|
|
@ -1230,6 +1230,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
carsLoadEntity.setIsSettlement("1"); |
|
|
|
carsLoadEntity.setIsSettlement("1"); |
|
|
|
carsLoadEntity.setCostAllocationType("0"); |
|
|
|
carsLoadEntity.setCostAllocationType("0"); |
|
|
|
carsLoadEntity.setIsAbnormal(0); |
|
|
|
carsLoadEntity.setIsAbnormal(0); |
|
|
|
|
|
|
|
carsLoadEntity.setIsCustomer("2"); |
|
|
|
boolean saveCarsLoad = save(carsLoadEntity); |
|
|
|
boolean saveCarsLoad = save(carsLoadEntity); |
|
|
|
if (!saveCarsLoad) { |
|
|
|
if (!saveCarsLoad) { |
|
|
|
log.warn("##############saveNew: 保存配载计划失败"); |
|
|
|
log.warn("##############saveNew: 保存配载计划失败"); |
|
|
@ -2694,6 +2695,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
carsLoadScanEntity.setNum(enterNum); |
|
|
|
carsLoadScanEntity.setNum(enterNum); |
|
|
|
carsLoadScanEntity.setIsSupple(0); |
|
|
|
carsLoadScanEntity.setIsSupple(0); |
|
|
|
carsLoadScanEntity.setLoadingAbnormal(isAbnormal); |
|
|
|
carsLoadScanEntity.setLoadingAbnormal(isAbnormal); |
|
|
|
|
|
|
|
carsLoadScanEntity.setUnloadAbnormal(0); |
|
|
|
|
|
|
|
carsLoadScanEntity.setUnloadCheck(0); |
|
|
|
carsLoadScanEntity.setType(2); |
|
|
|
carsLoadScanEntity.setType(2); |
|
|
|
carsLoadScanEntity.setIsData(isData); |
|
|
|
carsLoadScanEntity.setIsData(isData); |
|
|
|
carsLoadScanEntity.setTrayId(trayId); |
|
|
|
carsLoadScanEntity.setTrayId(trayId); |
|
|
@ -4531,15 +4534,18 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
List<TrunklineCarsOrderEntity> list = collect.get(signOrderId); |
|
|
|
List<TrunklineCarsOrderEntity> list = collect.get(signOrderId); |
|
|
|
TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity = signOrderEntityMap.get(signOrderId); |
|
|
|
TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity = signOrderEntityMap.get(signOrderId); |
|
|
|
//把list中所有元素的realNum求和
|
|
|
|
//把list中所有元素的realNum求和
|
|
|
|
int sum = list.stream().mapToInt(TrunklineCarsOrderEntity::getRealNum).sum(); |
|
|
|
int sumLoading = list.stream().mapToInt(TrunklineCarsOrderEntity::getRealNum).sum(); |
|
|
|
|
|
|
|
int sumPlan = list.stream().mapToInt(TrunklineCarsOrderEntity::getPlanNum).sum(); |
|
|
|
Integer planNum = trunklineLoadSignOrderEntity.getPlanNum(); |
|
|
|
Integer planNum = trunklineLoadSignOrderEntity.getPlanNum(); |
|
|
|
|
|
|
|
Integer loadingNum = trunklineLoadSignOrderEntity.getLoadingNum(); |
|
|
|
Integer signNum = trunklineLoadSignOrderEntity.getSignNum(); |
|
|
|
Integer signNum = trunklineLoadSignOrderEntity.getSignNum(); |
|
|
|
if(sum < planNum){ |
|
|
|
if(sumPlan < planNum){ |
|
|
|
//只是更新不删除
|
|
|
|
//只是更新不删除
|
|
|
|
TrunklineLoadSignOrderEntity updateSignOrderEntity = new TrunklineLoadSignOrderEntity(); |
|
|
|
TrunklineLoadSignOrderEntity updateSignOrderEntity = new TrunklineLoadSignOrderEntity(); |
|
|
|
updateSignOrderEntity.setId(trunklineLoadSignOrderEntity.getId()); |
|
|
|
updateSignOrderEntity.setId(trunklineLoadSignOrderEntity.getId()); |
|
|
|
int diff = planNum - sum; |
|
|
|
int diff = planNum - sumPlan; |
|
|
|
updateSignOrderEntity.setPlanNum(diff); |
|
|
|
updateSignOrderEntity.setPlanNum(diff); |
|
|
|
|
|
|
|
updateSignOrderEntity.setLoadingNum(loadingNum-sumLoading); |
|
|
|
if(signNum >= diff){ |
|
|
|
if(signNum >= diff){ |
|
|
|
updateSignOrderEntity.setSignStatus("20"); |
|
|
|
updateSignOrderEntity.setSignStatus("20"); |
|
|
|
}else if(signNum == 0){ |
|
|
|
}else if(signNum == 0){ |
|
|
@ -4555,6 +4561,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
|
|
|
|
|
|
|
|
list.forEach(e -> { |
|
|
|
list.forEach(e -> { |
|
|
|
TrunklineCarsOrderEntity carsOrderEntity = new TrunklineCarsOrderEntity(); |
|
|
|
TrunklineCarsOrderEntity carsOrderEntity = new TrunklineCarsOrderEntity(); |
|
|
|
|
|
|
|
carsOrderEntity.setId(e.getId()); |
|
|
|
carsOrderEntity.setOrderCode(e.getOrderCode()); |
|
|
|
carsOrderEntity.setOrderCode(e.getOrderCode()); |
|
|
|
carsOrderEntity.setWaybillNo(e.getWaybillNo()); |
|
|
|
carsOrderEntity.setWaybillNo(e.getWaybillNo()); |
|
|
|
carsOrderEntity.setLoadId(finalLoadId1); |
|
|
|
carsOrderEntity.setLoadId(finalLoadId1); |
|
|
|