|
@@ -67,6 +67,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
|
|
|
@Autowired
|
|
|
private TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
|
|
|
+ @Autowired
|
|
|
+ private TmstruckUnloadResultMapper tmstruckUnloadResultMapper;
|
|
|
|
|
|
/**
|
|
|
* 生成销售装车实绩(虚拟装车实绩)
|
|
@@ -203,6 +205,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
String capacityNumber = (String) mesMap.get("capacityNumber");
|
|
|
int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
|
|
|
BigDecimal resultTotalId = DataChange.dataToBigDecimal(mesMap.get("totalId"));
|
|
|
+ //装货时查询是否含有净重
|
|
|
+ Integer netWeight = tmstruckUnloadResultMapper.getNetWeightByTotalId(resultTotalId);
|
|
|
if(orderType == 11 || orderType == 15 || orderType == 16){
|
|
|
int sqe = DataChange.dataToBigDecimal(mesMap.get("Sqe")).intValue();
|
|
|
sqe = sqe + 1;
|
|
@@ -245,6 +249,13 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
if(dataMap == null){
|
|
|
return -3; //该订单没有装车作业
|
|
|
}
|
|
|
+ //获取该实绩的路段顺序号
|
|
|
+ BigDecimal segmentSqe = DataChange.dataToBigDecimal(dataMap.get("segmentSqe"));
|
|
|
+ //获取订单的路段顺序号
|
|
|
+ BigDecimal orderSegmentSqe = DataChange.dataToBigDecimal(mesMap.get("orderSegmentSqe"));
|
|
|
+ if(segmentSqe.intValue() > (orderSegmentSqe.intValue() + 1)){
|
|
|
+ return -6;
|
|
|
+ }
|
|
|
//查询装车实绩ID
|
|
|
map.putAll(dataMap);
|
|
|
tmstruckLoadResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
|
|
@@ -269,8 +280,13 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
|
|
|
}
|
|
|
// 更新装货点
|
|
|
tmstruckLoadResult.setLoadingId(DataChange.dataToBigDecimal(map.get("warehouseId")));
|
|
|
- //更新路段顺序号
|
|
|
- utilsService.updateOrderLineSequence(map);
|
|
|
+ if(netWeight == 0){ //如果没有净重 则更新路段顺序号 有则不更新
|
|
|
+ //路段顺序号 + 1
|
|
|
+ map.put("orderId", mesMap.get("orderId"));
|
|
|
+ utilsService.updateOrderLineSequence(map);
|
|
|
+ }
|
|
|
+ ////更新路段顺序号
|
|
|
+ //utilsService.updateOrderLineSequence(map);
|
|
|
//判断是否为未装货
|
|
|
if (map.get("insertUpdateRemark")!=null) {
|
|
|
String insertUpdateRemark = (String) map.get("insertUpdateRemark");
|