From 8c21c6bfa846ba688e30f49be6aa653db60c83f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 9 Feb 2026 18:14:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=93=8D=E4=BD=9C=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E5=A4=84=E7=90=86;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/HandoverTaskOrderDomainService.java | 3 +++ .../service/StockShelfOrderDomainService.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java index c7ef7ca8e..065580e24 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java @@ -196,10 +196,13 @@ public class HandoverTaskOrderDomainService { MaterialInventory materialInventoryPO = materialInventoryMapper.selectById(materialInventoryId); if (materialInventoryPO != null) { //更新库存数量 + //库存数量 BigDecimal oldInventoryQuantity = materialInventoryPO.getInventoryQuantity(); + oldInventoryQuantity = oldInventoryQuantity != null ? oldInventoryQuantity : BigDecimal.ZERO; //冻结数量 BigDecimal oldFreezeQuantity = materialInventoryPO.getFreezeQuantity(); + oldFreezeQuantity = oldFreezeQuantity != null ? oldFreezeQuantity : BigDecimal.ZERO; //分配后库存数量 BigDecimal newInventoryQuantity = oldInventoryQuantity.subtract(checkQuantity); //分配后冻结数量 diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java index 16d33a87b..c641472fb 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java @@ -541,10 +541,14 @@ public class StockShelfOrderDomainService { BigDecimal shelvesQuantity = shelfMaterialDetail.getShelvesQuantity(); shelvesQuantity = shelvesQuantity != null ? shelvesQuantity : BigDecimal.ZERO; MaterialInventoryPO materialInventoryPO = materialInventoryPOS.get(0); - BigDecimal newInventoryQuantity = materialInventoryPO.getInventoryQuantity().add(shelvesQuantity); + BigDecimal oldInventoryQuantity = materialInventoryPO.getInventoryQuantity(); - BigDecimal newAllocationQuantity = materialInventoryPO.getAllocationQuantity().add(shelvesQuantity); + oldInventoryQuantity = oldInventoryQuantity != null ? oldInventoryQuantity : BigDecimal.ZERO; + BigDecimal newInventoryQuantity = oldInventoryQuantity.add(shelvesQuantity); + BigDecimal oldAllocationQuantity = materialInventoryPO.getAllocationQuantity(); + oldAllocationQuantity = oldAllocationQuantity != null ? oldAllocationQuantity : BigDecimal.ZERO; + BigDecimal newAllocationQuantity = oldAllocationQuantity.add(shelvesQuantity); BigDecimal oldArea = materialInventoryPO.getArea(); oldArea = oldArea != null ? oldArea : BigDecimal.ZERO;