From c9ff6a7f2e89f751e2eec68ec02fa93919d05296 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 11 十二月 2024 13:56:59 +0800
Subject: [PATCH] 监听报警信息

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 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
new file mode 100644
index 0000000..7c6c315
--- /dev/null
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelAlarmConsumer.java
@@ -0,0 +1,46 @@
+package com.iailab.module.shasteel.mq.consumer;
+
+import com.iailab.module.model.api.mcs.McsApi;
+import com.iailab.module.shasteel.mq.config.QueueModelAlarmConfig;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * 监听报警信息
+ *
+ * @author PanZhibao
+ * @Description
+ * @createTime 2024年12月11日
+ */
+@Slf4j
+@Component
+public class ModelAlarmConsumer {
+
+    @Resource
+    private McsApi mcsApi;
+
+    /**
+     * 事件标识
+     */
+    private final String EVENT_FLAG = "GasAlarm";
+
+    /**
+     * 监听报警信息,执行调度
+     *
+     * @param message
+     */
+    @RabbitListener(queues = QueueModelAlarmConfig.QUEUE_NAME)
+    public void listen(Message message) {
+        // 查找需要执行的调度方案
+
+
+        // 开始执行调度方案
+
+        // 根据模型返回结果,保存调度建议
+
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3