diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index f79912342..4f38a765d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -1119,6 +1119,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl packageIds = new ArrayList<>(); + List finalPackageIds = packageIds; distrilbutionBillLading.getBillPackageEntityList().stream().collect(Collectors.groupingBy(DistrilbutionBillPackageEntity::getStockArticleId)) .forEach((k, v) -> { List list = distrilbutionBillPackageService.list(Wrappers.query().lambda() @@ -1153,7 +1155,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl collect = packageEntityList.stream().map(i -> i.getParceListId()).collect(Collectors.toList()); @@ -1176,10 +1178,30 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl distributionParcelListEntities = distributionParcelListService.listByIds(packageIds); + String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).collect(Collectors.joining(",")); + List warehouseIds = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getWarehouseId).distinct().collect(Collectors.toList()); + if (!warehouseIds.isEmpty()){ + if (warehouseIds.size() == 1){ + distributionStockArticleService.maintenanceOrderInfo(orderCodes,warehouseIds.get(0)); + }else { + log.error("#################自提订制品包件缺失warehouseId错误warehouseIds:{}",warehouseIds); + throw new ServiceException("修改失败!!!"); + } + }else { + log.error("#################自提订制品包件缺失warehouseId信息packageIds:{}",packageIds); + throw new ServiceException("修改失败!!!"); + } + } return true; } @@ -1252,6 +1274,14 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl