Quellcode durchsuchen

新增调用大华接口服务

邵洋 vor 1 Jahr
Ursprung
Commit
cb69616703
63 geänderte Dateien mit 5154 neuen und 4 gelöschten Zeilen
  1. 5 0
      visualization-service/pom.xml
  2. 1 0
      visualization-service/src/main/java/com/zksy/visualization/VisualizationApplication.java
  3. 5 0
      visualization-service/src/main/java/com/zksy/visualization/config/IccConfigProperty.java
  4. 249 0
      visualization-service/src/main/java/com/zksy/visualization/controller/DeviceInfoController.java
  5. 197 0
      visualization-service/src/main/java/com/zksy/visualization/controller/FireFightingController.java
  6. 253 0
      visualization-service/src/main/java/com/zksy/visualization/controller/ParkingManageController.java
  7. 120 0
      visualization-service/src/main/java/com/zksy/visualization/controller/RealTimePreviewVideoController.java
  8. 131 0
      visualization-service/src/main/java/com/zksy/visualization/controller/RotatingRingController.java
  9. 178 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/AcquisitionDeviceController.java
  10. 180 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/AirConditionerController.java
  11. 111 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/ComprehensiveController.java
  12. 147 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/ElectricEnergyMonitorController.java
  13. 201 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/LightingGatewayController.java
  14. 110 0
      visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/UsingEnergyController.java
  15. 54 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/AcquisitionDeviceRequest.java
  16. 31 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/AirConditionerControlRequest.java
  17. 55 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/AirConditionerRequest.java
  18. 32 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/AnalogQuantityRequest.java
  19. 66 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/ChannelPageRequest.java
  20. 31 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/ChannelSubtypeRequest.java
  21. 22 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/ComprehensiveRequest.java
  22. 49 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/DevicePageRequest.java
  23. 64 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/DeviceTreeRequest.java
  24. 22 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/DevicesOperatorRequest.java
  25. 34 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/ElectricEnergyMonitorRequest.java
  26. 215 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/EmptyDomainRequest.java
  27. 34 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/FireEquipmentRequest.java
  28. 34 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/FirefightingComponentsRequest.java
  29. 38 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/IntelligenceSensorRequest.java
  30. 31 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/IntelligentPanelRequest.java
  31. 34 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/ParkingListRequest.java
  32. 33 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/RealTimeDataRequest.java
  33. 31 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/RtspUrlRequest.java
  34. 37 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/SmartSocketRequest.java
  35. 44 0
      visualization-service/src/main/java/com/zksy/visualization/domain/request/UsingEnergyRequest.java
  36. 317 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/AcquisitionDeviceResponse.java
  37. 15 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/AirConditionerControlResponse.java
  38. 102 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/AirConditionerResponse.java
  39. 44 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/AnalogQuantityResponse.java
  40. 113 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ChannelPageResponse.java
  41. 56 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ChannelSubtypeResponse.java
  42. 54 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/CollectionStatisticsResponse.java
  43. 78 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ComprehensiveResponse.java
  44. 182 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/DeviceDetailsResponse.java
  45. 149 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/DevicePageResponse.java
  46. 98 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/DeviceTreeResponse.java
  47. 33 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/DevicesOperatorResponse.java
  48. 165 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ElectricEnergyMonitorResponse.java
  49. 18 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/EmptyDomainResponse.java
  50. 86 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/FireEquipmentResponse.java
  51. 95 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/FirefightingComponentsResponse.java
  52. 65 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/IntelligenceSensorResponse.java
  53. 71 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/IntelligentPanelResponse.java
  54. 63 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingListResponse.java
  55. 97 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingOverviewResponse.java
  56. 28 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingVacancyResponse.java
  57. 82 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/RealTimeDataResponse.java
  58. 77 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/RtspUrlResponse.java
  59. 62 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/SmartSocketResponse.java
  60. 77 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/TrafficStatisticsResponse.java
  61. 40 0
      visualization-service/src/main/java/com/zksy/visualization/domain/response/UsingEnergyResponse.java
  62. 1 1
      visualization-service/src/main/java/com/zksy/visualization/schedule/ScheduledTasks.java
  63. 7 3
      visualization-service/src/main/resources/bootstrap.yaml

+ 5 - 0
visualization-service/pom.xml

@@ -85,6 +85,11 @@
             <artifactId>minioutil</artifactId>
             <version>1.0.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.dahuatech.icc</groupId>
+            <artifactId>java-sdk-oauth</artifactId>
+            <version>1.0.13.10</version>
+        </dependency>
 
     </dependencies>
     <build>

+ 1 - 0
visualization-service/src/main/java/com/zksy/visualization/VisualizationApplication.java

@@ -13,5 +13,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 public class VisualizationApplication {
     public static void main(String[] args) {
         SpringApplication.run(VisualizationApplication.class, args);
+        System.out.println("调用大华系统接口");
     }
 }

+ 5 - 0
visualization-service/src/main/java/com/zksy/visualization/config/IccConfigProperty.java

@@ -19,4 +19,9 @@ public class IccConfigProperty {
     private String public_key;
     private String encryptedText;
     private String Authorization;
+
+    private String httpsPort;
+    private String httpPort;
+    private Long connectionTimeout;
+    private Long readTimeout;
 }

+ 249 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/DeviceInfoController.java

@@ -0,0 +1,249 @@
+package com.zksy.visualization.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.ChannelPageRequest;
+import com.zksy.visualization.domain.request.DevicePageRequest;
+import com.zksy.visualization.domain.request.DeviceTreeRequest;
+import com.zksy.visualization.domain.response.ChannelPageResponse;
+import com.zksy.visualization.domain.response.DeviceDetailsResponse;
+import com.zksy.visualization.domain.response.DevicePageResponse;
+import com.zksy.visualization.domain.response.DeviceTreeResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 设备管理
+ * @date 2024/12/12 16:56:41
+ */
+@RestController
+@Api(tags = "设备管理", description = "设备管理")
+@RequestMapping("/deviceInfo")
+@Slf4j
+public class DeviceInfoController {
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "设备详情查询")
+    @GetMapping("/deviceDetails")
+    public Result deviceDetails(String deviceCode){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        Request request = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-brm/"+iccConfigProperty.getVersion()+"/device/"+deviceCode)
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("设备详情查询失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        DeviceDetailsResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, DeviceDetailsResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("设备详情查询失败:{}", e);
+        }
+        return Result.error("设备详情查询失败");
+    }
+/*    @ApiOperation(value = "设备分页查询")
+    @PostMapping("/devicePage")
+    public Result devicePage(DevicePageRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-brm/"+ iccConfigProperty.getVersion() +"/device/subsystem/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        DevicePageResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, DevicePageResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    return Result.error("分页获取通道信息失败");
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }*/
+
+    @ApiOperation(value = "设备树查询")
+    @PostMapping("/deviceTree")
+    public Result deviceTree(DeviceTreeRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-brm/"+ iccConfigProperty.getVersion() +"/tree")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        DeviceTreeResponse deviceTreeResponse = objectMapper.treeToValue(dataNode, DeviceTreeResponse.class);
+                        return Result.ok(deviceTreeResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    // 获取错误信息并返回
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    /**
+     * TODO 分页获取通道信息
+     * @param
+     * @return ChannelPageResponse
+     * @author Administrator
+     * @date 2024/12/12 16:02:14
+     */
+    @ApiOperation(value = "分页获取通道信息")
+    @PostMapping("/getChannelPage")
+    public Result getChannelPage(ChannelPageRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-brm/"+ iccConfigProperty.getVersion() +"/device/channel/subsystem/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ChannelPageResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, ChannelPageResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+}

+ 197 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/FireFightingController.java

@@ -0,0 +1,197 @@
+package com.zksy.visualization.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.AnalogQuantityRequest;
+import com.zksy.visualization.domain.request.FireEquipmentRequest;
+import com.zksy.visualization.domain.request.FirefightingComponentsRequest;
+import com.zksy.visualization.domain.response.AnalogQuantityResponse;
+import com.zksy.visualization.domain.response.FireEquipmentResponse;
+import com.zksy.visualization.domain.response.FirefightingComponentsResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 消防业务
+ * @date 2024/12/19 15:17:52
+ */
+@RestController
+@Api(tags = "消防业务", description = "消防业务")
+@RequestMapping("/fireFighting")
+@Slf4j
+public class FireFightingController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "消防物联设备分页查询")
+    @PostMapping("/queryFireEquipment")
+    public Result queryFireEquipment(FireEquipmentRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-fdbu/"+ iccConfigProperty.getVersion() +"/device/subsystem/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if("true".equals(success.asText())) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        FireEquipmentResponse fireEquipmentResponse = objectMapper.treeToValue(dataNode, FireEquipmentResponse.class);
+                        return Result.ok(fireEquipmentResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    return Result.error("消防物联设备分页查询失败");
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    @ApiOperation(value = "消防探测器分页查询")
+    @PostMapping("/analogQuantity")
+    public Result analogQuantity(FirefightingComponentsRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-fdbu/"+ iccConfigProperty.getVersion() +"/detector/subsystem/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if("true".equals(success.asText())) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        FirefightingComponentsResponse firefightingComponentsResponse = objectMapper.treeToValue(dataNode, FirefightingComponentsResponse.class);
+                        return Result.ok(firefightingComponentsResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    return Result.error("消防探测器分页查询失败");
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    @ApiOperation(value = "分页查询消防最新模拟量信息")
+    @PostMapping("/fireSimulation")
+    public Result fireSimulation(AnalogQuantityRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-fdbu/"+ iccConfigProperty.getVersion() +"/analog/subsystem/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if("true".equals(success.asText())) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        AnalogQuantityResponse analogQuantityResponse = objectMapper.treeToValue(dataNode, AnalogQuantityResponse.class);
+                        return Result.ok(analogQuantityResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    return Result.error("分页查询消防最新模拟量信息失败");
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+}

+ 253 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/ParkingManageController.java

@@ -0,0 +1,253 @@
+package com.zksy.visualization.controller;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.ParkingListRequest;
+import com.zksy.visualization.domain.response.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 停车管理
+ * @date 2024/12/16 10:58:15
+ */
+@RestController
+@Api(tags = "停车管理", description = "停车管理")
+@RequestMapping("/parkingManage")
+@Slf4j
+public class ParkingManageController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    @ApiOperation(value = "停车场概览(用户总览/今日收款占比/今日泊位概况)")
+    @GetMapping("/parkingLot")
+    public Result parkingLot(){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        Request request = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/ipms/parkSurvey/platformDetail?noKeepAlive=true")
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("查询停车场概览失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ParkingOverviewResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, ParkingOverviewResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("error:{}", e);
+        }
+        return Result.error("查询停车场概览失败");
+    }
+
+    @ApiOperation(value = "收款统计")
+    @GetMapping("/collectionStatistics")
+    public Result collectionStatistics(){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        Request request = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/ipms/parkSurvey/todaySurvey?type=0")
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("查询收款统计失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        CollectionStatisticsResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, CollectionStatisticsResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("查询收款统计失败:{}", e);
+        }
+        return Result.error("查询收款统计失败");
+    }
+
+    @ApiOperation(value = "车流统计")
+    @GetMapping("/trafficStatistics")
+    public Result TrafficStatistics(){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        Request request = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/ipms/parkSurvey/carInOutSurvey?type=0")
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("查询车流统计失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        TrafficStatisticsResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, TrafficStatisticsResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("查询车流统计失败:{}", e);
+        }
+        return Result.error("查询车流统计失败");
+    }
+
+    @ApiOperation(value = "查询车场列表")
+    @GetMapping("/parkingList")
+    public Result ParkingList(ParkingListRequest parkingListRequest){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        HttpUrl url = new HttpUrl.Builder()
+                .scheme("https")
+                .host(iccConfigProperty.getHost())
+                .addPathSegments("/evo-apigw/ipms/parkinglot/query")
+                .addQueryParameter("pageNum", String.valueOf(parkingListRequest.getPageNum()))
+                .addQueryParameter("pageSize",String.valueOf(parkingListRequest.getPageSize()))
+                .addQueryParameter("returnPage",String.valueOf(parkingListRequest.getReturnPage()))
+                .addQueryParameter("parkingLotFuzzy",parkingListRequest.getParkingLotFuzzy())
+                .build();
+
+        Request request = new Request.Builder()
+                .url(url)
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("查询车场列表失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ParkingListResponse parkingListResponse = objectMapper.treeToValue(dataNode, ParkingListResponse.class);
+                        return Result.ok(parkingListResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else{
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("查询车场列表失败:{}", e);
+        }
+        return Result.error("查询车场列表失败");
+    }
+
+    @ApiOperation(value = "车场余位信息")
+    @GetMapping("/parkingVacancy")
+    public Result ParkingVacancy(){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        Request request = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/ipms/parkinglot/stat")
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("车场余位信息失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ParkingVacancyResponse parkingListResponse = objectMapper.treeToValue(dataNode, ParkingVacancyResponse.class);
+                        return Result.ok(parkingListResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else{
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("车场余位信息失败:{}", e);
+        }
+        return Result.error("车场余位信息失败");
+    }
+
+}

+ 120 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/RealTimePreviewVideoController.java

@@ -0,0 +1,120 @@
+package com.zksy.visualization.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.RtspUrlRequest;
+import com.zksy.visualization.domain.response.RtspUrlResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 视频实时预览
+ * @date 2024/12/12 13:32:23
+ */
+@RestController
+@Api(tags = "视频实时预览", description = "视频实时预览")
+@RequestMapping("/realTimePreviewVideo")
+@Slf4j
+public class RealTimePreviewVideoController {
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+    /**
+     * TODO 视频路径
+      * @param
+     * @return void
+     * @author Administrator
+     * @date 2024/12/12 14:43:37
+     */
+    @ApiOperation(value = "获取视频路径")
+    @PostMapping("/getRtspUrl")
+    public Result getRtspUrl(RtspUrlRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/admin/API/MTS/Video/StartVideo")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        RtspUrlResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, RtspUrlResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    /**
+     * 获取RTSP流地址
+     * @param rtspUrlRequest
+     * @return
+     */
+/*    public RtspUrlResponse getRtspUrl1(RtspUrlRequest rtspUrlRequest){
+        RtspUrlResponse response=null;
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        try {
+            log.info("RealTimePreviewDemo,getRtspUrl,request:{}", JSONUtil.toJsonStr(rtspUrlRequest));
+            response = HttpUtils.executeJson("/evo-apigw/admin/API/MTS/Video/StartVideo", rtspUrlRequest,null, Method.POST , config, RtspUrlResponse.class);
+            log.info("RealTimePreviewDemo,getRtspUrl,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.getCode().equals("1000")) {
+            log.info("获取rtsp流地址失败:{}",response.getErrMsg());
+        }
+        return response;
+    }*/
+}

+ 131 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/RotatingRingController.java

@@ -0,0 +1,131 @@
+package com.zksy.visualization.controller;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.ChannelSubtypeRequest;
+import com.zksy.visualization.domain.request.RealTimeDataRequest;
+import com.zksy.visualization.domain.response.ChannelSubtypeResponse;
+import com.zksy.visualization.domain.response.RealTimeDataResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 动环管理
+ * @date 2024/12/19 16:23:14
+ */
+@RestController
+@Api(tags = "动环管理", description = "动环管理")
+@RequestMapping("/rotatingRing")
+@Slf4j
+public class RotatingRingController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+    @ApiOperation(value = "通道子类型分页查询")
+    @GetMapping("/channelSubtype")
+    public Result ChannelSubtype(ChannelSubtypeRequest channelSubtypeRequest){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        HttpUrl url = new HttpUrl.Builder()
+                .scheme("https")
+                .host(iccConfigProperty.getHost())
+                .addPathSegments("/evo-apigw/evo-pmms/dictionary/devChildTypeList")
+                .addQueryParameter("pageNo", String.valueOf(channelSubtypeRequest.getPageNo()))
+                .addQueryParameter("pageSize",String.valueOf(channelSubtypeRequest.getPageSize()))
+                .addQueryParameter("searchKey",String.valueOf(channelSubtypeRequest.getSearchKey()))
+                .build();
+
+        Request request = new Request.Builder()
+                .url(url)
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("通道子类型分页查询失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ChannelSubtypeResponse channelSubtypeResponse = objectMapper.treeToValue(dataNode, ChannelSubtypeResponse.class);
+                        return Result.ok(channelSubtypeResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else{
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (Exception e) {
+            log.error("通道子类型分页查询失败:{}", e);
+        }
+        return Result.error("通道子类型分页查询失败");
+    }
+
+    @ApiOperation(value = "分页查询实时数据信息")
+    @GetMapping("/realTimeData")
+    public Result RealTimeData(RealTimeDataRequest realTimeDataRequest){
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        HttpUrl url = new HttpUrl.Builder()
+                .scheme("https")
+                .host(iccConfigProperty.getHost())
+                .addPathSegments("/evo-apigw/evo-pmms/real/data/nodeId="+realTimeDataRequest.getNodeId()+"" +
+                        "&devChildType="+realTimeDataRequest.getDevChildType()+"&pageNo="+realTimeDataRequest.getPageNo()+"" +
+                        "&pageSize="+realTimeDataRequest.getPageSize())
+                .build();
+
+        Request request = new Request.Builder()
+                .url(url)
+                .addHeader("Authorization", authorization)
+                .build();
+        try {
+            Response response = httpClient.newCall(request).execute();
+            if(!response.isSuccessful()){
+                return Result.error("分页查询实时数据信息失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                ObjectMapper objectMapper = new ObjectMapper();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                    JsonNode dataNode = rootNode.path("result");
+                    if (dataNode.isObject()) {
+                        RealTimeDataResponse realTimeDataResponse = objectMapper.treeToValue(dataNode, RealTimeDataResponse.class);
+                        return Result.ok(realTimeDataResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+            }
+        } catch (Exception e) {
+            log.error("分页查询实时数据信息失败:{}", e);
+        }
+        return Result.error("分页查询实时数据信息失败");
+    }
+
+}

+ 178 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/AcquisitionDeviceController.java

@@ -0,0 +1,178 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.AcquisitionDeviceRequest;
+import com.zksy.visualization.domain.request.EmptyDomainRequest;
+import com.zksy.visualization.domain.response.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智慧用电-设备管理
+ * @date 2024/12/16 15:13:50
+ */
+@RestController
+@Api(tags = "智慧用电-设备管理", description = "智慧用电-设备管理")
+@RequestMapping("/acquisitionDevice")
+@Slf4j
+public class AcquisitionDeviceController {
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "获取设备能力")
+    @PostMapping("/getAcquisitionDevice")
+    public Result getAcquisitionDevice(AcquisitionDeviceRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electricity/device/info")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        AcquisitionDeviceResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, AcquisitionDeviceResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+    @ApiOperation(value = "下发单个空开阀值")
+    @PostMapping("/getEmptyDomain")
+    public Result getEmptyDomain(EmptyDomainRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electricity/device/airSwitch/set")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isTextual()) {
+                        return Result.ok(dataNode.asText());
+                    }else if (dataNode.isObject() && dataNode.isEmpty()) {
+                        return Result.ok(null);
+                    } else {
+                        return Result.error("Unexpected data format: " + dataNode);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+/*    public AcquisitionDeviceResponse airConditioner(AcquisitionDeviceRequest acquisitionDeviceRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        AcquisitionDeviceResponse response=null;
+        try {
+            log.info("acquisitionDevice,getAcquisitionDevice,request:{}", JSONUtil.toJsonStr(acquisitionDeviceRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electricity/device/info", acquisitionDeviceRequest,null, Method.POST , config, AcquisitionDeviceResponse.class);
+            log.info("acquisitionDevice,getAcquisitionDevice,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("获取设备能力失败:{}",response.getErrMsg());
+        }
+        return response;
+    }*/
+
+    /*public EmptyDomainResponse emptyDomain(EmptyDomainRequest emptyDomainRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        EmptyDomainResponse response=null;
+        try {
+            log.info("emptyDomain,getEmptyDomain,request:{}", JSONUtil.toJsonStr(emptyDomainRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electricity/device/airSwitch/set", emptyDomainRequest,null, Method.POST , config, EmptyDomainResponse.class);
+            log.info("emptyDomain,getEmptyDomain,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("下发单个空开阀值失败:{}",response.getErrMsg());
+        }
+        return response;
+    }*/
+}

+ 180 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/AirConditionerController.java

@@ -0,0 +1,180 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.AirConditionerControlRequest;
+import com.zksy.visualization.domain.request.AirConditionerRequest;
+import com.zksy.visualization.domain.response.AirConditionerControlResponse;
+import com.zksy.visualization.domain.response.AirConditionerResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智慧用电-空调控制
+ * @date 2024/12/12 16:58:15
+ */
+@RestController
+@Api(tags = "智慧用电-空调控制", description = "智慧用电-空调控制")
+@RequestMapping("/airConditioner")
+@Slf4j
+public class AirConditionerController {
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "根据条件查询空调信息")
+    @PostMapping("/getAirConditionerInfo")
+    public Result getAirConditionerInfo(AirConditionerRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/airConditioner/search")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        AirConditionerResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, AirConditionerResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    @ApiOperation(value = "批量设置空调属性")
+    @PostMapping("/controlAirConditioner")
+    public Result controlAirConditioner(AirConditionerControlRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/airConditioner/controlMulti")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                    String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        AirConditionerControlResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, AirConditionerControlResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+    /*public AirConditionerControlResponse getAirConditionerControl(AirConditionerControlRequest airConditionerControlRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        AirConditionerControlResponse response=null;
+        try {
+            log.info("airConditioner,controlAirConditioner,request:{}", JSONUtil.toJsonStr(airConditionerControlRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/airConditioner/controlMulti", airConditionerControlRequest,null, Method.POST , config, AirConditionerControlResponse.class);
+            log.info("airConditioner,controlAirConditioner,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("批量设置空调属性失败:{}",response.getErrMsg());
+        }
+        return response;
+    }
+    public AirConditionerResponse getAirConditioner(AirConditionerRequest airConditionerRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        AirConditionerResponse response=null;
+        try {
+            log.info("airConditioner,getAirConditionerInfo,request:{}", JSONUtil.toJsonStr(airConditionerRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/airConditioner/search", airConditionerRequest,null, Method.POST , config, AirConditionerResponse.class);
+            log.info("airConditioner,getAirConditionerInfo,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("根据条件查询空调信息失败:{}",response.getErrMsg());
+        }
+        return response;
+    }
+*/
+
+}

+ 111 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/ComprehensiveController.java

@@ -0,0 +1,111 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.ComprehensiveRequest;
+import com.zksy.visualization.domain.response.ComprehensiveResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智慧用电-综合查询(用于查询空开的电流、电压、温度、功率情况)
+ * @date 2024/12/16 14:45:27
+ */
+@RestController
+@Api(tags = "智慧用电-综合查询", description = "智慧用电-综合查询")
+@RequestMapping("/comprehensive")
+@Slf4j
+public class ComprehensiveController {
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "综合查询(用于查询空开的电流、电压、温度、功率情况)")
+    @PostMapping("/comprehensiveQuery")
+    public Result comprehensive(ComprehensiveRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/history/getOtherData")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ComprehensiveResponse comprehensiveResponse = objectMapper.treeToValue(dataNode, ComprehensiveResponse.class);
+                        return Result.ok(comprehensiveResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+/*    public ComprehensiveResponse getComprehensive(ComprehensiveRequest comprehensiveRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        ComprehensiveResponse response=null;
+        try {
+            log.info("airConditioner,controlAirConditioner,request:{}", JSONUtil.toJsonStr(comprehensiveRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/history/getOtherData", comprehensiveRequest,null, Method.POST , config, ComprehensiveResponse.class);
+            log.info("airConditioner,controlAirConditioner,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("综合查询失败:{}",response.getErrMsg());
+        }
+        return response;
+    }*/
+
+}

+ 147 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/ElectricEnergyMonitorController.java

@@ -0,0 +1,147 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.DevicesOperatorRequest;
+import com.zksy.visualization.domain.request.ElectricEnergyMonitorRequest;
+import com.zksy.visualization.domain.response.DevicesOperatorResponse;
+import com.zksy.visualization.domain.response.ElectricEnergyMonitorResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 电能监测
+ * @date 2024/12/18 15:33:33
+ */
+@RestController
+@Api(tags = "智慧用电-电能监测", description = "智慧用电-电能监测")
+@RequestMapping("/electricEnergyMonitor")
+@Slf4j
+public class ElectricEnergyMonitorController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+    @ApiOperation(value = "全部/异常信息显示、手动刷新(空开信息、异常信息、子异常信息(电压异常、电流异常、功率异常、温度异常、漏电异常)信息显示、手动刷新)")
+    @PostMapping("/getElectricEnergyMonitor")
+    public Result getElectricEnergyMonitor(ElectricEnergyMonitorRequest request) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electric-energy-detection/showInfos")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        ElectricEnergyMonitorResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, ElectricEnergyMonitorResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+    @ApiOperation(value = "批量开启/关闭、单个设备开启/关闭")
+    @PostMapping("/devicesOperator")
+    public Result DevicesOperator(DevicesOperatorRequest request) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/electric-energy-detection/devicesOperator")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        DevicesOperatorResponse parkingOverviewResponse = objectMapper.treeToValue(dataNode, DevicesOperatorResponse.class);
+                        return Result.ok(parkingOverviewResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+}

+ 201 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/LightingGatewayController.java

@@ -0,0 +1,201 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.IntelligenceSensorRequest;
+import com.zksy.visualization.domain.request.IntelligentPanelRequest;
+import com.zksy.visualization.domain.request.SmartSocketRequest;
+import com.zksy.visualization.domain.response.IntelligenceSensorResponse;
+import com.zksy.visualization.domain.response.IntelligentPanelResponse;
+import com.zksy.visualization.domain.response.SmartSocketResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智慧用电-照明网关
+ * @date 2024/12/19 08:53:12
+ */
+@RestController
+@Api(tags = "智慧用电-照明网关", description = "智慧用电-照明网关")
+@RequestMapping("/lightingGateway")
+@Slf4j
+public class LightingGatewayController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+    @ApiOperation(value = "智能面板分页查询")
+    @PostMapping("/getIntelligentPanelPage")
+    public Result getIntelligentPanelPage(IntelligentPanelRequest request) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/lightingControl/panel/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        IntelligentPanelResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, IntelligentPanelResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+    @ApiOperation(value = "智能插座分页查询")
+    @PostMapping("/getSmartSocketPage")
+    public Result getSmartSocketPage(SmartSocketRequest request) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/lightingControl/socket/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        SmartSocketResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, SmartSocketResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+    @ApiOperation(value = "智能传感器分页查询")
+    @PostMapping("/getIntelligenceSensorPage")
+    public Result getIntelligenceSensorPage(IntelligenceSensorRequest request) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/lightingControl/inductor/page")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        IntelligenceSensorResponse intelligenceSensorResponse = objectMapper.treeToValue(dataNode, IntelligenceSensorResponse.class);
+                        return Result.ok(intelligenceSensorResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+}

+ 110 - 0
visualization-service/src/main/java/com/zksy/visualization/controller/smartElectricController/UsingEnergyController.java

@@ -0,0 +1,110 @@
+package com.zksy.visualization.controller.smartElectricController;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zksy.common.core.domain.Result;
+import com.zksy.visualization.config.IccConfigProperty;
+import com.zksy.visualization.domain.request.UsingEnergyRequest;
+import com.zksy.visualization.domain.response.UsingEnergyResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智慧用电-用能统计
+ * @date 2024/12/17 09:31:58
+ */
+@RestController
+@Api(tags = "智慧用电-用能统计", description = "智慧用电-用能统计")
+@RequestMapping("/usingEnergy")
+@Slf4j
+public class UsingEnergyController {
+    @Autowired
+    private OkHttpClient httpClient;
+    @Autowired
+    private IccConfigProperty iccConfigProperty;
+    @Autowired
+    private RedisTemplate<String,String> redisTemplate;
+
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+
+    @ApiOperation(value = "用能统计")
+    @PostMapping("/getUsingEnergy")
+    public Result getUsingEnergy(UsingEnergyRequest request){
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonParams = null;
+        String authorization = redisTemplate
+                .opsForValue()
+                .get("Authorization:" + iccConfigProperty.getUsername());
+        try {
+            jsonParams = objectMapper.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            log.error("JSON序列化失败: {}", e);
+            return Result.error("请求失败");
+        }
+        // 创建请求体
+        RequestBody body = RequestBody.create(jsonParams, JSON);
+        // 构建请求
+        Request requestHttp = new Request.Builder()
+                .url("https://" + iccConfigProperty.getHost() + "/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/energyCount/getCurrentByCondition")
+                .addHeader("Authorization", authorization)
+                .post(body)
+                .build();
+        // 发送请求
+        try (Response response = httpClient.newCall(requestHttp).execute()) {
+            if (!response.isSuccessful()) {
+                return Result.error("请求失败");
+            }
+            ResponseBody responseBody = response.body();
+            if (responseBody != null) {
+                String responseString = responseBody.string();
+                JsonNode rootNode = objectMapper.readTree(responseString);
+                JsonNode success = rootNode.path("success");
+                if(success.isBoolean() && success.asBoolean()) {
+                    JsonNode dataNode = rootNode.path("data");
+                    if (dataNode.isObject()) {
+                        UsingEnergyResponse intelligentPanelResponse = objectMapper.treeToValue(dataNode, UsingEnergyResponse.class);
+                        return Result.ok(intelligentPanelResponse);
+                    } else {
+                        return Result.ok(null);
+                    }
+                }else {
+                    JsonNode errMsgNode = rootNode.path("errMsg");
+                    String errMsg = errMsgNode.isTextual() ? errMsgNode.asText() : "未知错误";
+                    return Result.error(errMsg);
+                }
+            }
+        } catch (IOException e) {
+            log.error("请求失败: {}", e);
+        }
+        return Result.error("请求失败");
+    }
+
+/*    public UsingEnergyResponse usingEnergy(UsingEnergyRequest usingEnergyRequest){
+        OauthConfigUserPwdInfo config = oauthConfigUtil.getOauthConfig();
+        UsingEnergyResponse response=null;
+        try {
+            log.info("usingEnergy,getComprehensiveQuery,request:{}", JSONUtil.toJsonStr(usingEnergyRequest));
+            response = HttpUtils.executeJson("/evo-apigw/evo-electricity/"+ iccConfigProperty.getVersion() +"/energyCount/getCurrentByCondition", usingEnergyRequest,null, Method.POST , config, UsingEnergyResponse.class);
+            log.info("usingEnergy,getComprehensiveQuery,response:{}", JSONUtil.toJsonStr(response));
+        } catch (ClientException e) {
+            log.error(e.getErrMsg(), e);
+        }
+        if(!response.isSuccess()) {
+            log.info("用能统计失败:{}",response.getErrMsg());
+        }
+        return response;
+    }*/
+}

+ 54 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/AcquisitionDeviceRequest.java

@@ -0,0 +1,54 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 获取设备能力
+ * @date 2024/12/16 15:10:32
+ */
+@Data
+public class AcquisitionDeviceRequest {
+    @ApiModelProperty(value = "设备IP", required = false)
+    private String address;
+
+    @ApiModelProperty(value = "设备端口", required = false)
+    private Integer port;
+
+    @ApiModelProperty(value = "主动注册Id", required = false)
+    private String deviceNo;
+
+    @ApiModelProperty(value = "设备厂商,固定值Dahua", required = true, example = "Dahua")
+    @NotBlank(message = "设备厂商不能为空")
+    private String deviceManufacturer;
+
+    @ApiModelProperty(value = "设备类型,固定值iGATEWAY", required = true, example = "iGATEWAY")
+    @NotBlank(message = "设备类型不能为空")
+    private String deviceClass;
+
+    @ApiModelProperty(value = "设备编码", required = true)
+    @NotBlank(message = "设备编码不能为空")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "协议类型,IP方式为Dahua2,主动注册方式为Dahua-Reg", required = true)
+    @NotBlank(message = "协议类型不能为空")
+    private String protocolType;
+
+    @ApiModelProperty(value = "空开类型,固定值AIRSWITCH", required = true, example = "AIRSWITCH")
+    @NotBlank(message = "空开类型不能为空")
+    private String type;
+
+    @ApiModelProperty(value = "设备用户名", required = true)
+    @NotBlank(message = "设备用户名不能为空")
+    private String username;
+
+    @ApiModelProperty(value = "密码,明文展示", required = true)
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+}

+ 31 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/AirConditionerControlRequest.java

@@ -0,0 +1,31 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@Data
+public class AirConditionerControlRequest {
+
+    @NotNull(message = "通道编码集合不能为空")
+    @ApiModelProperty(value = "通道编码集合", required = true)
+    private List<String> channelCodeList;
+
+    @ApiModelProperty(value = "电源控制 0关闭,1开启", example = "1")
+    private Integer powerControl;
+
+    @Min(value = 16, message = "空调温度不能低于16度")
+    @Max(value = 32, message = "空调温度不能高于32度")
+    @ApiModelProperty(value = "空调温度调节 16~32 摄氏温度值", example = "25")
+    private Integer temperatureControl;
+
+    @ApiModelProperty(value = "空调模式调节 0自动,1制冷,2制热,3通风,4除湿", example = "1")
+    private Integer modeControl;
+
+    @ApiModelProperty(value = "空调风速调节 0自动,1低速,2中速,3高速", example = "0")
+    private Integer windSpeedControl;
+}

+ 55 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/AirConditionerRequest.java

@@ -0,0 +1,55 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 根据条件查询空调信息入参
+ * @date 2024/12/12 16:46:48
+ */
+@Data
+public class AirConditionerRequest {
+    @ApiModelProperty(value = "查询方式 0图表 1列表", required = true, example = "1")
+    private int choseMethod;
+
+    @ApiModelProperty(value = "空调状态,0离线 1开机 2关机 3全部", required = true, example = "3")
+    private int status;
+
+    @ApiModelProperty(value = "0:<系统配置设置时间,1:>=系统配置设置时间 2:全部", required = true, example = "2")
+    private int useTimeStatus;
+
+    @ApiModelProperty(value = "设定温度 0:16度至系统配置设置温度,1:系统配置设置温度至32度 2全部", required = true, example = "2")
+    private int temperatureStatus;
+
+    @ApiModelProperty(value = "模式:0-自动,1-制冷,2-制热,3-通风,4-除湿", example = "0")
+    private Integer model;
+
+    @ApiModelProperty(value = "风速 0-自动,1-低速,2-中速,3-高速", example = "0")
+    private Integer windSpeed;
+
+    @ApiModelProperty(value = "排序字段 已开时长:USE_TIME,温度:TEMPERATURE", required = true, example = "USE_TIME")
+    private String sortName;
+
+    @ApiModelProperty(value = "排序方式:true 升序,false 降序 默认true", required = true, example = "true")
+    private Boolean sortFlag;
+
+    @ApiModelProperty(value = "当前页码,默认1", required = true, example = "1")
+    private int pageNum;
+
+    @ApiModelProperty(value = "每页数量,默认10", required = true, example = "10")
+    private int pageSize;
+
+    @ApiModelProperty(value = "组织编码集合", required = true)
+    private List<String> orgCodeList;
+
+    @ApiModelProperty(value = "挂靠在根节点下的设备信息")
+    private List<String> deviceCodeList;
+
+    @ApiModelProperty(value = "用户勾选的空调通道信息,若传入了该参数,则该通道所属的设备编码不应在deviceCodeList下", required = true)
+    private List<String> checkChannelCodeList;
+}

+ 32 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/AnalogQuantityRequest.java

@@ -0,0 +1,32 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询消防最新模拟量信息
+ * @date 2024/12/19 16:02:03
+ */
+@Data
+public class AnalogQuantityRequest {
+    @ApiModelProperty(value = "当前页,默认1")
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "每页记录数,默认100,最多500")
+    @Size(max = 500, message = "每页记录数最多为500")
+    private Integer pageSize = 100;
+
+    @ApiModelProperty(value = "设备编码列表,最大支持50个")
+    @Size(max = 50, message = "设备编码列表最多包含50个编码")
+    private List<String> deviceCodes;
+
+    @ApiModelProperty(value = "主机或探测器的imei,最大支持50个")
+    @Size(max = 50, message = "主机或探测器的imei列表最多包含50个编码")
+    private List<String> deviceSns;
+}

+ 66 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/ChannelPageRequest.java

@@ -0,0 +1,66 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * program:java-sdk-demo
+ *
+ * @Author: 355079
+ * @Date:2024-05-07 10:02
+ * @Description: 设备通道分页查询请求参数
+ */
+@Data
+public class ChannelPageRequest {
+
+    @ApiModelProperty(value = "当前页,默认1")
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "每页记录数,默认10")
+    private Integer pageSize = 10;
+
+    @ApiModelProperty(value = "排序属性 支持排序属性:id、updateTime、ownerCode、deviceCode、channelCode、unitType、channelType、cameraType、channelSn")
+    private String sort;
+
+    @ApiModelProperty(value = "排序方式:ASC-升序,DESC-降序(默认)")
+    private String sortType = "DESC";
+
+    @ApiModelProperty(value = "所属组织编码")
+    private String ownerCode;
+
+    @ApiModelProperty(value = "设备编码列表")
+    private List<String> deviceCodeList;
+
+    @ApiModelProperty(value = "通道编码列表")
+    private List<String> channelCodeList;
+
+    @ApiModelProperty(value = "设备大类")
+    private Integer deviceCategory;
+
+    @ApiModelProperty(value = "设备小类,此字段生效,则deviceCategory必填")
+    private Integer deviceType;
+
+    @ApiModelProperty(value = "单元类型列表")
+    private List<Integer> unitTypeList;
+
+    @ApiModelProperty(value = "通道类型列表")
+    private List<Integer> channelTypeList;
+
+    @ApiModelProperty(value = "在线状态")
+    private Integer isOnline;
+
+    @ApiModelProperty(value = "是否已经接入")
+    private Integer access;
+
+    @ApiModelProperty(value = "是否是虚拟通道")
+    private Integer isVirtual;
+
+    @ApiModelProperty(value = "状态")
+    private Integer stat;
+
+    @ApiModelProperty(value = "是否包含子节点,默认true,展示下级通道")
+    private Boolean includeSubOwnerCodeFlag = true;
+
+}

+ 31 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/ChannelSubtypeRequest.java

@@ -0,0 +1,31 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 动环管理-通道子类型分页查询
+ * @date 2024/12/19 16:21:38
+ */
+@Data
+public class ChannelSubtypeRequest {
+    @ApiModelProperty(value = "页码,从1开始", required = true)
+    @NotNull(message = "页码不能为空")
+    @Min(value = 1, message = "页码必须从1开始")
+    private Integer pageNo;
+
+    @ApiModelProperty(value = "分页大小,最大1000", required = true)
+    @NotNull(message = "分页大小不能为空")
+    @Size(max = 1000, message = "分页大小最大为1000")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "设备名称模糊搜索")
+    private String searchKey;
+}

+ 22 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/ComprehensiveRequest.java

@@ -0,0 +1,22 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 综合查询
+ * @date 2024/12/16 14:40:23
+ */
+@Data
+public class ComprehensiveRequest {
+    @ApiModelProperty(value = "空开ID", required = true)
+    private String airSwitchId;
+
+    @ApiModelProperty(value = "查询日期", required = true)
+    private String date;
+}

+ 49 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/DevicePageRequest.java

@@ -0,0 +1,49 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 设备分页查询
+ * @date 2024/12/23 14:31:46
+ */
+@Data
+public class DevicePageRequest {
+    @ApiModelProperty(value = "当前页,默认1", example = "1")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "每页记录数,默认10", example = "10")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "设备所属组织编码集合")
+    private List<String> ownerCodes;
+
+    @ApiModelProperty(value = "是否包含子节点设备,0-不包含,1-包含", example = "1")
+    private Integer showChildNodeData;
+
+    @ApiModelProperty(value = "设备大类")
+    private List<Integer> categorys;
+
+    @ApiModelProperty(value = "设备小类, 设备小类的格式是:大类_小类,categorys与types同时存在时,此字段无效")
+    private List<String> types;
+
+    @ApiModelProperty(value = "设备编码列表,最大支持500个")
+    private List<String> deviceCodes;
+
+    @ApiModelProperty(value = "设备标识码列表,最大支持500个")
+    private List<String> deviceSns;
+
+    @ApiModelProperty(value = "设备地址,最大支持500个")
+    private List<String> deviceIps;
+
+    @ApiModelProperty(value = "在线状态,0-离线,1-在线", example = "1")
+    private Integer isOnline;
+
+    @ApiModelProperty(value = "是否获取虚拟设备,0-获取非虚拟设备,1-只获取虚拟设备", example = "0")
+    private Integer syncVirtualData;
+}

+ 64 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/DeviceTreeRequest.java

@@ -0,0 +1,64 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 设备树查询
+ * @date 2024/12/23 14:39:25
+ */
+@Data
+public class DeviceTreeRequest {
+    @ApiModelProperty(value = "上级节点编码(组织编码/设备编码),层级查询时将返回参数中的id作为上级节点编码请求;基础组织根节点是001,逻辑组织默认根节点调用户详情接口获取defaultOrgCode字段", example = "001")
+    private String id;
+
+    @ApiModelProperty(value = "组织/设备树展示的节点类型, type第一个分号的数据参考用户详情接口获取defaultOrgCode字段,入参为鉴权认证的用户id;" +
+            "基础组织示例:001;;1 逻辑组织示例:L01;;1", example = "001;;1")
+    private String type;
+
+    @ApiModelProperty(value = "业务类型: 1-基本组织,2-逻辑组织,默认值1,基础组织;逻辑组织编码是L打头", example = "1")
+    private Integer busiType;
+
+    @ApiModelProperty(value = "查询逻辑组织根组织标识,默认true,逻辑组织查询时使用;等价于基本组织组织编码传空的情况,其它情况请将参数设置为false,逻辑组织时推荐false", example = "false")
+    private Boolean checkLogicRootOrgNodeFlag;
+
+    @ApiModelProperty(value = "通道归属于组织还是归属于设备 1:归属于设备 0:归属于组织,默认0;注意,该参数只在type值为”001;1;”这种类型(最后一个分号后面不指定通道类型)时生效", example = "0")
+    private Integer channelBelong;
+
+    @ApiModelProperty(value = "操作类型,没有默认为根据上级节点查询下级节点;如果为search,表示按节点名称模糊搜索", example = "search")
+    private String act;
+
+    @NotNull(message = "上级组织/设备节点是否有权限不能为空")
+    @ApiModelProperty(value = "上级组织/设备节点是否有权限,查询下级节点时该值取上级节点中checkStat属性值;推荐送1", required = true, example = "1")
+    private Integer checkStat;
+
+    @ApiModelProperty(value = "act=search时模糊搜索的关键字", example = "关键字")
+    private String searchKey;
+
+    @ApiModelProperty(value = "通道能力集,取值为: '单元类型1_通道能力集,单元类型2_通道能力集', 如: ['1_0000000001000000','2_0000000000000001110']")
+    private List<String> chCapability;
+
+    @ApiModelProperty(value = "设备能力集,取值为: '设备大类1_通道能力集,设备大类2_通道能力集', 如: ['1_0000000001000000','2_0000000000000001110']")
+    private List<String> devCapability;
+
+    @ApiModelProperty(value = "初始化加载树时需要勾选的节点id列表")
+    private List<String> checkNodes;
+
+    @ApiModelProperty(value = "是否展示级联节点,默认是1", example = "1")
+    private Integer showCascadeNode;
+
+    @ApiModelProperty(value = "是否展示虚拟设备、通道,默认0", example = "0")
+    private Integer showVirtualNode;
+
+    @ApiModelProperty(value = "是否展示出没有通道或设备的组织节点,默认0", example = "0")
+    private Integer showEmptyOrgNode;
+
+    @ApiModelProperty(value = "设备通道状态 -1:查询全部 0:查询关闭 1:查询已经开启 默认:1", example = "1")
+    private Integer stat;
+}

+ 22 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/DevicesOperatorRequest.java

@@ -0,0 +1,22 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 批量开启/关闭、单个设备开启/关闭
+ * @date 2024/12/19 08:46:18
+ */
+@Data
+public class DevicesOperatorRequest {
+    @ApiModelProperty(value = "用户请求的动作,0表示关闭,1表示开启", required = true)
+    private Integer action;
+
+    @ApiModelProperty(value = "用户点击的空开信息,格式:网关标识#空开标识", required = true)
+    private List<String> dataList;
+}

+ 34 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/ElectricEnergyMonitorRequest.java

@@ -0,0 +1,34 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 电能监测
+ * @date 2024/12/18 15:30:33
+ */
+@Data
+public class ElectricEnergyMonitorRequest {
+    @ApiModelProperty(value = "用户点击的组织编号集合", required = true)
+    private List<String> orgData;
+
+    @ApiModelProperty(value = "用户点击的网关编号集合", required = true)
+    private List<String> gatewayData;
+
+    @ApiModelProperty(value = "用户点击的空开编号集合", required = true)
+    private List<String> data;
+
+    @ApiModelProperty(value = "用户请求的动作(0表示全部信息,1表示全部异常,2表示电压异常,3表示电流异常,4表示功率异常,5表示温度异常,6表示漏电异常)", required = true)
+    private Integer action;
+
+    @ApiModelProperty(value = "用户当前查看的页码", required = true)
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "当前每页显示条数", required = true)
+    private Integer pageSize;
+}

+ 215 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/EmptyDomainRequest.java

@@ -0,0 +1,215 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 下发单个空开阈值
+ * @date 2024/12/17 09:09:10
+ */
+@Data
+public class EmptyDomainRequest {
+    @ApiModelProperty(value = "通道编码", required = true)
+    @NotBlank(message = "通道编码不能为空")
+    private String channelCode;
+
+    // 温度预警阈值
+    @ApiModelProperty(value = "A相开关温度预警阈值")
+    private Double temperatureWaringAx;
+
+    @ApiModelProperty(value = "B相开关温度预警阈值")
+    private Double temperatureWaringBx;
+
+    @ApiModelProperty(value = "C相开关温度预警阈值")
+    private Double temperatureWaringCx;
+
+    @ApiModelProperty(value = "零相开关温度预警阈值")
+    private Double temperatureWaringLx;
+
+    // 温度报警阈值
+    @ApiModelProperty(value = "A相开关温度报警阈值")
+    private Double temperatureAlarmAx;
+
+    @ApiModelProperty(value = "B相开关温度报警阈值")
+    private Double temperatureAlarmBx;
+
+    @ApiModelProperty(value = "C相开关温度报警阈值")
+    private Double temperatureAlarmCx;
+
+    @ApiModelProperty(value = "零相开关温度报警阈值")
+    private Double temperatureAlarmLx;
+
+    // 温度上升预警时间阈值
+    @ApiModelProperty(value = "A相温度上升预警时间阈值")
+    private Integer temperatureUpTimeWaringAx;
+
+    @ApiModelProperty(value = "B相温度上升预警时间阈值")
+    private Integer temperatureUpTimeWaringBx;
+
+    @ApiModelProperty(value = "C相温度上升预警时间阈值")
+    private Integer temperatureUpTimeWaringCx;
+
+    @ApiModelProperty(value = "零相温度上升预警时间阈值")
+    private Integer temperatureUpTimeWaringLx;
+
+    // 温度上升预警温度阈值
+    @ApiModelProperty(value = "A相温度上升预警温度阈值")
+    private Double temperatureUpTemperatureWaringAx;
+
+    @ApiModelProperty(value = "B相温度上升预警温度阈值")
+    private Double temperatureUpTemperatureWaringBx;
+
+    @ApiModelProperty(value = "C相温度上升预警温度阈值")
+    private Double temperatureUpTemperatureWaringCx;
+
+    @ApiModelProperty(value = "零相温度上升预警温度阈值")
+    private Double temperatureUpTemperatureWaringLx;
+
+    // 漏电预警与报警阈值
+    @ApiModelProperty(value = "漏电预警阈值")
+    private Double leakageWaring;
+
+    @ApiModelProperty(value = "漏电报警阈值")
+    private Double leakageAlarm;
+
+    // 过流预警与报警阈值
+    @ApiModelProperty(value = "A相过流预警阈值")
+    private Double overCurrentWaringAx;
+
+    @ApiModelProperty(value = "B相过流预警阈值")
+    private Double overCurrentWaringBx;
+
+    @ApiModelProperty(value = "C相过流预警阈值")
+    private Double overCurrentWaringCx;
+
+    @ApiModelProperty(value = "A相过流报警阈值")
+    private Double overCurrentAlarmAx;
+
+    @ApiModelProperty(value = "B相过流报警阈值")
+    private Double overCurrentAlarmBx;
+
+    @ApiModelProperty(value = "C相过流报警阈值")
+    private Double overCurrentAlarmCx;
+
+    // 过压欠压预警与报警阈值
+    @ApiModelProperty(value = "A相过压预警阈值")
+    private Integer overVoltageWaringAx;
+
+    @ApiModelProperty(value = "B相过压预警阈值")
+    private Integer overVoltageWaringBx;
+
+    @ApiModelProperty(value = "C相过压预警阈值")
+    private Integer overVoltageWaringCx;
+
+    @ApiModelProperty(value = "A相过压报警阈值")
+    private Integer overVoltageAlarmAx;
+
+    @ApiModelProperty(value = "B相过压报警阈值")
+    private Integer overVoltageAlarmBx;
+
+    @ApiModelProperty(value = "C相过压报警阈值")
+    private Integer overVoltageAlarmCx;
+
+    @ApiModelProperty(value = "A相欠压预警阈值")
+    private Integer underVoltageWaringAx;
+
+    @ApiModelProperty(value = "B相欠压预警阈值")
+    private Integer underVoltageWaringBx;
+
+    @ApiModelProperty(value = "C相欠压预警阈值")
+    private Integer underVoltageWaringCx;
+
+    @ApiModelProperty(value = "A相欠压报警阈值")
+    private Integer underVoltageAlarmAx;
+
+    @ApiModelProperty(value = "B相欠压报警阈值")
+    private Integer underVoltageAlarmBx;
+
+    @ApiModelProperty(value = "C相欠压报警阈值")
+    private Integer underVoltageAlarmCx;
+
+    // 过载预警与报警阈值
+    @ApiModelProperty(value = "A相过载报警阈值")
+    private Integer overloadAlarmAx;
+
+    @ApiModelProperty(value = "B相过载报警阈值")
+    private Integer overloadAlarmBx;
+
+    @ApiModelProperty(value = "C相过载报警阈值")
+    private Integer overloadAlarmCx;
+
+    @ApiModelProperty(value = "A相过载预警阈值")
+    private Integer overloadWaringAx;
+
+    @ApiModelProperty(value = "B相过载预警阈值")
+    private Integer overloadWaringBx;
+
+    @ApiModelProperty(value = "C相过载预警阈值")
+    private Integer overloadWaringCx;
+
+    // 报警使能
+    @ApiModelProperty(value = "缺相报警使能(0:关,1:开)")
+    private Integer lackPhaseAlarmAbility;
+
+    @ApiModelProperty(value = "缺相报警动作使能(0:关,1:开)")
+    private Integer lackPhaseAlarmLinkageModel;
+
+    @ApiModelProperty(value = "欠压报警使能(0:关,1:开)")
+    private Integer underVoltageAlarmAbility;
+
+    @ApiModelProperty(value = "欠压报警动作使能(0:关,1:开)")
+    private Integer underVoltageAlarmLinkageModel;
+
+    @ApiModelProperty(value = "三相不平衡报警使能(0:关,1:开)")
+    private Integer unbalancedPhaseAlarmAbility;
+
+    @ApiModelProperty(value = "三相不平衡报警动作使能(0:关,1:开)")
+    private Integer unbalancedPhaseAlarmLinkageModel;
+
+    @ApiModelProperty(value = "漏电报警使能(0:关,1:开)")
+    private Integer leakageAlarmAbility;
+
+    @ApiModelProperty(value = "漏电报警动作使能(0:关,1:开)")
+    private Integer leakageAlarmLinkageModel;
+
+    @ApiModelProperty(value = "过压报警使能(0:关,1:开)")
+    private Integer overVoltageAlarmAbility;
+
+    @ApiModelProperty(value = "过压报警动作使能(0:关,1:开)")
+    private Integer overVoltageAlarmLinkageModel;
+
+    @ApiModelProperty(value = "过载报警使能(0:关,1:开)")
+    private Integer overloadAlarmAbility;
+
+    @ApiModelProperty(value = "过载报警动作使能(0:关,1:开)")
+    private Integer overloadAlarmLinkageModel;
+
+    @ApiModelProperty(value = "打火报警使能(0:关,1:开)")
+    private Integer igniteAlarmAbility;
+
+    @ApiModelProperty(value = "打火报警动作使能(0:关,1:开)")
+    private Integer igniteAlarmLinkageModel;
+
+    // 预警使能
+    @ApiModelProperty(value = "欠压预警使能(0:关,1:开)")
+    private Integer underVoltageWaringAbility;
+
+    @ApiModelProperty(value = "漏电预警使能(0:关,1:开)")
+    private Integer leakageWaringAbility;
+
+    @ApiModelProperty(value = "过压预警使能(0:关,1:开)")
+    private Integer overVoltageWaringAbility;
+
+    @ApiModelProperty(value = "过载预警使能(0:关,1:开)")
+    private Integer overloadWaringAbility;
+
+    // 数据同步标志
+    @ApiModelProperty(value = "数据是否从设备获取信息得到的(设备信息与平台不同步,前端获取设备信息需加入该标志)")
+    private Boolean getFromSOsoSuccess;
+
+}

+ 34 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/FireEquipmentRequest.java

@@ -0,0 +1,34 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 消防物联设备分页查询
+ * @date 2024/12/19 15:21:52
+ */
+@Data
+public class FireEquipmentRequest {
+    @ApiModelProperty(value = "当前页,默认1")
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "每页记录数,默认10,最多50")
+    @Size(max = 50, message = "每页记录数最多为50")
+    private Integer pageSize = 10;
+
+    @ApiModelProperty(value = "设备所属组织编码集合,最多10个")
+    @Size(max = 10, message = "设备所属组织编码集合最多包含10个编码")
+    private List<String> orgCodes;
+
+    @ApiModelProperty(value = "主机类型")
+    private String typeCode;
+
+    @ApiModelProperty(value = "设备名称/设备编号/imei")
+    private String keyCondition;
+}

+ 34 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/FirefightingComponentsRequest.java

@@ -0,0 +1,34 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询消防部件信息
+ * @date 2024/12/19 15:28:48
+ */
+@Data
+public class FirefightingComponentsRequest {
+    @ApiModelProperty(value = "当前页,默认1")
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "每页记录数,默认10,最多50")
+    @Size(max = 50, message = "每页记录数最多为50")
+    private Integer pageSize = 10;
+
+    @ApiModelProperty(value = "设备所属组织编码集合,最多10个")
+    @Size(max = 10, message = "设备所属组织编码集合最多包含10个编码")
+    private List<String> orgCodes;
+
+    @ApiModelProperty(value = "探测器类型")
+    private String typeCode;
+
+    @ApiModelProperty(value = "设备名称/设备编号/imei")
+    private String keyCondition;
+}

+ 38 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/IntelligenceSensorRequest.java

@@ -0,0 +1,38 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能传感器分页查询
+ * @date 2024/12/19 09:34:31
+ */
+@Data
+public class IntelligenceSensorRequest {
+    @ApiModelProperty(value = "根据设备的编码信息查询")
+    @Size(min = 1, message = "至少需要一个设备编码")
+    private List<String> deviceCodes;
+
+    @ApiModelProperty(value = "根据设备名称模糊查询")
+    private String searchName;
+
+    @ApiModelProperty(value = "第几页", required = true)
+    @NotNull(message = "页码不能为空")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "每页条数", required = true)
+    @NotNull(message = "每页条数不能为空")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "所属物模型种类 4:人体传感器 10:光照传感器 9:红外传感器", required = true)
+    @NotNull(message = "所属物模型种类不能为空")
+    @Size(min = 1, message = "至少需要选择一种物模型种类")
+    private List<Integer> iotTypes;
+}

+ 31 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/IntelligentPanelRequest.java

@@ -0,0 +1,31 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能面板分页查询
+ * @date 2024/12/19 09:01:36
+ */
+@Data
+public class IntelligentPanelRequest {
+    @ApiModelProperty(value = "根据设备的编码信息查询", required = false)
+    private List<String> deviceCodes;
+
+    @ApiModelProperty(value = "根据设备名称查询", required = false)
+    private String searchName;
+
+    @ApiModelProperty(value = "第几页", required = true)
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "每页条数", required = true)
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "根据组织编码查询", required = false)
+    private List<String> orgData;
+}

+ 34 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/ParkingListRequest.java

@@ -0,0 +1,34 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 查询车场列表
+ * @date 2024/12/16 10:29:39
+ */
+@Data
+public class ParkingListRequest {
+        @NotNull(message = "页码不能为空")
+        @Min(value = 1, message = "页码必须大于等于1")
+        @ApiModelProperty(value = "页码", example = "1")
+        private int pageNum;
+
+        @NotNull(message = "每页条数不能为空")
+        @Min(value = 1, message = "每页条数必须大于等于1")
+        @ApiModelProperty(value = "每页条数", example = "10")
+        private int pageSize;
+
+        @ApiModelProperty(value = "兼容标记,固定传1", example = "1")
+        private int returnPage = 1;
+
+        @ApiModelProperty(value = "场区编码/场区名称")
+        private String parkingLotFuzzy;
+
+}

+ 33 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/RealTimeDataRequest.java

@@ -0,0 +1,33 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询实时数据信息
+ * @date 2024/12/19 16:35:16
+ */
+@Data
+public class RealTimeDataRequest {
+    @ApiModelProperty(value = "组织编码或设备编码, 数据来源是基础资源下的组织管理与设备管理; 建议通过API文档-基础资源-设备管理-设备树查询接口,type字段送:001;9;10,20获取", required = true)
+    @NotNull(message = "组织编码或设备编码不能为空")
+    private String nodeId;
+
+    @ApiModelProperty(value = "通道子类类型,通过通道子类型分页查询接口获取的code字段", required = true)
+    @NotNull(message = "通道子类类型不能为空")
+    private String devChildType;
+
+    @ApiModelProperty(value = "页码,默认1")
+    private Integer pageNo = 1;
+
+    @ApiModelProperty(value = "分页大小,默认10,最大1000", required = true)
+    @NotNull(message = "分页大小不能为空")
+    @Size(max = 1000, message = "分页大小最大为1000")
+    private Integer pageSize;
+}

+ 31 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/RtspUrlRequest.java

@@ -0,0 +1,31 @@
+package com.zksy.visualization.domain.request;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@ApiModel(description = "RTSP URL 请求")
+public class RtspUrlRequest {
+
+        @ApiModelProperty(value = "请求数据对象", required = true)
+        private DataRequest data;
+
+        @Data
+        @JsonInclude(JsonInclude.Include.NON_NULL)
+        @ApiModel(description = "视频通道数据请求")
+        public static class DataRequest {
+                @ApiModelProperty(value = "视频通道编码,第一个$后数字代表通道类型,必须是1;\n" +
+                        "方式一:调设备通道分页查询接口 ,unitTypeList送1;\n" +
+                        "方式二:调设备树查询接口,type送;;1", required = true, example = "1000018$1$0$0")
+                private String channelId;
+
+                @ApiModelProperty(value = "视频类型:1=视频", required = true, example = "1")
+                private String dataType;
+
+                @ApiModelProperty(value = "码流类型:1=主码流,2=辅码流,3=辅码流2", required = true, example = "1")
+                private String streamType;
+        }
+}

+ 37 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/SmartSocketRequest.java

@@ -0,0 +1,37 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能插座分页查询
+ * @date 2024/12/19 09:27:57
+ */
+@Data
+public class SmartSocketRequest {
+    @ApiModelProperty(value = "根据设备的编码信息查询")
+    @Size(min = 1, message = "至少需要一个设备编码")
+    private List<String> deviceCodes;
+
+    @ApiModelProperty(value = "根据设备名称模糊查询")
+    private String searchName;
+
+    @ApiModelProperty(value = "第几页", required = true)
+    @NotNull(message = "页码不能为空")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "每页条数", required = true)
+    @NotNull(message = "每页条数不能为空")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "组织编码")
+    @Size(min = 1, message = "至少需要一个组织编码")
+    private List<String> orgData;
+}

+ 44 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/request/UsingEnergyRequest.java

@@ -0,0 +1,44 @@
+package com.zksy.visualization.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 用能统计
+ * @date 2024/12/17 09:23:22
+ */
+@Data
+public class UsingEnergyRequest {
+    @ApiModelProperty(value = "组织类型,1:基本组织,2:逻辑组织", required = true, example = "1")
+    @NotNull(message = "组织类型不能为空")
+    private Integer orgType;
+
+    @ApiModelProperty(value = "日期类型,0:按日,1:按月,2:按年", required = true, example = "0")
+    @NotNull(message = "日期类型不能为空")
+    private Integer dateType;
+
+    @ApiModelProperty(value = "组织编码列表", required = true)
+    @NotEmpty(message = "组织编码列表不能为空")
+    private List<String> orgData;
+
+    @ApiModelProperty(value = "设备编码列表", required = false)
+    private List<String> deviceCode;
+
+    @ApiModelProperty(value = "通道编码列表", required = false)
+    private List<String> channelId;
+
+    @ApiModelProperty(value = "日期,格式取决于dateType:2021-05-17(按日), 2021-05(按月), 2021(按年)", required = true)
+    @NotEmpty(message = "日期不能为空")
+    private String date;
+
+    @ApiModelProperty(value = "分项类型,规则如下:001001表示两个下拉框都选第一个;若第一个下拉框选第一个,第二个下拉框选全部,则传001;若两个下拉框都是全部,传空字符串。选项包括:001:照明插座用电, 002:空调用电, 003:动力用电, 004:特殊用电", required = true)
+    @NotEmpty(message = "分项类型不能为空")
+    private String airSwitchType;
+}

+ 317 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/AcquisitionDeviceResponse.java

@@ -0,0 +1,317 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 获取设备能力
+ * @date 2024/12/16 15:11:43
+ */
+@Data
+public class AcquisitionDeviceResponse {
+
+        @ApiModelProperty(value = "如果传入设备编码,那么该值便返回传入的设备编码,否则由paas自动生成随机字符")
+        private String deviceIdFromPaas;
+
+        @ApiModelProperty(value = "串口1波特率")
+        private int serialCaud1;
+
+        @ApiModelProperty(value = "串口2波特率")
+        private int serialCaud2;
+
+        @ApiModelProperty(value = "串口3波特率")
+        private int serialCaud3;
+
+        @ApiModelProperty(value = "串口4波特率")
+        private int serialCaud4;
+
+        @ApiModelProperty(value = "MAC地址")
+        private String macAddress;
+
+        @ApiModelProperty(value = "设备序列号")
+        private String deviceSn;
+
+        @ApiModelProperty(value = "空开数量")
+        private int airSwitchAmount;
+
+        @ApiModelProperty(value = "空开集合列表")
+        private List<AirSwitch> airSwitchList;
+
+        @ApiModelProperty(value = "电表集合列表")
+        private List<MeterVo> meterVoList;
+    @Data
+    public class MeterVo {
+
+        @ApiModelProperty(value = "电表唯一标识符")
+        private String devId;
+
+        @ApiModelProperty(value = "通道编码")
+        private String channelCode;
+
+        @ApiModelProperty(value = "电表名称")
+        private String meterName;
+    }
+
+    @Data
+    public class AirSwitch {
+
+        @ApiModelProperty(value = "空开序号")
+        private String devIdFromDevice;
+
+        @ApiModelProperty(value = "如果传入通道编码,那么该值便返回传入的通道编码,否则由paas自动生成随机字符")
+        private String channelIdFromPaas;
+
+        @ApiModelProperty(value = "空开类型")
+        private String airSwitchCategory;
+
+        @ApiModelProperty(value = "空开型号")
+        private String airSwitchModel;
+
+        @ApiModelProperty(value = "地址码")
+        private int addressCode;
+
+        @ApiModelProperty(value = "额定电流")
+        private int ratedCurrent;
+
+        @ApiModelProperty(value = "漏检漏保能力,设备端返回LJAS、LBAS、PTAS或无")
+        private String capability;
+
+        @ApiModelProperty(value = "通道序列号,唯一,用于区分不同空开")
+        private String serialNumber;
+
+        @ApiModelProperty(value = "阈值对象")
+        private ReturnResult returnResult;
+    }
+
+    @Data
+    public class ReturnResult {
+
+        @ApiModelProperty(value = "电流")
+        private ElectricCurrent electricCurrent;
+
+        @ApiModelProperty(value = "漏电流")
+        private Leakage leakage;
+
+        @ApiModelProperty(value = "开关功率")
+        private Power power;
+
+        @ApiModelProperty(value = "开关温度")
+        private Temperature temperature;
+
+        @ApiModelProperty(value = "开关电压")
+        private Voltage voltage;
+
+        @ApiModelProperty(value = "空开使能")
+        private Ability ability;
+    }
+
+    @Data
+    public class ElectricCurrent {
+
+        @ApiModelProperty(value = "A相过流预警阈值")
+        private double overCurrentWaringAx;
+
+        @ApiModelProperty(value = "B相过流预警阈值")
+        private double overCurrentWaringBx;
+
+        @ApiModelProperty(value = "C相过流预警阈值")
+        private double overCurrentWaringCx;
+
+        @ApiModelProperty(value = "A相过流报警阈值")
+        private double overCurrentAlarmAx;
+
+        @ApiModelProperty(value = "B相过流报警阈值")
+        private double overCurrentAlarmBx;
+
+        @ApiModelProperty(value = "C相过流报警阈值")
+        private double overCurrentAlarmCx;
+    }
+
+    @Data
+    public class Leakage {
+
+        @ApiModelProperty(value = "漏电预警阈值")
+        private double leakageWaring;
+
+        @ApiModelProperty(value = "漏电报警阈值")
+        private double leakageAlarm;
+    }
+
+    @Data
+    public class Power {
+
+        @ApiModelProperty(value = "A相过载报警阈值")
+        private int overloadAlarmAx;
+
+        @ApiModelProperty(value = "B相过载报警阈值")
+        private int overloadAlarmBx;
+
+        @ApiModelProperty(value = "C相过载报警阈值")
+        private int overloadAlarmCx;
+
+        @ApiModelProperty(value = "A相过载预警阈值")
+        private int overloadWaringAx;
+
+        @ApiModelProperty(value = "B相过载预警阈值")
+        private int overloadWaringBx;
+
+        @ApiModelProperty(value = "C相过载预警阈值")
+        private int overloadWaringCx;
+    }
+
+    @Data
+    public class Temperature {
+
+        @ApiModelProperty(value = "A相开关温度预警阈值")
+        private double temperatureWaringAx;
+
+        @ApiModelProperty(value = "B相开关温度预警阈值")
+        private double temperatureWaringBx;
+
+        @ApiModelProperty(value = "C相开关温度预警阈值")
+        private double temperatureWaringCx;
+
+        @ApiModelProperty(value = "零相开关温度预警阈值")
+        private double temperatureWaringLx;
+
+        @ApiModelProperty(value = "A相开关温度报警阈值")
+        private double temperatureAlarmAx;
+
+        @ApiModelProperty(value = "B相开关温度报警阈值")
+        private double temperatureAlarmBx;
+
+        @ApiModelProperty(value = "C相开关温度报警阈值")
+        private double temperatureAlarmCx;
+
+        @ApiModelProperty(value = "零相开关温度报警阈值")
+        private double temperatureAlarmLx;
+
+        @ApiModelProperty(value = "A相温度上升预警时间阈值")
+        private int temperatureUpTimeWaringAx;
+
+        @ApiModelProperty(value = "B相温度上升预警时间阈值")
+        private int temperatureUpTimeWaringBx;
+
+        @ApiModelProperty(value = "C相温度上升预警时间阈值")
+        private int temperatureUpTimeWaringCx;
+
+        @ApiModelProperty(value = "零相温度上升预警时间阈值")
+        private int temperatureUpTimeWaringLx;
+
+        @ApiModelProperty(value = "A相温度上升预警温度阈值")
+        private double temperatureUpTemperatureWaringAx;
+
+        @ApiModelProperty(value = "B相温度上升预警温度阈值")
+        private double temperatureUpTemperatureWaringBx;
+
+        @ApiModelProperty(value = "C相温度上升预警温度阈值")
+        private double temperatureUpTemperatureWaringCx;
+
+        @ApiModelProperty(value = "零相温度上升预警温度阈值")
+        private double temperatureUpTemperatureWaringLx;
+    }
+
+    @Data
+    public class Voltage {
+
+        @ApiModelProperty(value = "A相过压预警阈值")
+        private int overVoltageWaringAx;
+
+        @ApiModelProperty(value = "B相过压预警阈值")
+        private int overVoltageWaringBx;
+
+        @ApiModelProperty(value = "C相过压预警阈值")
+        private int overVoltageWaringCx;
+
+        @ApiModelProperty(value = "A相过压报警阈值")
+        private int overVoltageAlarmAx;
+
+        @ApiModelProperty(value = "B相过压报警阈值")
+        private int overVoltageAlarmBx;
+
+        @ApiModelProperty(value = "C相过压报警阈值")
+        private int overVoltageAlarmCx;
+
+        @ApiModelProperty(value = "A相欠压预警阈值")
+        private int underVoltageWaringAx;
+
+        @ApiModelProperty(value = "B相欠压预警阈值")
+        private int underVoltageWaringBx;
+
+        @ApiModelProperty(value = "C相欠压预警阈值")
+        private int underVoltageWaringCx;
+
+        @ApiModelProperty(value = "A相欠压报警阈值")
+        private int underVoltageAlarmAx;
+
+        @ApiModelProperty(value = "B相欠压报警阈值")
+        private int underVoltageAlarmBx;
+
+        @ApiModelProperty(value = "C相欠压报警阈值")
+        private int underVoltageAlarmCx;
+    }
+
+    @Data
+    public class Ability {
+
+        @ApiModelProperty(value = "缺相报警使能(0:关,1:开)")
+        private int lackPhaseAlarmAbility;
+
+        @ApiModelProperty(value = "缺相报警动作使能(0:关,1:开)")
+        private int lackPhaseAlarmLinkageModel;
+
+        @ApiModelProperty(value = "欠压报警使能(0:关,1:开)")
+        private int underVoltageAlarmAbility;
+
+        @ApiModelProperty(value = "欠压报警动作使能(0:关,1:开)")
+        private int underVoltageAlarmLinkageModel;
+
+        @ApiModelProperty(value = "三相不平衡报警使能(0:关,1:开)")
+        private int unbalancedPhaseAlarmAbility;
+
+        @ApiModelProperty(value = "三相不平衡报警动作使能(0:关,1:开)")
+        private int unbalancedPhaseAlarmLinkageModel;
+
+        @ApiModelProperty(value = "漏电报警使能(0:关,1:开)")
+        private int leakageAlarmAbility;
+
+        @ApiModelProperty(value = "漏电报警动作使能(0:关,1:开)")
+        private int leakageAlarmLinkageModel;
+
+        @ApiModelProperty(value = "过压报警使能(0:关,1:开)")
+        private int overVoltageAlarmAbility;
+
+        @ApiModelProperty(value = "过压报警动作使能(0:关,1:开)")
+        private int overVoltageAlarmLinkageModel;
+
+        @ApiModelProperty(value = "过载报警使能(0:关,1:开)")
+        private int overloadAlarmAbility;
+
+        @ApiModelProperty(value = "过载报警动作使能(0:关,1:开)")
+        private int overloadAlarmLinkageModel;
+
+        @ApiModelProperty(value = "打火报警使能(0:关,1:开)")
+        private int igniteAlarmAbility;
+
+        @ApiModelProperty(value = "打火报警动作使能(0:关,1:开)")
+        private int igniteAlarmLinkageModel;
+
+        @ApiModelProperty(value = "欠压预警使能(0:关,1:开)")
+        private int underVoltageWaringAbility;
+
+        @ApiModelProperty(value = "漏电预警使能(0:关,1:开)")
+        private int leakageWaringAbility;
+
+        @ApiModelProperty(value = "过压预警使能(0:关,1:开)")
+        private int overVoltageWaringAbility;
+
+        @ApiModelProperty(value = "过载预警使能(0:关,1:开)")
+        private int overloadWaringAbility;
+    }
+}

+ 15 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/AirConditionerControlResponse.java

@@ -0,0 +1,15 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+@Data
+public class AirConditionerControlResponse {
+        @ApiModelProperty(value = "控制成功的数量", example = "5")
+        private int successNum;
+
+        @ApiModelProperty(value = "失败的数量", example = "0")
+        private int failNum;
+}

+ 102 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/AirConditionerResponse.java

@@ -0,0 +1,102 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class AirConditionerResponse  {
+        @ApiModelProperty(value = "空调信息列表")
+        private List<PageData> pageData;
+
+        @ApiModelProperty(value = "当前页码", example = "1")
+        private int currentPage;
+
+        @ApiModelProperty(value = "总页数", example = "1")
+        private int totalPage;
+
+        @ApiModelProperty(value = "每页数量", example = "20")
+        private int pageSize;
+
+        @ApiModelProperty(value = "总记录数", example = "15")
+        private int totalRows;
+
+        @ApiModelProperty(value = "总数", example = "0")
+        private int countAll;
+
+        @ApiModelProperty(value = "失败数", example = "0")
+        private int countFail;
+
+    @Data
+    public static class PageData {
+        @ApiModelProperty(value = "离线空调数量", example = "0")
+        private int offlineCount;
+
+        @ApiModelProperty(value = "运行空调数量", example = "11")
+        private int runningCount;
+
+        @ApiModelProperty(value = "大于设定温度的空调数量", example = "0")
+        private int overTemperatureCount;
+
+        @ApiModelProperty(value = "大于等于设定使用时长的空调数量", example = "0")
+        private int overUseTimeCount;
+
+        @ApiModelProperty(value = "空调信息列表")
+        private List<AirConditionerVo> airConditionerVoList;
+    }
+
+    @Data
+    public static class AirConditionerVo {
+        @ApiModelProperty(value = "设备编码")
+        private String deviceCode;
+
+        @ApiModelProperty(value = "通道编码")
+        private String channelCode;
+
+        @ApiModelProperty(value = "通道名称")
+        private String channelName;
+
+        @ApiModelProperty(value = "温度", example = "25")
+        private int temperature;
+
+        @ApiModelProperty(value = "模式:0-自动,1-制冷,2-制热,3-通风,4-除湿", example = "4")
+        private int model;
+
+        @ApiModelProperty(value = "风速:0-自动,1-低速,2-中速,3-高速", example = "1")
+        private int windSpeed;
+
+        @ApiModelProperty(value = "使用时长,单位:秒", example = "0")
+        private int useTime;
+
+        @ApiModelProperty(value = "运行状态 1-开启,0-关闭", example = "0")
+        private int powerStatus;
+
+        @ApiModelProperty(value = "逻辑组织名称")
+        private String allLogicName;
+
+        @ApiModelProperty(value = "室内温度", example = "29")
+        private int indoorTemp;
+
+        @ApiModelProperty(value = "在离线状态 1-在线 0-离线", example = "1")
+        private int status;
+
+        @ApiModelProperty(value = "任务列表")
+        private List<AirConditionerTaskVo> airConditionerTaskVoList;
+    }
+
+    @Data
+    public static class AirConditionerTaskVo {
+        @ApiModelProperty(value = "定时任务名称")
+        private String timeTaskName;
+
+        @ApiModelProperty(value = "定时任务时间,格式:yyyy-MM-dd HH:mm")
+        @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+        private Date timeTaskTime;
+
+        @ApiModelProperty(value = "定时任务将要执行的操作,1-开启,0-关闭", example = "0")
+        private int timeTaskStatus;
+    }
+}

+ 44 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/AnalogQuantityResponse.java

@@ -0,0 +1,44 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询消防最新模拟量信息
+ * @date 2024/12/19 16:04:45
+ */
+@Data
+public class AnalogQuantityResponse {
+    @ApiModelProperty(value = "总条数")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "下一页")
+    private Integer nextPage;
+
+    @ApiModelProperty(value = "数据列表")
+    private List<AnalogInfoVO> pageData;
+
+@Data
+public static class AnalogInfoVO {
+
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备唯一标示码IMEI")
+    private String uniqueCode;
+
+    @ApiModelProperty(value = "模拟量类型")
+    private String analogType;
+
+    @ApiModelProperty(value = "模拟量值")
+    private String analogValue;
+
+    @ApiModelProperty(value = "上报时间,格式:yyyy-MM-dd HH:mm:ss")
+    private String reportTime;
+}
+}

+ 113 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ChannelPageResponse.java

@@ -0,0 +1,113 @@
+package com.zksy.visualization.domain.response;
+
+import cn.hutool.core.date.DateTime;
+import com.dahuatech.icc.oauth.http.IccResponse;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * program:java-sdk-demo
+ *
+ * @Author: 355079
+ * @Date:2024-05-07 10:03
+ * @Description: 设备通道分页查询返回参数
+ */
+@Data
+public class ChannelPageResponse  {
+    @ApiModelProperty(value = "当前页码", example = "1", required = true)
+    private int currentPage;
+
+    @ApiModelProperty(value = "总页数", example = "5", required = true)
+    private int totalPage;
+
+    @ApiModelProperty(value = "每页记录数", example = "10", required = true)
+    private int pageSize;
+
+    @ApiModelProperty(value = "总数", example = "45", required = true)
+    private int totalRows;
+
+    @ApiModelProperty(value = "数据列表", required = true)
+    private List<ChannelInfoVO> pageData;
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    @ApiModel(description = "通道信息")
+    public static class ChannelInfoVO {
+
+        @ApiModelProperty(value = "自增ID", example = "408", required = true)
+        private Long id;
+
+        @ApiModelProperty(value = "设备编码", example = "1000088", required = true)
+        private String deviceCode;
+
+        @ApiModelProperty(value = "单元类型", example = "23", required = true)
+        private Integer unitType;
+
+        @ApiModelProperty(value = "单元序号", example = "1", required = true)
+        private Integer unitSeq;
+
+        @ApiModelProperty(value = "通道序号", example = "1", required = true)
+        private Integer channelSeq;
+
+        @ApiModelProperty(value = "通道编码", example = "1000088$23$1$1", required = true)
+        private String channelCode;
+
+        @ApiModelProperty(value = "通道标识码", example = "864160064339432$1$0$1", required = true)
+        private String channelSn;
+
+        @ApiModelProperty(value = "通道名称", example = "1F液体压力表", required = true)
+        private String channelName;
+
+        @ApiModelProperty(value = "通道类型", example = "1", required = true)
+        private String channelType;
+
+        @ApiModelProperty(value = "摄像头类型", example = "")
+        private String cameraType;
+
+        @ApiModelProperty(value = "所属组织编码", example = "001002", required = true)
+        private String ownerCode;
+
+        @ApiModelProperty(value = "经度", example = "")
+        private String gpsX;
+
+        @ApiModelProperty(value = "纬度", example = "")
+        private String gpsY;
+
+        @ApiModelProperty(value = "z轴", example = "")
+        private String gpsZ;
+
+        @ApiModelProperty(value = "光栅图ID", example = "")
+        private Long mapId;
+
+        @ApiModelProperty(value = "域ID", example = "")
+        private Long domainId;
+
+        @ApiModelProperty(value = "描述", example = "")
+        private String memo;
+
+        @ApiModelProperty(value = "设备通道在线状态", example = "0", required = true)
+        private Integer isOnline;
+
+        @ApiModelProperty(value = "状态 0:关闭 1:开启", example = "1", required = true)
+        private Integer stat;
+
+        @ApiModelProperty(value = "通道能力集,详细说明请参考通道能力级说明", example = "")
+        private String capability;
+
+        @ApiModelProperty(value = "是否已经接入 :1-已接入, 0-未接入", example = "1", required = true)
+        private Integer access;
+
+        @ApiModelProperty(value = "通道详情扩展信息,json体,具体参考设备扩展信息->XX设备->通道扩展协议", example = "")
+        private String chExt;
+
+        @ApiModelProperty(value = "是否是虚拟通道", example = "false", required = true)
+        private Boolean isVirtual;
+
+        @ApiModelProperty(value = "创建时间")
+        private DateTime createTime;
+    }
+
+}

+ 56 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ChannelSubtypeResponse.java

@@ -0,0 +1,56 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 动环管理-通道子类型分页查询
+ * @date 2024/12/19 16:24:17
+ */
+@Data
+public class ChannelSubtypeResponse {
+    @ApiModelProperty(value = "页码")
+    private Integer pageNo;
+
+    @ApiModelProperty(value = "分页大小")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "总数")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "枚举列表")
+    private List<DictionaryItem> result;
+
+@Data
+class DictionaryItem {
+
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "设备子类型编码")
+    private String code;
+
+    @ApiModelProperty(value = "设备子类型名称")
+    private String name;
+
+    @ApiModelProperty(value = "设备类型编码")
+    private String par1;
+
+    @ApiModelProperty(value = "设备类型名称")
+    private String par1Name;
+
+    @ApiModelProperty(value = "所属场景编码")
+    private String par2;
+
+    @ApiModelProperty(value = "所属场景名称")
+    private String par2Name;
+
+    @ApiModelProperty(value = "描述")
+    private String memo;
+}
+}

+ 54 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/CollectionStatisticsResponse.java

@@ -0,0 +1,54 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 收款统计
+ * @date 2024/12/16 10:08:32
+ */
+@Data
+@ApiModel(description = "停车收款统计响应")
+public class CollectionStatisticsResponse {
+    @ApiModelProperty(value = "收款金额明细")
+    private ConsumeSurvey consumeSurvey;
+
+    @ApiModelProperty(value = "应收金额明细")
+    private List<FeeAmountItem> feeTrend;
+
+    @Data
+    @ApiModel(description = "消费调查详情")
+    public static class ConsumeSurvey {
+        @ApiModelProperty(value = "应收金额,单位:元")
+        private String consumeMoney;
+
+        @ApiModelProperty(value = "优惠金额,单位:元")
+        private String favorableAmount;
+
+        @ApiModelProperty(value = "免费金额,单位:元")
+        private String freeMoney;
+
+        @ApiModelProperty(value = "应收金额,单位:元")
+        private String feeAmount;
+
+        @ApiModelProperty(value = "退款金额,单位:元")
+        private String backMoney;
+    }
+
+    @Data
+    @ApiModel(description = "费用趋势项")
+    public static class FeeAmountItem {
+        @ApiModelProperty(value = "实收金额,单位:元")
+        private String feeTotal;
+
+        @ApiModelProperty(value = "时段,示例格式:\"00:00\"")
+        private String dates;
+    }
+}
+

+ 78 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ComprehensiveResponse.java

@@ -0,0 +1,78 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 综合查询
+ * @date 2024/12/16 14:43:54
+ */
+@Data
+public class ComprehensiveResponse {
+        @ApiModelProperty(value = "A相电压列表", example = "[0, 0]")
+        @JsonProperty("aVoltageList")
+        private List<Integer> aVoltageList;
+
+        @ApiModelProperty(value = "B相电压列表", example = "[-1, -1]")
+        @JsonProperty("bVoltageList")
+        private List<Integer> bVoltageList;
+
+        @ApiModelProperty(value = "C相电压列表", example = "[-1, -1]")
+        @JsonProperty("cVoltageList")
+        private List<Integer> cVoltageList;
+
+        @ApiModelProperty(value = "A相电流列表", example = "[0, 0]")
+        @JsonProperty("aElectricityList")
+        private List<Integer> aElectricityList;
+
+        @ApiModelProperty(value = "B相电流列表", example = "[-1, -1]")
+        @JsonProperty("bElectricityList")
+        private List<Integer> bElectricityList;
+
+        @ApiModelProperty(value = "C相电流列表", example = "[-1, -1]")
+        @JsonProperty("cElectricityList")
+        private List<Integer> cElectricityList;
+
+        @ApiModelProperty(value = "A相功率列表", example = "[0, 0]")
+        @JsonProperty("aPowerList")
+        private List<Integer> aPowerList;
+
+        @ApiModelProperty(value = "B相功率列表", example = "[-1, -1]")
+        @JsonProperty("bPowerList")
+        private List<Integer> bPowerList;
+
+        @ApiModelProperty(value = "C相功率列表", example = "[-1, -1]")
+        @JsonProperty("cPowerList")
+        private List<Integer> cPowerList;
+
+        @ApiModelProperty(value = "A相温度列表", example = "[218, 234]")
+        @JsonProperty("aTemperatureList")
+        private List<Integer> aTemperatureList;
+
+        @ApiModelProperty(value = "B相温度列表", example = "[-1, -1]")
+        @JsonProperty("bTemperatureList")
+        private List<Integer> bTemperatureList;
+
+        @ApiModelProperty(value = "C相温度列表", example = "[0, 0]")
+        @JsonProperty("cTemperatureList")
+        private List<Integer> cTemperatureList;
+
+        @ApiModelProperty(value = "零线温度列表", example = "[-1, -1]")
+        @JsonProperty("zeroTemperatureList")
+        private List<Integer> zeroTemperatureList;
+
+        @ApiModelProperty(value = "时间戳列表", example = "[\"2021-03-05 11:31:12\", \"2021-03-05 11:50:28\"]")
+        @JsonProperty("timeList")
+        private List<String> timeList;
+
+        @ApiModelProperty(value = "总功率列表", example = "[]")
+        @JsonProperty("allPowerList")
+        private List<Integer> allPowerList;
+}

+ 182 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/DeviceDetailsResponse.java

@@ -0,0 +1,182 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 设备详情查询
+ * @date 2024/12/23 14:24:23
+ */
+@Data
+public class DeviceDetailsResponse {
+    @ApiModelProperty(value = "设备名称", example = "Device123", required = true)
+    private String deviceName;
+
+    @ApiModelProperty(value = "设备编码", example = "code123", required = true)
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备唯一标识码", example = "SN123456789", required = true)
+    private String deviceSn;
+
+    @ApiModelProperty(value = "设备大类", example = "1", required = true)
+    private Integer deviceCategory;
+
+    @ApiModelProperty(value = "设备小类", example = "2", required = true)
+    private Integer deviceType;
+
+    @ApiModelProperty(value = "厂商类型", example = "ManufacturerA", required = true)
+    private String deviceManufacturer;
+
+    @ApiModelProperty(value = "设备型号", example = "ModelX", required = true)
+    private String deviceModel;
+
+    @ApiModelProperty(value = "设备IP", example = "192.168.1.1", required = true)
+    private String deviceIp;
+
+    @ApiModelProperty(value = "设备端口,取值范围:0 ~ 65535", example = "8080", required = true)
+    private Integer devicePort;
+
+    @ApiModelProperty(value = "设备所属组织", example = "Org123", required = true)
+    private String ownerCode;
+
+    @ApiModelProperty(value = "添加方式", example = "manual", required = true)
+    private String loginType;
+
+    @ApiModelProperty(value = "登录名称", example = "admin", required = true)
+    private String loginName;
+
+    @ApiModelProperty(value = "登录密码", example = "password123", required = true)
+    private String loginPassword;
+
+    @ApiModelProperty(value = "主动注册服务器编码", example = "Server123")
+    private String registServerCode;
+
+    @ApiModelProperty(value = "主动注册代理端口", example = "8081")
+    private Integer registProxyPort;
+
+    @ApiModelProperty(value = "主动注册设备编码", example = "RegDev123")
+    private String registDeviceCode;
+
+    @ApiModelProperty(value = "设备描述", example = "This is a device description.")
+    private String memo;
+
+    @ApiModelProperty(value = "在线状态", example = "1", required = true)
+    private Integer isOnline;
+
+    @ApiModelProperty(value = "是否休眠, 1-休眠,0-非休眠", example = "0", required = true)
+    private Integer sleepStat;
+
+    @ApiModelProperty(value = "第三服务代理端口", example = "8082")
+    private Integer thirdProxyPort;
+
+    @ApiModelProperty(value = "第三服务器编码", example = "ThirdServer123")
+    private String thirdProxyServerCode;
+
+    @ApiModelProperty(value = "加密狗是否到期, 0-否,1-是", example = "0", required = true)
+    private Integer licenseLimit;
+
+    @ApiModelProperty(value = "光栅图", example = "123456789")
+    private Long mapId;
+
+    @ApiModelProperty(value = "经度", example = "120.123456")
+    private String gpsX;
+
+    @ApiModelProperty(value = "纬度", example = "30.123456")
+    private String gpsY;
+
+    @ApiModelProperty(value = "设备所属子系统", example = "SubSystem1")
+    private String subSystem;
+
+    @ApiModelProperty(value = "设备扩展属性,自定义json数据")
+    private Object devExt;
+
+    @ApiModelProperty(value = "创建时间(13位时间戳)", example = "1672531200000", required = true)
+    private Long createTime;
+
+    @ApiModelProperty(value = "设备在线状态更新时间(yyyy-MM-dd HH:mm:ss)")
+    private String onlineUpdateTime;
+
+    @ApiModelProperty(value = "单元信息")
+    private List<UnitInfo> units;
+    @Data
+    @ApiModel(description = "单元信息")
+    public class UnitInfo {
+
+        @ApiModelProperty(value = "单元类型", example = "1", required = true)
+        private Integer unitType;
+
+        @ApiModelProperty(value = "单元序号", example = "1", required = true)
+        private Integer unitSeq;
+
+        @ApiModelProperty(value = "排序码", example = "1", required = true)
+        private Integer sort;
+
+        @ApiModelProperty(value = "单元描述", example = "This is a unit description.")
+        private String memo;
+
+        @ApiModelProperty(value = "能力集", example = "CapabilitySet1")
+        private String capability;
+
+        @ApiModelProperty(value = "单元扩展信息")
+        private Object unitExt;
+
+        @ApiModelProperty(value = "单元通道信息")
+        private List<ChannelInfo> channels;
+    }
+
+    @Data
+    @ApiModel(description = "通道信息")
+    public class ChannelInfo {
+
+        @ApiModelProperty(value = "通道编码", example = "chCode123", required = true)
+        private String channelCode;
+
+        @ApiModelProperty(value = "通道名称", example = "ChannelName1", required = true)
+        private String channelName;
+
+        @ApiModelProperty(value = "通道序号", example = "1", required = true)
+        private Integer channelSeq;
+
+        @ApiModelProperty(value = "通道唯一标识码", example = "CHSN123456789", required = true)
+        private String channelSn;
+
+        @ApiModelProperty(value = "通道类型", example = "Video", required = true)
+        private String channelType;
+
+        @ApiModelProperty(value = "是否休眠, 1-休眠,0-非休眠", example = "0", required = true)
+        private Integer sleepStat;
+
+        @ApiModelProperty(value = "通道能力集")
+        private String capability;
+
+        @ApiModelProperty(value = "摄像头类型", example = "CameraTypeA")
+        private String cameraType;
+
+        @ApiModelProperty(value = "是否已接入, 0-未接入,1-接入", example = "1", required = true)
+        private Integer access;
+
+        @ApiModelProperty(value = "经度", example = "120.123456")
+        private String gpsX;
+
+        @ApiModelProperty(value = "纬度", example = "30.123456")
+        private String gpsY;
+
+        @ApiModelProperty(value = "Z轴", example = "10.123456")
+        private String gpsZ;
+
+        @ApiModelProperty(value = "通道描述", example = "This is a channel description.")
+        private String memo;
+
+        @ApiModelProperty(value = "状态, 0-不启用,1-启用", example = "1", required = true)
+        private Integer stat;
+
+        @ApiModelProperty(value = "通道扩展属性")
+        private Object chExt;
+    }
+}

+ 149 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/DevicePageResponse.java

@@ -0,0 +1,149 @@
+package com.zksy.visualization.domain.response;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.List;
+
+@Data
+@ApiModel(description = "设备分页查询响应")
+public class DevicePageResponse {
+    @ApiModelProperty(value = "当前页码", example = "1", required = true)
+    private int currentPage;
+
+    @ApiModelProperty(value = "总页数", example = "5", required = true)
+    private int totalPage;
+
+    @ApiModelProperty(value = "每页记录数", example = "10", required = true)
+    private int pageSize;
+
+    @ApiModelProperty(value = "总数", example = "45", required = true)
+    private int totalRows;
+
+    @ApiModelProperty(value = "数据列表", required = true)
+    private List<DeviceInfoVO> pageData;
+    @Data
+    @ApiModel(description = "设备信息")
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class DeviceInfoVO {
+
+        @ApiModelProperty(value = "设备编码", example = "1000001", required = true)
+        private String deviceCode;
+
+        @ApiModelProperty(value = "设备名称", example = "172.16.100.2", required = true)
+        private String deviceName;
+
+        @ApiModelProperty(value = "设备唯一标识码", example = "SN123456789", required = true)
+        private String deviceSn;
+
+        @ApiModelProperty(value = "设备大类", example = "93", required = true)
+        private Integer deviceCategory;
+
+        @ApiModelProperty(value = "设备小类", example = "类型A", required = true)
+        private String deviceType;
+
+        @ApiModelProperty(value = "厂商类型", example = "厂商X", required = true)
+        private String deviceManufacturer;
+
+        @ApiModelProperty(value = "设备IP", example = "172.16.100.2", required = true)
+        private String deviceIp;
+
+        @ApiModelProperty(value = "设备端口", example = "8080", required = true)
+        private Integer devicePort;
+
+        @ApiModelProperty(value = "设备所属组织编码", example = "001", required = true)
+        private String ownerCode;
+
+        @ApiModelProperty(value = "设备在线状态", example = "0", required = true)
+        private Integer isOnline;
+
+        @ApiModelProperty(value = "设备离线原因", example = "断电", required = true)
+        private String offlineReason;
+
+        @ApiModelProperty(value = "设备所属子系统", example = "evo-runs-adapt", required = true)
+        private String subSystem;
+
+        @ApiModelProperty(value = "设备扩展属性,自定义json数据", example = "{}", required = true)
+        private Object devExt;
+
+        @ApiModelProperty(value = "经度", example = "116.4074", required = true)
+        private String gpsX;
+
+        @ApiModelProperty(value = "纬度", example = "39.9042", required = true)
+        private String gpsY;
+
+        @ApiModelProperty(value = "单元信息", required = true)
+        private List<UnitVO> units;
+    }
+    @Data
+    @ApiModel(description = "单元信息")
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class UnitVO {
+
+        @ApiModelProperty(value = "单元类型", example = "1", required = true)
+        private Integer unitType;
+
+        @ApiModelProperty(value = "单元序号", example = "1", required = true)
+        private Integer unitSeq;
+
+        @ApiModelProperty(value = "排序码", example = "1", required = true)
+        private Integer sort;
+
+        @ApiModelProperty(value = "能力集", example = "能力A,能力B", required = true)
+        private String capability;
+
+        @ApiModelProperty(value = "单元扩展信息", example = "{}", required = true)
+        private Object unitExt;
+
+        @ApiModelProperty(value = "单元通道信息", required = true)
+        private List<ChannelVO> channels;
+    }
+    @Data
+    @ApiModel(description = "通道信息")
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class ChannelVO {
+
+        @ApiModelProperty(value = "通道编码", example = "CH123456", required = true)
+        private String channelCode;
+
+        @ApiModelProperty(value = "通道名称", example = "通道1", required = true)
+        private String channelName;
+
+        @ApiModelProperty(value = "通道序号", example = "1", required = true)
+        private Integer channelSeq;
+
+        @ApiModelProperty(value = "通道唯一标识码", example = "CSN123456789", required = true)
+        private String channelSn;
+
+        @ApiModelProperty(value = "通道类型", example = "类型A", required = true)
+        private String channelType;
+
+        @ApiModelProperty(value = "通道能力集", example = "能力A,能力B", required = true)
+        private String capability;
+
+        @ApiModelProperty(value = "摄像头类型", example = "高清摄像头", required = false)
+        private String cameraType;
+
+        @ApiModelProperty(value = "是否已接入:0-未接入,1-接入", example = "1", required = true)
+        private Integer access;
+
+        @ApiModelProperty(value = "经度", example = "116.4074", required = false)
+        private String gpsX;
+
+        @ApiModelProperty(value = "纬度", example = "39.9042", required = false)
+        private String gpsY;
+
+        @ApiModelProperty(value = "Z轴", example = "10.0", required = false)
+        private String gpsZ;
+
+        @ApiModelProperty(value = "通道描述", example = "描述信息", required = false)
+        private String memo;
+
+        @ApiModelProperty(value = "状态 :0-不启用,1-启用", example = "1", required = true)
+        private Integer stat;
+
+        @ApiModelProperty(value = "通道扩展属性 自定义", example = "{}", required = false)
+        private Object chExt;
+    }
+}

+ 98 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/DeviceTreeResponse.java

@@ -0,0 +1,98 @@
+package com.zksy.visualization.domain.response;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 设备树查询
+ * @date 2024/12/23 14:39:56
+ */
+@Data
+public class DeviceTreeResponse {
+    @ApiModelProperty(value = "数据内容", required = true)
+    private List<ValueVO> value;
+
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    @ApiModel(description = "组织结构树节点")
+    public static class ValueVO {
+
+        @ApiModelProperty(value = "节点ID", example = "001", required = true)
+        private String id;
+
+        @ApiModelProperty(value = "节点名称", example = "根节点", required = true)
+        private String name;
+
+        @ApiModelProperty(value = "路径", example = "")
+        private String path;
+
+        @ApiModelProperty(value = "父节点ID", example = "")
+        @JsonProperty("pId") // 明确指定 JSON 属性名
+        private String pId;
+
+        @ApiModelProperty(value = "节点类型", example = "org_base", required = true)
+        private String type;
+
+        @ApiModelProperty(value = "是否为父节点", example = "true", required = true)
+        private Boolean isParent;
+
+        @ApiModelProperty(value = "图标类型", example = "/bResource/static/image/treeIcons/org_org_base", required = true)
+        private String iconType;
+
+        @ApiModelProperty(value = "检查状态", example = "1", required = true)
+        private Integer checkStat;
+
+        @ApiModelProperty(value = "排序", example = "1", required = true)
+        private Integer sort;
+
+        @ApiModelProperty(value = "是否选中", example = "false", required = true)
+        private Boolean isCheck;
+
+        @ApiModelProperty(value = "节点类型(如:org)", example = "org", required = true)
+        private String nodeType;
+
+        @ApiModelProperty(value = "设备可见性", example = "1", required = true)
+        private Integer deviceVisible;
+
+        @ApiModelProperty(value = "是否有更多子节点", example = "false", required = true)
+        private Boolean hasMoreNode;
+
+        @ApiModelProperty(value = "是否禁止绑定用户", example = "0", required = true)
+        private Integer forbidBindUser;
+
+        @ApiModelProperty(value = "组织扩展信息", required = true)
+        private OrgExt orgExt;
+    }
+
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    @ApiModel(description = "组织扩展信息")
+    public static class OrgExt {
+
+        @ApiModelProperty(value = "组织编码", example = "001", required = true)
+        private String orgCode;
+
+        @ApiModelProperty(value = "组织唯一标识码", example = "", required = false)
+        private String orgSn;
+
+        @ApiModelProperty(value = "组织类型", example = "", required = false)
+        private String orgType;
+
+        @ApiModelProperty(value = "业务类型", example = "1", required = true)
+        private Integer busiType;
+
+        @ApiModelProperty(value = "重复添加标志", example = "1", required = true)
+        private Integer repeatAddFlag;
+
+        @ApiModelProperty(value = "树名称", example = "", required = false)
+        private String treeName;
+    }
+}

+ 33 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/DevicesOperatorResponse.java

@@ -0,0 +1,33 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 批量开启/关闭、单个设备开启/关闭
+ * @date 2024/12/19 08:46:18
+ */
+@Data
+public class DevicesOperatorResponse {
+
+    @ApiModelProperty(value = "成功操作的空开数量")
+    private Integer successCount;
+
+    @ApiModelProperty(value = "操作失败的空开信息")
+    private List<FailDeviceInfo> failData;
+
+    @Data
+    class FailDeviceInfo {
+        @ApiModelProperty(value = "失败的空开名称")
+        private String deviceName;
+
+        @ApiModelProperty(value = "空开的失败原因")
+        private String reason;
+    }
+}
+

+ 165 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ElectricEnergyMonitorResponse.java

@@ -0,0 +1,165 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 电能监测
+ * @date 2024/12/18 15:32:06
+ */
+@Data
+public class ElectricEnergyMonitorResponse {
+
+        @ApiModelProperty(value = "当前页码")
+        private Integer currentPage;
+
+        @ApiModelProperty(value = "总页数")
+        private Integer totalPage;
+
+        @ApiModelProperty(value = "每页记录数")
+        private Integer pageSize;
+
+        @ApiModelProperty(value = "总数")
+        private Integer totalRows;
+
+        @ApiModelProperty(value = "所有记录总数")
+        private int countAll;
+
+        @ApiModelProperty(value = "失败记录数")
+        private int countFail;
+
+        @ApiModelProperty(value = "所有信息记录数")
+        private int allInfoCount;
+
+        @ApiModelProperty(value = "所有异常记录数")
+        private int allExceptionCount;
+
+        @ApiModelProperty(value = "电压异常记录数")
+        private int voltageExcCount;
+
+        @ApiModelProperty(value = "电流异常记录数")
+        private int currentExcCount;
+
+        @ApiModelProperty(value = "功率异常记录数")
+        private int powerExcCount;
+
+        @ApiModelProperty(value = "温度异常记录数")
+        private int tempExcCount;
+
+        @ApiModelProperty(value = "泄漏异常记录数")
+        private int leakageExcCount;
+
+        @ApiModelProperty(value = "数据列表")
+        private List<DetectionInfo> pageData;
+
+    @Data
+    class DetectionInfo {
+
+        @ApiModelProperty(value = "空开唯一标识")
+        private String channelCode;
+
+        @ApiModelProperty(value = "对接设备添加设备后返回的设备ID,即设备的入参userChannelCode(对应air_switch中的DEV_ID_FROM_DEVICE),只在网关下唯一,全局不唯一")
+        private String devIdFromDevice;
+
+        @ApiModelProperty(value = "对接PAAS添加通道后返回的通道ID(对应air_switch中的CHANNEL_ID_FROM_PAAS)")
+        private String channelIdFromPAAS;
+
+        @ApiModelProperty(value = "空开名称")
+        private String name;
+
+        @ApiModelProperty(value = "空开所属组织编码")
+        private String ownerCode;
+
+        @ApiModelProperty(value = "空开所属组织名称")
+        private String ownerName;
+
+        @ApiModelProperty(value = "空开所属网关编号")
+        private String gatewayCode;
+
+        @ApiModelProperty(value = "空开所属网关名称")
+        private String gatewayName;
+
+        @ApiModelProperty(value = "空开开关状态,1表示分闸,0表示合闸")
+        private Integer type;
+
+        @ApiModelProperty(value = "空开所处在离线状态,1表示离线,0表示在线,2表示异常")
+        private Integer state;
+
+        @ApiModelProperty(value = "A项电压,若不存在该项属性,返回-1")
+        private Double avoltage;
+
+        @ApiModelProperty(value = "B项电压,若不存在该项属性,返回-1")
+        private Double bvoltage;
+
+        @ApiModelProperty(value = "C项电压,若不存在该项属性,返回-1")
+        private Double cvoltage;
+
+        @ApiModelProperty(value = "A项电流,若不存在该项属性,返回-1")
+        private Double aelectricCurrent;
+
+        @ApiModelProperty(value = "B项电流,若不存在该项属性,返回-1")
+        private Double belectricCurrent;
+
+        @ApiModelProperty(value = "C项电流,若不存在该项属性,返回-1")
+        private Double celectricCurrent;
+
+        @ApiModelProperty(value = "A项功率,若不存在该项属性,返回-1")
+        private Double apower;
+
+        @ApiModelProperty(value = "B项功率,若不存在该项属性,返回-1")
+        private Double bpower;
+
+        @ApiModelProperty(value = "C项功率,若不存在该项属性,返回-1")
+        private Double cpower;
+
+        @ApiModelProperty(value = "A项温度,若不存在该项属性,返回-1")
+        private Double atemperature;
+
+        @ApiModelProperty(value = "B项温度,若不存在该项属性,返回-1")
+        private Double btemperature;
+
+        @ApiModelProperty(value = "C项温度,若不存在该项属性,返回-1")
+        private Double ctemperature;
+
+        @ApiModelProperty(value = "漏电量,若不存在该项属性,返回-1")
+        private Double leakage;
+
+        @ApiModelProperty(value = "零线温度,若不存在该项属性,返回-1")
+        private Double zeroTemperature;
+
+        @ApiModelProperty(value = "电量数据")
+        private String electricityNum;
+
+        @ApiModelProperty(value = "数据更新时间")
+        private String time;
+
+        @ApiModelProperty(value = "异常类型")
+        private List<String> exceptionType;
+
+        @ApiModelProperty(value = "全部信息数量")
+        private Integer allInfoCount;
+
+        @ApiModelProperty(value = "全部异常信息数量")
+        private Integer allExceptionCount;
+
+        @ApiModelProperty(value = "电压异常信息数量")
+        private Integer voltageExcCount;
+
+        @ApiModelProperty(value = "电流异常信息数量")
+        private Integer currentExcCount;
+
+        @ApiModelProperty(value = "功率异常信息数量")
+        private Integer powerExcCount;
+
+        @ApiModelProperty(value = "温度异常信息数量")
+        private Integer tempExcCount;
+
+        @ApiModelProperty(value = "漏电异常信息数量")
+        private Integer leakageExcCount;
+    }
+}

+ 18 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/EmptyDomainResponse.java

@@ -0,0 +1,18 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 下发单个空开阈值
+ * @date 2024/12/17 09:07:28
+ */
+@Data
+public class EmptyDomainResponse  {
+    @ApiModelProperty(value = "响应数据对象")
+    private String data;
+}

+ 86 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/FireEquipmentResponse.java

@@ -0,0 +1,86 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 消防物联设备分页查询
+ * @date 2024/12/19 15:23:06
+ */
+@Data
+public class FireEquipmentResponse {
+    @ApiModelProperty(value = "下一页页码")
+    private Integer nextPage;
+
+    @ApiModelProperty(value = "总数")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "数据列表")
+    private List<DeviceInfoVO> pageData;
+
+@Data
+public static class DeviceInfoVO {
+
+    @ApiModelProperty(value = "唯一主键")
+    private String id;
+
+    @ApiModelProperty(value = "设备唯一标识码, 设备的imei号")
+    private String imei;
+
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+
+    @ApiModelProperty(value = "公司编号")
+    private String companyId;
+
+    @ApiModelProperty(value = "公司名称")
+    private String companyName;
+
+    @ApiModelProperty(value = "厂商编码")
+    private String manufacturerCode;
+
+    @ApiModelProperty(value = "厂商名称")
+    private String manufacturerName;
+
+    @ApiModelProperty(value = "主机类型")
+    private String typeCode;
+
+    @ApiModelProperty(value = "主机类型名称")
+    private String typeName;
+
+    @ApiModelProperty(value = "组织编码")
+    private String orgCode;
+
+    @ApiModelProperty(value = "组织名称")
+    private String orgName;
+
+    @ApiModelProperty(value = "接入设备域")
+    private String dcpsId;
+
+    @ApiModelProperty(value = "软件版本号")
+    private String softwareVersion;
+
+    @ApiModelProperty(value = "系统地址")
+    private Integer systemAddress;
+
+    @ApiModelProperty(value = "安装地址")
+    private String address;
+
+    @ApiModelProperty(value = "设备型号")
+    private String productModel;
+
+    @ApiModelProperty(value = "在离线状态")
+    private String isOnline;
+
+    @ApiModelProperty(value = "描述")
+    private String description;
+}
+}

+ 95 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/FirefightingComponentsResponse.java

@@ -0,0 +1,95 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询消防部件信息
+ * @date 2024/12/19 15:29:43
+ */
+@Data
+public class FirefightingComponentsResponse {
+    @ApiModelProperty(value = "总条数")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "下一页")
+    private Integer nextPage;
+
+    @ApiModelProperty(value = "数据列表")
+    private List<DetectorVO> pageData;
+
+    @Data
+    public static class DetectorVO {
+
+    @ApiModelProperty(value = "ID", example = "2", required = true)
+    private Integer id;
+
+    @ApiModelProperty(value = "探测器代码", example = "43648965748949614", required = true)
+    private String detectorCode;
+
+    @ApiModelProperty(value = "探测器名称", example = "液体压力表", required = true)
+    private String detectorName;
+
+    @ApiModelProperty(value = "IMEI", example = "864160064339333$1$0$1", required = true)
+    private String imei;
+
+    @ApiModelProperty(value = "探测器状态", example = "5", required = true)
+    private Integer detectorStatus;
+
+    @ApiModelProperty(value = "组织代码", example = "001002", required = true)
+    private String orgCode;
+
+    @ApiModelProperty(value = "组织名称", example = "沅陵工业园", required = true)
+    private String orgName;
+
+    @ApiModelProperty(value = "类型代码", example = "128", required = true)
+    private Integer typeCode;
+
+    @ApiModelProperty(value = "公司ID", example = "6bec2a7b7f7f40a9b0904711774c1443", required = true)
+    private String companyId;
+
+    @ApiModelProperty(value = "父级代码", example = "1000080", required = true)
+    private String parentCode;
+
+    @ApiModelProperty(value = "父级名称", example = "液体压力表", required = true)
+    private String parentName;
+
+    @ApiModelProperty(value = "消防系统代码", example = "3", required = true)
+    private String fireSystemCode;
+
+    @ApiModelProperty(value = "部分单元回路代码", example = "0", required = true)
+    private String partUnitLoopCode;
+
+    @ApiModelProperty(value = "通道号", example = "1", required = true)
+    private String channelNo;
+
+    @ApiModelProperty(value = "系统地址", example = "1", required = true)
+    private Integer systemAddress;
+
+    @ApiModelProperty(value = "制造商代码", example = "")
+    private String manufacturerCode;
+
+    @ApiModelProperty(value = "通道序列号", example = "1000080$23$1$1", required = true)
+    private String channelSn;
+
+    @ApiModelProperty(value = "地图类型", example = "0", required = true)
+    private Integer mapType;
+
+    @ApiModelProperty(value = "类型名称", example = "压力传感器", required = true)
+    private String typeName;
+
+    @ApiModelProperty(value = "公司名称", example = "沅陵工业园", required = true)
+    private String companyName;
+
+    @ApiModelProperty(value = "消防系统名称", example = "智慧用水系统", required = true)
+    private String fireSystemName;
+
+    @ApiModelProperty(value = "制造商名称", example = "")
+    private String manufacturerName;
+}
+}

+ 65 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/IntelligenceSensorResponse.java

@@ -0,0 +1,65 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能传感器分页查询
+ * @date 2024/12/19 09:35:55
+ */
+@Data
+public class IntelligenceSensorResponse {
+    @ApiModelProperty(value = "当前页码")
+    private Integer currentPage;
+
+    @ApiModelProperty(value = "每页条数")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "总页数")
+    private Integer totalPage;
+
+    @ApiModelProperty(value = "总条数")
+    private Integer totalRows;
+
+    @ApiModelProperty(value = "当前页数据")
+    private List<PageDataItem> pageData;
+
+@Data
+class PageDataItem {
+
+    @ApiModelProperty(value = "所属组织编码")
+    private String orgCode;
+
+    @ApiModelProperty(value = "所属组织名称")
+    private String orgName;
+
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备名称")
+    private String deciceName;
+
+    @ApiModelProperty(value = "设备在离线状态(0:离线 1:在线)")
+    private Integer isOnline;
+
+    @ApiModelProperty(value = "联动面板名称")
+    private List<String> linkagePanels;
+
+    @ApiModelProperty(value = "光照强度")
+    private Integer lightData;
+
+    @ApiModelProperty(value = "红外数据 0:无人 1:有人")
+    private Integer infraredData;
+
+    @ApiModelProperty(value = "人体传感器数据 0:无人 1:有人")
+    private Integer radarData;
+
+    @ApiModelProperty(value = "所属物模型种类")
+    private Integer iotType;
+}
+}

+ 71 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/IntelligentPanelResponse.java

@@ -0,0 +1,71 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能面板分页查询
+ * @date 2024/12/19 09:01:36
+ */
+@Data
+public class IntelligentPanelResponse {
+
+    @ApiModelProperty(value = "当前页码")
+    private Integer currentPage;
+
+    @ApiModelProperty(value = "每页条数")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "总页数")
+    private Integer totalPage;
+
+    @ApiModelProperty(value = "总条数")
+    private Integer totalRows;
+
+    @ApiModelProperty(value = "当前页数据")
+    private List<PageDataItem> pageData;
+
+@Data
+class PageDataItem {
+
+    @ApiModelProperty(value = "所属组织编码")
+    private String orgCode;
+
+    @ApiModelProperty(value = "所属组织名称")
+    private String orgName;
+
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+
+    @ApiModelProperty(value = "设备在离线状态(0:离线 1:在线)")
+    private Integer isOnline;
+
+    @ApiModelProperty(value = "联动感应器名称")
+    private List<String> linkageInductors;
+
+    @ApiModelProperty(value = "设备类型")
+    private String typeId;
+
+    @ApiModelProperty(value = "面板拥有的按键集合")
+    private Map<String, SwitchStatus> switchStatusMap;
+}
+
+    @Data
+    class SwitchStatus {
+
+        @ApiModelProperty(value = "按键的名称")
+        private String switchName;
+
+        @ApiModelProperty(value = "按键的开关状态 (0:关 1:开)")
+        private Integer switchStatus;
+    }
+}

+ 63 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingListResponse.java

@@ -0,0 +1,63 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 查询车场列表
+ * @date 2024/12/16 10:25:11
+ */
+@Data
+public class ParkingListResponse {
+        @ApiModelProperty(value = "分页对象")
+        private List<ParikingLot> pageData;
+
+    @Data
+    public class ParikingLot {
+
+        @ApiModelProperty(value = "绑定车场的车辆数")
+        private int carNum;
+
+        @ApiModelProperty(value = "入口数")
+        private int entranceNum;
+
+        @ApiModelProperty(value = "出口数")
+        private int exitusNum;
+
+        @ApiModelProperty(value = "ID")
+        private Long id;
+
+        @ApiModelProperty(value = "余位数")
+        private int idleLot;
+
+        @ApiModelProperty(value = "绑定的LED数")
+        private int ledNum;
+
+        @ApiModelProperty(value = "场区名称")
+        private String parkingLot;
+
+        @ApiModelProperty(value = "场区编号")
+        private String parkingLotCode;
+
+        @ApiModelProperty(value = "总车位数")
+        private int totalLot;
+
+        @ApiModelProperty(value = "使用了的车位数")
+        private int usedLot;
+
+        @ApiModelProperty(value = "父场区名称")
+        private String parentName;
+
+        @ApiModelProperty(value = "场区所属组织编码")
+        private String orgCode;
+    }
+    private Integer currentPage;
+    private String totalPage;
+    private Integer pageSize;
+    private String totalRows;
+}

+ 97 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingOverviewResponse.java

@@ -0,0 +1,97 @@
+package com.zksy.visualization.domain.response;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 停车场概览
+ * @date 2024/12/16 09:56:57
+ */
+@Data
+@ApiModel(description = "停车平台概览响应")
+public class ParkingOverviewResponse {
+
+    @ApiModelProperty(value = "概况信息")
+    private UserSurvey userSurvey;
+
+    @ApiModelProperty(value = "今日收款占比")
+    private List<ChargeDetail> chargeDetail;
+
+    @ApiModelProperty(value = "今日泊位概况")
+    private CarportModel carportModel;
+
+    @Data
+    @ApiModel(description = "用户总览")
+    public static class UserSurvey {
+        @ApiModelProperty(value = "储值")
+        private Account storedAccount;
+
+        @ApiModelProperty(value = "月卡")
+        private Account secularAccount;
+
+        @ApiModelProperty(value = "长期")
+        private Account monthAccount;
+
+        @Data
+        @ApiModel(description = "账户概览DTO")
+        public static class Account {
+            @ApiModelProperty(value = "金额 ,单位:元")
+            private String totalMoney;
+
+            @ApiModelProperty(value = "当前用户数")
+            private String currentAmount;
+
+            @ApiModelProperty(value = "当日新增用户数")
+            private String newAmount;
+
+            @ApiModelProperty(value = "当日续费用户数")
+            private String renewAmount;
+
+            @ApiModelProperty(value = "余额不足用户数(储值用户)")
+            private String noMoneyAmount;
+
+            @ApiModelProperty(value = "过期用户数")
+            private String expireAmount;
+
+            @ApiModelProperty(value = "即将过期用户数")
+            private String immediatelyAmount;
+        }
+    }
+
+    @Data
+    @ApiModel(description = "收费项目详情")
+    public static class ChargeDetail {
+        @ApiModelProperty(value = "支付方式,现金、支付宝、微信、银行支付 、其他")
+        private String name;
+
+        @ApiModelProperty(value = "金额,单位:元")
+        private String value;
+
+        @ApiModelProperty(value = "占比")
+        private String rate;
+    }
+
+    @Data
+    @ApiModel(description = "泊位模型")
+    public static class CarportModel {
+        @ApiModelProperty(value = "总泊位数")
+        private String totalCarports;
+
+        @ApiModelProperty(value = "已用泊位数")
+        private String uesdCarports;
+
+        @ApiModelProperty(value = "剩余泊位数")
+        private String canUseCarports;
+
+        @ApiModelProperty(value = "已用泊位占比")
+        private String usedRate;
+
+        @ApiModelProperty(value = "剩余泊位占比")
+        private String canUseRate;
+    }
+}

+ 28 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/ParkingVacancyResponse.java

@@ -0,0 +1,28 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 车场余位信息
+ * @date 2024/12/16 10:46:04
+ */
+@Data
+public class ParkingVacancyResponse {
+        @ApiModelProperty(value = "余位数")
+        private int idleLot;
+
+        @ApiModelProperty(value = "余位百分比")
+        private String idleLotPercent;
+
+        @ApiModelProperty(value = "场区数")
+        private int parkingNum;
+
+        @ApiModelProperty(value = "总车位数")
+        private int totalLot;
+
+}

+ 82 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/RealTimeDataResponse.java

@@ -0,0 +1,82 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 分页查询实时数据信息
+ * @date 2024/12/19 16:34:48
+ */
+@Data
+public class RealTimeDataResponse {
+    @ApiModelProperty(value = "分页大小")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "页码")
+    private Integer pageNo;
+
+    @ApiModelProperty(value = "总数")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "返回数据对象")
+    private Result result;
+
+    @Data
+    public static class Result {
+
+        @ApiModelProperty(value = "设备编码")
+        private String fsuCode;
+
+        @ApiModelProperty(value = "通道编号")
+        private String channelCode;
+
+        @ApiModelProperty(value = "通道名称")
+        private String channelName;
+
+        @ApiModelProperty(value = "时间")
+        private String time;
+
+        @ApiModelProperty(value = "实时数据")
+        private List<DataItem> dataList;
+    }
+
+    @Data
+    public static class DataItem {
+
+        @ApiModelProperty(value = "数据类型:1,遥控;2,遥调;3,遥测;4,遥信")
+        private Integer type;
+
+        @ApiModelProperty(value = "点位编码")
+        private String signalCode;
+
+        @ApiModelProperty(value = "点位名称")
+        private String signalName;
+
+        @ApiModelProperty(value = "测量值")
+        private String measuredVal;
+
+        @ApiModelProperty(value = "测量值含义")
+        private String measuredValName;
+
+        @ApiModelProperty(value = "点位单位")
+        private Integer signalUnit;
+
+        @ApiModelProperty(value = "状态:0,正常;1-4,告警")
+        private Status status;
+    }
+
+    @Data
+    public static class Status {
+
+        @ApiModelProperty(value = "状态代码")
+        private Integer code;
+
+        @ApiModelProperty(value = "状态描述")
+        private String description;
+    }
+}

+ 77 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/RtspUrlResponse.java

@@ -0,0 +1,77 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 实时拉流返回
+ */
+@Data
+public class RtspUrlResponse {
+
+    @ApiModelProperty(value = "RTSP令牌(有效时间30秒,请及时建立连接),仅能播放一次,失效后重新请求获取", example = "61", required = true)
+    private String token;
+
+    @ApiModelProperty(value = "RTSP地址,完整的播放地址需拼接RTSP令牌访问,RTSP令牌为此接口返回的token字段", example = "rtsp://172.16.100.2:9100/dss/monitor/param/cameraid=1000018%240%26substream=1", required = true)
+    private String url;
+
+    @ApiModelProperty(value = "轨道ID")
+    private String trackId;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)最低码流,要求客户具备的最低码流")
+    private String minRate;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)协议:1=CNM3, 2=RTSP")
+    private String protocol;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)IP地址,根据类型可能是转发服务器IP,也可能是设备IP")
+    private String ip;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)端口")
+    private String port;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)是否支持STUN协议:1=支持, 0=不支持")
+    private String stunEnable;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)STUN协议端口")
+    private String stunPort;
+
+    @ApiModelProperty(value = "URL列表")
+    private List<String> urlList;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)类型:1=转发模式,2=直连模式")
+    private String connectType;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)转发会话ID")
+    private String session;
+
+    @ApiModelProperty(value = "内网IP地址", example = "172.16.100.2", required = true)
+    private String innerIp;
+
+    @ApiModelProperty(value = "是否压缩", example = "false", required = true)
+    private boolean compress;
+
+    @Deprecated
+    @ApiModelProperty(value = "(已废弃)流类型")
+    private String stream;
+
+    @ApiModelProperty(value = "可达性")
+    private Boolean reachable;
+
+    @ApiModelProperty(value = "WebSocket直接连接标志", example = "0", required = true)
+    private int wssDirect;
+
+    @ApiModelProperty(value = "网络标志")
+    private String netFlag;
+}

+ 62 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/SmartSocketResponse.java

@@ -0,0 +1,62 @@
+package com.zksy.visualization.domain.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 智能插座分页查询
+ * @date 2024/12/19 09:27:57
+ */
+@Data
+public class SmartSocketResponse {
+    @ApiModelProperty(value = "当前页码")
+    private Integer currentPage;
+
+    @ApiModelProperty(value = "每页条数")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "总页数")
+    private Integer totalPage;
+
+    @ApiModelProperty(value = "总条数")
+    private Integer totalRows;
+
+    @ApiModelProperty(value = "当前页数据")
+    private List<PageDataItem> pageData;
+
+    @Data
+    class PageDataItem {
+        @ApiModelProperty(value = "所属组织编码")
+        private String orgCode;
+
+        @ApiModelProperty(value = "所属组织名称")
+        private String orgName;
+
+        @ApiModelProperty(value = "设备编码")
+        private String deviceCode;
+
+        @ApiModelProperty(value = "设备名称")
+        private String deciceName;
+
+        @ApiModelProperty(value = "开关状态 (0:关 1:开)")
+        private Integer switchStatus;
+
+        @ApiModelProperty(value = "设备在离线状态(0:离线 1:在线)")
+        private Integer isOnline;
+
+        @ApiModelProperty(value = "当日用电量(单位k•Wh)")
+        private String energy;
+
+        @ApiModelProperty(value = "实时电流(单位mA)")
+        private String electricCurrent;
+
+        @ApiModelProperty(value = "设备类型")
+        private String typeId;
+    }
+}
+

+ 77 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/TrafficStatisticsResponse.java

@@ -0,0 +1,77 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 车流统计
+ * @date 2024/12/16 10:16:23
+ */
+@Data
+@ApiModel(description = "车流统计响应")
+public class TrafficStatisticsResponse {
+    /**
+     * 车流统计信息,包含总的入场和出场车流量。
+     */
+    @ApiModelProperty(value = "车流统计对象", required = true)
+    private CarInOutSurveyInfo carInOutSurvey;
+
+    /**
+     * 车流明细,按时间段统计的入场和出场车流量。
+     */
+    @ApiModelProperty(value = "车流明细", required = true)
+    private List<CarInoutItem> carInoutTrend;
+
+    /**
+     * 车流统计信息实体类,用于表示总的入场和出场车流量。
+     */
+    @Data
+    @ApiModel(description = "车流统计信息")
+    public static class CarInOutSurveyInfo {
+
+        /**
+         * 总入场车流量。
+         */
+        @ApiModelProperty(value = "总入场车流量", example = "0", required = true)
+        private String inFlow;
+
+        /**
+         * 总出场车流量。
+         */
+        @ApiModelProperty(value = "总出场车流量", example = "0", required = true)
+        private String outFlow;
+    }
+
+    /**
+     * 车流明细实体类,用于表示按时间段统计的入场和出场车流量。
+     */
+    @Data
+    @ApiModel(description = "车流明细")
+    public static class CarInoutItem {
+
+        /**
+         * 时间段,格式为HH:mm,例如"00:00"。
+         */
+        @ApiModelProperty(value = "时段,示例格式:\"00:00\"", example = "00:00", required = true)
+        private String dates;
+
+        /**
+         * 入场车流量,在指定时间段内的入场车辆数量。
+         */
+        @ApiModelProperty(value = "入场车流量", example = "0", required = true)
+        private String inFlow;
+
+        /**
+         * 出场车流量,在指定时间段内的出场车辆数量。
+         */
+        @ApiModelProperty(value = "出场车流量", example = "0", required = true)
+        private String outFlow;
+    }
+}

+ 40 - 0
visualization-service/src/main/java/com/zksy/visualization/domain/response/UsingEnergyResponse.java

@@ -0,0 +1,40 @@
+package com.zksy.visualization.domain.response;
+
+import com.dahuatech.icc.oauth.http.IccResponse;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project dh-server-micro
+ * @description 用能统计
+ * @date 2024/12/17 09:24:57
+ */
+@Data
+public class UsingEnergyResponse {
+
+    @ApiModelProperty(value = "车流明细", required = true)
+    private List<EnergyInfo> value;
+
+    @Data
+    public static class EnergyInfo {
+        @ApiModelProperty(value = "节点名称")
+        private String nodeName;
+
+        @ApiModelProperty(value = "耗能")
+        private List<String> electricityConsumption;
+
+        @ApiModelProperty(value = "环比")
+        private List<String> monthRation;
+
+        @ApiModelProperty(value = "同比")
+        private List<String> yearRation;
+
+        @ApiModelProperty(value = "均值")
+        private String avg;
+    }
+}

+ 1 - 1
visualization-service/src/main/java/com/zksy/visualization/schedule/ScheduledTasks.java

@@ -78,7 +78,7 @@ public class ScheduledTasks {
         }
     }
 
-    @Scheduled(cron = "0 0 */12 * * ?")
+    //@Scheduled(cron = "0 0 */12 * * ?")
     public void initialize() throws Exception {
         String publicKey = retrievePublicKey();
         log.info("Public Key: {}", publicKey);

+ 7 - 3
visualization-service/src/main/resources/bootstrap.yaml

@@ -24,14 +24,18 @@ spring:
     host: 192.168.110.30
     port: 6379
 icc:
-  host: 192.168.110.218
+  host: 172.16.100.7
   clientId: zksy2024
-  clientSecret: 52da1934-937b-4e70-9719-4bd9d1d74d4b
+  clientSecret: 3ff685b3-f183-4d72-9d3e-33ba9c46d67a
   grantType: password
   username: system
-  password: Dahua123
+  password: YLicc@123456
   version: 1.0.0
   service: ThirdParty
   Authorization:
+  httpsPort: 4077
+  httpPort: 4078
+  connectionTimeout: -11
+  readTimeout: -11