From a8de159170c83ffd0eceff935f3a59608afeee8e Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Sat, 16 Dec 2023 15:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E8=A3=85=E8=BD=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionParcelListMapper.java | 6 ++++++ .../mapper/DistributionParcelListMapper.xml | 6 ++++++ .../service/IDistributionAsyncService.java | 8 +++++++- .../impl/DistributionAsyncServiceImpl.java | 15 +++++++++------ .../impl/DistributionDeliveryListServiceImpl.java | 13 +++++++++++-- 5 files changed, 39 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index cb5c9b551..f25c8eee1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -128,4 +128,10 @@ public interface DistributionParcelListMapper extends BaseMapper packageIds); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index 8fd772098..92d22e688 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -878,6 +878,12 @@ set order_package_status = #{orderPackageStatus} where id = #{packageId} + + UPDATE logpm_distribution_parcel_list SET order_package_loading_status = 20 WHERE id IN + + #{item} + + 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 8d52007a1..2c9f6d5a9 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 @@ -207,7 +207,7 @@ public interface IDistributionAsyncService { /** * 维护订单预约、装车状态 - * @param parcelListEntity + * @param packageId */ void checkReservationStatusAndLoadingStatusByPackage(Long packageId); @@ -258,4 +258,10 @@ public interface IDistributionAsyncService { * @param orderPackageId */ void checkRetentionZeroPackageReservationAndDeliveryInfo(Long reservationId, Long deliveryId, Long orderPackageId, Long orderId); + + /** + * 批量修改包件装车状态 + * @param updatePackageList + */ + void updatepackageListLoadingStatus(List updatePackageList); } 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 089cb074a..e805f8fe4 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 @@ -905,12 +905,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } @Override - public void checkOrderLoadingStatus(Long packageId) { - DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(packageId); - parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); - distributionParcelListService.updateById(parcelListEntity); - if (Func.isNotEmpty(parcelListEntity)) { - DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); + public void checkOrderLoadingStatus(Long orderId) { + if (Func.isNotEmpty(orderId)) { + DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(orderId); Integer orderLoadingNum = distributionLoadscanMapper.selectOrderLoadingNum(stockArticleEntity.getId()); if (Func.isNotEmpty(orderLoadingNum) && orderLoadingNum > 0) { if (stockArticleEntity.getTotalNumber() == orderLoadingNum) { @@ -1342,6 +1339,12 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { maintenanceDeliveryPackageNum(deliveryId); } + @Override + public void updatepackageListLoadingStatus(List updatePackageList) { + List packageIds = updatePackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); + Integer i = distributionParcelListMapper.updatePackageListByIds(packageIds); + } + /** * 维护配送数量和状态 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 11019ff1d..2f8e354a0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -1402,6 +1402,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { + List updatePackageList = new ArrayList<>(); List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId()); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { DistributionLoadscanEntity packageLoadingScan = distributionLoadscanService.getOne(Wrappers.query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); @@ -1503,12 +1505,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl