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()));