Commit 48ec7fb5 by huluobin

# 周转匹配平台规则

parent 85ce7b89
...@@ -153,5 +153,6 @@ public interface DcBaseOmsSkuMapper { ...@@ -153,5 +153,6 @@ public interface DcBaseOmsSkuMapper {
@Param("upperTime") LocalDateTime upperTime, @Param("upperTime") LocalDateTime upperTime,
@Param("bailunSku") String bailunSku, @Param("bailunSku") String bailunSku,
@Param("warehouseCode") String warehouseCode, @Param("warehouseCode") String warehouseCode,
@Param("days") Integer days); @Param("days") Integer days,
@Param("platform") String platform);
} }
...@@ -3759,6 +3759,9 @@ ...@@ -3759,6 +3759,9 @@
and t1.has_platsku_remark = 0 and t1.has_platsku_remark = 0
and t1.has_innersale = 0 and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled' and t1.bailun_order_status != 'Canceled'
<if test="platform!=null and platform !=''">
and t1.platform_type = #{platform}
</if>
and t1.platform_order_type != '手工单' and t1.platform_order_type != '手工单'
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str) GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str)
where tt2.bailun_sku =#{bailunSku} where tt2.bailun_sku =#{bailunSku}
...@@ -3786,6 +3789,9 @@ ...@@ -3786,6 +3789,9 @@
and t1.has_innersale = 0 and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled' and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单' 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)) GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str))
/ #{days} / #{days}
- -
...@@ -3808,6 +3814,9 @@ ...@@ -3808,6 +3814,9 @@
and t1.has_innersale = 0 and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled' and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单' 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) GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str)
where tt2.bailun_sku =#{bailunSku} where tt2.bailun_sku =#{bailunSku}
and tt2.warehouse_code = #{warehouseCode} and tt2.warehouse_code = #{warehouseCode}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<configuration> <configuration>
<!--<properties resource="db-tj.properties"/>--> <!--<properties resource="db-tj.properties"/>-->
<!-- <properties resource="db-dev.properties"/>--> <!-- <properties resource="db-dev.properties"/>-->
<properties resource="db-prod.properties"/> <properties resource="db-prod.properties"/>
<settings> <settings>
<setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="mapUnderscoreToCamelCase" value="true"/>
......
...@@ -28,6 +28,7 @@ import org.junit.jupiter.api.Test; ...@@ -28,6 +28,7 @@ import org.junit.jupiter.api.Test;
import org.junit.platform.commons.util.StringUtils; import org.junit.platform.commons.util.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate; import java.time.LocalDate;
...@@ -251,16 +252,16 @@ public class AutoTurnoverTest { ...@@ -251,16 +252,16 @@ public class AutoTurnoverTest {
} }
//LM-EO-007,MMDUSFBA
//LM-EO-007,MMDUSFBA
@Transactional
@Test @Test
public void testXX2() { public void testXX2() {
DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class) DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class)
.selectOneByExample(DcBaseStockExample.newAndCreateCriteria() .selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo("950643503") .andBailunSkuEqualTo("944579124")
.andWarehouseCodeEqualTo("GZBLWH") .andWarehouseCodeEqualTo("GZBLWH")
.example()); .example());
try { try {
AutoTurnoverJob autoTurnoverJob = new AutoTurnoverJob(); AutoTurnoverJob autoTurnoverJob = new AutoTurnoverJob();
autoTurnoverJob.autoTurnoverFromStock(DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now()), dcBaseStock); 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