fix(wms): 修复钢卷警告检查逻辑

- 注释掉新增钢卷时的长度/厚度偏差检查
- 添加actionId为空判断条件避免警告插入异常
- 优化更新钢卷时的警告检查逻辑
This commit is contained in:
2026-06-11 16:49:15 +08:00
parent f319308196
commit c1e3fa5141

View File

@@ -1529,8 +1529,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
throw new RuntimeException("新增钢卷失败"); throw new RuntimeException("新增钢卷失败");
} }
// 检查长度/厚度偏差并插入告警 // // 检查长度/厚度偏差并插入告警
materialWarningService.checkAndInsertWarnings(add, bo); // materialWarningService.checkAndInsertWarnings(add, bo);
// 设置返回用的ID并更新二维码内容中的coilId // 设置返回用的ID并更新二维码内容中的coilId
bo.setCoilId(add.getCoilId()); bo.setCoilId(add.getCoilId());
@@ -1751,7 +1751,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
// } // }
// 检查长度/厚度偏差并插入告警 // 检查长度/厚度偏差并插入告警
materialWarningService.checkAndInsertWarnings(updateCoil, bo); if (bo.getActionId() != null) {
materialWarningService.checkAndInsertWarnings(updateCoil, bo);
}
// 如果实际库区id为-1或状态为1则清空钢卷上的实际库区绑定 // 如果实际库区id为-1或状态为1则清空钢卷上的实际库区绑定
if ((bo.getActualWarehouseId() != null && bo.getActualWarehouseId().equals(-1L)) if ((bo.getActualWarehouseId() != null && bo.getActualWarehouseId().equals(-1L))