fix(warning): 解决退火工序告警处理问题
- 退火工序没有actionId时不创建代操作记录,直接设置actionType=600 - 当actionId为空时使用bo中的actionType作为兜底方案 - 确保退火工序的告警能够正确关联到对应的操作类型
This commit is contained in:
@@ -1870,6 +1870,10 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
}
|
||||
|
||||
// 检查长度/厚度偏差并插入告警
|
||||
// 退火工序没有actionId(不创建代操作记录),直接设置actionType=600
|
||||
if ("annealing".equals(qrcodeStepType)) {
|
||||
bo.setActionType(600);
|
||||
}
|
||||
materialWarningService.checkAndInsertWarnings(newCoil, bo);
|
||||
|
||||
// 如果实际库区id为-1,则清空钢卷上的实际库区绑定
|
||||
|
||||
@@ -198,6 +198,10 @@ public class WmsMaterialWarningServiceImpl implements IWmsMaterialWarningService
|
||||
log.warn("查询产线类型失败, actionId={}", bo.getActionId(), e);
|
||||
}
|
||||
}
|
||||
// 兜底:如果没有actionId(如退火工序不创建代操作记录),直接使用bo中的actionType
|
||||
if (actionType == null && bo != null && bo.getActionType() != null) {
|
||||
actionType = bo.getActionType();
|
||||
}
|
||||
if (actionType != null) {
|
||||
for (WmsMaterialWarning w : warnings) {
|
||||
w.setActionType(actionType);
|
||||
|
||||
Reference in New Issue
Block a user