From 7519b0c3099ad6e4e7618c06a7e39b1907702106 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 25 Mar 2025 17:08:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=A4=87=E8=B4=A7BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionStockupServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index d96de1ad7..dd2c7b160 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -6334,7 +6334,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); @@ -6353,6 +6357,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); } }