Commit c11ab3182765e20ff7f8efee01db9e6f6e039c07

Authored by chenhang4442024
1 parent 569e9e3c

fix:1.复制跟单信息和质检信息时,计算时间不再从当前时间计算,而是从当时创建订单的时间来计算。

2.复制时,取消对于质检信息中过滤。
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
@@ -2282,18 +2282,19 @@ end @@ -2282,18 +2282,19 @@ end
2282 redisUtils.set(orderBaseInfoDo.getCustomerStyle()+Constant.CROSS_BAR_CHARACTER+resultText, "1", 90, TimeUnit.DAYS); 2282 redisUtils.set(orderBaseInfoDo.getCustomerStyle()+Constant.CROSS_BAR_CHARACTER+resultText, "1", 90, TimeUnit.DAYS);
2283 } 2283 }
2284 } 2284 }
2285 - //查询最近四个月的数据。(之前设置三个月太少了!) 2285 + //查询创建时间在4天的数据
2286 private List<OrderBaseInfoDO> getTwoMonthOrderBaseInfo(OrderBaseInfoDO orderBaseInfoDo){ 2286 private List<OrderBaseInfoDO> getTwoMonthOrderBaseInfo(OrderBaseInfoDO orderBaseInfoDo){
2287 - LocalDateTime now = LocalDateTime.now();  
2288 - LocalDateTime twoMonthsAgo = now.minusMonths(4); 2287 + LocalDateTime createTime = orderBaseInfoDo.getCreateTime();
  2288 + LocalDateTime twoFeatureDay = createTime.plusDays(2);
  2289 + LocalDateTime twoAgoDay = createTime.minusDays(2);
2289 List<OrderBaseInfoDO> orderBaseInfoDOList; 2290 List<OrderBaseInfoDO> orderBaseInfoDOList;
2290 //这部分代码的目的是,遇到相同style的订单,他们只需要填写其中任何一个订单的跟单信息,就会填写的跟单信息复制到其他订单上。 2291 //这部分代码的目的是,遇到相同style的订单,他们只需要填写其中任何一个订单的跟单信息,就会填写的跟单信息复制到其他订单上。
2291 if(Constant.STRING_ZERO.equals(orderBaseInfoDo.getReturnOrder())){ 2292 if(Constant.STRING_ZERO.equals(orderBaseInfoDo.getReturnOrder())){
2292 //查询所有相同的style的并且不是返单的订单。 2293 //查询所有相同的style的并且不是返单的订单。
2293 - orderBaseInfoDOList = baseMapper.sameAttributeOrder(orderBaseInfoDo.getCustomerStyle(), orderBaseInfoDo.getInnerNo(), Constant.STRING_ZERO, twoMonthsAgo, now); 2294 + orderBaseInfoDOList = baseMapper.sameAttributeOrder(orderBaseInfoDo.getCustomerStyle(), orderBaseInfoDo.getInnerNo(), Constant.STRING_ZERO, twoAgoDay,twoFeatureDay);
2294 }else{ 2295 }else{
2295 //查询所有相同的style的并且是返单的订单。 2296 //查询所有相同的style的并且是返单的订单。
2296 - orderBaseInfoDOList = baseMapper.sameAttributeOrder(orderBaseInfoDo.getCustomerStyle(), orderBaseInfoDo.getInnerNo(), Constant.STRING_ONE, twoMonthsAgo, now); 2297 + orderBaseInfoDOList = baseMapper.sameAttributeOrder(orderBaseInfoDo.getCustomerStyle(), orderBaseInfoDo.getInnerNo(), Constant.STRING_ONE, twoAgoDay, twoFeatureDay);
2297 } 2298 }
2298 //如果一个都没有查询出来,就说明创建订单时创建质检信息,到现在已经距离四个月了,所以连自己都没有查询出来,这个时候就把自己传过去,避免一个都没有。 2299 //如果一个都没有查询出来,就说明创建订单时创建质检信息,到现在已经距离四个月了,所以连自己都没有查询出来,这个时候就把自己传过去,避免一个都没有。
2299 if(CollectionUtils.isEmpty(orderBaseInfoDOList)){ 2300 if(CollectionUtils.isEmpty(orderBaseInfoDOList)){
src/main/resources/mapper/OrderBaseInfoMapper.xml
@@ -127,10 +127,6 @@ @@ -127,10 +127,6 @@
127 obi.return_order = #{isReturnOrder} 127 obi.return_order = #{isReturnOrder}
128 AND 128 AND
129 obi.create_time BETWEEN #{monthsAgo} AND #{now} 129 obi.create_time BETWEEN #{monthsAgo} AND #{now}
130 - AND  
131 - (opa.mid_check_apply_time IS NULL  
132 - OR  
133 - opa.mid_check_result IS NULL)  
134 </select> 130 </select>
135 131
136 <select id="countRecentYearByOrderInit" resultType="java.lang.Long"> 132 <select id="countRecentYearByOrderInit" resultType="java.lang.Long">