fix: 通知标题

This commit is contained in:
2024-04-22 09:33:42 +08:00
parent c5dee1c8c4
commit fae1c79e95
3 changed files with 6 additions and 3 deletions

View File

@@ -610,6 +610,9 @@ public class WmsToMesServiceImpl implements WmsToMesService {
// 获取物料
MdBaseMaterial materialDto = mdBaseMaterialService.getOne(new LambdaQueryWrapper<MdBaseMaterial>()
.eq(MdBaseMaterial::getHalf_material_code, fproductMaterialId));
if (ObjectUtil.isEmpty(materialDto)) {
throw new BadRequestException("工单同步失败:[" + fproductMaterialId + "]物料不存在");
}
// 获取压机点位
SchBasePoint pointDto = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getExt_point_code, mesWorkOrderDto.getPRESSUNIT()));

View File

@@ -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;
}

View File

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