From 69269829c1cc3ba14514333c64a0b32bd5256d21 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 21 一月 2025 14:23:54 +0800
Subject: [PATCH] 保存调度建议

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java
index 72c254c..cb2cfcc 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java
@@ -58,7 +58,7 @@
             return;
         }
         Date predictTime = DateUtils.parse(messageJson.get("predictTime").toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND);
-        if (new Date().getTime() - predictTime.getTime() > 1000 * 60 * 3) {
+        if (new Date().getTime() - predictTime.getTime() > 1000 * 60 * 10) {
             log.info("过滤旧消息");
             return;
         }
@@ -85,17 +85,20 @@
             if (mdkScheduleRespDTO == null) {
                 return;
             }
+
             Map<String, Object> result = mdkScheduleRespDTO.getResult();
             switch (mdkScheduleRespDTO.getScheduleCode()) {
                 case CommonConstant.GAS_MODEL_CODE:
+                    // 结果写入测点
+                    mdkApi.scheduleModelOut(mdkScheduleRespDTO);
+
+                    // 保存调度建议
                     String sch_obj_gas = "GAS";
                     saveScheduleSuggest("adviceBFG", result.get("adviceBFG"), sch_obj_gas, predictTime);
                     saveScheduleSuggest("adviceCOG", result.get("adviceCOG"), sch_obj_gas, predictTime);
                     saveScheduleSuggest("adviceLDG13W", result.get("adviceLDG13W"), sch_obj_gas, predictTime);
                     saveScheduleSuggest("adviceLDG12W", result.get("adviceLDG12W"), sch_obj_gas, predictTime);
                     saveScheduleSuggest("adviceLDG12WT", result.get("adviceLDG12WT"), sch_obj_gas, predictTime);
-                    // 结果写入测点
-                    mdkApi.scheduleModelOut(mdkScheduleRespDTO);
                     break;
                 case CommonConstant.OXYGEN_ONE_CODE:
                     if (!result.containsKey("faAdvice") || !result.containsKey("yingDiAdvice") || !result.containsKey("yingZhongAdvice")

--
Gitblit v1.9.3