分配问题修改;

This commit is contained in:
王奎兴
2026-02-28 16:05:26 +08:00
parent 9bf5187d42
commit 3875a92299
@@ -289,8 +289,8 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
outMaterialDetailChild.setCreateBy(loginUser.getUserid());
outMaterialDetailChild.setCreateByName(loginUser.getUsername());
outMaterialDetailChild.setCreateTime(new Date());
BigDecimal allocationQuantity = outMaterialDetailChild.getAllocationQuantity();
BigDecimal alreadyAllocationQuantity = outMaterialDetailChild.getAlreadyAllocationQuantity();
BigDecimal allocationQuantity = outMaterialDetailChild.getAllocationQuantity() != null ? outMaterialDetailChild.getAllocationQuantity() : BigDecimal.ZERO;
BigDecimal alreadyAllocationQuantity = outMaterialDetailChild.getAlreadyAllocationQuantity() != null ? outMaterialDetailChild.getAlreadyAllocationQuantity() : BigDecimal.ZERO;
BigDecimal nowAllocationQuantity = allocationQuantity.subtract(alreadyAllocationQuantity);
outMaterialDetailChild.setNowAllocationQuantity(nowAllocationQuantity);
outMaterialDetailListChild.add(outMaterialDetailChild);