Commit 48ec7fb5 by huluobin

# 周转匹配平台规则

parent 85ce7b89
......@@ -153,5 +153,6 @@ public interface DcBaseOmsSkuMapper {
@Param("upperTime") LocalDateTime upperTime,
@Param("bailunSku") String bailunSku,
@Param("warehouseCode") String warehouseCode,
@Param("days") Integer days);
@Param("days") Integer days,
@Param("platform") String platform);
}
......@@ -3759,6 +3759,9 @@
and t1.has_platsku_remark = 0
and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled'
<if test="platform!=null and platform !=''">
and t1.platform_type = #{platform}
</if>
and t1.platform_order_type != '手工单'
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str)
where tt2.bailun_sku =#{bailunSku}
......@@ -3786,6 +3789,9 @@
and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单'
<if test="platform!=null and platform !=''">
and t1.platform_type = #{platform}
</if>
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str))
/ #{days}
-
......@@ -3808,6 +3814,9 @@
and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单'
<if test="platform!=null and platform !=''">
and t1.platform_type = #{platform}
</if>
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str)
where tt2.bailun_sku =#{bailunSku}
and tt2.warehouse_code = #{warehouseCode}
......
......@@ -28,6 +28,7 @@ import org.junit.jupiter.api.Test;
import org.junit.platform.commons.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.time.LocalDate;
......@@ -251,16 +252,16 @@ public class AutoTurnoverTest {
}
//LM-EO-007,MMDUSFBA
//LM-EO-007,MMDUSFBA
@Transactional
@Test
public void testXX2() {
DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class)
.selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo("950643503")
.andBailunSkuEqualTo("944579124")
.andWarehouseCodeEqualTo("GZBLWH")
.example());
try {
AutoTurnoverJob autoTurnoverJob = new AutoTurnoverJob();
autoTurnoverJob.autoTurnoverFromStock(DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now()), dcBaseStock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment