From d49863c81167ceb4b66c69c8be0e87319149c3b9 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期五, 27 五月 2022 17:22:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java |  198 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 194 insertions(+), 4 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
index d6a1395..383d07a 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
@@ -5,11 +5,16 @@
 import com.sandu.common.domain.ResponseVO;
 import com.sandu.common.util.ResponseUtil;
 import com.sandu.common.util.SpringContextHolder;
+import com.sandu.ximon.admin.param.BroadcastTerminalV2Param;
 import com.sandu.ximon.admin.security.SecurityUtils;
-import com.sandu.ximon.admin.service.ClientService;
+import com.sandu.ximon.admin.service.*;
+import com.sandu.ximon.dao.bo.BroadcastTerminalV2EntityBo;
+import com.sandu.ximon.dao.bo.LightBo;
 import com.sandu.ximon.dao.bo.MonitorBo;
-import com.sandu.ximon.dao.domain.Client;
+import com.sandu.ximon.dao.domain.*;
+import com.sandu.ximon.dao.mapper.LightMapper;
 import com.sandu.ximon.dao.mapper.MonitorMapper;
+import com.sandu.ximon.dao.mapper.PoleMapper;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -55,6 +60,144 @@
         return ResponseUtil.success(mapList);
     }
 
+    /**
+     * 鐏潌鍒楄〃
+     */
+    private final PoleMapper poleMapper;
+
+    @GetMapping("/getPoleList")
+    public ResponseVO<Object> getPoleList() {
+        List<Pole> poleList;
+        if (SecurityUtils.getClientId() == null) {
+            poleList = poleMapper.queryPoleOnLineStatesList(null, null, null, null, null, null);
+        } else {
+            poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), null, null, null, null, null);
+        }
+
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (Pole bean : poleList) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getId());
+            map.put("poleName", bean.getPoleName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+    /**
+     * 璺伅鍒楄〃
+     */
+    private final LightMapper lightMapper;
+
+    @GetMapping("/getLightList")
+    public ResponseVO<Object> getLightList() {
+        List<LightBo> listLight = lightMapper.listLight(SecurityUtils.getClientId(), null);
+
+
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (LightBo bean : listLight) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getLightId());
+            map.put("deviceCode", bean.getDeviceCode());
+            map.put("poleId", bean.getPoleId());
+            map.put("poleName", bean.getPoleName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+    /**
+     * NLED鍒楄〃(璇虹摝璁惧)
+     */
+    @GetMapping("/getLedPlayerEntityList")
+    public ResponseVO<Object> getLedPlayerEntityList() {
+        List<LedPlayerEntity> list = SpringContextHolder.getBean(LedPlayerEntityService.class).
+                ledPlayerEntityList(null, null, null, null);
+
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (LedPlayerEntity bean : list) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getId());
+            map.put("name", bean.getName());
+            map.put("playerName", bean.getPlayerName());
+            map.put("sn", bean.getSn());
+            map.put("poleId", bean.getPoleId());
+            map.put("poleName", bean.getPoleName());
+            map.put("onlineStatus", bean.getOnlineStatus());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+    /**
+     * NLED鏂囦欢鍒楄〃
+     */
+    @GetMapping("/getLedFilesList")
+    public ResponseVO<Object> getLedFilesList() {
+        List<LedSFile> list = SpringContextHolder.getBean(LedSFileService.class).list();
+
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (LedSFile bean : list) {
+            map = new LinkedHashMap();
+            map.put("fileId", bean.getFileId());
+            map.put("fileType", bean.getFileType());
+            map.put("fileUrl", bean.getFileUrl());
+            map.put("fileSize", bean.getFileSize());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+    /**
+     * NLED鑺傜洰鍒楄〃
+     *
+     * @return
+     */
+    private final LEDProgramService ledProgramService;
+
+    @GetMapping("/getNledProgeamList")
+    public ResponseVO<Object> getNledProgeamList() {
+        List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null,null,null);
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (LEDProgram bean : ledPrograms) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getId());
+            map.put("name", bean.getName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+
+    /**
+     * SLED鍒楄〃
+     *
+     * @return
+     */
+    private final PoleLightemitService sLedService;
+
+    @GetMapping("/getSledList")
+    public ResponseVO<Object> getSledList() {
+        List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLed(null, null, null, false);
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (PoleLightemitEntity bean : poleLightemitEntities) {
+            map = new LinkedHashMap();
+            map.put("lightemitName", bean.getLightemitName());
+            map.put("lightemitControlCode", bean.getLightemitControlCode());
+            map.put("isOnLine", bean.isOnLine());
+            map.put("streetlightId", bean.getStreetlightId());
+            map.put("streetlightName", bean.getStreetlightName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
 
     /**
      * 鎽勫儚澶村垪琛�
@@ -68,9 +211,9 @@
         List<MonitorBo> monitorBos;
         //瓒呯
         if (SecurityUtils.getClientId() == null) {
-            monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2);
+            monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2, null);
         } else {
-            monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2);
+            monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2, null);
         }
         List<Map> mapList = new ArrayList<>();
         Map map;
@@ -87,4 +230,51 @@
     }
 
 
+    /**
+     * 闊虫煴鍒楄〃
+     */
+    private final IpVolumeService ipVolumeService;
+
+    @GetMapping("/getIpVolumeList")
+    public ResponseVO<Object> getIpVolumeList() {
+        BroadcastTerminalV2Param param = new BroadcastTerminalV2Param();
+        param.setBindingState(2);
+        param.setKeyword(null);
+        param.setWorkState(2);
+        List<BroadcastTerminalV2EntityBo> broadcastTerminalList = ipVolumeService.getBroadcastTerminalList(null, null, null, param);
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (BroadcastTerminalV2EntityBo bean : broadcastTerminalList) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getId());
+            map.put("terminalName", bean.getTerminalName());
+            map.put("status", bean.getStatus());
+            map.put("poleId", bean.getPoleId());
+            map.put("PoleName", bean.getPoleName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+
+    /**
+     * 闊虫煴骞挎挱绱犳潗鍒楄〃
+     */
+    private final IpVolumeFileService ipVolumeFileService;
+
+    @GetMapping("/getIpFileList")
+    public ResponseVO<Object> getIpFileList() {
+        List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listFiles();
+        List<Map> mapList = new ArrayList<>();
+        Map map;
+        for (IpVolumeFile bean : ipVolumeFiles) {
+            map = new LinkedHashMap();
+            map.put("id", bean.getId());
+            map.put("fileName", bean.getFileName());
+            mapList.add(map);
+        }
+        return ResponseUtil.success(mapList);
+    }
+
+
 }

--
Gitblit v1.9.3