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 e2fbe3ee7..951e19b35 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 @@ -206,10 +206,10 @@ public interface IDistributionAsyncService { void checkOrderLoadingStatus(Long packageId); /** - * 维护包件、订单预约状态 + * 维护订单预约、装车状态 * @param parcelListEntity */ - void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity); + void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity); /** * 修改零担备货状态 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 867ee85da..da6100326 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 @@ -886,22 +886,33 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } @Override - public void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity) { + public void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity) { List parcelListEntities = distributionParcelListService.list(Wrappers.query().lambda() .eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId())); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); - boolean flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue())); - if (flag) { + boolean reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue())); + if (reservationStatusFlag) { stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue()); } else { - flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue())); - if (flag) { + reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue())); + if (reservationStatusFlag) { stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue()); } else { stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue()); } } + boolean loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); + if (loadingStatusFlag) { + stockArticleEntity.setOrderStatus(OrderStatusConstant.chuku.getValue()); + } else { + loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())); + if (loadingStatusFlag) { + stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); + } else { + stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenchuku.getValue()); + } + } distributionStockArticleService.updateById(stockArticleEntity); } @@ -1169,6 +1180,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } } } + //维护预约的预约数量 maintenanceReservationPackageNum(reservationId); maintenanceDeliveryPackageNum(deliveryId); 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 f67aa8d85..3b7de90d2 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 @@ -5355,6 +5355,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl exportWarehouseRetentionRecord(Map paramMap) { - // 获取当前登录的仓库信息 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if (ObjectUtils.isNull(myCurrentWarehouse)) {