From af2d5942652584c65579894c4a4a680bc37dad20 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期六, 08 二月 2025 15:29:39 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java | 42 +++++++++++++++++++++++++++++------------- 1 files changed, 29 insertions(+), 13 deletions(-) diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java index d5828bd..f33f03d 100644 --- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java @@ -27,13 +27,17 @@ * 宏昌建议送出量 hongAdvice * 润忠建议送出量 RunAdvice * 调整值 adviceValues - * <p> + * * 05 * 氧气系统优化调度决策 * 盈德中压建议调整量 yingdiAdvice * 法夜空建议调整量 faAdvice * 宏昌建议调整量 hongAdvice * 润忠建议调整量 RunAdvice + * + * 01 + * 氮气预警模型 + * 预警信号 advice * * @author PanZhibao * @Description @@ -54,6 +58,8 @@ private static final String CODE06 = "06"; private static final String CODE05 = "05"; + + private static final String CODE01 = "01"; @Override public void run(String params) { @@ -76,21 +82,20 @@ } schemeMap.clear(); Map<String, MdkScheduleRespDTO> resultMap = new HashMap<String, MdkScheduleRespDTO>(); - schemeList.forEach(item -> { - schemeMap.put(item.getCode(), item); - StScheduleSchemeDTO scheme = schemeList.get(0); + schemeList.forEach(scheme -> { + schemeMap.put(scheme.getCode(), scheme); MdkScheduleReqDTO dto = new MdkScheduleReqDTO(); dto.setScheduleTime(scheduleTime); dto.setScheduleCode(scheme.getCode()); MdkScheduleRespDTO mdkScheduleRespDTO = mdkApi.doSchedule(dto); - resultMap.put(item.getCode(), mdkScheduleRespDTO); + resultMap.put(scheme.getCode(), mdkScheduleRespDTO); }); if (CollectionUtils.isEmpty(resultMap)) { logger.info("resultMap为空"); return; } for (Map.Entry<String, MdkScheduleRespDTO> entry : resultMap.entrySet()) { - if (CommonConstant.MDK_STATUS_100.equals(entry.getValue().getStatusCode())) { + if (!CommonConstant.MDK_STATUS_100.equals(entry.getValue().getStatusCode())) { logger.info("调度结果异常,STATUS=" + entry.getValue().getStatusCode()); continue; } @@ -98,20 +103,31 @@ if (entry.getKey().equals(CODE06)) { // 氧气班平衡计划,建议值写入测点 mdkApi.scheduleModelOut(entry.getValue()); + logger.info("氧气班平衡计划下发参数: {}", entry.getValue()); } else if (entry.getKey().equals(CODE05)) { String scheduleObj = schemeMap.get(CODE05).getScheduleObj(); - // double[] adviceValues = (double[]) entry.getValue().getResult().get("adviceValues"); - String yingdiAdvice = entry.getValue().getResult().get("yingdiAdvice").toString(); - saveScheduleSuggest("盈德中压建议调整量", yingdiAdvice, scheduleObj, scheduleTime); String faAdvice = entry.getValue().getResult().get("faAdvice").toString(); - saveScheduleSuggest("法夜空建议调整量", faAdvice, scheduleObj, scheduleTime); String hongAdvice = entry.getValue().getResult().get("hongAdvice").toString(); - saveScheduleSuggest("宏昌建议调整量", hongAdvice, scheduleObj, scheduleTime); String runAdvice = entry.getValue().getResult().get("RunAdvice").toString(); - saveScheduleSuggest("宏昌建议调整量", runAdvice, scheduleObj, scheduleTime); + String yingdiAdvice = entry.getValue().getResult().get("yingdiAdvice").toString(); + if(!yingdiAdvice.equals("压力正常")){ + saveScheduleSuggest("盈德中压建议调整量", yingdiAdvice, scheduleObj, scheduleTime); + } + if(!faAdvice.equals("压力正常")){ + saveScheduleSuggest("法夜空建议调整量", faAdvice, scheduleObj, scheduleTime); + } + if(!hongAdvice.equals("压力正常")){ + saveScheduleSuggest("宏昌建议调整量", hongAdvice, scheduleObj, scheduleTime); + } + if(!runAdvice.equals("压力正常")){ + saveScheduleSuggest("润忠建议调整量", runAdvice, scheduleObj, scheduleTime); + } + } else if (entry.getKey().equals(CODE01)) { + String scheduleObj = schemeMap.get(CODE01).getScheduleObj(); + String advice = entry.getValue().getResult().get("advice").toString(); + saveScheduleSuggest("氮气预警", advice, scheduleObj, scheduleTime); } } - logger.info(params + "调度方案执行完成"); } catch (Exception ex) { logger.error("RunScheduleOnaOptTask运行异常"); -- Gitblit v1.9.3