From 8c189b243bfbbacb2ab1ce79f4e1ff22708f125a Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期一, 26 七月 2021 16:45:09 +0800
Subject: [PATCH] 修复接口

---
 src/main/java/com/whyc/controller/CentralMonitorSysSTController.java |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/whyc/controller/CentralMonitorSysSTController.java b/src/main/java/com/whyc/controller/CentralMonitorSysSTController.java
index db68b80..690db8e 100644
--- a/src/main/java/com/whyc/controller/CentralMonitorSysSTController.java
+++ b/src/main/java/com/whyc/controller/CentralMonitorSysSTController.java
@@ -1,16 +1,18 @@
 package com.whyc.controller;
 
+import com.github.pagehelper.PageInfo;
 import com.whyc.dto.Response;
+import com.whyc.pojo.CentralMonitorSysRT;
 import com.whyc.pojo.CentralMonitorSysST;
 import com.whyc.service.CentralMonitorSysRTService;
 import com.whyc.service.CentralMonitorSysSTService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
 
 
 @RequestMapping("centralMonitorSysST")
@@ -27,6 +29,28 @@
         return service.getInfoByDevId(devId);
     }
 
+    @GetMapping("field")
+    @ApiOperation(value = "鏌ヨ鍛婅闃堝�煎瓧娈�")
+    public Response<Map<String, List>> getField(){
+        return service.getField();
+    }
+
+    @PutMapping("updateStatus")
+    @ApiOperation(value = "鏇存柊鐘舵��-婕旂ず浣跨敤")
+    public Response updateStatus(@RequestParam int devId,@RequestParam int switchCloseBusScreen){
+        return service.updateStatus(devId,switchCloseBusScreen);
+    }
+
+    /**
+     * ======History======
+     * 鍘嗗彶鏌ヨ鏃�,鍥犱负鍘嗗彶璁板綍鏄寜鐓ф棩鏈熷垎琛ㄧ殑,濡傛灉鏌ヨ鎵�鏈夌殑鏃ユ湡琛�(union)鍚庡啀鍒嗛〉,浼氬鑷撮�熷害鏋佹參,鏁呮煡璇㈡寜鐓у崟涓棩鏈熸煡璇�
+     * TODO 寰呯‘瀹氭槸鍚﹂渶瑕佸姞涓婃棩鏈�
+     * */
+    @GetMapping("history/all")
+    @ApiOperation(value = "鏌ヨ鍘嗗彶璁板綍")
+    public Response<PageInfo<CentralMonitorSysST>> getHistory(@RequestParam int pageNum, int pageSize, int devId){
+        return service.getHistory(pageNum,pageSize,devId);
+    }
 
 
 }

--
Gitblit v1.9.1