From f4038e4445a11815de8dfea89ca05c46bbbc3678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BE=99?= Date: Thu, 3 Apr 2025 10:27:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=86=E5=8D=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DistributionSplitOrderTaskServiceImpl.java | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java index c2c84e910..199b06d08 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java @@ -137,10 +137,9 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl packageAllowCount ? packageAllowCount : packageAllowCount - 1; if (packageAllowCount < taskNumber) { - return R.fail("拆单包件数量不足,请重新填写,目前可拆单数量:" + tipNumber); - } - if (packageAllCount <= taskNumber) { - return R.fail("拆单数需要小于订单总数量,请重新填写,目前可拆单数量:" + tipNumber); + return R.fail("拆单包件数量不足,请重新填写,目前可拆单数量:" + packageAllowCount); } taskLock(stockArticleId, () -> { @@ -272,7 +267,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpllambdaQuery() .in(DistributionParcelListEntity::getOrderPackageCode, packageCodes) - .ne(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue()) + .eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) .eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) .eq(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) .eq(DistributionParcelListEntity::getOrderPackageFreezeStatus, OrderPackageFreezeStatusConstant.weidongjie.getValue()) @@ -977,15 +972,19 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpllambdaQuery() .in(DistributionParcelListEntity::getStockArticleId, stockArticleId) - .ne(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue()) + .eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) .eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) .eq(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) .eq(DistributionParcelListEntity::getOrderPackageFreezeStatus, OrderPackageFreezeStatusConstant.weidongjie.getValue()) .eq(DistributionParcelListEntity::getIsTransfer, 0) ); + + return allowCount >= splitOrderAllCount ? allowCount - 1 : allowCount; } public long getSplitOrderAllCount(Long stockArticleId) { @@ -1020,10 +1019,9 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl