From fae1c79e95889bda5e48e009c2d764850ad729e4 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Mon, 22 Apr 2024 09:33:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E7=9F=A5=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java | 3 +++ .../nl/wms/sch/task_manage/task/tasks/gtx/HCSSXMLTask.java | 2 +- .../org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java index 602f4fa..4836cda 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java @@ -610,6 +610,9 @@ public class WmsToMesServiceImpl implements WmsToMesService { // 获取物料 MdBaseMaterial materialDto = mdBaseMaterialService.getOne(new LambdaQueryWrapper() .eq(MdBaseMaterial::getHalf_material_code, fproductMaterialId)); + if (ObjectUtil.isEmpty(materialDto)) { + throw new BadRequestException("工单同步失败:[" + fproductMaterialId + "]物料不存在"); + } // 获取压机点位 SchBasePoint pointDto = pointService.getOne(new LambdaQueryWrapper() .eq(SchBasePoint::getExt_point_code, mesWorkOrderDto.getPRESSUNIT())); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/gtx/HCSSXMLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/gtx/HCSSXMLTask.java index 8586831..77601a3 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/gtx/HCSSXMLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/gtx/HCSSXMLTask.java @@ -82,7 +82,7 @@ public class HCSSXMLTask extends AbstractTask { task.setRemark("入窑口未找到所需点位!"); taskService.updateById(task); // 消息通知 - noticeService.createNotice(task.getRemark(), task.getConfig_code() + task.getTask_code(), + noticeService.createNotice(task.getRemark(), task.getConfig_code() + task.getPoint_code1(), NoticeTypeEnum.WARN.getCode()); return; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java index f697233..5dbb1a1 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java @@ -118,14 +118,14 @@ public class HNMLTask extends AbstractTask { task.setRemark("未存在生产该料的压机!"); taskService.updateById(task); // 消息通知 - noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getTask_code(), NoticeTypeEnum.WARN.getCode()); + noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getPoint_code1(), NoticeTypeEnum.WARN.getCode()); continue; } if (ObjectUtil.isNotEmpty(point.getTask_warn())) { task.setRemark(point.getTask_warn()); taskService.updateById(task); // 消息通知 - noticeService.createNotice("找不到困料点", TASK_CONFIG_CODE + task.getTask_code(), NoticeTypeEnum.WARN.getCode()); + noticeService.createNotice("找不到困料点", TASK_CONFIG_CODE + task.getPoint_code1(), NoticeTypeEnum.WARN.getCode()); continue; } log.info("任务【" + task.getTask_code() + "】叫料标识:{}", point.getRecord_id());