From edac02738ed3acd8d879e84fa97803204201e4ee Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 4 Apr 2024 01:04:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=87=AA=E6=8F=90=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E9=9B=B6=E6=8B=85=E8=AE=A2=E5=8D=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistrilbutionBillLadingServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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..de8d0d782 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 @@ -1252,6 +1252,14 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl Date: Thu, 4 Apr 2024 01:17:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=87=AA=E6=8F=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8C=85=E4=BB=B6=E5=92=8C=E6=96=B0=E5=A2=9E=E5=8C=85=E4=BB=B6?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistrilbutionBillLadingServiceImpl.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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 de8d0d782..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; }