mirror of
https://gitee.com/yudaocode/yudao-boot-mini.git
synced 2026-10-06 14:13:14 +08:00
[ENHANCE] ERP:采购入库单明细数量补接口层正数校验,库存增量更新补 0 量防护(管理端界面输入已有 0.001 下限拦截)
This commit is contained in:
-4
@@ -36,10 +36,6 @@ public interface ErpStockMapper extends BaseMapperX<ErpStockDO> {
|
||||
}
|
||||
|
||||
default int updateCountIncrement(Long id, BigDecimal count, boolean negativeEnable) {
|
||||
// 数量为 0 无库存增量(历史脏数据防护):直接跳过,避免生成空 SET 的 UPDATE 抛异常 500
|
||||
if (count.compareTo(BigDecimal.ZERO) == 0) {
|
||||
return 0;
|
||||
}
|
||||
LambdaUpdateWrapper<ErpStockDO> updateWrapper = new LambdaUpdateWrapper<ErpStockDO>()
|
||||
.eq(ErpStockDO::getId, id);
|
||||
if (count.compareTo(BigDecimal.ZERO) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user