From 15d4bbfb0833b5dd844066eaaf373647d0eb2978 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 8 Aug 2024 16:29:47 +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 --- .../AftersalesAbnormalRecordServiceImpl.java | 32 +++++++++++++++- .../impl/TrunklineCarsLoadServiceImpl.java | 2 +- .../TrunklineWaybillPackageServiceImpl.java | 38 ++++++++++--------- 3 files changed, 52 insertions(+), 20 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java index 60122f6fa..6c0931497 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java @@ -13,8 +13,12 @@ import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; +import com.logpm.trunkline.dto.AddWaybillTrackDTO; import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; import com.logpm.trunkline.feign.ITrunklineCarsLoadScanClient; +import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient; +import com.logpm.warehouse.entity.WarehouseWaybillEntity; +import com.logpm.warehouse.feign.IWarehouseWaybillClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.utils.CommonUtil; @@ -43,6 +47,10 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl page = new Page<>(); @@ -268,7 +276,7 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl waybillPackageEntities = new ArrayList<>(); - Set waybillIds = new HashSet<>(); - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("order_package_code",orderPackageCodes) - .eq("is_deleted",0); - List trunklineWaybillPackageEntities = baseMapper.selectList(queryWrapper); - if(!trunklineWaybillPackageEntities.isEmpty()){ - for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : trunklineWaybillPackageEntities) { - trunklineWaybillPackageEntity.setPackageStatus(packageStatus); - waybillIds.add(trunklineWaybillPackageEntity.getWaybillId()); - } + if(CollUtil.isNotEmpty(orderPackageCodes)){ + if(!Objects.isNull(packageStatus)){ + List waybillPackageEntities = new ArrayList<>(); + Set waybillIds = new HashSet<>(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("order_package_code",orderPackageCodes) + .eq("is_deleted",0); + List trunklineWaybillPackageEntities = baseMapper.selectList(queryWrapper); + if(!trunklineWaybillPackageEntities.isEmpty()){ + for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : trunklineWaybillPackageEntities) { + trunklineWaybillPackageEntity.setPackageStatus(packageStatus); + waybillIds.add(trunklineWaybillPackageEntity.getWaybillId()); + } - updateBatchById(trunklineWaybillPackageEntities); + updateBatchById(trunklineWaybillPackageEntities); - for (Long waybillId : waybillIds) { - WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId); - updateWaybillStatus(waybillEntity); + for (Long waybillId : waybillIds) { + WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId); + updateWaybillStatus(waybillEntity); + } } } - } - packageTrackLogAsyncService.sendPackageWorkNodeFanout(orderPackageCodes,workNode,warehouseId, map); + packageTrackLogAsyncService.sendPackageWorkNodeFanout(orderPackageCodes,workNode,warehouseId, map); + } } }