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());