From 36b1e3da8258747625a50e58f7e10539a15e5a0a Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Fri, 12 Jun 2026 16:00:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(warning):=20=E8=A7=A3=E5=86=B3=E9=80=80?= =?UTF-8?q?=E7=81=AB=E5=B7=A5=E5=BA=8F=E5=91=8A=E8=AD=A6=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 退火工序没有actionId时不创建代操作记录,直接设置actionType=600 - 当actionId为空时使用bo中的actionType作为兜底方案 - 确保退火工序的告警能够正确关联到对应的操作类型 --- .../java/com/klp/service/impl/WmsMaterialCoilServiceImpl.java | 4 ++++ .../com/klp/service/impl/WmsMaterialWarningServiceImpl.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialCoilServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialCoilServiceImpl.java index 609cc1df..79780c1a 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialCoilServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialCoilServiceImpl.java @@ -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,则清空钢卷上的实际库区绑定 diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialWarningServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialWarningServiceImpl.java index 77b60f97..dcebe400 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialWarningServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsMaterialWarningServiceImpl.java @@ -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);