|
@@ -3,10 +3,9 @@ package com.steerinfo.dil.service.impl;
|
|
|
import com.steerinfo.dil.feign.OmsFeign;
|
|
|
import com.steerinfo.dil.feign.WMSFeign;
|
|
|
import com.steerinfo.dil.feign.WmshBoundFeign;
|
|
|
-import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
|
|
|
-import com.steerinfo.dil.mapper.TmstruckLoadResultMapper;
|
|
|
-import com.steerinfo.dil.mapper.TmstruckReturnResultMapper;
|
|
|
-import com.steerinfo.dil.mapper.UtilsMapper;
|
|
|
+import com.steerinfo.dil.mapper.*;
|
|
|
+import com.steerinfo.dil.model.TmstruckEnfactoryResult;
|
|
|
+import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
|
|
|
import com.steerinfo.dil.model.TmstruckLoadResult;
|
|
|
import com.steerinfo.dil.service.ITmstruckLoadResultService;
|
|
|
import com.steerinfo.dil.util.DataChange;
|
|
@@ -46,7 +45,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
private UtilsServiceImpl utilsService;
|
|
|
|
|
|
@Autowired
|
|
|
- private RulesServiceImpl rulesService;
|
|
|
+ private TmstruckLeaveFactoryResultMapper tmstruckLeaveFactoryResultMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private WmshBoundFeign wmshBoundFeign;
|
|
@@ -114,18 +113,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
- //判断装货是否含有备注
|
|
|
- @Override
|
|
|
- public int loadJudge(Map<String, Object> map) {
|
|
|
- int i=0;
|
|
|
- //判断装货实绩是否含有未装货备注
|
|
|
- BigDecimal orderId =(BigDecimal) map.get("orderId");
|
|
|
- BigDecimal lineId =(BigDecimal) map.get("lineId");
|
|
|
- //获得最大路段顺序号
|
|
|
- Integer maxSeq = tmstruckLoadResultMapper.Maxseq(lineId);
|
|
|
- i = tmstruckLoadResultMapper.updateSqe(maxSeq - 1,orderId);
|
|
|
- return i;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 新增采购装车实绩 / 内转装车实绩
|
|
@@ -296,7 +285,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
if (map.get("insertUpdateRemark")!=null) {
|
|
|
String insertUpdateRemark = (String) map.get("insertUpdateRemark");
|
|
|
if("未装货".equals(insertUpdateRemark)){
|
|
|
-// loadJudge(orderMap);
|
|
|
+ loadJudge(orderMap);
|
|
|
}
|
|
|
tmstruckLoadResult.setInsertUpdateRemark(insertUpdateRemark);
|
|
|
}
|
|
@@ -308,6 +297,30 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
return i;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 更改最大路段顺序号 -1
|
|
|
+ * @Author TXF
|
|
|
+ * @Date 2022/2/13 12:59
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+ @Override
|
|
|
+ public int loadJudge(Map<String, Object> map) {
|
|
|
+ BigDecimal orderId =DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
+ //查找当前订单共有几次出厂
|
|
|
+ List<Integer> resultIdList = tmstruckLoadResultMapper.allOutFactoryNum(orderId);
|
|
|
+ if(resultIdList.size() > 1){
|
|
|
+ for(int i = 0; i < resultIdList.size() - 1; i ++){
|
|
|
+ //给最后一次出厂 之外的出厂实绩 赋值出厂时间
|
|
|
+ TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult = new TmstruckLeaveFactoryResult();
|
|
|
+ tmstruckLeaveFactoryResult.setResultId(new BigDecimal(resultIdList.get(i)));
|
|
|
+ tmstruckLeaveFactoryResult.setResultOutMode("未装货出厂");
|
|
|
+ tmstruckLeaveFactoryResult.setResultOutGateTime(new Date());
|
|
|
+ tmstruckLeaveFactoryResultMapper.updateByPrimaryKeySelective(tmstruckLeaveFactoryResult);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return tmstruckLoadResultMapper.updateSqe(orderId);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 添加装车标准时长ID
|