耗材管理
This commit is contained in:
parent
e48be265fd
commit
5076cc5808
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue