From 13cb6d826593e240f44a5aedfa904ab456a0e1d0 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 10 Jul 2024 15:12:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=94=B6=E8=B4=A7=E5=8D=95=E4=BD=8D=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/BasicdataTripartiteMallMapper.xml | 1 + .../trunkline/mapper/TrunklineAdvanceMapper.xml | 2 +- .../service/impl/InComingServiceImpl.java | 15 +++++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml index e8331fb53..b13846305 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml @@ -52,6 +52,7 @@ from logpm_basicdata_tripartite_mall where tripartite_mall = #{name} and brand_name = #{brand} + and is_deleted = 0 and tripartite_coding = #{code} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml index 8368b1b30..4fa61a11b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml @@ -15,7 +15,7 @@ select lta.*, lbc.client_name htMallName from logpm_trunkline_advance lta - left join logpm_basicdata_tripartite_mall lbtm on lbtm.tripartite_mall = lta.dealer_name and lbtm.brand_name = lta.brand and IFNULL(lta.dealer_code,'') = IFNULL(lbtm.tripartite_coding,'') + left join logpm_basicdata_tripartite_mall lbtm on lbtm.tripartite_mall = lta.dealer_name and lbtm.brand_name = lta.brand and IFNULL(lta.dealer_code,'') = IFNULL(lbtm.tripartite_coding,'') and lbtm.is_deletd = 0 left join logpm_basicdata_client lbc on lbc.id = lbtm.client_id where lta.is_deleted = 0 and lta.waybill_status = 0 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java index 6ec13746f..aac2f069d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java @@ -699,13 +699,16 @@ public class InComingServiceImpl implements IInComingService { Set waybillIdSet = map.keySet(); - List waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet)); - waybillEntityList.forEach(wb -> { - Integer totalCount = wb.getTotalCount(); - Integer stockCount = wb.getStockCount(); - openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); - }); + + if(CollUtil.isNotEmpty(waybillIdSet)){ + List waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet)); + waybillEntityList.forEach(wb -> { + Integer totalCount = wb.getTotalCount(); + Integer stockCount = wb.getStockCount(); + openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); + }); + } //把waybillEntityList转化成id为key的Map // Map waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getId, Function.identity()));