Commit 15545517439a748de09a2392223e0c96dbe13e8c
Merge branch 'dev' into de_wangfs_202511
Showing
2 changed files
with
6 additions
and
4 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java
| @@ -142,9 +142,11 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { | @@ -142,9 +142,11 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { | ||
| 142 | if (outNum == null) { | 142 | if (outNum == null) { |
| 143 | throw exception0(BAD_REQUEST.getCode(),"更新库存失败:outNum为空!"); | 143 | throw exception0(BAD_REQUEST.getCode(),"更新库存失败:outNum为空!"); |
| 144 | } | 144 | } |
| 145 | - materialInventory.setOutTotalNum(materialInventory.getOutTotalNum() + outNum); | ||
| 146 | - materialInventory.setCurrentNum(materialInventory.getCurrentNum() - outNum); | ||
| 147 | - return materialInventoryMapper.updateById(materialInventory); | 145 | + MaterialInventoryDO update = new MaterialInventoryDO(); |
| 146 | + update.setInventoryId(materialInventory.getInventoryId()); | ||
| 147 | + update.setOutTotalNum(materialInventory.getOutTotalNum() + outNum); | ||
| 148 | + update.setCurrentNum(materialInventory.getCurrentNum() - outNum); | ||
| 149 | + return materialInventoryMapper.updateById(update); | ||
| 148 | } | 150 | } |
| 149 | 151 | ||
| 150 | @Override | 152 | @Override |
urbanops-server/src/main/resources/application-dev.yaml