From 44e84f1008d0c55c2e099c7b4b7eae866267b772 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 07 二月 2025 15:37:49 +0800
Subject: [PATCH] 预警信息生成重复问题修复

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

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java
index 1312921..19ab2ac 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java
@@ -106,7 +106,6 @@
                     }).collect(Collectors.toList()).stream().mapToDouble(Double::doubleValue).sum());
                     log.info("culValue:" + culValue);
 
-
                     // 生成预警信息
                     AlarmMessageRespDTO alarmMessage = new AlarmMessageRespDTO();
                     alarmMessage.setConfigId(configItem.getId());
@@ -131,7 +130,6 @@
                         alarmList.add(alarmMessage);
                         continue;
                     }
-
 
                     log.info("对比预测值是否超限");
                     int toIndex = result.size();
@@ -158,6 +156,7 @@
                         alarmMessage.setContent(content.toString());
                         mcsApi.createAlarmMessage(alarmMessage);
                         alarmList.add(alarmMessage);
+                        break;
                     }
                 }
             }

--
Gitblit v1.9.3