From bc1c32d9f909aa4039bf81acd351227b255d7022 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 18 Jul 2024 11:42:36 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TrunklineCarsLoadServiceImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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);