diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index dee90834d..dbd82f7df 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1230,6 +1230,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl list = collect.get(signOrderId); TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity = signOrderEntityMap.get(signOrderId); //把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 loadingNum = trunklineLoadSignOrderEntity.getLoadingNum(); Integer signNum = trunklineLoadSignOrderEntity.getSignNum(); - if(sum < planNum){ + if(sumPlan < planNum){ //只是更新不删除 TrunklineLoadSignOrderEntity updateSignOrderEntity = new TrunklineLoadSignOrderEntity(); updateSignOrderEntity.setId(trunklineLoadSignOrderEntity.getId()); - int diff = planNum - sum; + int diff = planNum - sumPlan; updateSignOrderEntity.setPlanNum(diff); + updateSignOrderEntity.setLoadingNum(loadingNum-sumLoading); if(signNum >= diff){ updateSignOrderEntity.setSignStatus("20"); }else if(signNum == 0){ @@ -4555,6 +4561,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl { TrunklineCarsOrderEntity carsOrderEntity = new TrunklineCarsOrderEntity(); + carsOrderEntity.setId(e.getId()); carsOrderEntity.setOrderCode(e.getOrderCode()); carsOrderEntity.setWaybillNo(e.getWaybillNo()); carsOrderEntity.setLoadId(finalLoadId1);