差异库存查询处理可用数量
This commit is contained in:
+7
@@ -190,6 +190,13 @@ public class DifferentManageImpl extends ServiceImpl<DifferentManageMapper, Diff
|
|||||||
// if (e.getInvestigationStatus() != 3){ // 库存更新
|
// if (e.getInvestigationStatus() != 3){ // 库存更新
|
||||||
materialInventory = materialInventoryMapper.selectById(e.getMaterialInventoryId());
|
materialInventory = materialInventoryMapper.selectById(e.getMaterialInventoryId());
|
||||||
materialInventory.setInventoryQuantity(e.getInvestigationQuantity());
|
materialInventory.setInventoryQuantity(e.getInvestigationQuantity());
|
||||||
|
if (e.getInvestigationResult() == 1){
|
||||||
|
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().add(e.getDifferentQuantity()));
|
||||||
|
} else if (e.getInvestigationResult() == 2) {
|
||||||
|
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(e.getDifferentQuantity()));
|
||||||
|
}else {
|
||||||
|
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity() == null ? BigDecimal.ZERO : materialInventory.getAllocationQuantity());
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
InventoryAdjustmentRecord(e);
|
InventoryAdjustmentRecord(e);
|
||||||
materialInventoryMapper.updateMaterial(JSONUtil.toBean(JSONUtil.toJsonStr(materialInventory), MaterialInventoryDO.class));
|
materialInventoryMapper.updateMaterial(JSONUtil.toBean(JSONUtil.toJsonStr(materialInventory), MaterialInventoryDO.class));
|
||||||
|
|||||||
Reference in New Issue
Block a user