From 3784f0e5f866f244179d4ee305acb81992220bc3 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 13 Jun 2024 18:10:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/IDistributionAsyncService.java | 6 ++++++ .../impl/DistributionAsyncServiceImpl.java | 19 +++++++++++++++++++ .../DistributionStockArticleServiceImpl.java | 2 +- .../DistrilbutionBillLadingServiceImpl.java | 2 ++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java index 8a02e85ef..72c7b7b63 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java @@ -351,4 +351,10 @@ public interface IDistributionAsyncService { * @param s */ void sendFactorySignforInfo(String s,BasicdataWarehouseEntity warehouse,BladeUser user); + + /** + * 异步维护取消自提的单子信息 + * @param ids + */ + void maintenanceCancelBillLading(List ids); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index cff27365e..c4111c57b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -3066,6 +3066,25 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } } + @Override + public void maintenanceCancelBillLading(List ids) { + for (Long id : ids) { + List list = billPackageService.list(Wrappers.query().lambda() + .eq(DistrilbutionBillPackageEntity::getBillLadingId, id) + .eq(DistrilbutionBillPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (!list.isEmpty()) { + List packageIds = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); + distributionParcelListService.update(Wrappers.update().lambda() + .in(DistributionParcelListEntity::getId,packageIds) + .set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue()) + ); + List orderIds = list.stream().map(DistrilbutionBillPackageEntity::getStockArticleId).distinct().collect(Collectors.toList()); + distributionStockArticleService.maintenanceOrderInfoByIds(orderIds); + } + } + } + private void handlePushFactoryOrderIds(List orderIds, String s, BasicdataWarehouseEntity warehouse, BladeUser user) { if (!orderIds.isEmpty()) { List distributionStockArticleEntities = distributionStockArticleService.list(Wrappers.query().lambda() diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index d5b16c2e5..b838a02d5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -2217,7 +2217,6 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl 0) { stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); } @@ -2228,6 +2227,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl 0) { stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue()); } + } if (signingQuantity == 0) { stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); 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 8c5d071c9..3193c6120 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 @@ -942,6 +942,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl