Commit 8eba684dea570386895baced78b02be9a30e55ff

Authored by wangqian
1 parent eabe261f

库存修改

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java
@@ -134,10 +134,9 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { @@ -134,10 +134,9 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService {
134 if (outNum == null) { 134 if (outNum == null) {
135 throw exception0(BAD_REQUEST.getCode(),"更新库存失败:outNum为空!"); 135 throw exception0(BAD_REQUEST.getCode(),"更新库存失败:outNum为空!");
136 } 136 }
137 - MaterialInventoryDO out = new MaterialInventoryDO();  
138 - out.setInventoryId(materialInventory.getInventoryId());  
139 - out.setOutTotalNum(materialInventory.getInventoryTotalNum() + outNum);  
140 - out.setCurrentNum(materialInventory.getCurrentNum() - outNum); 137 + materialInventory.setInventoryId(materialInventory.getInventoryId());
  138 + materialInventory.setOutTotalNum(materialInventory.getInventoryTotalNum() + outNum);
  139 + materialInventory.setCurrentNum(materialInventory.getCurrentNum() - outNum);
141 return materialInventoryMapper.updateById(materialInventory); 140 return materialInventoryMapper.updateById(materialInventory);
142 } 141 }
143 142