From 1e1e9bb19e595f65e35de48d91ae436a89147ec9 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期五, 03 一月 2025 16:32:11 +0800
Subject: [PATCH] 添加AGV告警处理及回调接口

---
 src/main/java/com/zy/asrs/task/ReportDataScheduler.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/ReportDataScheduler.java b/src/main/java/com/zy/asrs/task/ReportDataScheduler.java
index 3e25641..eb29c45 100644
--- a/src/main/java/com/zy/asrs/task/ReportDataScheduler.java
+++ b/src/main/java/com/zy/asrs/task/ReportDataScheduler.java
@@ -15,7 +15,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -57,15 +56,17 @@
     @Value("${mes.getTokenPath}")
     private String getTokenPath;
 
+    @Value("${mes.stock}")
+    private String stock;
+
 
     @Scheduled(fixedDelay = 5000)
-    @Async("reportThreadPool")
     public void execute() {
         log.info("瀹氭椂浠诲姟寮�濮嬫墽琛�");
         if (!flag) {
             return;
         }
-        Page<ReportData> objectPage = new Page<>(1, 1000);
+        Page<ReportData> objectPage = new Page<>(1, 100);
         Page<ReportData> reportData = reportDataService.selectPage(objectPage, new EntityWrapper<ReportData>().orderBy("create_time", false));
         if (reportData != null && !Cools.isEmpty(reportData.getRecords())) {
             Map<String, Object> mesTokenInfo = getMesTokenInfo();
@@ -119,4 +120,15 @@
         }
 
     }
+
+
+    public void executeStock() {
+        log.info("Stock瀹氭椂浠诲姟寮�濮嬫墽琛�");
+        if (!flag) {
+            return;
+        }
+        Map<String, Object> mesTokenInfo = getMesTokenInfo();
+        reportDataHandler.stock(mesTokenInfo);
+        log.info("Stock瀹氭椂浠诲姟缁撴潫鎵ц");
+    }
 }

--
Gitblit v1.9.1