From 70ea2416ada88e83bd06f5b236b2e0a538c4f2ce Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Sun, 7 Apr 2024 14:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=8F=96=E6=B6=88BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistrilbutionBillLadingServiceImpl.java | 15 ++++++++++++++- 1 file changed, 14 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 6af3dd11c..9b8937230 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 @@ -1034,6 +1034,19 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl packageIds = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); //将这些包件还原成可操作状态 Integer num = distributionParcelListService.restorePakcageByIds(packageIds); + log.info("######################取消自提单释放包件>>>>>:{}",num); + ids.forEach(id ->{ + //查询自提单存在的零担订单 + List reservationZeroPackageEntities = distributionZeroPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationZeroPackageEntity::getReservationId, id) + .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, "2") + ); + if (Func.isNotEmpty(reservationZeroPackageEntities)){ + List collect = reservationZeroPackageEntities.stream().map(DistributionReservationZeroPackageEntity::getStockArticleId).distinct().collect(Collectors.toList()); + //释放零担资源 + distributionZeroPackageService.recoverZeroPackage(id,collect); + } + }); //维护订单状态 String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(",")); distributionStockArticleService.maintenanceOrderInfo(orderCodes, myCurrentWarehouse.getId()); @@ -1058,7 +1071,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl updateWrapper = new UpdateWrapper<>(); updateWrapper.lambda() - .set(DistributionDeliveryDetailsEntity::getInventoryStatus, 3) + .set(DistributionDeliveryDetailsEntity::getInventoryStatus, 2) .set(DistributionDeliveryDetailsEntity::getQuantity, 0) .in(DistributionDeliveryDetailsEntity::getBillLadingId, ids); distributionDeliveryDetailsService.update(updateWrapper);