耗材管理
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user