耗材管理

This commit is contained in:
Tankaikai
2025-03-12 14:17:51 +08:00
parent 604cb94def
commit c2f09c0ffd

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("耗材{}存在发生变动,请刷新后重试", entity.getConName()));
throw new CzgException(StrUtil.format("耗材{}报损数量不能大于当前库存{}", consInfo.getStockNumber()));
}
entity.setBeforeNumber(consInfo.getStockNumber());
entity.setInOutNumber(NumberUtil.sub(BigDecimal.ZERO, balance));