From a184b4f78cdba57c72cfac7eab3c22e4a9a767f8 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 24 Oct 2024 17:17:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=85=8D=E8=BD=BD=E5=8D=B8=E8=BD=A6=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/patch/jobhandle/SyncOrderInfoToPlatform.java | 9 +++++---- .../service/impl/TrunklineCarsLoadServiceImpl.java | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java index b8eca629b..dd2235042 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java @@ -1002,11 +1002,10 @@ public class SyncOrderInfoToPlatform { //查询所有装车明细 List carsLoadScanEntities = carsLoadScanClient.findAllListByLoadId(loadId); - List scanloadIdList = carsLoadScanEntities.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList()); - + List scanloadIdList = new ArrayList<>(); //把carsLoadScanEntities通过unloadNodeId分组 - Map> collect = carsLoadScanEntities.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getUnloadNodeId)); + Map> collect = carsLoadScanEntities.stream().filter(s -> !Objects.isNull(s.getUnloadNodeId())).collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getUnloadNodeId)); collect.keySet().forEach(unloadNodeId -> { List trunklineCarsLoadScanEntities = collect.get(unloadNodeId); @@ -1026,7 +1025,9 @@ public class SyncOrderInfoToPlatform { }); }); - carsLoadScanClient.removeLoadScanByIds(scanloadIdList); + if(CollUtil.isNotEmpty(scanloadIdList)){ + carsLoadScanClient.removeLoadScanByIds(scanloadIdList); + } carsLoadClient.updateCardLoadNum(loadId); 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 ea7d99f26..c72b8dc88 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 @@ -8790,6 +8790,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl neloadScanQueryWrapper = new QueryWrapper<>(); neloadScanQueryWrapper.eq("load_id", loadId) .eq("scan_code", orderPackageCode) + .eq("unload_node_id", warehouseId) .ne("scan_status", "1"); TrunklineCarsLoadScanEntity scanEntity = trunklineCarsLoadScanService.getOne(neloadScanQueryWrapper);