From 90baa6a076b7c7ea036d2adac3a032a1a473b309 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 21 十二月 2024 09:28:51 +0800
Subject: [PATCH] 在“远程测控”增加查询一个取水口报警状态的功能,实现后端逻辑

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
index 15bd426..a591161 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
@@ -16,10 +16,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -56,7 +53,7 @@
     })
     @GetMapping(path = "/getControllerAlarmStateHistory")
     @SsoAop()
-    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory(@RequestBody ControllerAlarmStateQueryVo vo) {
+    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory( ControllerAlarmStateQueryVo vo) {
         try {
             QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateHistory(vo);
             return BaseResponseUtils.buildSuccess(res);
@@ -66,6 +63,33 @@
         }
     }
 
+
+    /**
+     * 鑾峰彇鎸囧畾鍙栨按鍙f姤璀︿笌鐘舵�佸垪琛紙鍘嗗彶锛�
+     *
+     * @param vo 鐩歌鏉′欢锛屽叾涓繀椤昏祴鍊煎彇姘村彛ID
+     * @return 绗﹀悎鏉′欢鐨勬帶鍒跺櫒鎶ヨ涓庣姸鎬佸垪琛紙鍘嗗彶锛�
+     */
+    @Operation(summary = "鑾峰緱涓�椤佃幏鍙栨寚瀹氬彇姘村彛鎶ヨ涓庣姸鎬佽褰�", description = "杩斿洖涓�椤佃幏鍙栨寚瀹氬彇姘村彛鎶ヨ涓庣姸鎬佹暟鎹�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤佃幏鍙栨寚瀹氬彇姘村彛鎶ヨ涓庣姸鎬侊紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoActiveCard.class))}
+            )
+    })
+    @GetMapping(path = "/getOneControllerAlarmStateHistory")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getOneControllerAlarmStateHistory(ControllerAlarmStateQueryVo vo) {
+        try {
+            QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getOneControllerAlarmStateHistory(vo);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鑾峰彇鑾峰彇鎸囧畾鍙栨按鍙f姤璀︿笌鐘舵�佽褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 
 
     /**
@@ -85,7 +109,7 @@
     })
     @GetMapping(path = "/getControllerAlarmStateLast")
     @SsoAop()
-    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast(@RequestBody ControllerAlarmStateQueryVo vo) {
+    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast( ControllerAlarmStateQueryVo vo) {
         try {
             QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateLast(vo);
             return BaseResponseUtils.buildSuccess(res);

--
Gitblit v1.8.0