耗材管理

This commit is contained in:
Tankaikai 2025-03-12 14:30:30 +08:00
parent e48be265fd
commit 5076cc5808
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ public class ConsStockFlowServiceImpl extends ServiceImpl<ConsStockFlowMapper, C
entity.setPurchasePrice(consInfo.getPrice());
BigDecimal balance = NumberUtil.sub(consInfo.getStockNumber(), param.getNumber());
if (NumberUtil.isLess(balance, BigDecimal.ZERO)) {
throw new CzgException(StrUtil.format("耗材{}报损数量不能大于当前库存{}", consInfo.getStockNumber()));
throw new CzgException(StrUtil.format("耗材{}报损数量不能大于当前库存{}", entity.getConName(), consInfo.getStockNumber()));
}
entity.setBeforeNumber(consInfo.getStockNumber());
entity.setInOutNumber(NumberUtil.sub(BigDecimal.ZERO, balance));