调整后可用数量 盘亏 减差异数量 盘盈 加差异数量,调整后库存数量 用盘点数量

This commit is contained in:
zhou-hongcheng
2026-03-13 13:31:45 +08:00
parent 1d1adc61e8
commit 89db83dd05
@@ -247,7 +247,13 @@ public class DifferentManageImpl extends ServiceImpl<DifferentManageMapper, Diff
UserPo userPo = loginUser.getUserPo();
if (userPo != null) inventoryAdjustmentRecord.setCreateByName(userPo.getUserName());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory1.getAllocationQuantity() == null ? BigDecimal.ZERO : materialInventory1.getAllocationQuantity());
if (investigetionManageDetailDO.getInvestigationResult() == 1){
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory1.getAllocationQuantity().add(investigetionManageDetailDO.getDifferentQuantity()));
} else if (investigetionManageDetailDO.getInvestigationResult() == 2) {
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory1.getAllocationQuantity().subtract(investigetionManageDetailDO.getDifferentQuantity()));
}else {
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory1.getAllocationQuantity() == null ? BigDecimal.ZERO : materialInventory1.getAllocationQuantity());
}
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory1.getAllocationQuantity() == null ? BigDecimal.ZERO : materialInventory1.getAllocationQuantity());
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory1.getFreezeQuantity() == null ? BigDecimal.ZERO : materialInventory1.getFreezeQuantity());
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory1.getFreezeQuantity() == null ? BigDecimal.ZERO : materialInventory1.getFreezeQuantity());