From ef270bd1855b5ce3f398c5df024840a498e33a8f Mon Sep 17 00:00:00 2001
From: MercuryZ <zdmisif@126.com>
Date: 星期四, 31 三月 2022 14:09:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightPoleHeelingController.java |   90 ++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 76 insertions(+), 14 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightPoleHeelingController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightPoleHeelingController.java
index 90eb09b..8d4aedf 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightPoleHeelingController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightPoleHeelingController.java
@@ -1,19 +1,21 @@
 package com.sandu.ximon.admin.controller;
 
 import com.sandu.common.domain.ResponseVO;
+import com.sandu.common.object.BaseConditionVO;
 import com.sandu.common.util.ResponseUtil;
+import com.sandu.ximon.admin.param.C3ChargingParam;
+import com.sandu.ximon.admin.param.LightPoleHeelingListParam;
+import com.sandu.ximon.admin.param.LightPoleHeelingParam;
 import com.sandu.ximon.admin.service.LightPoleHeelingService;
 import com.sandu.ximon.dao.domain.LightPoleHeeling;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
 /**
- * 鐏潌鍊炬枩
+ * 鐏潌鍊炬枩璀﹀憡鍒楄〃
  */
 @RestController
 @AllArgsConstructor
@@ -21,20 +23,80 @@
 public class LightPoleHeelingController {
     private final LightPoleHeelingService lightPoleHeelingService;
 
-    @GetMapping
-    public ResponseVO<Object> listLightPoleHeeling() {
-        List<LightPoleHeeling> list = lightPoleHeelingService.listLightPoleHeeling();
-        return ResponseUtil.successPage(list);
-    }
-
     /**
      * 妯$硦鏌ヨ
      *
      * @return
      */
-    @GetMapping("/listLightPoleHeelingByKeyword/{keyword}")
-    public ResponseVO<Object> listLightPoleHeelingByKeyword(@PathVariable String keyword) {
-        List<LightPoleHeeling> list = lightPoleHeelingService.listLightPoleHeelingByKeyword(keyword);
+    @PostMapping("/listLightPoleHeelingByKeyword")
+    public ResponseVO<Object> listLightPoleHeelingByKeyword(BaseConditionVO baseConditionVO
+            , @RequestBody(required = false) LightPoleHeelingListParam lightPoleHeelingListParam) {
+        List<LightPoleHeeling> list = lightPoleHeelingService.listLightPoleHeelingByKeyword(baseConditionVO, lightPoleHeelingListParam);
         return ResponseUtil.successPage(list);
     }
+
+    /**
+     * 鐏潌鍊炬枩蹇冭烦鍖�
+     *
+     * @return
+     */
+    @PostMapping("/LightPoleHeelingHeartbeatPackage")
+    public ResponseVO<Object> LightPoleHeelingHeartbeatPackage(@RequestBody @Validated LightPoleHeelingParam lightPoleHeelingParam) {
+        return ResponseUtil.success(lightPoleHeelingService.LightPoleHeelingHeartbeatPackage(lightPoleHeelingParam.getDeviceName()));
+
+    }
+
+    /**
+     * 鏌ヨ蹇冭烦鍖呴棿闅旀椂闂�
+     *
+     * @return
+     */
+    @PostMapping("/QueryIntervalTime")
+    public ResponseVO<Object> QueryIntervalTime(@RequestBody @Validated LightPoleHeelingParam lightPoleHeelingParam) {
+        return ResponseUtil.success(lightPoleHeelingService.QueryIntervalTime(lightPoleHeelingParam.getDeviceName()));
+
+    }
+
+    /**
+     * 鐏潌鍊炬枩杞噸鍚�
+     *
+     * @return
+     */
+    @PostMapping("/RestartLightPoleHeeling")
+    public ResponseVO<Object> RestartLightPoleHeeling(@RequestBody @Validated LightPoleHeelingParam lightPoleHeelingParam) {
+        String result = lightPoleHeelingService.RestartLightPoleHeeling(lightPoleHeelingParam.getDeviceName());
+        if ("鎿嶄綔鎴愬姛".equals(result)) {
+            return ResponseUtil.success(result);
+        } else {
+            return ResponseUtil.fail(result);
+        }
+
+    }
+
+    /**
+     * 璁剧疆蹇冭烦鍖呴棿闅旀椂闂�(绉掞級
+     */
+    @PostMapping("/SetHeartbeatPacketTime")
+    public ResponseVO<Object> SetHeartbeatPacketTime(@RequestBody @Validated LightPoleHeelingParam lightPoleHeelingParam) {
+        String result = lightPoleHeelingService.SetHeartbeatPacketTime(lightPoleHeelingParam.getDeviceName(), lightPoleHeelingParam.getTime());
+        if ("鎿嶄綔鎴愬姛".equals(result)) {
+            return ResponseUtil.success(result);
+        } else {
+            return ResponseUtil.fail(result);
+        }
+
+    }
+
+    /**
+     * 璁剧疆浼犳劅鍣ㄤ负鍒濆鐘舵��
+     */
+    @PostMapping("/SetSensorState")
+    public ResponseVO<Object> SetSensorState(@RequestBody @Validated LightPoleHeelingParam lightPoleHeelingParam) {
+        String result = lightPoleHeelingService.SetSensorState(lightPoleHeelingParam.getDeviceName());
+        if ("鎿嶄綔鎴愬姛".equals(result)) {
+            return ResponseUtil.success(result);
+        } else {
+            return ResponseUtil.fail(result);
+        }
+    }
 }

--
Gitblit v1.9.3