From b0d474c73776562733d4eb451057a688dd385a95 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 3 Jan 2024 17:59:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDistributionReservationStockarticleService.java | 2 +- .../service/impl/DistributionAsyncServiceImpl.java | 2 +- .../service/impl/DistributionDeliveryInfoServiceImpl.java | 8 +++++--- .../service/impl/DistributionDeliveryListServiceImpl.java | 2 +- .../DistributionReservationStockarticleServiceImpl.java | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java index 953231b18..647e1c228 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java @@ -63,5 +63,5 @@ public interface IDistributionReservationStockarticleService extends BaseService * 维护预约订单状态 * @param reservationId */ - void maintenanceReservationStockArticle(Long reservationId); + void maintenanceReservationStockArticle(Long reservationId,Long warehouseId); } 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 d78cfb1e7..cc9b97f9f 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 @@ -1561,7 +1561,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { //维护预约订单状态 - distributionReservationStockarticleService.maintenanceReservationStockArticle(reservationId); + distributionReservationStockarticleService.maintenanceReservationStockArticle(reservationId,warehouseId); } //存在库存品信息 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index 3b69294d3..2d61b4df3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -40,6 +40,7 @@ import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; import org.springblade.common.constant.reservation.ReservationOrderStatusConstant; +import org.springblade.common.exception.CustomerException; import org.springblade.common.serviceConstant.ServiceConstant; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; @@ -122,7 +123,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImplquery().lambda().eq(DistributionLoadscanEntity::getPackageId, p.getId()).eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode())); if (Func.isNotEmpty(loadscanEntity)) { try { - p.setLoadingTime(sdf.parse(loadscanEntity.getScanTime())); + p.setLoadingTime(loadscanEntity.getScanTime()); switch (loadscanEntity.getScanState().toString()) { case "1": p.setScanStatus(LoadingStatusConstant.quxiao.getName()); @@ -146,8 +147,9 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl>> 系统异常",e); + throw new CustomerException("系统异常,请联系管理员"); } } }); 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 5373e911a..346dfaa57 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 @@ -4099,7 +4099,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntities = this.list(Wrappers.query().lambda() .eq(DistributionReservationStockarticleEntity::getReservationId, reservationId) .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()) @@ -95,7 +95,7 @@ public class DistributionReservationStockarticleServiceImpl extends BaseServiceI List reservationOrderList = reservationStockarticleEntities.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).collect(Collectors.toList()); if (Func.isNotEmpty(reservationOrderList)){ for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationOrderList) { - List distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, reservationStockarticleEntity.getStockArticleId()); + List distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, reservationStockarticleEntity.getStockArticleId(),warehouseId); if (Func.isNotEmpty(distributionParcelListEntities)){ int sum = distributionParcelListEntities.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum(); if (sum == 0){