From 05576523a8626d34aaa1a47f1dfdcad7710482b4 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 27 十一月 2024 13:35:45 +0800
Subject: [PATCH] 调度建议

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
index a0421b1..41b12ec 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
@@ -19,6 +19,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
+
 import static com.iailab.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
 
 /**
@@ -90,7 +91,6 @@
 
     @GetMapping("/predict-data/exportValue")
     @Operation(summary = "导出预测数据")
-    @ApiAccessLog(operateType = EXPORT)
     public void exportPointValue(@RequestParam("itemId") String itemId,
                                  @RequestParam("startTime") String startTime,
                                  @RequestParam("endTime") String endTime,
@@ -100,13 +100,13 @@
         reqVO.setItemId(itemId);
         try {
             if (startTime == "") {
-                reqVO.setStartTime(new Date((new Date()).getTime() - 60*60*1000));
+                reqVO.setStartTime(new Date((new Date()).getTime() - 60 * 60 * 1000));
             } else {
                 reqVO.setStartTime(formatter.parse(startTime));
 
             }
             if (endTime == "") {
-                reqVO.setEndTime(new Date((new Date()).getTime() + 60*60*1000));
+                reqVO.setEndTime(new Date((new Date()).getTime() + 60 * 60 * 1000));
             } else {
                 reqVO.setEndTime(formatter.parse(endTime));
             }
@@ -115,10 +115,26 @@
         }
         PreDataItemChartRespVO respVO = mcsApi.getPreDataItemChart(reqVO);
         try {
-            String sheetTitle =  "sheet1";
+            String sheetTitle = "sheet1";
             ExcelUtil.exportchart(sheetTitle, respVO, response);
         } catch (Exception ex) {
             ex.printStackTrace();
         }
     }
+
+    @GetMapping("/alarm-message/last-one")
+    @Operation(summary = "根据监控对象获取最新预警信息")
+    public CommonResult<AlarmMessageRespDTO> getLastAlarmMessage(HttpServletResponse response, HttpServletRequest
+            request, @RequestParam("alarmObj") String alarmObj) {
+        AlarmMessageRespDTO data = mcsApi.getLastAlarmMessage(alarmObj);
+        return CommonResult.success(data);
+    }
+
+    @GetMapping("/schedule-suggest/last-limit")
+    @Operation(summary = "根据监控对象获取最新预警信息")
+    public CommonResult<List<ScheduleSuggestRespDTO>> getLastLimitScheduleSuggest(HttpServletResponse response, HttpServletRequest
+            request, @RequestParam("scheduleObj") String scheduleObj, @RequestParam("limit") Integer limit) {
+        List<ScheduleSuggestRespDTO> data = mcsApi.getLastLimitScheduleSuggest(scheduleObj, limit);
+        return CommonResult.success(data);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3