From 8eba684dea570386895baced78b02be9a30e55ff Mon Sep 17 00:00:00 2001 From: wangqian <1406304305@qq.com> Date: Thu, 4 Dec 2025 14:16:50 +0800 Subject: [PATCH] 库存修改 --- urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java index 57c3e72..acb9f9c 100644 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java @@ -134,10 +134,9 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { if (outNum == null) { throw exception0(BAD_REQUEST.getCode(),"更新库存失败:outNum为空!"); } - MaterialInventoryDO out = new MaterialInventoryDO(); - out.setInventoryId(materialInventory.getInventoryId()); - out.setOutTotalNum(materialInventory.getInventoryTotalNum() + outNum); - out.setCurrentNum(materialInventory.getCurrentNum() - outNum); + materialInventory.setInventoryId(materialInventory.getInventoryId()); + materialInventory.setOutTotalNum(materialInventory.getInventoryTotalNum() + outNum); + materialInventory.setCurrentNum(materialInventory.getCurrentNum() - outNum); return materialInventoryMapper.updateById(materialInventory); } -- libgit2 0.21.4