bihuisong hace 2 meses
padre
commit
2dd0a85c65
Se han modificado 55 ficheros con 2240 adiciones y 3672 borrados
  1. 1 1
      monitor_ui/package.json
  2. 1 1
      monitor_ui/src/views/centerMonitor/camera/index.vue
  3. 1 4
      monitor_ui/src/views/centerMonitor/device/index.vue
  4. 868 0
      sql/onest_monitor.sql
  5. 0 8
      src/main/java/com/sooka/sponest/monitor/LabelManagement/controller/CentermonitorSetLabelController.java
  6. 2 0
      src/main/java/com/sooka/sponest/monitor/LabelManagement/domain/CentermonitorSetLabel.java
  7. 1 0
      src/main/java/com/sooka/sponest/monitor/aidevicedept/domain/CenterdataTAidevicedeptDTO.java
  8. 2 1
      src/main/java/com/sooka/sponest/monitor/aidevicedept/mapper/CenterdataTAidevicedeptMapper.java
  9. 72 73
      src/main/java/com/sooka/sponest/monitor/camera/controller/CentermonitorTCameraController.java
  10. 0 4
      src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudCameraBO.java
  11. 2 1
      src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudMapVO.java
  12. 24 26
      src/main/java/com/sooka/sponest/monitor/camera/mapper/CentermonitorTCameraMapper.java
  13. 0 119
      src/main/java/com/sooka/sponest/monitor/camera/quartz/IndexLineChartCountTask.java
  14. 19 19
      src/main/java/com/sooka/sponest/monitor/camera/service/ICentermonitorTCameraService.java
  15. 28 30
      src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCameraServiceImpl.java
  16. 1 2
      src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCamerachannelServiceImpl.java
  17. 0 278
      src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogBlackTask.java
  18. 1 1
      src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogWhiteTask.java
  19. 0 116
      src/main/java/com/sooka/sponest/monitor/dahua/quartz/EquipmentStatusTask.java
  20. 1 1
      src/main/java/com/sooka/sponest/monitor/dahua/service/impl/DahuaServiceImpl.java
  21. 6 181
      src/main/java/com/sooka/sponest/monitor/device/controller/CentermonitorTMonitoringDeviceController.java
  22. 27 109
      src/main/java/com/sooka/sponest/monitor/device/mapper/CentermonitorTMonitoringDeviceMapper.java
  23. 27 78
      src/main/java/com/sooka/sponest/monitor/device/service/ICentermonitorTMonitoringDeviceService.java
  24. 17 571
      src/main/java/com/sooka/sponest/monitor/device/service/impl/CentermonitorTMonitoringDeviceServiceImpl.java
  25. 308 308
      src/main/java/com/sooka/sponest/monitor/haikang/HikSubscription.java
  26. 0 8
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankDevicesController.java
  27. 2 12
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankHistoricalTrajectoryController.java
  28. 0 36
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankTravelMileageController.java
  29. 0 3
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankDevicesMapper.java
  30. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankHistoricalTrajectoryMapper.java
  31. 0 4
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankTravelMileageMapper.java
  32. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankDevicesService.java
  33. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankHistoricalTrajectoryService.java
  34. 0 17
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankTravelMileageService.java
  35. 0 15
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankDevicesServiceImpl.java
  36. 0 13
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankHistoricalTrajectoryServiceImpl.java
  37. 0 95
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankTravelMileageServiceImpl.java
  38. 0 6
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/data/RemoteDataBaseServiceFallbackFactory.java
  39. 2 9
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/event/RemoteEventBaseServiceFallbackFactory.java
  40. 0 34
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/lawenforcement/RemoteLawenforcementBaseServiceFallbackFactory.java
  41. 5 1
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/system/RemoteSystemBaseServiceFallbackFactory.java
  42. 0 4
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/data/RemoteDataBaseService.java
  43. 1 5
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/event/RemoteEventBaseService.java
  44. 0 24
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/lawenforcement/RemoteLawenforcementBaseService.java
  45. 0 5
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/system/RemoteService.java
  46. 0 137
      src/main/java/com/sooka/sponest/monitor/util/ScheduledTasks.java
  47. 1 1
      src/main/resources/bootstrap.yml
  48. 2 1
      src/main/resources/mapper/monitor/LabelManagement/CentermonitorSetLabelServiceMapper.xml
  49. 1 0
      src/main/resources/mapper/monitor/aidevicedept/CenterdataTAidevicedeptMapper.xml
  50. 743 802
      src/main/resources/mapper/monitor/camera/CentermonitorTCameraMapper.xml
  51. 0 4
      src/main/resources/mapper/monitor/dahua/CenternonitorTDahuaOperateLogMapper.xml
  52. 74 453
      src/main/resources/mapper/monitor/device/CentermonitorTMonitoringDeviceMapper.xml
  53. 0 10
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankDevicesMapper.xml
  54. 0 23
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankHistoricalTrajectoryMapper.xml
  55. 0 12
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankTravelMileageMapper.xml

+ 1 - 1
monitor_ui/package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.4.0",
-  "description": "全域视联平台",
+  "description": "四平市态势感知平台",
   "author": "若依",
   "license": "MIT",
   "scripts": {

+ 1 - 1
monitor_ui/src/views/centerMonitor/camera/index.vue

@@ -936,7 +936,7 @@ export default {
     window.alertLoginFailed = this.alertLoginFailed// 登陆失败
     window.alertReinstall = this.alertReinstall// 请重新安装客户端
     setTimeout(() => {
-      this.pageName = '全域视联平台'
+      this.pageName = '四平市态势感知平台'
     }, 2000)
   },
   methods: {

+ 1 - 4
monitor_ui/src/views/centerMonitor/device/index.vue

@@ -273,7 +273,7 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="摄像头" prop="cameraCodeList">
-              <el-select v-model="form.cameraCodeList" multiple placeholder="请选择摄像头" style="width:560px"
+              <el-select v-model="form.cameraCodeList" multiple  filterable  placeholder="请选择摄像头" style="width:560px"
                          @change="onChange"
               >
                 <el-option
@@ -1012,9 +1012,6 @@ export default {
         ],
         cameraList: [],
         selectedOptions: [],
-        cameraCodeList: [
-          { required: true, message: '请选择摄像头', trigger: 'blur' }
-        ],
       }
     }
   },

+ 868 - 0
sql/onest_monitor.sql

@@ -0,0 +1,868 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 192.168.10.15
+ Source Server Type    : MySQL
+ Source Server Version : 50721
+ Source Host           : 192.168.10.15:63306
+ Source Schema         : onest_monitor
+
+ Target Server Type    : MySQL
+ Target Server Version : 50721
+ File Encoding         : 65001
+
+ Date: 31/03/2025 16:14:24
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_aidevicedept
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_aidevicedept`;
+CREATE TABLE `centermonitor_t_aidevicedept`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `device_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型(字典)',
+  `device_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备code',
+  `device_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备ID',
+  `device_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
+  `map_dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门id',
+  `map_dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门名称',
+  `dept_protype` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门类型(1-责任单位,接收推送,2-查看单位)',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  `data_status` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据状态(可用 、不可用 ) 字典',
+  `dept_id` bigint(50) NULL DEFAULT NULL COMMENT '数据所属部门id',
+  `dept_name` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据所属部门名称',
+  `is_command_center` int(10) NULL DEFAULT 0 COMMENT '是否指挥中心',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `id`(`device_id`, `map_dept_id`, `dept_protype`, `id`) USING BTREE,
+  INDEX `device_id`(`device_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_aideviceevent
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_aideviceevent`;
+CREATE TABLE `centermonitor_t_aideviceevent`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `aidevice_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型(字典)',
+  `device_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备code',
+  `device_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备ID',
+  `device_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
+  `event_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件类型',
+  `event_type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件类型名称',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  `data_status` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据状态(可用 、不可用 ) 字典',
+  `dept_id` bigint(50) NULL DEFAULT NULL COMMENT '数据所属部门id',
+  `dept_name` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据所属部门名称',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camera
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camera`;
+CREATE TABLE `centermonitor_t_camera`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  `data_status` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据状态(1-可用 2-不可用 )',
+  `data_dept_id` bigint(20) NULL DEFAULT NULL COMMENT '数据所属部门(政或党的id)',
+  `camera_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头名称',
+  `camera_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ip',
+  `camera_port` bigint(20) NULL DEFAULT NULL COMMENT '端口',
+  `camera_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号',
+  `camera_pasword` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
+  `camera_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '摄像头编码',
+  `camera_factory` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头厂家(海康、大华)',
+  `camera_region` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属区域',
+  `camera_radius` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '半径',
+  `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高度',
+  `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '维度',
+  `camera_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头类型',
+  `operator_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '运营商类型(1联通,2移动,3电信)',
+  `camera_use` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '摄像头用途',
+  `channel_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道编号',
+  `working_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '运行状态',
+  `offline_reason` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '离线原因',
+  `camera_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头图片',
+  `convergence_platform` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '融合平台',
+  PRIMARY KEY (`id`, `camera_code`) USING BTREE,
+  INDEX `id`(`id`) USING BTREE,
+  INDEX `camera_use`(`camera_use`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '摄像头' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camera_call_log
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camera_call_log`;
+CREATE TABLE `centermonitor_t_camera_call_log`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `device_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备code',
+  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '调用状态(0:调用;1被调用)',
+  `map_dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门id',
+  `map_dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门名称',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '摄像头调用记录统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camera_copy
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camera_copy`;
+CREATE TABLE `centermonitor_t_camera_copy`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  `data_status` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据状态(1-可用 2-不可用 )',
+  `data_dept_id` bigint(20) NULL DEFAULT NULL COMMENT '数据所属部门(政或党的id)',
+  `camera_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头名称',
+  `camera_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ip',
+  `camera_port` bigint(20) NULL DEFAULT NULL COMMENT '端口',
+  `camera_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号',
+  `camera_pasword` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
+  `camera_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '摄像头编码',
+  `camera_factory` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头厂家(海康、大华)',
+  `camera_region` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属区域',
+  `camera_radius` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '半径',
+  `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高度',
+  `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '维度',
+  `camera_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头类型',
+  `operator_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '运营商类型(1联通,2移动,3电信)',
+  `camera_use` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '摄像头用途',
+  `channel_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道编号',
+  PRIMARY KEY (`id`, `camera_code`) USING BTREE,
+  INDEX `id`(`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '摄像头' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camera_img
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camera_img`;
+CREATE TABLE `centermonitor_t_camera_img`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `camera_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头图片',
+  `camera_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头id',
+  `camera_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头编码',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 8492 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camera_state_log
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camera_state_log`;
+CREATE TABLE `centermonitor_t_camera_state_log`  (
+  `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `camera_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头主键',
+  `create_time` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
+  `state` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '运行状态',
+  `report_text` blob NULL COMMENT '上报报文',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `id_time_state`(`camera_id`, `create_time`, `state`) USING BTREE,
+  INDEX `camera_id`(`camera_id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4473823 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_camerachannel
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_camerachannel`;
+CREATE TABLE `centermonitor_t_camerachannel`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `data_status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据状态(1-可用 2-不可用 )',
+  `data_dept_id` bigint(20) NULL DEFAULT NULL COMMENT '数据所属部门(政或党的id)',
+  `camera_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头ID',
+  `channel_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道编号',
+  `channel_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道名称',
+  `channel_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道类型(1-红外 2-高清)',
+  `device_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `device_sn` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '唯一编码,默认为国标编码',
+  `device_protocol_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接入协议',
+  `device_login_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备登录类型',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `id`(`camera_id`, `channel_code`, `id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '摄像头通道表' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_cloud_broadcast
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_cloud_broadcast`;
+CREATE TABLE `centermonitor_t_cloud_broadcast`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `name` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
+  `dept_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门id',
+  `dept_name` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',
+  `model` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '型号',
+  `longitude` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '位置',
+  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
+  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备可用系统',
+  `broadcast_use` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '云广播用途',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_cloud_broadcast_img
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_cloud_broadcast_img`;
+CREATE TABLE `centermonitor_t_cloud_broadcast_img`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `broadcast_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `broadcast_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 488 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_label
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_label`;
+CREATE TABLE `centermonitor_t_label`  (
+  `id` int(25) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签名称',
+  `sort` int(10) NULL DEFAULT NULL COMMENT '排序',
+  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签属性',
+  `parent_id` int(255) NOT NULL COMMENT '标签父级id',
+  `level` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '层级',
+  `img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 455 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_label_mapping
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_label_mapping`;
+CREATE TABLE `centermonitor_t_label_mapping`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `label_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签id',
+  `device_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备id',
+  `label_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型',
+  `preset_point_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预置点编码',
+  `preset_point_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预置点名称',
+  `channel_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道编号',
+  `camera_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头编码',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 734 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_label_type
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_label_type`;
+CREATE TABLE `centermonitor_t_label_type`  (
+  `id` int(25) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `label_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签id',
+  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别id',
+  `type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1035 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_atmosphere
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_atmosphere`;
+CREATE TABLE `centermonitor_t_monitoring_data_atmosphere`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `device_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据创建时间',
+  `fine_particle` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可吸入细颗粒(pm2.5)',
+  `suction_particle` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可吸入颗粒物(pm10)',
+  `sulfur_dioxide` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二氧化硫',
+  `nitrogen_dioxide` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二氧化氮',
+  `ozone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '臭氧',
+  `carbon_monoxide` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一氧化碳',
+  `tvoc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '总挥发性有机物',
+  `tsp` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '总悬浮颗粒物',
+  `temperature` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度',
+  `humidity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度',
+  `atmos` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '大气压 -k',
+  `wind_speed` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '风速',
+  `wind_direction` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '风向',
+  `battery_voltage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电压',
+  `signal_strength` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '信号强度',
+  `error_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '错误码',
+  `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本号',
+  `latitude` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `longitude` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `illuminance` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '光照度 Lux',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_insect_pests
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_insect_pests`;
+CREATE TABLE `centermonitor_t_monitoring_data_insect_pests`  (
+  `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据创建时间',
+  `download_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头采集原图下载URL',
+  `download_url_compress` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头采集原图下载URL(压缩后)',
+  `tagging_img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标注后的图片',
+  `tagging_img_url_compress` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标注后图片(压缩后)',
+  `device_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编号',
+  `new_time` timestamp NULL DEFAULT NULL COMMENT '最新一次识别时间',
+  `results` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最新一次识别结果',
+  `new_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最新一次识别数量',
+  `type_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最新一次识别的种类数量',
+  `old_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次识别数量',
+  `old_time` timestamp NULL DEFAULT NULL COMMENT '上一次识别时间',
+  `old_results` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次识别结果',
+  `old_type_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次识别种类数量',
+  `old_download_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次摄像头采集原图下载URL',
+  `old_tagging_img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次标注后图片',
+  `old_download_url_compress` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次摄像头采集原图下载URL(压缩后)',
+  `old_tagging_img_url_compress` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上一次标注后图片(压缩后)',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_soil_moisture
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_soil_moisture`;
+CREATE TABLE `centermonitor_t_monitoring_data_soil_moisture`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `device_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据创建时间',
+  `temperature` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度',
+  `humidity` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度',
+  `ph` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ph值',
+  `conductivity` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导电率',
+  `nitrogen` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '氮含量',
+  `phosphorus` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '磷含量',
+  `potassium` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钾含量',
+  `latitude` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `signal_strength` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '信号强度',
+  `error_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '错误码',
+  `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本号',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_water_pressure
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_water_pressure`;
+CREATE TABLE `centermonitor_t_monitoring_data_water_pressure`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `IMEI` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `threshold_low_enable` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下限警报使能',
+  `threshold_high_enable` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上限警报使能',
+  `signal_power` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '信号强度',
+  `hydraulic_value` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压值',
+  `hydraulic_threshold_min` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压下限阈值',
+  `hydraulic_threshold_max` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压上限阈值',
+  `heartbeat_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '心跳周期',
+  `battery_voltage` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电压',
+  `battery_value` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电量',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_water_quality
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_water_quality`;
+CREATE TABLE `centermonitor_t_monitoring_data_water_quality`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `device_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据创建时间',
+  `water_ph` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水中PH',
+  `water_temperature` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水温',
+  `water_quality_suspension` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水质悬浮物',
+  `water_temperature_two` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水温',
+  `conductivity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水中电导率',
+  `ammonia_nitrogen` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '氨氮',
+  `cod` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '化学需氧量',
+  `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `signal_strength` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '信号强度',
+  `error_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '错误码',
+  `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本号',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_data_water_velocity
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_data_water_velocity`;
+CREATE TABLE `centermonitor_t_monitoring_data_water_velocity`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `ST` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测站唯一编码',
+  `FUN` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '功能码',
+  `TT` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据采集时间',
+  `TM` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通讯时间',
+  `VER` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',
+  `MARK` int(100) NULL DEFAULT NULL COMMENT '传输标志',
+  `SERIAL` int(100) NULL DEFAULT NULL COMMENT '数据包流水号',
+  `TYPE` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测站类型',
+  `DTEMP` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备温度',
+  `BAT` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电量',
+  `SIGNAL` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备通讯信号强度',
+  `VT` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备电池电压',
+  `Q` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '两个流量计的瞬时流量之和',
+  `Q1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计1瞬时流量Q1(采集水深/水位 流速 通过断面面积计算瞬时流量)',
+  `Q2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计2瞬时流量Q2(采集水深/水位 流速 通过断面面积计算瞬时流量)',
+  `V1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '瞬时流速',
+  `CQ1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流量计1累计流量(通过瞬时流量的累计计算累计流量)',
+  `Z` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水位',
+  `Z1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水深',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '传感器存储数据表1' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_device
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_device`;
+CREATE TABLE `centermonitor_t_monitoring_device`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '注释',
+  `device_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
+  `brand` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '品牌',
+  `device_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `longitude` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `dept_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门ID',
+  `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',
+  `working_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作状态',
+  `device_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型',
+  `warn_line` int(10) NULL DEFAULT NULL COMMENT '预警阈值',
+  `remark` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
+  `charger` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人',
+  `charger_tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
+  `for_system` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备可用系统',
+  `address` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址',
+  `open_warn` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '是否开启告警',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '监测设备' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_device_camera
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_device_camera`;
+CREATE TABLE `centermonitor_t_monitoring_device_camera`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `device_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '监测设备id',
+  `camera_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头编码',
+  `camera_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头名称',
+  `camera_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头类型',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `device_id`(`device_id`) USING BTREE,
+  INDEX `camera_code`(`camera_code`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 96 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '检测设备和摄像头关联表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_device_img
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_device_img`;
+CREATE TABLE `centermonitor_t_monitoring_device_img`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `device_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '传感器图片',
+  `device_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '传感器id',
+  `device_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '传感器编码',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 290 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_equpment_position
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_equpment_position`;
+CREATE TABLE `centermonitor_t_monitoring_equpment_position`  (
+  `id` int(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `angle` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角度。正北方向为原点,顺时针为正,单位度。',
+  `event` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件名称',
+  `device_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `is_online` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备在线状态,1:在线,0:离线',
+  `data_source` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源。1:APP,2:车载,3:单兵。',
+  `gps_x` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `gps_y` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高度',
+  `speed` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '速度。单位:公里/小时。仅GPS定位是有速度信息',
+  `star_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定位星数',
+  `antenna_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '天线状态,1:好,0:坏.',
+  `orientation_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定位状态,1:定位,2:不定位。',
+  `extend_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展信息',
+  `cap_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上报时间,UTC 0时区,毫秒值。',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `channel_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道编码',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `device_code`(`device_code`) USING BTREE,
+  INDEX `channel_code`(`channel_code`) USING BTREE,
+  INDEX `create_time`(`create_time`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 124568 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '执法仪设备位置消息' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_threshold_atmosphere
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_threshold_atmosphere`;
+CREATE TABLE `centermonitor_t_monitoring_threshold_atmosphere`  (
+  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `device_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `fine_particle_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'pm2.5',
+  `suction_particle_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'pm10',
+  `carbon_monoxide_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一氧化碳',
+  `ozone_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '臭氧',
+  `nitrogen_dioxide_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二氧化氮',
+  `sulfur_dioxide_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二氧化硫',
+  `temperature_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度上限',
+  `temperature_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度下限',
+  `humidity_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度上限',
+  `humidity_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度下限',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_threshold_soil_moisture
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_threshold_soil_moisture`;
+CREATE TABLE `centermonitor_t_monitoring_threshold_soil_moisture`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `device_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `temperature_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度上限',
+  `temperature_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '温度下限',
+  `humidity_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度上限',
+  `humidity_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '湿度下限',
+  `ph_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ph值上限',
+  `ph_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ph值下限',
+  `conductivity_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导电率上限',
+  `conductivity_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导电率下限',
+  `nitrogen_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '氮含量上限',
+  `nitrogen_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '氮含量下限',
+  `phosphorus_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '磷含量上限',
+  `phosphorus_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '磷含量下限',
+  `potassium_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钾含量上限',
+  `potassium_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钾含量下限',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_threshold_water_pressure
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_threshold_water_pressure`;
+CREATE TABLE `centermonitor_t_monitoring_threshold_water_pressure`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `device_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `hydraulic_threshold_max` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压上限阈值',
+  `hydraulic_threshold_min` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压下限阈值',
+  `hydraulic_threshold_heartbeat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '心跳周期',
+  `threshold_high_enable` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '压力关闭报警',
+  `threshold_low_enable` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '压力开启报警',
+  `command_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '指令类型',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_threshold_water_quality
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_threshold_water_quality`;
+CREATE TABLE `centermonitor_t_monitoring_threshold_water_quality`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `device_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `water_ph_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水质ph上限',
+  `water_ph_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水质ph下限',
+  `water_quality_suspension_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水质浊度',
+  `ammonia_nitrogen_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '氨氮',
+  `cod_threshold` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '化学需氧量',
+  `water_temperature_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水温上限',
+  `water_temperature_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水温下限',
+  `conductivity_threshold_up` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电导率上限',
+  `conductivity_threshold_down` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电导率下限',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_threshold_water_velocity
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_threshold_water_velocity`;
+CREATE TABLE `centermonitor_t_monitoring_threshold_water_velocity`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `device_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `q_threshold` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '瞬时流量阈值',
+  `v_threshold` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '瞬时流速阈值',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_monitoring_warn_water_pressure
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_monitoring_warn_water_pressure`;
+CREATE TABLE `centermonitor_t_monitoring_warn_water_pressure`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `device_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `service_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务ID',
+  `hydraulic_state` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压监测状态',
+  `hydraulic_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '水压值',
+  `error_code` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '故障码',
+  `battery_value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电量',
+  `battery_voltage` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电池电压',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_playback
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_playback`;
+CREATE TABLE `centermonitor_t_playback`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `event_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `play_back_url` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_recorder_location
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_recorder_location`;
+CREATE TABLE `centermonitor_t_recorder_location`  (
+  `id` int(11) NOT NULL COMMENT '主键id',
+  `event` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件名称',
+  `deviceCode` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
+  `isOnline` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备在线状态1:在线,0:离线',
+  `dataSource` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源1:APP,2:车载,3:单兵。',
+  `gpsX` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `gpsY` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `height` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高度',
+  `angle` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角度。正北方向为原点,顺时针为正,单位度',
+  `speed` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '速度。单位:公里/小时。仅GPS定位是有速度信息',
+  `starCount` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定位星数',
+  `antennaStatus` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '天线状态,1:好,0:坏。',
+  `orientationStatus` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定位状态,1:定位,2:不定位。',
+  `extendInfo` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展信息',
+  `capTime` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上报时间,UTC 0时区,毫秒值',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '执法记录仪位置' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_type
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_type`;
+CREATE TABLE `centermonitor_t_type`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
+  `camera_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '摄像头id',
+  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别ID',
+  `type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类名名称',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_uav
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_uav`;
+CREATE TABLE `centermonitor_t_uav`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `base_station_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基站名称',
+  `base_station_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机库ID',
+  `base_station_sn` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机库SN',
+  `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `latitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '海拔高度',
+  `uav_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '无人机名称',
+  `uav_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '无人机ID',
+  `uav_sn` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '无人机SN',
+  `dept_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '无人机' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centermonitor_t_uavdept
+-- ----------------------------
+DROP TABLE IF EXISTS `centermonitor_t_uavdept`;
+CREATE TABLE `centermonitor_t_uavdept`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `uav_id` bigint(20) NULL DEFAULT NULL COMMENT '无人机id',
+  `uav_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '无人机名称',
+  `dept_id` bigint(50) NULL DEFAULT NULL COMMENT '所属部门id',
+  `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门名称',
+  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `uav_id`(`uav_id`) USING BTREE,
+  INDEX `id`(`id`, `uav_id`, `dept_id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '无人机部门关联表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for centernonitor_t_dahua_operate_log
+-- ----------------------------
+DROP TABLE IF EXISTS `centernonitor_t_dahua_operate_log`;
+CREATE TABLE `centernonitor_t_dahua_operate_log`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `record_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
+  `terminal_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作者ip',
+  `mac_addr` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作者mac地址',
+  `channel_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通道名',
+  `device_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
+  `operate_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模块名称',
+  `operate_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作类型',
+  `operate_result` tinyint(1) NULL DEFAULT NULL COMMENT '操作结果(1成功;0失败;)',
+  `service_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务标识',
+  `service_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务名称',
+  `response_time` int(11) NULL DEFAULT NULL COMMENT '操作耗时',
+  `detail` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件内容',
+  `behavior` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务操作',
+  `operate_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
+  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `channel_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `device_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门id',
+  `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
+  `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '父部门id',
+  `ancestors` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '祖级列表',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `channel_code`(`channel_code`) USING BTREE,
+  INDEX `operate_time`(`operate_time`) USING BTREE,
+  INDEX `dept_id`(`dept_id`) USING BTREE,
+  INDEX `ancestors`(`ancestors`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 24313020 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '大华操作日志' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centernonitor_t_dahua_operate_log_url
+-- ----------------------------
+DROP TABLE IF EXISTS `centernonitor_t_dahua_operate_log_url`;
+CREATE TABLE `centernonitor_t_dahua_operate_log_url`  (
+  `id` bigint(20) NOT NULL COMMENT '主键id',
+  `operate_id` bigint(20) NULL DEFAULT NULL COMMENT 'centernonitor_t_dahua_operate_log主键id',
+  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'url',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '大华操作日志url' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centernonitor_t_gas_tank_devices
+-- ----------------------------
+DROP TABLE IF EXISTS `centernonitor_t_gas_tank_devices`;
+CREATE TABLE `centernonitor_t_gas_tank_devices`  (
+  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `deviceid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备序列号,全局唯一',
+  `devicename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名称',
+  `devicetype` int(11) NULL DEFAULT NULL COMMENT '设备类型',
+  `simnum` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'SIM号码',
+  `overduetime` bigint(20) NULL DEFAULT NULL COMMENT '过期时间',
+  `expirnotifytime` bigint(20) NULL DEFAULT NULL COMMENT '到期通知时间',
+  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
+  `creater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '哪个用户创建的,方便快速查找分组',
+  `videochannelcount` int(11) NULL DEFAULT 0 COMMENT '默认摄像头数量',
+  `lastactivetime` bigint(20) NULL DEFAULT NULL COMMENT '上一次在线时间',
+  `isfree` int(11) NULL DEFAULT NULL COMMENT '是否能正常使用: 1 正常使用, 2 正在体验, 3 已禁用, 4 设备到期, 5 设备过期',
+  `allowedit` int(11) NULL DEFAULT 0 COMMENT '0代表不允许二级普通用户编辑, 1代表允许',
+  `icon` int(11) NULL DEFAULT 0 COMMENT '默认图标, 0代表小车',
+  `stared` int(11) NULL DEFAULT 0 COMMENT '是否关注: 0 代表未关注, 1代表关注',
+  `loginname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录名称',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `deviceid`(`deviceid`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 178 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '煤气罐设备信息表' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centernonitor_t_gas_tank_historical_trajectory
+-- ----------------------------
+DROP TABLE IF EXISTS `centernonitor_t_gas_tank_historical_trajectory`;
+CREATE TABLE `centernonitor_t_gas_tank_historical_trajectory`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `deviceid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备序列号,全局唯一',
+  `updatetime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '综合计算后位置更新时间',
+  `status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应部标状态值',
+  `speed` double NULL DEFAULT NULL COMMENT '速度(米)',
+  `callat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计算出来的纬度',
+  `callon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计算出来的经度',
+  `altitude` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高度(米)',
+  `course` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方向(0-360)',
+  `totaldistance` double NULL DEFAULT NULL COMMENT '总里程米',
+  `totalad` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `totalnotrunningad` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `ad0` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油量1',
+  `ad1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油量2',
+  `ad2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油量3',
+  `ad3` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油量4',
+  `srcad0` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `srcad1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `srcad2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `srcad3` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `track_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '里面包含了多少个上报点',
+  `starttime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '点的开始时间',
+  `endtime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '点的结束时间',
+  `trackid` int(11) NULL DEFAULT NULL COMMENT '第一个点在数据库点主键',
+  `arrivedtime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '到达服务器时间',
+  `radius` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定位精度米',
+  `recorderspeed` double NULL DEFAULT NULL COMMENT '行车记录仪速度米',
+  `strstatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应部标状态文字描述',
+  `strstatusen` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应部标状态英文文字描述',
+  `gotsrc` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '位置信息来源定位类型 (gps,wifi,cell)',
+  `rxlevel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基站信号强度',
+  `reportmode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上报类型',
+  `gpsvalidnum` int(11) NULL DEFAULT NULL COMMENT 'gps有效数',
+  `weight` double NULL DEFAULT NULL,
+  `reissue` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `address` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `voltage` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `temp1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `temp2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `temp3` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `temp4` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `humi1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `humi2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `oilrate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `startdistance` double NULL DEFAULT NULL,
+  `enddistance` double NULL DEFAULT NULL,
+  `indistance` double NULL DEFAULT NULL,
+  `outdistance` double NULL DEFAULT NULL,
+  `durationidle` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `region` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `stralarm` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `stralarmen` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `messagetype` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `create_time` datetime NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `deviceid`(`deviceid`) USING BTREE,
+  INDEX `create_time`(`create_time`) USING BTREE,
+  INDEX `updatetime`(`updatetime`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 6785897 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '历史轨迹' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for centernonitor_t_gas_tank_travel_mileage
+-- ----------------------------
+DROP TABLE IF EXISTS `centernonitor_t_gas_tank_travel_mileage`;
+CREATE TABLE `centernonitor_t_gas_tank_travel_mileage`  (
+  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `deviceid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备序列号,全局唯一',
+  `maxspeed` double NULL DEFAULT NULL COMMENT '最大速度 米/小时',
+  `tripdistance` double NULL DEFAULT NULL COMMENT '这一段里程的总里程 米',
+  `triptime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '这一段里程的总时间 毫秒数',
+  `starttime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始时间 毫秒数',
+  `endtime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间 毫秒数',
+  `parktime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '停车时长 毫秒数',
+  `averagespeed` double NULL DEFAULT NULL COMMENT '平均速度 米/小时',
+  `slat` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始纬度',
+  `slon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始经度',
+  `elat` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束纬度',
+  `elon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束经度',
+  `trackstarttime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `trackendtime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `fuelreport` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `addressmap` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '行程地点',
+  `create_time` datetime NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `deviceid`(`deviceid`) USING BTREE,
+  INDEX `endtime`(`endtime`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 230972 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 8
src/main/java/com/sooka/sponest/monitor/LabelManagement/controller/CentermonitorSetLabelController.java

@@ -114,14 +114,6 @@ public class CentermonitorSetLabelController extends BaseController {
     }
 
     /**
-     * 根据标签id查询摄像头设备列表
-     */
-    @GetMapping("/getCamerasByLabelId")
-    public List<CentermonitorSetLabel> getCamerasByLabelId(CentermonitorSetLabel centermonitorSetLabel) {
-        return centermonitorSetLabelService.getCameraByLabelId(centermonitorSetLabel);
-    }
-
-    /**
      * 根据标签id查询摄像头预置点等信息
      */
     @GetMapping("/getCameraById")

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/LabelManagement/domain/CentermonitorSetLabel.java

@@ -43,6 +43,8 @@ public class CentermonitorSetLabel  {
     private String workingStatus;
     //覆盖范围
     private String cameraRadius;
+    //所属区域
+    private String cameraRegion;
     //子表标签id
     private Integer labelId;
     //子表设备id

+ 1 - 0
src/main/java/com/sooka/sponest/monitor/aidevicedept/domain/CenterdataTAidevicedeptDTO.java

@@ -13,3 +13,4 @@ public class CenterdataTAidevicedeptDTO {
 
 
 }
+

+ 2 - 1
src/main/java/com/sooka/sponest/monitor/aidevicedept/mapper/CenterdataTAidevicedeptMapper.java

@@ -77,5 +77,6 @@ public interface CenterdataTAidevicedeptMapper
      */
      List<CenterdataTAidevicedept> selectDeptByDeviceCode(String deviceCode);
 
-     List<CenterdataTAidevicedeptDTO> getByDeviceCode(String deviceCode);
+    List<CenterdataTAidevicedeptDTO> getByDeviceCode(String deviceCode);
+
 }

+ 72 - 73
src/main/java/com/sooka/sponest/monitor/camera/controller/CentermonitorTCameraController.java

@@ -691,85 +691,84 @@ public class CentermonitorTCameraController extends BaseController {
         return centermonitorTCameraService.getVideoFusionUnifyInlet(deptId);
 
     }
+        /**
+         * 海康插件融合预览回放
+         */
+        @Value("${sooka.haikang_video_server.loginIp}")
+        private String loginIp;
+        @Value("${sooka.haikang_video_server.appkey}")
+        private String appkey;
+        @Value("${sooka.haikang_video_server.secret}")
+        private String secret;
+        @Value("${sooka.haikang_video_server.loginPort}")
+        private String loginPort;
+
+        @GetMapping("/HKTVWall")
+        @ApiOperation(value = "海康插件融合预览回放", notes = "海康插件融合预览回放")
+        public AjaxResult getHKTVWall (Integer playMode){
+            Map<String, Object> data = new HashMap<>();
+            data.put("loginIp", loginIp);
+            data.put("appkey", appkey);
+            data.put("secret", secret);
+            data.put("loginPort", Integer.valueOf(loginPort));
+            data.put("playMode", playMode);
+            data.put("layout", "1x1");
+            return AjaxResult.success(data);
+        }
 
-    /**
-     * 海康插件融合预览回放
-     */
-    @Value("${sooka.haikang_video_server.loginIp}")
-    private String loginIp;
-    @Value("${sooka.haikang_video_server.appkey}")
-    private String appkey;
-    @Value("${sooka.haikang_video_server.secret}")
-    private String secret;
-    @Value("${sooka.haikang_video_server.loginPort}")
-    private String loginPort;
-
-    @GetMapping("/HKTVWall")
-    @ApiOperation(value = "海康插件融合预览回放", notes = "海康插件融合预览回放")
-    public AjaxResult getHKTVWall(Integer playMode) {
-        Map<String, Object> data = new HashMap<>();
-        data.put("loginIp", loginIp);
-        data.put("appkey", appkey);
-        data.put("secret", secret);
-        data.put("loginPort", Integer.valueOf(loginPort));
-        data.put("playMode", playMode);
-        data.put("layout", "1x1");
-        return AjaxResult.success(data);
-    }
-
-
-    /**
-     * 查询全部摄像头用于和检测设备一对多绑定
-     */
-    @Log(title = "摄像头", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "查询全部摄像头用于和检测设备一对多绑定", notes = "查询全部摄像头用于和检测设备一对多绑定")
-    @RequestMapping(value = "/selectAllCameraList", method = GET)
-    public R<?> selectAllCameraList() {
-        return R.ok(centermonitorTCameraService.selectAllCameraList());
-    }
 
+        /**
+         * 查询全部摄像头用于和检测设备一对多绑定
+         */
+        @Log(title = "摄像头", businessType = BusinessType.OTHER)
+        @ApiOperation(value = "查询全部摄像头用于和检测设备一对多绑定", notes = "查询全部摄像头用于和检测设备一对多绑定")
+        @RequestMapping(value = "/selectAllCameraList", method = GET)
+        public R<?> selectAllCameraList () {
+            return R.ok(centermonitorTCameraService.selectAllCameraList());
+        }
 
-    /**
-     * 根据部门ID获取执法记录仪列表
-     */
-    @Log(title = "执法记录仪", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "根据部门ID获取执法记录仪列表", notes = "根据部门ID获取执法记录仪列表")
-    @RequestMapping(value = "selectRecorderByDeptId", method = POST)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Integer", paramType = "query"),
-            @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "cameraUse", value = "摄像头用途", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "workingStatus", value = "运行状态", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "deviceCode", value = "设备编码", dataType = "String", paramType = "query")
-    })
-    public AjaxResult selectRecorderByDeptId(@RequestBody VisuForestCloudMapVO vo) {
-        return centermonitorTCameraService.selectRecorderByDeptId(vo);
-    }
 
-    /**
-     * 根据部门ID获取执法记录仪在离线状态数量
-     */
-    @Log(title = "执法记录仪", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "根据部门ID获取执法记录仪在离线状态数量", notes = "根据部门ID获取执法记录仪在离线状态数量")
-    @RequestMapping(value = "selectRecorderCountByDeptId", method = POST)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Integer", paramType = "query"),
-            @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "query"),
-    })
-    public AjaxResult selectRecorderCountByDeptId(@RequestBody VisuForestCloudMapVO vo) {
-        return AjaxResult.success(centermonitorTCameraService.selectRecorderCountByDeptId(vo));
-    }
+        /**
+         * 根据部门ID获取本部门及以下执法记录仪列表
+         */
+        @Log(title = "执法记录仪", businessType = BusinessType.OTHER)
+        @ApiOperation(value = "根据部门ID获取本部门及以下执法记录仪列表", notes = "根据部门ID获取本部门及以下执法记录仪列表")
+        @RequestMapping(value = "selectRecorderByDeptId", method = POST)
+        @ApiImplicitParams({
+                @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Integer", paramType = "query"),
+                @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "query"),
+                @ApiImplicitParam(name = "cameraUse", value = "摄像头用途", dataType = "String", paramType = "query"),
+                @ApiImplicitParam(name = "workingStatus", value = "运行状态", dataType = "String", paramType = "query"),
+                @ApiImplicitParam(name = "deviceCode", value = "设备编码", dataType = "String", paramType = "query")
+        })
+        public AjaxResult selectRecorderByDeptId (@RequestBody VisuForestCloudMapVO vo){
+            return centermonitorTCameraService.selectRecorderByDeptId(vo);
+        }
 
+        /**
+         * 根据部门ID获取执法记录仪在离线状态数量
+         */
+        @Log(title = "执法记录仪", businessType = BusinessType.OTHER)
+        @ApiOperation(value = "根据部门ID获取执法记录仪在离线状态数量", notes = "根据部门ID获取执法记录仪在离线状态数量")
+        @RequestMapping(value = "selectRecorderCountByDeptId", method = POST)
+        @ApiImplicitParams({
+                @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Integer", paramType = "query"),
+                @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "query"),
+        })
+        public AjaxResult selectRecorderCountByDeptId (@RequestBody VisuForestCloudMapVO vo){
+            return AjaxResult.success(centermonitorTCameraService.selectRecorderCountByDeptId(vo));
+        }
 
-    /**
-     * 根据通道编码查询摄像头信息和通道信息
-     */
-    @ApiOperation(value = "根据通道编码查询摄像头信息和通道信息", notes = "根据通道编码查询摄像头信息和通道信息")
-    @GetMapping(value = "selectCameraInfoByChannelCode/{channelCode}")
-    @Log(title = "摄像头通道", businessType = BusinessType.OTHER)
-    public R<CentermonitorTCamera> selectCameraInfoByChannelCode(@PathVariable("channelCode") String channelCode) {
-        return R.ok(centermonitorTCameraService.selectCameraInfoByChannelCode(channelCode));
-    }
+
+        /**
+         * 根据通道编码查询摄像头信息和通道信息
+         */
+        @ApiOperation(value = "根据通道编码查询摄像头信息和通道信息", notes = "根据通道编码查询摄像头信息和通道信息")
+        @GetMapping(value = "selectCameraInfoByChannelCode/{channelCode}")
+        @Log(title = "摄像头通道", businessType = BusinessType.OTHER)
+        public R<CentermonitorTCamera> selectCameraInfoByChannelCode (@PathVariable("channelCode") String channelCode){
+            return R.ok(centermonitorTCameraService.selectCameraInfoByChannelCode(channelCode));
+        }
 
 }
 

+ 0 - 4
src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudCameraBO.java

@@ -87,10 +87,6 @@ public class VisuForestCloudCameraBO extends BaseEntity {
 
     private String longitude;
 
-    /** 图片 */
-
-    private String cameraImg;
-
     /** 维度 */
 
     private String latitude;

+ 2 - 1
src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudMapVO.java

@@ -18,7 +18,7 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
 
     //部门ID
     private Long deptId;
-    private List<Long> deptIds;
+
     //查询日期 yyyy-mm-dd
     private String day;
 
@@ -45,4 +45,5 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
     private String [] eventTypeIdDl;
     /** 设备编码 */
     private String deviceCode;
+    private List<Long> deptIds;
 }

+ 24 - 26
src/main/java/com/sooka/sponest/monitor/camera/mapper/CentermonitorTCameraMapper.java

@@ -7,7 +7,6 @@ import org.springframework.stereotype.Repository;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 摄像头Mapper接口
@@ -316,31 +315,6 @@ public interface CentermonitorTCameraMapper {
     void deleteImageByCameraId(@Param("cameraId") String cameraId);
 
     /**
-     * 查询全部摄像头用于和检测设备一对多绑定
-     **/
-    List<CameraCodeAndNameVO> selectAllCameraList();
-
-    /**
-     * 根据cameraCode更新执法仪状态
-     **/
-    void updateLawEnforcementInstrumentState(@Param("status") String status, @Param("code") String code);
-
-    /**
-     * 根据部门ID获取执法记录仪列表
-     */
-    List<VisuForestCloudCameraBO> selectRecorderByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
-
-    /**
-     * 根据部门ID获取执法记录仪在离线状态数量
-     */
-    RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
-
-
-    CentermonitorTCamera selectCameraInfoByChannelCode(@Param("channelCode") String channelCode);
-
-    void updateBatchLawEnforcementInstrumentState(List<Map<String, Object>> list);
-
-    /**
      * 接入设备情况-厂商-雷达图
      */
     List<CentermonitorTCamera> getAccessManufacturer(CentermonitorTCamera centermonitorTCamera);
@@ -373,5 +347,29 @@ public interface CentermonitorTCameraMapper {
      * 视频目录统计
      */
     public List<CentermonitorTCamera> getVideoDirectory(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 查询全部摄像头用于和检测设备一对多绑定
+     **/
+    List<CameraCodeAndNameVO> selectAllCameraList();
+
+    /**
+     * 根据cameraCode更新执法仪状态
+     **/
+    void updateLawEnforcementInstrumentState(@Param("status") String status, @Param("code") String code);
+
+    /**
+     * 根据部门ID获取执法记录仪列表
+     */
+    List<VisuForestCloudCameraBO> selectRecorderByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
+
+    /**
+     * 根据部门ID获取执法记录仪在离线状态数量
+     */
+    RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
+
+
+    CentermonitorTCamera selectCameraInfoByChannelCode(@Param("channelCode") String channelCode);
+
 }
 

+ 0 - 119
src/main/java/com/sooka/sponest/monitor/camera/quartz/IndexLineChartCountTask.java

@@ -1,119 +0,0 @@
-package com.sooka.sponest.monitor.camera.quartz;
-
-
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.redis.service.RedisService;
-import com.sooka.sponest.monitor.camera.domain.IndexLineChartsVo;
-import com.sooka.sponest.monitor.camera.service.ICentermonitorTCameraService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.util.*;
-
-import static org.springframework.web.bind.annotation.RequestMethod.GET;
-
-@Slf4j
-@Component
-@Api(tags = "监控中心首页定时任务")
-@RestController
-@RequestMapping("/camera/quartz")
-public class IndexLineChartCountTask {
-
-    @Resource
-    private RedisService redisService;
-
-    @Resource
-    private ICentermonitorTCameraService centermonitorTCameraService;
-
-    private final List<String> monthList = Arrays.asList("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12");
-
-    /**
-     * 监控中心首页-离线设备日折线图缓存
-     **/
-//    @Scheduled(cron = "0 0 0/2 * * ?")
-    @Log(title = "监控中心首页-离线设备日折线图缓存", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "监控中心首页-离线设备日折线图缓存", notes = "监控中心首页-离线设备日折线图缓存")
-    @RequestMapping(value = "/selectDayLineChartCountTask", method = GET)
-    public void selectDayLineChartCountTask() {
-        Date date = new Date();
-        List<Integer> yearList = getPreviousTwoYears(date);
-        for (int year : yearList) {
-            for (String month : monthList) {
-                List<IndexLineChartsVo> list = centermonitorTCameraService.dayLineChart(year + "-" + month);
-                redisService.setCacheObject("selectDayLineChartCount" + year + "-" + month, list);
-            }
-        }
-    }
-
-
-    /**
-     * 监控中心首页-离线设备月折线图缓存
-     **/
-//    @Scheduled(cron = "0 0 0/2 * * ?")
-    @Log(title = "监控中心首页-离线设备月折线图缓存", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "监控中心首页-离线设备月折线图缓存", notes = "监控中心首页-离线设备月折线图缓存")
-    @RequestMapping(value = "/selectMonthlyLineChartCountTask", method = GET)
-    public void selectMonthlyLineChartCountTask() {
-        Date date = new Date();
-        List<Integer> yearList = getPreviousTwoYears(date);
-        for (int year : yearList) {
-            List<IndexLineChartsVo> list = centermonitorTCameraService.monthlyLineChart(year + "-01");
-            redisService.setCacheObject("monthlyLineChartCount" + year + "-01", list);
-        }
-    }
-
-
-    /**
-     * 监控中心首页-离线设备季度折线图缓存
-     **/
-//    @Scheduled(cron = "0 0 0/2 * * ?")
-    @Log(title = "监控中心首页-离线设备季度折线图缓存", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "监控中心首页-离线设备季度折线图缓存", notes = "监控中心首页-离线设备季度折线图缓存")
-    @RequestMapping(value = "/quarterlineChartTask", method = GET)
-    public void quarterlineChartTask() {
-        Date date = new Date();
-        List<Integer> yearList = getPreviousTwoYears(date);
-        for (int year : yearList) {
-            List<IndexLineChartsVo> list = centermonitorTCameraService.quarterLineChart(year + "-01");
-            redisService.setCacheObject("quarterlineChart" + year + "-01", list);
-        }
-    }
-
-
-    /**
-     * 监控中心首页-离线设备年折线图缓存
-     **/
-//    @Scheduled(cron = "0 0 0/2 * * ?")
-    @Log(title = "监控中心首页-离线设备年折线图缓存", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "监控中心首页-离线设备年折线图缓存", notes = "监控中心首页-离线设备年折线图缓存")
-    @RequestMapping(value = "/yearlineChartTask", method = GET)
-    public void yearlineChartTask() {
-        Date date = new Date();
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTime(date);
-        int year = calendar.get(Calendar.YEAR);
-        List<IndexLineChartsVo> list = centermonitorTCameraService.yearLineChart(String.valueOf(year));
-        redisService.setCacheObject("yearlineChart" + year, list);
-    }
-
-    //获取当前年份
-    public static List<Integer> getPreviousTwoYears(Date date) {
-        List<Integer> yearList = new ArrayList<>();
-        // 创建 Calendar 实例并设置为当前时间
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTime(date);
-        // 获取当前年份
-        int currentYear = calendar.get(Calendar.YEAR);
-        // 添加前两年的年份到列表
-        yearList.add(currentYear - 2);
-        yearList.add(currentYear - 1);
-        yearList.add(currentYear);
-        return yearList;
-    }
-}

+ 19 - 19
src/main/java/com/sooka/sponest/monitor/camera/service/ICentermonitorTCameraService.java

@@ -279,27 +279,9 @@ public interface ICentermonitorTCameraService
      * **/
     List<CameraCodeAndNameVO> selectAllCameraList();
 
-    /**
-     * 根据部门ID获取执法记录仪列表
-     * **/
-    AjaxResult selectRecorderByDeptId(VisuForestCloudMapVO vo);
-
-    /**
-     * 根据部门ID获取执法记录仪在离线状态数量
-     */
-    RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
-
-    /**
-     * 根据通道编码查询摄像头信息
-     *
-     * @param channelCode 通道编码
-     *
-     */
-    public CentermonitorTCamera selectCameraInfoByChannelCode(String channelCode);
-
     R saveCameraCallLog(JSONObject deviceCode);
     /**
-     * 监控中心首页-年离线设备折线
+     * 接入设备情况-厂商-雷达图
      */
     Map<String, List> getAccessManufacturer(Long deptId);
 
@@ -342,6 +324,24 @@ public interface ICentermonitorTCameraService
     List<GiveAnAlarmResultDTO> selectEventGjnums(List<SysDept> sysDeptList);
 
     R getVideoFusionUnifyInlet(Long deptId);
+
+    /**
+     * 根据部门ID获取执法记录仪列表
+     * **/
+    AjaxResult selectRecorderByDeptId(VisuForestCloudMapVO vo);
+
+    /**
+     * 根据部门ID获取执法记录仪在离线状态数量
+     */
+    RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO);
+
+    /**
+     * 根据通道编码查询摄像头信息
+     *
+     * @param channelCode 通道编码
+     *
+     */
+    public CentermonitorTCamera selectCameraInfoByChannelCode(String channelCode);
 }
 
 

+ 28 - 30
src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCameraServiceImpl.java

@@ -31,12 +31,11 @@ import org.springframework.util.CollectionUtils;
 import javax.annotation.Resource;
 import java.lang.reflect.Field;
 import java.util.*;
-import java.util.concurrent.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 /**
  * 摄像头Service业务层处理
@@ -68,7 +67,6 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
     @Resource
     private CentermonitorTCameraCallLogMapper centermonitorTCameraCallLogMapper;
 
-
     /**
      * 查询摄像头
      *
@@ -622,30 +620,6 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
         return centermonitorTCameraMapper.selectAllCameraList();
     }
 
-    /**
-     * 根据部门ID获取执法记录仪列表
-     */
-    @Override
-    @DataScopeMutiDept(deptAlias = "d")
-    public AjaxResult selectRecorderByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO) {
-        setSookaDataBase(visuForestMonitorCenterVO);
-        List<VisuForestCloudCameraBO> list = centermonitorTCameraMapper.selectRecorderByDeptId(visuForestMonitorCenterVO);
-        return AjaxResult.success(list);
-    }
-
-    /**
-     * 根据部门ID获取执法记录仪在离线状态数量
-     */
-    @Override
-    public RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO) {
-        return centermonitorTCameraMapper.selectRecorderCountByDeptId(visuForestMonitorCenterVO);
-    }
-
-    @Override
-    public CentermonitorTCamera selectCameraInfoByChannelCode(String channelCode) {
-        return centermonitorTCameraMapper.selectCameraInfoByChannelCode(channelCode);
-    }
-
     @Override
     @Transactional(rollbackFor = Exception.class)
     public R saveCameraCallLog(JSONObject json) {
@@ -1054,6 +1028,30 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
         return R.ok(map);
     }
 
+    /**
+     * 根据部门ID获取执法记录仪列表
+     */
+    @Override
+    @DataScopeMutiDept(deptAlias = "d")
+    public AjaxResult selectRecorderByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO) {
+        setSookaDataBase(visuForestMonitorCenterVO);
+        List<VisuForestCloudCameraBO> list = centermonitorTCameraMapper.selectRecorderByDeptId(visuForestMonitorCenterVO);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 根据部门ID获取执法记录仪在离线状态数量
+     */
+    @Override
+    public RecorderCountVO selectRecorderCountByDeptId(VisuForestCloudMapVO visuForestMonitorCenterVO) {
+        return centermonitorTCameraMapper.selectRecorderCountByDeptId(visuForestMonitorCenterVO);
+    }
+
+    @Override
+    public CentermonitorTCamera selectCameraInfoByChannelCode(String channelCode) {
+        return centermonitorTCameraMapper.selectCameraInfoByChannelCode(channelCode);
+    }
+
 
 }
 

+ 1 - 2
src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCamerachannelServiceImpl.java

@@ -11,7 +11,6 @@ import com.sooka.sponest.monitor.camera.service.ICentermonitorTCamerachannelServ
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -23,7 +22,7 @@ import java.util.List;
 @Service
 public class CentermonitorTCamerachannelServiceImpl implements ICentermonitorTCamerachannelService
 {
-    @Resource
+    @Autowired
     private CentermonitorTCamerachannelMapper centermonitorTCamerachannelMapper;
 
     /**

+ 0 - 278
src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogBlackTask.java

@@ -1,278 +0,0 @@
-package com.sooka.sponest.monitor.dahua.controller;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.domain.SysDept;
-import com.sooka.sponest.monitor.dahua.domain.CenternonitorTDahuaOperateLog;
-import com.sooka.sponest.monitor.dahua.domain.CenternonitorTDahuaOperateLogUrl;
-import com.sooka.sponest.monitor.dahua.mapper.CenternonitorTDahuaOperateLogUrlMapper;
-import com.sooka.sponest.monitor.dahua.service.ICenternonitorTDahuaOperateLogService;
-import com.sooka.sponest.monitor.dahua.utils.HttpTestUtils;
-import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.ObjectUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.impl.client.LaxRedirectStrategy;
-import org.apache.http.ssl.SSLContextBuilder;
-import org.apache.http.util.EntityUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLContext;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.util.*;
-
-import static org.springframework.web.bind.annotation.RequestMethod.POST;
-
-
-/**
- * 对接大华云台日志定时任务Controller
- * <p>
- * "0": "登录",
- * "1": "查询",
- * "2": "新增",
- * "3": "修改",
- * "4": "删除",
- * "5": "布控",
- * "6": "撤控",
- * "7": "控制",
- * "8": "注销",
- * "9": "审核",
- * "10": "导入",
- * "11": "导出",
- * "14": "录像回放",
- * "15": "录像下载",
- * "16": "录像查询",
- * "17": "本地录像",
- * "18": "语音对讲",
- * "19": "锁定录像",
- * "20": "解锁录像",
- * "21": "下载",
- * "22": "远程录像",
- * "90": "开启",
- * "91": "停止",
- * "92": "查看",
- * "93": "处理",
- * "94": "锁定",
- * "95": "解锁",
- * "96": "暂停",
- * "97": "分享"
- *
- * @author ruoyi
- * @date 2023-12-09
- */
-@Slf4j
-@Component
-@RestController
-@RequestMapping("/dahuaOperateLog")
-public class DahuaOperateLogBlackTask {
-
-    @Resource
-    private ICenternonitorTDahuaOperateLogService centernonitorTDahuaOperateLogService;
-    @Resource
-    private CenternonitorTDahuaOperateLogUrlMapper centernonitorTDahuaOperateLogUrlMapper;
-    @Resource
-    private RemoteService remoteService;
-    private final List<String> operateTypeBlackList = Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "14", "15", "16", "17", "18", "19", "20", "21", "22", "90", "91", "92", "93", "94", "95", "96", "97");
-
-
-    @Value("${sooka.dahua_interface_server.loginIp}")
-    private String loginIp;
-    @Value("${sooka.dahua_interface_server.loginPort}")
-    private String loginPort;
-    @Value("${sooka.dahua_interface_server.userName}")
-    private String userName;
-    @Value("${sooka.dahua_interface_server.userPwd}")
-    private String userPwd;
-    private final String url = "/SlsService/opreationlog/list";
-
-//    @Scheduled(cron = "0 0/1 * * * ?")//添加定时任务 每天1分钟执行
-//    @Log(title = "对接大华云台日志定时任务", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "对接大华云台日志定时任务", notes = "对接大华云台日志定时任务")
-    @RequestMapping(value = "configureBlackTasks", method = POST)
-    public void configureBlackTasks() {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");
-        Calendar calendar = Calendar.getInstance();
-        Date now = new Date();
-        //设置入参开始时间
-        calendar.setTime(now);
-        // 获取当前时间前一天的日期
-        calendar.add(Calendar.DAY_OF_MONTH, -1);
-        // 设置时间为16:00:00
-        calendar.set(Calendar.HOUR_OF_DAY, 16);
-        calendar.set(Calendar.MINUTE, 0);
-        calendar.set(Calendar.SECOND, 0);
-        Date startTime = calendar.getTime();
-        //获取当前时间的15:59:59
-        calendar.setTime(now);
-        calendar.set(Calendar.HOUR_OF_DAY, 15);
-        calendar.set(Calendar.MINUTE, 59);
-        calendar.set(Calendar.SECOND, 59);
-        Date endTime = calendar.getTime();
-
-        try {
-            R<?> result = HttpTestUtils.getToken(loginIp, Integer.parseInt(loginPort), userName, userPwd);
-            if (result.getCode() != 200) {
-                log.error("调用获取token接口报错:{}", result);
-            }
-            String token = result.getData().toString();
-            log.error("获取token:{}", token);
-            extractedBlack(token, sdf.format(startTime), sdf.format(endTime));
-        } catch (Exception e) {
-            log.error("configureBlackTasks background error:", e);
-        }
-    }
-
-    public void extractedBlack(String token, String startTime, String endTime) throws Exception {
-        //取消证书认证
-        SSLContext sslContext = SSLContextBuilder.create()
-                .loadTrustMaterial(new TrustSelfSignedStrategy())
-                .build();
-        HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE;
-        HttpClient httpClient = HttpClients.custom()
-                .setSSLContext(sslContext)
-                .setSSLHostnameVerifier(hostnameVerifier)
-                .setRedirectStrategy(new LaxRedirectStrategy())
-                .build();
-        log.info("调用操作日志查询接口开始");
-        long startTimeDate = System.currentTimeMillis();
-        log.info("开始时间:{}", startTimeDate);
-        //3.调用操作日志查询接口
-        String proto = loginPort.equals("8320") ? "https://" : "http://";
-        HttpPost httpPost = new HttpPost(proto + loginIp + ":" + loginPort + url);
-        httpPost.setHeader("X-Subject-Token", token);
-        httpPost.setHeader("content-type", "application/json");
-
-        for (String str : operateTypeBlackList) {
-            extracted(startTime, endTime, str, httpPost, httpClient);
-        }
-        log.info("调用操作日志查询接口结束");
-        log.info("结束时间:{}", System.currentTimeMillis() - startTimeDate);
-    }
-
-    private void extracted(String startTime, String endTime, String str, HttpPost httpPost, HttpClient httpClient) throws Exception {
-        //第三次请求入参入参
-        Integer pageNo = 1;
-        Integer nextPage = 1;
-        for (int i = 1; i <= pageNo; i++) {
-            if (nextPage > 0) {
-                //循环赋值第几页
-                String requestBody = "{\n" +
-                        "\t\"condition\": {\n" +
-                        "\t\t\"startTime\": \"" + startTime + "\",\n" +
-                        "\t\t\"endTime\": \"" + endTime + "\",\n" +
-                        "\t\t\"type\": 2,\n" +
-                        "\t\t\"operateNames\": [],\n" +
-                        "\t\t\"operateType\": \"" + str + "\",\n" +
-                        "\t\t\"deptCode\": \"\",\n" +
-                        "\t\t\"userName\": \"\",\n" +
-                        "\t\t\"address\": \"\",\n" +
-                        "\t\t\"eventDetail\": \"\"\n" +
-                        "\t},\n" +
-                        "\t\"order\": [\n" +
-                        "\t\t{\n" +
-                        "\t\t\t\"orderBy\": \"operateTime\",\n" +
-                        "\t\t\t\"order\": \"desc\"\n" +
-                        "\t\t}\n" +
-                        "\t],\n" +
-                        "\t\"page\": \"" + i + "\",\n" +
-                        "\t\"pageSize\": 512\n" +
-                        "}";
-                log.info("configureBlackTasks=======>requestBody:{}", requestBody);
-                StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
-                httpPost.setEntity(requestEntity);
-                HttpResponse response = httpClient.execute(httpPost);
-                HttpEntity responseEntity = response.getEntity();
-                if (responseEntity != null) {
-                    List<CenternonitorTDahuaOperateLogUrl> centernonitorTDahuaOperateLogUrlList = new ArrayList<>();
-                    String responseBody = EntityUtils.toString(responseEntity);
-                    log.info("configureBlackTasks=======>responseBody:{}", responseBody);
-                    JSONObject jsonObject = JSONObject.parseObject(responseBody);
-                    log.info("configureBlackTasks=======>jsonObject.totalCount():{}", jsonObject.get("totalCount"));
-                    if (ObjectUtils.isNotEmpty(jsonObject.get("code")) && jsonObject.get("code").toString().equals("402")) {
-                        //如果token过期重新走业务逻辑
-                        getTokenBlack();
-                    } else {
-                        pageNo = (Integer) jsonObject.get("totalCount") / 512 + 1;
-                        nextPage = (Integer) jsonObject.get("nextPage");
-                        List<CenternonitorTDahuaOperateLog> list = JSONObject.parseArray(jsonObject.get("results").toString(), CenternonitorTDahuaOperateLog.class);
-                        if (CollectionUtils.isNotEmpty(list)) {
-                            for (CenternonitorTDahuaOperateLog item : list) {
-                                R<SysDept> result = remoteService.findDeptIdByUserName(item.getUserName());
-                                if (result.getCode() == 200 && result.getData() != null) {
-                                    item.setDeptId(result.getData().getDeptId());
-                                    item.setDeptName(result.getData().getDeptName());
-                                    item.setAncestors(result.getData().getAncestors());
-                                    item.setParentId(result.getData().getParentId());
-                                }
-                            }
-                            int count = centernonitorTDahuaOperateLogService.insertBatch(list);
-                            list.stream().forEach(item -> {
-                                if (CollectionUtils.isNotEmpty(item.getUrl())) {
-                                    item.getUrl().stream().forEach(var -> {
-                                        CenternonitorTDahuaOperateLogUrl centernonitorTDahuaOperateLogUrl = new CenternonitorTDahuaOperateLogUrl();
-                                        centernonitorTDahuaOperateLogUrl.setOperateId(item.getId());
-                                        centernonitorTDahuaOperateLogUrl.setUrl(var);
-                                        centernonitorTDahuaOperateLogUrlList.add(centernonitorTDahuaOperateLogUrl);
-                                    });
-                                }
-                            });
-                            if (CollectionUtils.isNotEmpty(centernonitorTDahuaOperateLogUrlList)) {
-                                centernonitorTDahuaOperateLogUrlMapper.insertBatch(centernonitorTDahuaOperateLogUrlList);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    public R<?> getTokenBlack() {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");
-        Calendar calendar = Calendar.getInstance();
-        Date now = new Date();
-        //设置入参开始时间
-        calendar.setTime(now);
-        // 获取当前时间前一天的日期
-        calendar.add(Calendar.DAY_OF_MONTH, -1);
-        // 设置时间为16:00:00
-        calendar.set(Calendar.HOUR_OF_DAY, 16);
-        calendar.set(Calendar.MINUTE, 0);
-        calendar.set(Calendar.SECOND, 0);
-        Date startTime = calendar.getTime();
-        //获取当前时间的15:59:59
-        calendar.setTime(now);
-        calendar.set(Calendar.HOUR_OF_DAY, 15);
-        calendar.set(Calendar.MINUTE, 59);
-        calendar.set(Calendar.SECOND, 59);
-        Date endTime = calendar.getTime();
-        try {
-            R<?> result = HttpTestUtils.getToken(loginIp, Integer.parseInt(loginPort), userName, userPwd);
-            if (result.getCode() != 200) {
-                return R.fail(result.getMsg());
-            }
-            String token = result.getData().toString();
-            extractedBlack(token, sdf.format(startTime), sdf.format(endTime));
-            return R.ok();
-        } catch (Exception e) {
-            return R.fail("调用操作日志接口报错");
-        }
-    }
-
-}

+ 1 - 1
src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogWhiteTask.java

@@ -51,7 +51,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.POST;
 @Slf4j
 @Component
 @RestController
-@RequestMapping("/dahuaOperateLog")
+@RequestMapping("/dahuaWhiteOperateLog")
 public class DahuaOperateLogWhiteTask {
 
     @Resource

+ 0 - 116
src/main/java/com/sooka/sponest/monitor/dahua/quartz/EquipmentStatusTask.java

@@ -1,116 +0,0 @@
-package com.sooka.sponest.monitor.dahua.quartz;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.nacos.shaded.com.google.gson.Gson;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.sooka.sponest.monitor.camera.mapper.CentermonitorTCameraMapper;
-import com.sooka.sponest.monitor.dahua.utils.HttpEnum;
-import com.sooka.sponest.monitor.dahua.utils.HttpTestUtils;
-import com.sooka.sponest.monitor.remoteapi.service.center.lawenforcement.RemoteLawenforcementBaseService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.stereotype.Component;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.springframework.web.bind.annotation.RequestMethod.GET;
-
-
-/**
- * 对接大华根据组织获取执法记录仪、单兵设备在线状态
- */
-
-@Slf4j
-@Component
-@Api(tags = "对接大华根据组织获取执法记录仪、单兵设备在线状态定时任务")
-@RestController
-@RequestMapping("/equipmentStatus/quartz")
-public class EquipmentStatusTask {
-
-
-    @Resource
-    private CentermonitorTCameraMapper centermonitorTCameraMapper;
-    @Resource
-    private RemoteLawenforcementBaseService remoteLawenforcementBaseService;
-    @Value("${sooka.dahua_interface_server.loginIp}")
-    private String loginIp;
-    @Value("${sooka.dahua_interface_server.loginPort}")
-    private String loginPort;
-    @Value("${sooka.dahua_interface_server.userName}")
-    private String userName;
-    @Value("${sooka.dahua_interface_server.userPwd}")
-    private String userPwd;
-//    private String loginIp = "10.53.0.35";
-//    private String loginPort = "7901";
-//    private String userName = "system";
-//    private String userPwd = "Admin123";
-    //按组织获取设备详细信息
-    public static final String ACTION = "/videoService/devicesManager/devicesInfo";
-
-
-//    @Scheduled(cron = "0 0/1 * * * ?")
-    @Log(title = "对接大华根据组织获取执法记录仪、单兵设备在线状态定时任务", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "对接大华根据组织获取执法记录仪、单兵设备在线状态定时任务", notes = "对接大华根据组织获取执法记录仪、单兵设备在线状态定时任务")
-    @RequestMapping(value = "/getLongPollingPositionMsg", method = GET)
-    public void getLongPollingPositionMsg() throws Exception {
-        log.info("开始执行获取记录仪在离线数据定时任务");
-        R<?> result = HttpTestUtils.getToken(loginIp, Integer.parseInt(loginPort), userName, userPwd);
-        if (result.getCode() != 200) {
-            log.info("获取token失败,请检查配置信息:", JSONObject.parseObject(result.getMsg()));
-        }
-        String token = result.getData().toString();
-        getMessage(loginIp, Integer.parseInt(loginPort), token);
-    }
-
-    /**
-     * 根据组织code编码获取执法仪详情数据
-     *
-     * @param ip
-     * @param port
-     * @param token
-     */
-    private void getMessage(String ip, int port, String token) {
-        Map<String, String> content = new HashMap<>();
-//        content.put("orgCode", "9370184169490624");
-        content.put("orgCode", "11033445593778368");
-        String response = HttpTestUtils.httpRequest(HttpEnum.POST, ip, port, ACTION, token, new Gson().toJson(content));
-        JSONObject jsonObject = JSONObject.parseObject(response);
-        if (jsonObject.get("devices") == null) {
-            log.info("根据组织code编码获取执法仪response:{}", response);
-            return;
-        }
-        Map<String, Object> rsp = new Gson().fromJson(response, Map.class);
-        List<Map<String, Object>> arr = (List<Map<String, Object>>) rsp.get("devices");
-        log.info("获取记录仪在离线数据 size = {}", arr.size());
-        extracted(arr);
-    }
-
-    /**
-     * 更新执法仪在离线状态
-     *
-     * @param arr
-     */
-    private void extracted(List<Map<String, Object>> arr) {
-        log.info("根据组织code编码获取执法仪详情数据:{}", arr.size());
-        if (CollectionUtils.isNotEmpty(arr)) {
-            //向执法中心推送设备状态
-            R result = remoteLawenforcementBaseService.deviceOpenOrClose(arr);
-            if (result.getCode() != 200) {
-                log.info("向执法中心推送设备状态失败:{}", result.getMsg());
-            }
-            centermonitorTCameraMapper.updateBatchLawEnforcementInstrumentState(arr);
-        }
-    }
-
-}

+ 1 - 1
src/main/java/com/sooka/sponest/monitor/dahua/service/impl/DahuaServiceImpl.java

@@ -451,7 +451,7 @@ public class DahuaServiceImpl extends BaseService implements DahuaService {
         String prBody = null;
         String PAGE_URL = host + "/evo-apigw/evo-brm/" + version + "/device/subsystem/page";
         Integer pageNum = _pageNum;
-        String pageSize = "50";
+        String pageSize = "1000";
         String[] ownerCodes = {"001"};
         String token = getToken();
         Map<String, Object> param = new HashMap();

+ 6 - 181
src/main/java/com/sooka/sponest/monitor/device/controller/CentermonitorTMonitoringDeviceController.java

@@ -1,12 +1,9 @@
 package com.sooka.sponest.monitor.device.controller;
 
 import com.alibaba.fastjson.JSONObject;
-import com.dahuatech.hutool.json.JSONUtil;
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -28,7 +25,6 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
-import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -218,45 +214,6 @@ public class CentermonitorTMonitoringDeviceController extends BaseController {
     }
 
 
-    /************************************传感器数据对接部分*****************************************/
-
-    /**
-     * 根据设备类型查询监控设备Map
-     */
-    @Log(title = "传感器", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "接收传感器水质数据", notes = "接收传感器水质数据")
-    @PostMapping("/getDevideCodeMapByTypes")
-    public AjaxResult getDevideCodeMapByTypes(@RequestBody String types) {
-        if (StringUtils.isEmpty(types)) {
-            return AjaxResult.error("缺少必要参数");
-        }
-        String[] type_arr;
-        try {
-            type_arr = types.split(",");
-            return AjaxResult.success(centermonitorTMonitoringDeviceService.getDevideCodeMapByTypes(type_arr));
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return AjaxResult.success(new HashMap<>());
-    }
-
-    /**
-     * 【水流速】接收水水测家传感器:水流速数据方法
-     */
-    @Log(title = "传感器", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "接收传感器水流速数据", notes = "接收传感器水流速数据")
-    @PostMapping("/saveWaterMonitoringData")
-    public AjaxResult saveWaterMonitoringData(@RequestBody JSONObject json) {
-        logger.info("监控中心收到【水流速】数据 ==> {}", json);
-        CentermonitorTMonitoringDataWaterVelocity centermonitorTMonitoringDataWater = null;
-        try {
-            centermonitorTMonitoringDataWater = BeanUtil.mapToBean(json, CentermonitorTMonitoringDataWaterVelocity.class);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return toAjax(centermonitorTMonitoringDeviceService.saveWaterMonitoringData(centermonitorTMonitoringDataWater));
-    }
-
     /**
      * 查询水流速传感器数据列表
      */
@@ -403,144 +360,6 @@ public class CentermonitorTMonitoringDeviceController extends BaseController {
 
 
     /**
-     * 【物联网】接收精讯传感器:大气、水质、土壤墒情数据通用方法
-     */
-    @Log(title = "传感器", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "接收精讯传感器数据通用方法", notes = "接收精讯传感器数据通用方法")
-    @PostMapping("/saveSennorDeviceData")
-    public AjaxResult saveSennorDeviceData(@RequestBody JSONObject json) {
-        logger.info("监控中心收到【物联网】数据 ==> {}", json);
-        try {
-            /**先判断data是否为空,如果不为空则取数据中的deviceNumber判断传感器类型**/
-            Object data = json.get("data");
-            /**设备编码**/
-            String deviceNumber = json.getJSONObject("data").getString("deviceNumber");
-            if (data != null && StringUtils.isNotEmpty(deviceNumber)) {
-                /**数据采集时间**/
-                String time = json.getJSONObject("data").getString("time");
-                CentermonitorTMonitoringDevice device =
-                        centermonitorTMonitoringDeviceService.selectCentermonitorTMonitoringDeviceByDeviceCode(deviceNumber);
-                /**土壤墒情数据处理方法**/
-                if (device_soil_moisture.equals(device.getDeviceType())) {
-                    CentermonitorTMonitoringDataSoilMoisture soilMoisture;
-                    String[] values = json.getJSONObject("data").getString("data").split(" \\| ");
-                    soilMoisture = BeanUtil.arrayToBean(values, CentermonitorTMonitoringDataSoilMoisture.class);
-                    /**添加ID、设备编码、采集时间**/
-                    soilMoisture.setId(IdUtils.simpleUUID());
-                    soilMoisture.setDeviceCode(deviceNumber);
-                    soilMoisture.setCreateTime(time);
-                    /**数据库持久化**/
-                    centermonitorTMonitoringDeviceService.saveDataSoilMoistureMonitoringData(soilMoisture);
-                    /**大气数据处理方法**/
-                } else if (device_air_quality.equals(device.getDeviceType())) {
-                    CentermonitorTMonitoringDataAtmosphere atmosphere;
-                    String[] values = json.getJSONObject("data").getString("data").split(" \\| ");
-                    atmosphere = BeanUtil.arrayToBean(values, CentermonitorTMonitoringDataAtmosphere.class);
-                    /**添加ID、设备编码、采集时间**/
-                    atmosphere.setId(IdUtils.simpleUUID());
-                    atmosphere.setDeviceCode(deviceNumber);
-                    atmosphere.setCreateTime(time);
-                    /**数据库持久化**/
-                    centermonitorTMonitoringDeviceService.saveDataAtmosphereMonitoringData(atmosphere);
-                    /**水质数据处理方法**/
-                } else if (device_water_quality.equals(device.getDeviceType())) {
-                    CentermonitorTMonitoringDataWaterQuality waterQuality;
-                    String[] values = json.getJSONObject("data").getString("data").split(" \\| ");
-                    waterQuality = BeanUtil.arrayToBean(values, CentermonitorTMonitoringDataWaterQuality.class);
-                    /**添加ID、设备编码、采集时间**/
-                    waterQuality.setId(IdUtils.simpleUUID());
-                    waterQuality.setDeviceCode(deviceNumber);
-                    waterQuality.setCreateTime(time);
-                    /**数据库持久化**/
-                    centermonitorTMonitoringDeviceService.saveDataWaterQualityMonitoringData(waterQuality);
-                }
-
-            }
-            return AjaxResult.success();
-        } catch (Exception e) {
-            e.printStackTrace();
-            return AjaxResult.error();
-        }
-    }
-
-    /**
-     * 【水压】接收城安盛邦 水压传感器数据方法
-     */
-    @Log(title = "传感器", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "接收水压传感器数据", notes = "接收水压传感器数据")
-    @PostMapping("/saveWaterPressureDeviceData")
-    public AjaxResult saveWaterPressureDeviceData(@RequestBody JSONObject json) {
-        String deviceCode = "";
-        Object ob = json.get("serviceId");//服务ID,在上线下线时有可能为空
-        logger.info("监控中心收到【水压心跳】数据 ==> {}", json);
-        CentermonitorTMonitoringDataWaterPressure waterPressure = new CentermonitorTMonitoringDataWaterPressure();
-        waterPressure.setId(IdUtils.simpleUUID());
-        waterPressure.setCreateTime(DateUtils.getTime());
-        /** 【心跳】 心跳数据处理方法 4:代表心跳数据 ,做数据库持久化**/
-        if (ob != null && ob.toString().equals("4")) {
-            JSONObject payload = json.getJSONObject("payload");
-            waterPressure.putWaterPressureValue(
-                    json.getString("IMEI"),
-                    payload.getString("threshold_low_enable"),
-                    payload.getString("threshold_high_enable"),
-                    payload.getString("signalPower"),
-                    payload.getString("hydraulic_value"),
-                    payload.getString("hydraulic_threshold_min"),
-                    payload.getString("hydraulic_threshold_max"),
-                    payload.getString("heartbeat_time"),
-                    payload.getString("battery_voltage"),
-                    payload.getString("battery_value"));
-            return toAjax(centermonitorTMonitoringDeviceService.saveWaterPressureDeviceData(waterPressure));
-            /** 【水压监测告警】 1001:代表水压监测告警 ,做数据库持久化**/
-        } else if (ob != null && ob.toString().equals("1001")) {
-            logger.info("监控中心收到【水压监测告警】数据 ==> {}", json);
-            JSONObject content = json.getJSONObject("eventContent");
-            deviceCode = json.getString("IMEI");
-            CentermonitorTMonitoringDevice device = centermonitorTMonitoringDeviceService.selectCentermonitorTMonitoringDeviceByDeviceCode(deviceCode);
-            //枚举值 : 0--水压过高报警解除 1--水压过高报警 2--水压过低报警解除 3--水压过低报警 4--水压波动报警解除 5--水压波动报警
-            if ((content.get("hydraulic_state").toString().equals("1") || content.get("hydraulic_state").toString().equals("3") || content.get("hydraulic_state").toString().equals("5")) && device.getOpenWarn().equals("1")) {
-                try {
-                    centermonitorTMonitoringDeviceService.waterPressureWarn(device, json);
-                } catch (ParseException e) {
-                    e.printStackTrace();
-                    throw new RuntimeException(e);
-                }
-            }
-            return AjaxResult.success();
-            /** 【故障上报】 1002:代表故障上报 ,做数据库持久化**/
-        } else if (ob != null && ob.toString().equals("1002")) {
-            logger.info("监控中心收到【故障上报】数据 ==> {}", json);
-            return AjaxResult.success();
-            /** 【电池低电压告警】 1003:代表电池低电压告警 ,做数据库持久化**/
-        } else if (ob != null && ob.toString().equals("1003")) {
-            logger.info("监控中心收到【电池低电压告警】数据 ==> {}", json);
-            return AjaxResult.success();
-        } else {
-            return AjaxResult.success();
-        }
-
-    }
-
-    /**
-     * 【病虫害】接收病虫害传感器数据方法
-     */
-    @Log(title = "传感器", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "接收病虫害传感器数据", notes = "接收病虫害传感器数据")
-    @PostMapping("/saveInsectPestsDeviceData")
-    public AjaxResult saveInsectPestsDeviceData(@RequestBody JSONObject json) throws Exception {
-        logger.info("监控中心收到【病虫害】数据 ==> {}", json);
-        Object object = json.get("data");
-        String deviceNumber = json.getJSONObject("data").getString("deviceNumber");
-        if (object != null && StringUtils.isNotEmpty(deviceNumber)) {
-            CentermonitorTMonitoringDataInsectPests data = BeanUtil.mapToBean(JSONUtil.parseObj(object), CentermonitorTMonitoringDataInsectPests.class);
-            data.setId(IdUtils.simpleUUID());
-            data.setCreateTime(DateUtils.getTime());
-            return toAjax(centermonitorTMonitoringDeviceService.saveInsectPestsDeviceData(data));
-        }
-        return AjaxResult.error();
-    }
-
-    /**
      * 将传感器列表和传感器最新数据构建为一个list返回给前端
      */
     private List<CentermonitorTMonitoringDevice> putDataIntoDeviceList(List<CentermonitorTMonitoringDevice> monitoringDeviceList, List<CentermonitorTMonitoringDataWaterQuality> waterQualities,
@@ -685,6 +504,12 @@ public class CentermonitorTMonitoringDeviceController extends BaseController {
         monitoringDeviceList = putDataIntoDeviceList(monitoringDeviceList, waterQualities, soilMoistures, atmospheres, waterPressures, waterVelocities, insectPests);
         /**将传感器列表和传感器阈值构建为一个list返回给前端**/
         monitoringDeviceList = putThresholdIntoDeviceList(monitoringDeviceList, thresholdWaterQualities, thresholdSoilMoistures, thresholdAtmospheres, thresholdWaterVelocities);
+
+        /**检测设备和摄像头关联表构建为一个list返回给前端**/
+//        for (CentermonitorTMonitoringDevice var : monitoringDeviceList) {
+//            List<CameraCodeAndNameVO> list = centermonitorTMonitoringDeviceCameraMapper.selectByDeviceId(var.getId());
+//            var.setCameras(list);
+//        }
         return AjaxResult.success(monitoringDeviceList);
     }
 

+ 27 - 109
src/main/java/com/sooka/sponest/monitor/device/mapper/CentermonitorTMonitoringDeviceMapper.java

@@ -1,7 +1,6 @@
 package com.sooka.sponest.monitor.device.mapper;
 
 import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedept;
-import com.sooka.sponest.monitor.camera.domain.CentermonitorTCameraImg;
 import com.sooka.sponest.monitor.camera.domain.CentermonitorTCameraType;
 import com.sooka.sponest.monitor.device.domain.*;
 import org.apache.ibatis.annotations.Param;
@@ -53,14 +52,6 @@ public interface CentermonitorTMonitoringDeviceMapper
      CentermonitorTMonitoringDataInsectPests selectInsectPestsCentermonitorByCode(String deviceCode);
 
     /**
-     * 查询监测设备
-     *
-     * @param deviceCode 监测设备主键
-     * @return 监测设备
-     */
-     CentermonitorTMonitoringDevice selectCentermonitorTMonitoringDeviceByDeviceCode(String deviceCode);
-
-    /**
      * 查询大气传感器PM2.5和PM10的24小时平均值数据
      */
      CentermonitorTMonitoringDataAtmosphere selectAtmosphereAVGData(@Param("deviceCode") String deviceCode, @Param("startTime") String startTime, @Param("endTime") String endTime);
@@ -107,41 +98,35 @@ public interface CentermonitorTMonitoringDeviceMapper
      */
      int deleteTypeById(String id);
      int deleteDeviceDeptById(String id);
-     int deleteAtmosphereDataByCode(String id);
-     int deleteInsectPestsDataByCode(String id);
-     int deleteSoilMoistureDataByCode(String id);
-     int deleteWaterPressureDataByCode(String id);
-     int deleteWaterQualityDataByCode(String id);
-     int deleteWaterVelocityDataByCode(String id);
      int deleteAtmosphereThresholdByCode(String id);
      int deleteSoilMoistureThresholdByCode(String id);
      int deleteWaterQualityThresholdByCode(String id);
      int deleteWaterVelocityThresholdByCode(String id);
      int deleteWaterPressureThresholdByCode(String id);
 
-    /**
-     * 修改监测设备
-     *
-     * @param centermonitorTMonitoringDevice 监测设备
-     * @return 结果
-     */
-     int updateCentermonitorTMonitoringDevice(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
     /**
-     * 修改监测设备离线在线状态
+     * 删除监测设备
      *
-     * @param centermonitorTMonitoringDevice 监测设备
+     * @param id 需要删除的监测设备主键
      * @return 结果
      */
-     int updateDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    int deleteAtmosphereDataByCode(String id);
+    int deleteSoilMoistureDataByCode(String id);
+    int deleteWaterQualityDataByCode(String id);
+    int deleteInsectPestsDataByCode(String id);
+    int deleteWaterPressureDataByCode(String id);
+    int deleteWaterVelocityDataByCode(String id);
+
 
     /**
-     * 根据设备编号修改监测设备离线在线状态
+     * 修改监测设备
      *
      * @param centermonitorTMonitoringDevice 监测设备
      * @return 结果
      */
-     int updateDeviceWorkingStatusByDeviceCode(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+     int updateCentermonitorTMonitoringDevice(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
     /**
      * 删除监测设备
@@ -168,47 +153,6 @@ public interface CentermonitorTMonitoringDeviceMapper
      List<CentermonitorTMonitoringDevice> selectListByDeptId(@Param("str") List<String> str);
 
     /**
-     * 查询监测设备根据设备类型
-     *
-     * @param types  设备类型
-     * @return 监测设备设备集合
-     */
-     List<Map<String,String>> getDevideCodeMapByTypes(String[]  types);
-
-
-    /**
-     * 接收传感器水质数据
-     *
-     * @param centermonitorTMonitoringDataWater 接收传感器水质数据
-     * @return 接收传感器水质数据
-     */
-     int saveWaterMonitoringData(CentermonitorTMonitoringDataWaterVelocity centermonitorTMonitoringDataWater);
-
-    // 保存土壤传感器数据
-     int saveDataSoilMoistureMonitoringData(CentermonitorTMonitoringDataSoilMoisture centermonitorTMonitoringDataSoilMoisture);
-
-    // 保存大气传感器数据
-     int saveDataAtmosphereMonitoringData(CentermonitorTMonitoringDataAtmosphere centermonitorTMonitoringDataAtmosphere);
-
-    //保存水质传感器数据
-     int saveDataWaterQualityMonitoringData(CentermonitorTMonitoringDataWaterQuality centermonitorTMonitoringDataWaterQuality);
-
-    //保存水压传感器数据
-     int saveWaterPressureDeviceData(CentermonitorTMonitoringDataWaterPressure centermonitorTMonitoringDataWaterPressure);
-
-    //保存病虫害数据
-     int saveInsectPestsDeviceData(CentermonitorTMonitoringDataInsectPests centermonitorTMonitoringDataInsectPests);
-
-    //病虫害时间校验
-     CentermonitorTMonitoringDataInsectPests selectInsectPestsNewDeviceData(CentermonitorTMonitoringDataInsectPests centermonitorTMonitoringDataInsectPests);
-    //土壤时间校验
-     CentermonitorTMonitoringDataSoilMoisture selectSoilMoistureNewDeviceData(CentermonitorTMonitoringDataSoilMoisture centermonitorTMonitoringDataSoilMoisture);
-    //大气时间校验
-     CentermonitorTMonitoringDataAtmosphere selectAtmosphereNewDeviceData(CentermonitorTMonitoringDataAtmosphere centermonitorTMonitoringDataAtmosphere);
-    //水质时间效验
-     CentermonitorTMonitoringDataWaterQuality selectWaterQualityNewDeviceData(CentermonitorTMonitoringDataWaterQuality centermonitorTMonitoringDataWaterQuality);
-
-    /**
      * 查询水流速传感器数据列表
      *
      * @param centermonitorTMonitoringDataWaterVelocity 水质传感器
@@ -299,53 +243,12 @@ public interface CentermonitorTMonitoringDeviceMapper
      */
      List<CentermonitorTMonitoringDataInsectPests> selectInsectPestsDataByDeviceCodes(String[]  deviceCodes);
 
-    /**
-     * 查询最新一条病虫害传感器监测数据 -- getTimeUpdate
-     */
-     List<CentermonitorTMonitoringDataInsectPests> getTimeUpdate(String[]  deviceCodes);
 
     /**
      * 查询最新一条水质传感器监测数据 -- 根据设备编码
      */
      CentermonitorTMonitoringDataWaterQuality selectWaterQualityDataByDeviceCode(String  deviceCode);
 
-    /**
-     * 获取设备列表以判断工作状态
-     */
-     List<CentermonitorTMonitoringDevice> getDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice device);
-
-    /**
-     * 获取设备数据列表以判断工作状态
-     */
-    //大气
-     CentermonitorTMonitoringDataAtmosphere getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataAtmosphere device);
-    //病虫害
-     CentermonitorTMonitoringDataInsectPests getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataInsectPests device);
-    //土壤
-     CentermonitorTMonitoringDataSoilMoisture getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataSoilMoisture device);
-    //水压
-     CentermonitorTMonitoringDataWaterPressure getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterPressure device);
-    //水质
-     CentermonitorTMonitoringDataWaterQuality getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterQuality device);
-    //水流速
-     CentermonitorTMonitoringDataWaterVelocity getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterVelocity device);
-
-    /**
-     * 新增监测设备图片
-     */
-    int insertCentermonitorTDeviceImg(List<CentermonitorTMonitoringDeviceImg> images);
-
-    /**
-     * 查询监测设备图片
-     */
-    ArrayList<CentermonitorTMonitoringDeviceImg> selectCentermonitorTDeviceImgByDeviceId(String id);
-
-    /**
-     * 移除监测设备图片
-     */
-    void deleteImageByDeviceId(@Param("deviceId")String deviceId);
-
-
     List<DeviceIoTEquipmentStatisticsResult> getIoTEquipmentStatistics(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
     List<DeviceIoTEquipmentStatisticsResult> getOnLineSensorStatistics(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
@@ -370,4 +273,19 @@ public interface CentermonitorTMonitoringDeviceMapper
     CentermonitorTMonitoringDataAtmosphereIoTResult getIoTAtmosphere(@Param("deviceCode") String deviceCode, @Param("date") String date);
     CentermonitorTMonitoringDataWaterPressureIoTResult getIoTWaterPressure(@Param("deviceCode") String deviceCode, @Param("date") String date);
     CentermonitorTMonitoringDataWaterVelocityIoTResult getIoTWaterVelocity(@Param("deviceCode") String deviceCode, @Param("date") String date);
+
+    /**
+     * 新增监测设备图片
+     */
+    int insertCentermonitorTDeviceImg(List<CentermonitorTMonitoringDeviceImg> images);
+
+    /**
+     * 查询监测设备图片
+     */
+    ArrayList<CentermonitorTMonitoringDeviceImg> selectCentermonitorTDeviceImgByDeviceId(String id);
+
+    /**
+     * 移除监测设备图片
+     */
+    void deleteImageByDeviceId(@Param("deviceId")String deviceId);
 }

+ 27 - 78
src/main/java/com/sooka/sponest/monitor/device/service/ICentermonitorTMonitoringDeviceService.java

@@ -1,14 +1,13 @@
 package com.sooka.sponest.monitor.device.service;
 
-import java.text.ParseException;
-import java.util.List;
-import java.util.Map;
-
-import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.api.domain.SysDept;
 import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedept;
 import com.sooka.sponest.monitor.device.domain.*;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 监测设备Service接口
  *
@@ -40,19 +39,6 @@ public interface ICentermonitorTMonitoringDeviceService
      CentermonitorTMonitoringDataInsectPests selectInsectPestsCentermonitorByDeviceCode(String id);
 
     /**
-     * 水压设备告警方法
-     * */
-     void waterPressureWarn(CentermonitorTMonitoringDevice device, JSONObject json) throws ParseException;
-
-    /**
-     * 查询监测设备
-     *
-     * @param deviceCode 监测设备主键
-     * @return 监测设备
-     */
-     CentermonitorTMonitoringDevice selectCentermonitorTMonitoringDeviceByDeviceCode(String deviceCode);
-
-    /**
      * 查询监测设备列表
      *
      * @param centermonitorTMonitoringDevice 监测设备
@@ -92,13 +78,6 @@ public interface ICentermonitorTMonitoringDeviceService
      */
      int updateCentermonitorTMonitoringDevice(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
-    /**
-     * 修改监测设备离线在线状态
-     *
-     * @param centermonitorTMonitoringDevice 监测设备
-     * @return 结果
-     */
-     int updateDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
     /**
      * 批量删除监测设备
@@ -125,40 +104,6 @@ public interface ICentermonitorTMonitoringDeviceService
      List<CentermonitorTMonitoringDevice> selectListByDeptId(List<String> str);
 
     /**
-     * 根据设备类型查询监控设备Map
-     *
-     * @param types  设备类型
-     * @return 监测设备设备集合
-     */
-     List<Map<String,String>> getDevideCodeMapByTypes(String[]  types);
-
-
-    /**
-     * 接收传感器水流速数据
-     *
-     * @param centermonitorTMonitoringDataWater 接收传感器水流速数据
-     * @return 接收传感器水流速数据
-     */
-     int saveWaterMonitoringData(CentermonitorTMonitoringDataWaterVelocity centermonitorTMonitoringDataWater);
-
-    /**数据库持久化**/
-     int saveDataSoilMoistureMonitoringData(CentermonitorTMonitoringDataSoilMoisture centermonitorTMonitoringDataSoilMoisture);
-
-    /**数据库持久化**/
-     int saveDataAtmosphereMonitoringData(CentermonitorTMonitoringDataAtmosphere centermonitorTMonitoringDataAtmosphere);
-
-    /**数据库持久化**/
-     int saveDataWaterQualityMonitoringData(CentermonitorTMonitoringDataWaterQuality centermonitorTMonitoringDataWaterQuality);
-
-    /** 【心跳】 心跳数据处理方法 4:代表心跳数据 ,做数据库持久化**/
-     int saveWaterPressureDeviceData(CentermonitorTMonitoringDataWaterPressure centermonitorTMonitoringDataWaterPressure);
-
-    /**
-     * 【病虫害】接收病虫害传感器数据方法
-     */
-     int saveInsectPestsDeviceData(CentermonitorTMonitoringDataInsectPests centermonitorTMonitoringDataInsectPests);
-
-    /**
      * 查询水流速传感器数据列表
      *
      * @param centermonitorTMonitoringDataWaterVelocity 水质传感器
@@ -249,34 +194,38 @@ public interface ICentermonitorTMonitoringDeviceService
      */
      List<CentermonitorTMonitoringDataInsectPests> selectInsectPestsDataByDeviceCodes(String[]  deviceCodes);
 
+    List<DeviceIoTEquipmentStatisticsVO> getIoTEquipmentStatistics(Long deptId);
+
+    Map<String, List> getOnLineSensorStatistics(Long deptId);
+
+    List<Map<String, List>> getOfflineReasonCountStatistics(List<SysDept> sysDepartments);
+
     /**
-     * 获取设备列表以判断工作状态
+     * 在线设备分析
      */
-     List<CentermonitorTMonitoringDevice> getDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice device);
+    public Map<String, List> getDeviceAnalysis(Long deptId);
 
     /**
-     * 获取设备数据列表以判断工作状态
+     * 设备故障分布
      */
-    //大气
-     CentermonitorTMonitoringDataAtmosphere getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataAtmosphere device);
-    //病虫害
-     CentermonitorTMonitoringDataInsectPests getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataInsectPests device);
-    //土壤
-     CentermonitorTMonitoringDataSoilMoisture getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataSoilMoisture device);
-    //水压
-     CentermonitorTMonitoringDataWaterPressure getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterPressure device);
-    //水质
-     CentermonitorTMonitoringDataWaterQuality getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterQuality device);
-    //水流速
-     CentermonitorTMonitoringDataWaterVelocity getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterVelocity device);
+    Map<String, List>  getFaultDistribution(Long deptId);
 
-    Map<String, List> getFaultDistribution(Long deptId);
+    /**
+     * 采集数量分析
+     */
+    public Map<String, List> getSensorDataCount(Long deptId);
 
-    R getDeviceSquareNumber(Long deptId);
+    /**
+     * 物联广场右上角统计数
+     */
+    public R getDeviceSquareNumber(Long deptId);
 
+    /**
+     * 物联网中台统一入口
+     */
     R getInternetOfThings(Long deptId);
 
-    R getIoTEquipmentDetails(Long deptId, String deviceCode, String deviceType);
 
-    Object getOnLineSensorStatistics(Long deptId);
+    R getIoTEquipmentDetails(Long deptId,String deviceCode,String deviceType);
+
 }

+ 17 - 571
src/main/java/com/sooka/sponest/monitor/device/service/impl/CentermonitorTMonitoringDeviceServiceImpl.java

@@ -1,6 +1,5 @@
 package com.sooka.sponest.monitor.device.service.impl;
 
-import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
@@ -19,7 +18,6 @@ import com.sooka.sponest.monitor.device.service.*;
 import com.sooka.sponest.monitor.remoteapi.service.center.event.RemoteEventBaseService;
 import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.time.FastDateFormat;
 import org.slf4j.Logger;
@@ -28,6 +26,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.ObjectUtils;
 
 import javax.annotation.Resource;
 import java.text.ParseException;
@@ -72,7 +71,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
 
     Logger logger = LoggerFactory.getLogger(CentermonitorTMonitoringDeviceServiceImpl.class);
 
-    @Resource
+    @Autowired
     private CentermonitorTMonitoringDeviceCameraMapper centermonitorTMonitoringDeviceCameraMapper;
 
     /**
@@ -222,17 +221,6 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
     }
 
     /**
-     * 查询监测设备
-     *
-     * @param deviceCode 监测设备主键
-     * @return 监测设备
-     */
-    @Override
-    public CentermonitorTMonitoringDevice selectCentermonitorTMonitoringDeviceByDeviceCode(String deviceCode) {
-        return centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(deviceCode);
-    }
-
-    /**
      * 查询监测设备列表
      *
      * @param centermonitorTMonitoringDevice 监测设备
@@ -299,7 +287,9 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
         if (!images.isEmpty()) {
             centermonitorTMonitoringDeviceMapper.insertCentermonitorTDeviceImg(images);
         }
-        centermonitorTMonitoringDeviceCameraMapper.insertDeviceCamera(centermonitorTMonitoringDevice.getId(), centermonitorTMonitoringDevice.getCameras());
+        if (CollectionUtils.isNotEmpty(centermonitorTMonitoringDevice.getCameras())) {
+            centermonitorTMonitoringDeviceCameraMapper.insertDeviceCamera(centermonitorTMonitoringDevice.getId(), centermonitorTMonitoringDevice.getCameras());
+        }
         return centermonitorTMonitoringDeviceMapper.insertCentermonitorTMonitoringDevice(centermonitorTMonitoringDevice);
     }
 
@@ -326,7 +316,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
         List<CentermonitorTMonitoringDeviceImg> imagesList = new ArrayList<>();
         List<String> deviceImagesList = centermonitorTMonitoringDevice.getDeviceImages();
         centermonitorTMonitoringDeviceMapper.deleteImageByDeviceId(centermonitorTMonitoringDevice.getId());
-        if (CollectionUtils.isNotEmpty(deviceImagesList)){
+        if (CollectionUtils.isNotEmpty(deviceImagesList)) {
             for (String image : deviceImagesList) {
                 if (image != null && image.contains("group")) {
                     // 修改中间表记录的 cameraImg 字段
@@ -341,24 +331,13 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             centermonitorTMonitoringDeviceMapper.insertCentermonitorTDeviceImg(imagesList);
         }
         centermonitorTMonitoringDeviceCameraMapper.deleteDeviceCameraByDeviceId(centermonitorTMonitoringDevice.getId());
-        if (CollectionUtils.isNotEmpty(deviceImagesList)) {
+        if (CollectionUtils.isNotEmpty(centermonitorTMonitoringDevice.getCameras())) {
             centermonitorTMonitoringDeviceCameraMapper.insertDeviceCamera(centermonitorTMonitoringDevice.getId(), centermonitorTMonitoringDevice.getCameras());
         }
         return centermonitorTMonitoringDeviceMapper.updateCentermonitorTMonitoringDevice(centermonitorTMonitoringDevice);
     }
 
     /**
-     * 修改监测设备离线在线状态
-     *
-     * @param centermonitorTMonitoringDevice 监测设备
-     * @return 结果
-     */
-    @Override
-    public int updateDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice) {
-        return centermonitorTMonitoringDeviceMapper.updateDeviceListToJudgeWorkingStatus(centermonitorTMonitoringDevice);
-    }
-
-    /**
      * 批量删除监测设备
      *
      * @param ids 需要删除的监测设备主键
@@ -419,129 +398,6 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
     }
 
     /**
-     * 根据设备类型查询监控设备Map
-     *
-     * @param types 设备类型
-     * @return 监测设备设备集合
-     */
-    public List<Map<String, String>> getDevideCodeMapByTypes(String[] types) {
-        return centermonitorTMonitoringDeviceMapper.getDevideCodeMapByTypes(types);
-    }
-
-    /**
-     * 接收传感器水流速数据
-     *
-     * @param centermonitorTMonitoringDataWater 接收传感器水流速数据
-     * @return 接收传感器水流速数据
-     */
-    @Override
-    public int saveWaterMonitoringData(CentermonitorTMonitoringDataWaterVelocity centermonitorTMonitoringDataWater) {
-        centermonitorTMonitoringDataWater.setId(IdUtils.simpleUUID());
-        //不保留水流速传感器历史数据
-        centermonitorTMonitoringDeviceMapper.deleteWaterVelocityDataByCode(centermonitorTMonitoringDataWater.getST());
-        // 保存水流速传感器数据
-        int res = centermonitorTMonitoringDeviceMapper.saveWaterMonitoringData(centermonitorTMonitoringDataWater);
-        // 更新传感器状态为在线
-        CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-        monitoringDevice.setWorkingStatus("0");
-        monitoringDevice.setDeviceCode(centermonitorTMonitoringDataWater.getST());
-        centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-        //水流速传感器阈值
-        CentermonitorTMonitoringThresholdWaterVelocity thresholdWaterVelocity =
-                centermonitorTMonitoringDeviceThresholdService.selectWaterVelocityThresholdByCode(centermonitorTMonitoringDataWater.getST());
-        //如果设置过阈值,则走报警
-        if (thresholdWaterVelocity != null) {
-            CentermonitorTMonitoringDevice device =
-                    centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(centermonitorTMonitoringDataWater.getST());
-            if (device.getOpenWarn().equals("1")) {//开启告警状态才会上报事件
-                try {
-                    waterVelocityWarn(device, thresholdWaterVelocity, centermonitorTMonitoringDataWater);
-                } catch (ParseException e) {
-                    logger.error("saveWaterMonitoringData 方法报错 => {}", e.getMessage());
-                }
-            }
-        }
-        return res;
-    }
-
-    /**
-     * 水流速设备告警方法
-     */
-    private void waterVelocityWarn(CentermonitorTMonitoringDevice device,
-                                   CentermonitorTMonitoringThresholdWaterVelocity thresholdWaterVelocity,
-                                   CentermonitorTMonitoringDataWaterVelocity centermonitorTMonitoringDataWater) throws ParseException {
-        boolean flag = false;
-        //告警报文
-        String title = "【水流速传感器阈值告警】传感器名称:" + device.getDeviceName() + "  设备编码:" + device.getDeviceCode() + ";";
-        StringBuilder stringBuilder = new StringBuilder(title);
-        if (centermonitorTMonitoringDataWater.getQ() > Double.parseDouble(thresholdWaterVelocity.getQThreshold())) {
-            flag = true;
-            stringBuilder.append("  瞬时流量过高, 当前值:").append(centermonitorTMonitoringDataWater.getQ()).append("m³/s;  高位阈值流量:").append(thresholdWaterVelocity.getQThreshold()).append("m³/s;");
-        }
-        if (centermonitorTMonitoringDataWater.getV1() > Double.parseDouble(thresholdWaterVelocity.getVThreshold())) {
-            flag = true;
-            stringBuilder.append("  瞬时流速过高, 当前值:").append(centermonitorTMonitoringDataWater.getV1()).append("m/s;  高位阈值流速:").append(thresholdWaterVelocity.getVThreshold()).append("m/s;");
-        }
-        if (!stringBuilder.toString().equals(title)) {
-            System.out.println(stringBuilder);
-        }
-        /*
-         * 环保事件(大类6):大气监测(小类601)、水质环境(小类602)
-         * 水利事件(大类5):水压监测(小类510)、水流速(小类511)
-         * 农业事件(大类4):土壤墒情(小类403)、病虫害监测(小类401)
-         * */
-        if (flag) {
-            SensorEventVo vo = new SensorEventVo();
-            vo.setEventType("5");
-            vo.setEventTypeXl("511");
-            vo.setEventName(title);
-            vo.setEventDescription(stringBuilder.toString());
-            vo.setLatitude(device.getLatitude());
-            vo.setLongitude(device.getLongitude());
-            vo.setSensorId(device.getId());
-            vo.setReportor(device.getDeviceName());
-            vo.setReportTime(simpleDateFormat.parse(centermonitorTMonitoringDataWater.getTT()));
-            vo.setAddress(device.getAddress());
-            eventBaseService.insertSensorEvent(vo);
-        }
-    }
-
-    /**
-     * 土壤墒情数据保存方法
-     */
-    public int saveDataSoilMoistureMonitoringData(CentermonitorTMonitoringDataSoilMoisture centermonitorTMonitoringDataSoilMoisture) {
-        CentermonitorTMonitoringDataSoilMoisture latest = centermonitorTMonitoringDeviceMapper.selectSoilMoistureNewDeviceData(centermonitorTMonitoringDataSoilMoisture);
-        if (latest == null || centermonitorTMonitoringDataSoilMoisture.getCreateTime().compareTo(latest.getCreateTime()) > 0) {
-            //不保留土壤传感器历史数据
-            centermonitorTMonitoringDeviceMapper.deleteSoilMoistureDataByCode(centermonitorTMonitoringDataSoilMoisture.getDeviceCode());
-            // 保存土壤传感器数据
-            int soil = centermonitorTMonitoringDeviceMapper.saveDataSoilMoistureMonitoringData(centermonitorTMonitoringDataSoilMoisture);
-            // 更新传感器状态为在线
-            CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-            monitoringDevice.setWorkingStatus("0");
-            monitoringDevice.setDeviceCode(centermonitorTMonitoringDataSoilMoisture.getDeviceCode());
-            centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-            //土壤传感器阈值
-            CentermonitorTMonitoringThresholdSoilMoisture thresholdSoilMoisture =
-                    centermonitorTMonitoringDeviceSoilMoistureThresholdService.selectSoilMoistureThresholdByCode(centermonitorTMonitoringDataSoilMoisture.getDeviceCode());
-            //如果设置过阈值,则走报警
-            if (thresholdSoilMoisture != null) {
-                CentermonitorTMonitoringDevice device =
-                        centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(centermonitorTMonitoringDataSoilMoisture.getDeviceCode());
-                if (device.getOpenWarn().equals("1")) {//开启告警状态才会上报事件
-                    try {
-                        soilMoistureWarn(device, thresholdSoilMoisture, centermonitorTMonitoringDataSoilMoisture);
-                    } catch (ParseException e) {
-                        logger.error("saveDataSoilMoistureMonitoringData 方法报错 => {}", e.getMessage());
-                    }
-                }
-            }
-            return soil;
-        }
-        return 0;
-    }
-
-    /**
      * 土壤设备告警方法
      */
     private void soilMoistureWarn(CentermonitorTMonitoringDevice device,
@@ -642,380 +498,6 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             vo.setReportor(device.getDeviceName());
             vo.setReportTime(simpleDateFormat.parse(centermonitorTMonitoringDataSoilMoisture.getCreateTime()));
             vo.setAddress(device.getAddress());
-            eventBaseService.insertSensorEvent(vo);
-        }
-    }
-
-    /**
-     * 大气数据保存方法
-     */
-    public int saveDataAtmosphereMonitoringData(CentermonitorTMonitoringDataAtmosphere centermonitorTMonitoringDataAtmosphere) {
-        CentermonitorTMonitoringDataAtmosphere latest = centermonitorTMonitoringDeviceMapper.selectAtmosphereNewDeviceData(centermonitorTMonitoringDataAtmosphere);
-        if (latest == null || centermonitorTMonitoringDataAtmosphere.getCreateTime().compareTo(latest.getCreateTime()) > 0) {
-            //不保留大气传感器历史数据
-            centermonitorTMonitoringDeviceMapper.deleteAtmosphereDataByCode(centermonitorTMonitoringDataAtmosphere.getDeviceCode());
-            // 保存大气传感器数据
-            int atmosphere = centermonitorTMonitoringDeviceMapper.saveDataAtmosphereMonitoringData(centermonitorTMonitoringDataAtmosphere);
-            // 更新传感器状态为在线
-            CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-            monitoringDevice.setWorkingStatus("0");
-            monitoringDevice.setDeviceCode(centermonitorTMonitoringDataAtmosphere.getDeviceCode());
-            centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-            //大气传感器阈值
-            CentermonitorTMonitoringThresholdAtmosphere thresholdAtmosphere =
-                    centermonitorTMonitoringDeviceAtmosphereThresholdService.selectAtmosphereThresholdByCode(centermonitorTMonitoringDataAtmosphere.getDeviceCode());
-            //如果设置过阈值,则走报警
-            if (thresholdAtmosphere != null) {
-                CentermonitorTMonitoringDevice device =
-                        centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(centermonitorTMonitoringDataAtmosphere.getDeviceCode());
-                if (device.getOpenWarn().equals("1")) {//开启告警状态才会上报事件
-                    try {
-                        atmosphereWarn(device, thresholdAtmosphere, centermonitorTMonitoringDataAtmosphere);
-                    } catch (ParseException e) {
-                        logger.error("saveDataAtmosphereMonitoringData 方法报错 => {}", e.getMessage());
-                    }
-                }
-            }
-            return atmosphere;
-        }
-        return 0;
-    }
-
-    /**
-     * 大气设备告警方法
-     */
-    private void atmosphereWarn(CentermonitorTMonitoringDevice device,
-                                CentermonitorTMonitoringThresholdAtmosphere thresholdAtmosphere,
-                                CentermonitorTMonitoringDataAtmosphere centermonitorTMonitoringDataAtmosphere) throws ParseException {
-        boolean flag = false;
-        //告警报文
-        String title = "【大气传感器阈值告警】传感器名称:" + device.getDeviceName() + "  设备编码:" + device.getDeviceCode() + ";";
-        String warnText;
-        StringBuilder stringBuilder = new StringBuilder(title);
-        //查询过去24小时内的PM2.5 和PM10 的平均值
-        CentermonitorTMonitoringDataAtmosphere atmosphere = centermonitorTMonitoringDeviceMapper.selectAtmosphereAVGData(centermonitorTMonitoringDataAtmosphere.getDeviceCode(),
-                twentyFourHoursAgo(centermonitorTMonitoringDataAtmosphere.getCreateTime()), centermonitorTMonitoringDataAtmosphere.getCreateTime());
-        if (Double.parseDouble(atmosphere.getFineParticle()) > Double.parseDouble(thresholdAtmosphere.getFineParticleThreshold())) {
-            flag = true;
-            stringBuilder.append("  pm2.5(24小时平均值)过高, 当前值:").append(atmosphere.getFineParticle()).append("ug/m³;  24小时平均浓度应当低于:").append(thresholdAtmosphere.getFineParticleThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(atmosphere.getSuctionParticle()) > Double.parseDouble(thresholdAtmosphere.getSuctionParticleThreshold())) {
-            flag = true;
-            stringBuilder.append("  pm10(24小时平均值)过高, 当前值:").append(atmosphere.getSuctionParticle()).append("ug/m³;  24小时平均浓度应当低于:").append(thresholdAtmosphere.getSuctionParticleThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getCarbonMonoxide()) > Double.parseDouble(thresholdAtmosphere.getCarbonMonoxideThreshold())) {
-            flag = true;
-            stringBuilder.append("  一氧化碳含量过高, 当前值:").append(centermonitorTMonitoringDataAtmosphere.getCarbonMonoxide()).append("ug/m³;  高位阈值:").append(thresholdAtmosphere.getCarbonMonoxideThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getOzone()) > Double.parseDouble(thresholdAtmosphere.getOzoneThreshold())) {
-            flag = true;
-            stringBuilder.append("  臭氧含量过高, 当前值:").append(centermonitorTMonitoringDataAtmosphere.getOzone()).append("ug/m³;  高位阈值:").append(thresholdAtmosphere.getOzoneThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getNitrogenDioxide()) > Double.parseDouble(thresholdAtmosphere.getNitrogenDioxideThreshold())) {
-            flag = true;
-            stringBuilder.append("  二氧化氮含量过高, 当前值:").append(centermonitorTMonitoringDataAtmosphere.getNitrogenDioxide()).append("ug/m³;  高位阈值:").append(thresholdAtmosphere.getNitrogenDioxideThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getSulfurDioxide()) > Double.parseDouble(thresholdAtmosphere.getSulfurDioxideThreshold())) {
-            flag = true;
-            stringBuilder.append("  二氧化硫含量过高, 当前值:").append(centermonitorTMonitoringDataAtmosphere.getSulfurDioxide()).append("ug/m³;  高位阈值:").append(thresholdAtmosphere.getSulfurDioxideThreshold()).append("ug/m³;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getTemperature()) < Double.parseDouble(thresholdAtmosphere.getTemperatureThresholdDown()) ||
-                Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getTemperature()) > Double.parseDouble(thresholdAtmosphere.getTemperatureThresholdUp())) {
-            if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getTemperature()) < Double.parseDouble(thresholdAtmosphere.getTemperatureThresholdDown())) {
-                warnText = "温度过低";
-            } else {
-                warnText = "温度过高";
-            }
-            flag = true;
-            stringBuilder.append("  ").append(warnText).append(", 当前温度:").append(centermonitorTMonitoringDataAtmosphere.getTemperature()).append("℃;  参考阈值:").append(thresholdAtmosphere.getTemperatureThresholdDown()).append("~").append(thresholdAtmosphere.getTemperatureThresholdUp()).append("℃;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getHumidity()) < Double.parseDouble(thresholdAtmosphere.getHumidityThresholdDown()) ||
-                Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getHumidity()) > Double.parseDouble(thresholdAtmosphere.getHumidityThresholdUp())) {
-            if (Double.parseDouble(centermonitorTMonitoringDataAtmosphere.getHumidity()) < Double.parseDouble(thresholdAtmosphere.getHumidityThresholdDown())) {
-                warnText = "湿度过低";
-            } else {
-                warnText = "湿度过高";
-            }
-            flag = true;
-            stringBuilder.append("  ").append(warnText).append(", 当前湿度:").append(centermonitorTMonitoringDataAtmosphere.getHumidity()).append("%RH;  参考阈值:").append(thresholdAtmosphere.getHumidityThresholdDown()).append("~").append(thresholdAtmosphere.getHumidityThresholdUp()).append("%RH;");
-        }
-        if (!stringBuilder.toString().equals(title)) {
-            System.out.println(stringBuilder);
-        }
-        /*
-         * 环保事件(大类6):大气监测(小类601)、水质环境(小类602)
-         * 水利事件(大类5):水压监测(小类510)、水流速(小类511)
-         * 农业事件(大类4):土壤墒情(小类403)、病虫害监测(小类401)
-         * */
-        if (flag) {
-            SensorEventVo vo = new SensorEventVo();
-            vo.setEventType("6");
-            vo.setEventTypeXl("601");
-            vo.setEventName(title);
-            vo.setEventDescription(stringBuilder.toString());
-            vo.setLatitude(device.getLatitude());
-            vo.setLongitude(device.getLongitude());
-            vo.setSensorId(device.getId());
-            vo.setReportor(device.getDeviceName());
-            vo.setReportTime(simpleDateFormat.parse(centermonitorTMonitoringDataAtmosphere.getCreateTime()));
-            vo.setAddress(device.getAddress());
-            eventBaseService.insertSensorEvent(vo);
-        }
-    }
-
-    private String twentyFourHoursAgo(String time) {
-        Calendar date = Calendar.getInstance();
-        try {
-            date.setTime(simpleDateFormat.parse(time));
-        } catch (ParseException e) {
-            throw new RuntimeException(e);
-        }
-        date.set(Calendar.DATE, date.get(Calendar.DATE) - 1);
-        return simpleDateFormat.format(date.getTime());
-    }
-
-    /**
-     * 水质数据保存方法
-     */
-    public int saveDataWaterQualityMonitoringData(CentermonitorTMonitoringDataWaterQuality centermonitorTMonitoringDataWaterQuality) {
-        CentermonitorTMonitoringDataWaterQuality latest = centermonitorTMonitoringDeviceMapper.selectWaterQualityNewDeviceData(centermonitorTMonitoringDataWaterQuality);
-        if (latest == null || centermonitorTMonitoringDataWaterQuality.getCreateTime().compareTo(latest.getCreateTime()) > 0) {
-            //不保留水质传感器历史数据
-            centermonitorTMonitoringDeviceMapper.deleteWaterQualityDataByCode(centermonitorTMonitoringDataWaterQuality.getDeviceCode());
-            //保存水质传感器数据
-            int waterQuality = centermonitorTMonitoringDeviceMapper.saveDataWaterQualityMonitoringData(centermonitorTMonitoringDataWaterQuality);
-            // 更新传感器状态为在线
-            CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-            monitoringDevice.setWorkingStatus("0");
-            monitoringDevice.setDeviceCode(centermonitorTMonitoringDataWaterQuality.getDeviceCode());
-            centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-            //水质传感器阈值
-            CentermonitorTMonitoringThresholdWaterQuality thresholdWaterQuality =
-                    centermonitorTMonitoringDeviceWaterQualityThresholdService.selectWaterQualityThresholdByCode(centermonitorTMonitoringDataWaterQuality.getDeviceCode());
-            //如果设置过阈值,则走报警
-            if (thresholdWaterQuality != null) {
-                CentermonitorTMonitoringDevice device =
-                        centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(centermonitorTMonitoringDataWaterQuality.getDeviceCode());
-                if (device.getOpenWarn().equals("1")) {//开启告警状态才会上报事件
-                    try {
-                        waterQualityWarn(device, thresholdWaterQuality, centermonitorTMonitoringDataWaterQuality);
-                    } catch (ParseException e) {
-                        logger.error("saveDataWaterQualityMonitoringData 方法报错 => {}", e.getMessage());
-                    }
-                }
-            }
-            return waterQuality;
-        }
-        return 0;
-    }
-
-    /**
-     * 水质设备告警方法
-     */
-    private void waterQualityWarn(CentermonitorTMonitoringDevice device,
-                                  CentermonitorTMonitoringThresholdWaterQuality thresholdWaterQuality,
-                                  CentermonitorTMonitoringDataWaterQuality centermonitorTMonitoringDataWaterQuality) throws ParseException {
-        boolean flag = false;
-        //告警报文
-        String title = "【水质传感器阈值告警】传感器名称:" + device.getDeviceName() + "  设备编码:" + device.getDeviceCode() + ";";
-        String warnText;
-        StringBuilder stringBuilder = new StringBuilder(title);
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterPh()) < Double.parseDouble(thresholdWaterQuality.getWaterPhThresholdDown()) ||
-                Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterPh()) > Double.parseDouble(thresholdWaterQuality.getWaterPhThresholdUp())) {
-            if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterPh()) < Double.parseDouble(thresholdWaterQuality.getWaterPhThresholdDown())) {
-                warnText = "水质PH值过低";
-            } else {
-                warnText = "水质PH值过高";
-            }
-            flag = true;
-            stringBuilder.append("  ").append(warnText).append(", 当前值:").append(centermonitorTMonitoringDataWaterQuality.getWaterPh()).append("PH;  参考阈值:").append(thresholdWaterQuality.getWaterPhThresholdDown()).append("~").append(thresholdWaterQuality.getWaterPhThresholdUp()).append("PH;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterQualitySuspension()) > Double.parseDouble(thresholdWaterQuality.getWaterQualitySuspensionThreshold())) {
-            flag = true;
-            stringBuilder.append("  浊度值过高, 当前值:").append(centermonitorTMonitoringDataWaterQuality.getWaterQualitySuspension()).append("mg/L;  高位阈值:").append(thresholdWaterQuality.getWaterQualitySuspensionThreshold()).append("mg/L;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getAmmoniaNitrogen()) > Double.parseDouble(thresholdWaterQuality.getAmmoniaNitrogenThreshold())) {
-            flag = true;
-            stringBuilder.append("  氨氮值过高, 当前值:").append(centermonitorTMonitoringDataWaterQuality.getAmmoniaNitrogen()).append("mg/L;  高位阈值:").append(thresholdWaterQuality.getAmmoniaNitrogenThreshold()).append("mg/L;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getCod()) > Double.parseDouble(thresholdWaterQuality.getCodThreshold())) {
-            flag = true;
-            stringBuilder.append("  化学需氧量过高, 当前值:").append(centermonitorTMonitoringDataWaterQuality.getCod()).append("mg/L;  高位阈值:").append(thresholdWaterQuality.getCodThreshold()).append("mg/L;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterTemperature()) < Double.parseDouble(thresholdWaterQuality.getWaterTemperatureThresholdDown()) ||
-                Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterTemperature()) > Double.parseDouble(thresholdWaterQuality.getWaterTemperatureThresholdUp())) {
-
-            if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getWaterTemperature()) < Double.parseDouble(thresholdWaterQuality.getWaterTemperatureThresholdDown())) {
-                warnText = "水温过低";
-            } else {
-                warnText = "水温过高";
-            }
-            flag = true;
-            stringBuilder.append("  ").append(warnText).append(", 当前水温:").append(centermonitorTMonitoringDataWaterQuality.getWaterTemperature()).append("℃;  参考阈值:").append(thresholdWaterQuality.getWaterTemperatureThresholdDown()).append("~").append(thresholdWaterQuality.getWaterTemperatureThresholdUp()).append("℃;");
-        }
-        if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getConductivity()) < Double.parseDouble(thresholdWaterQuality.getConductivityThresholdDown()) ||
-                Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getConductivity()) > Double.parseDouble(thresholdWaterQuality.getConductivityThresholdUp())) {
-            if (Double.parseDouble(centermonitorTMonitoringDataWaterQuality.getConductivity()) < Double.parseDouble(thresholdWaterQuality.getConductivityThresholdDown())) {
-                warnText = "水质电导率过低";
-            } else {
-                warnText = "水质电导率过高";
-            }
-            flag = true;
-            stringBuilder.append("  ").append(warnText).append(", 当前值:").append(centermonitorTMonitoringDataWaterQuality.getConductivity()).append("μS/cm;  参考阈值:").append(thresholdWaterQuality.getConductivityThresholdDown()).append("~").append(thresholdWaterQuality.getConductivityThresholdUp()).append("μS/cm;");
-        }
-        if (!stringBuilder.toString().equals(title)) {
-            System.out.println(stringBuilder);
-        }
-        /*
-         * 环保事件(大类6):大气监测(小类601)、水质环境(小类602)
-         * 水利事件(大类5):水压监测(小类510)、水流速(小类511)
-         * 农业事件(大类4):土壤墒情(小类403)、病虫害监测(小类401)
-         * */
-        if (flag) {
-            SensorEventVo vo = new SensorEventVo();
-            vo.setEventType("6");
-            vo.setEventTypeXl("602");
-            vo.setEventName(title);
-            vo.setEventDescription(stringBuilder.toString());
-            vo.setLatitude(device.getLatitude());
-            vo.setLongitude(device.getLongitude());
-            vo.setSensorId(device.getId());
-            vo.setReportor(device.getDeviceName());
-            vo.setReportTime(simpleDateFormat.parse(centermonitorTMonitoringDataWaterQuality.getCreateTime()));
-            vo.setAddress(device.getAddress());
-            eventBaseService.insertSensorEvent(vo);
-        }
-    }
-
-    /**
-     * 水压数据保存方法
-     */
-    public int saveWaterPressureDeviceData(CentermonitorTMonitoringDataWaterPressure centermonitorTMonitoringDataWaterPressure) {
-        // 更新传感器状态为在线
-        CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-        monitoringDevice.setWorkingStatus("0");
-        monitoringDevice.setDeviceCode(centermonitorTMonitoringDataWaterPressure.getIMEI());
-        centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-        //不保留水压传感器历史数据
-        centermonitorTMonitoringDeviceMapper.deleteWaterPressureDataByCode(centermonitorTMonitoringDataWaterPressure.getIMEI());
-        //保存水压传感器数据
-        return centermonitorTMonitoringDeviceMapper.saveWaterPressureDeviceData(centermonitorTMonitoringDataWaterPressure);
-    }
-
-    /**
-     * 水压设备告警方法
-     */
-    @Override
-    public void waterPressureWarn(CentermonitorTMonitoringDevice device, JSONObject json) throws ParseException {
-        boolean flag = false;
-        JSONObject content = json.getJSONObject("eventContent");
-        //水压值
-        String hydraulicValue = String.format("%.2f", content.getDouble("hydraulic_value"));
-        //告警报文
-        String title = "【水压传感器阈值告警】传感器名称:" + device.getDeviceName() + "  设备编码:" + device.getDeviceCode() + ";";
-        StringBuilder stringBuilder = new StringBuilder(title);
-
-        if (content.get("hydraulic_state").toString().equals("1")) {//1--水压过高报警
-            flag = true;
-            stringBuilder.append("  报警类型:水压过高  当前水压:").append(hydraulicValue).append("Mpa");
-        }
-        if (content.get("hydraulic_state").toString().equals("3")) {//3--水压过低报警
-            flag = true;
-            stringBuilder.append("  报警类型:水压过低  当前水压:").append(hydraulicValue).append("Mpa");
-        }
-        if (content.get("hydraulic_state").toString().equals("5")) {//5--水压波动报警
-            flag = true;
-            stringBuilder.append("  报警类型:水压波动  当前水压:").append(hydraulicValue).append("Mpa");
-        }
-        if (!stringBuilder.toString().equals(title)) {
-            System.out.println(stringBuilder);
-        }
-        /*
-         * 环保事件(大类6):大气监测(小类601)、水质环境(小类602)
-         * 水利事件(大类5):水压监测(小类510)、水流速(小类511)
-         * 农业事件(大类4):土壤墒情(小类403)、病虫害监测(小类401)
-         * */
-        if (flag) {
-            SensorEventVo vo = new SensorEventVo();
-            vo.setEventType("10");
-            vo.setEventTypeXl("510");
-            vo.setEventName(title);
-            vo.setEventDescription(stringBuilder.toString());
-            vo.setLatitude(device.getLatitude());
-            vo.setLongitude(device.getLongitude());
-            vo.setSensorId(device.getId());
-            vo.setReportor(device.getDeviceName());
-            vo.setReportTime(simpleDateFormat.parse(simpleDateFormat.format(json.getLong("timestamp"))));
-            vo.setAddress(device.getAddress());
-            eventBaseService.insertSensorEvent(vo);
-        }
-    }
-
-    /**
-     * 【病虫害】接收病虫害传感器数据方法
-     */
-    public int saveInsectPestsDeviceData(CentermonitorTMonitoringDataInsectPests centermonitorTMonitoringDataInsectPests) {
-        CentermonitorTMonitoringDataInsectPests latest = centermonitorTMonitoringDeviceMapper.selectInsectPestsNewDeviceData(centermonitorTMonitoringDataInsectPests);
-        if (latest == null || centermonitorTMonitoringDataInsectPests.getNewTime().compareTo(latest.getNewTime()) > 0) {
-            //不保留病虫害历史数据
-            centermonitorTMonitoringDeviceMapper.deleteInsectPestsDataByCode(centermonitorTMonitoringDataInsectPests.getDeviceNumber());
-            //保存病虫害数据
-            int res = centermonitorTMonitoringDeviceMapper.saveInsectPestsDeviceData(centermonitorTMonitoringDataInsectPests);
-            // 更新传感器状态为在线
-            CentermonitorTMonitoringDevice monitoringDevice = new CentermonitorTMonitoringDevice();
-            monitoringDevice.setWorkingStatus("0");
-            monitoringDevice.setDeviceCode(centermonitorTMonitoringDataInsectPests.getDeviceNumber());
-            centermonitorTMonitoringDeviceMapper.updateDeviceWorkingStatusByDeviceCode(monitoringDevice);
-            // 告警
-            CentermonitorTMonitoringDevice device =
-                    centermonitorTMonitoringDeviceMapper.selectCentermonitorTMonitoringDeviceByDeviceCode(centermonitorTMonitoringDataInsectPests.getDeviceNumber());
-            if (device.getOpenWarn().equals("1")) {//开启告警状态才会上报事件
-                try {
-                    insectPestsWarn(device, centermonitorTMonitoringDataInsectPests);
-                } catch (ParseException e) {
-                    logger.error("saveInsectPestsDeviceData 方法报错 => {}", e.getMessage());
-                }
-            }
-            return res;
-        }
-        return 0;
-    }
-
-    /**
-     * 病虫害设备告警方法
-     */
-    private void insectPestsWarn(CentermonitorTMonitoringDevice device,
-                                 CentermonitorTMonitoringDataInsectPests centermonitorTMonitoringDataInsectPests) throws ParseException {
-        boolean flag = false;
-        //告警报文
-        String title = "【病虫害传感器告警】传感器名称:" + device.getDeviceName() + "  设备编码:" + device.getDeviceCode() + ";";
-        StringBuilder stringBuilder = new StringBuilder(title);
-        if (StringUtils.isNotEmpty(centermonitorTMonitoringDataInsectPests.getResults())) {
-            flag = true;
-            stringBuilder.append("  发现害虫:").append(centermonitorTMonitoringDataInsectPests.getResults());
-        }
-        if (!stringBuilder.toString().equals(title)) {
-            System.out.println(stringBuilder);
-        }
-        /*
-         * 环保事件(大类6):大气监测(小类601)、水质环境(小类602)
-         * 水利事件(大类5):水压监测(小类510)、水流速(小类511)
-         * 农业事件(大类4):土壤墒情(小类403)、病虫害监测(小类401)
-         * */
-        if (flag) {
-            SensorEventVo vo = new SensorEventVo();
-            vo.setEventType("4");
-            vo.setEventTypeXl("401");
-            vo.setEventName(title);
-            vo.setEventDescription(stringBuilder.toString());
-            vo.setLatitude(device.getLatitude());
-            vo.setLongitude(device.getLongitude());
-            vo.setSensorId(device.getId());
-            vo.setReportor(device.getDeviceName());
-            vo.setReportTime(simpleDateFormat.parse(centermonitorTMonitoringDataInsectPests.getNewTime()));
-            vo.setAddress(device.getAddress());
-            vo.setPicture(centermonitorTMonitoringDataInsectPests.getTaggingImgUrl());
-            eventBaseService.insertSensorEvent(vo);
         }
     }
 
@@ -1171,46 +653,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
         return insectPestsList;
     }
 
-    /**
-     * 获取设备列表以判断工作状态
-     */
-    public List<CentermonitorTMonitoringDevice> getDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceListToJudgeWorkingStatus(device);
-    }
-
-    /**
-     * 获取设备数据列表以判断工作状态
-     */
-    //大气
-    public CentermonitorTMonitoringDataAtmosphere getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataAtmosphere device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus(device);
-    }
-
-    //病虫害
-    public CentermonitorTMonitoringDataInsectPests getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataInsectPests device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus(device);
-    }
-
-    //土壤
-    public CentermonitorTMonitoringDataSoilMoisture getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataSoilMoisture device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus(device);
-    }
-
-    //水压
-    public CentermonitorTMonitoringDataWaterPressure getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterPressure device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus(device);
-    }
-
-    //水质
-    public CentermonitorTMonitoringDataWaterQuality getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterQuality device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus(device);
-    }
-
-    //水流速
-    public CentermonitorTMonitoringDataWaterVelocity getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus(CentermonitorTMonitoringDataWaterVelocity device) {
-        return centermonitorTMonitoringDeviceMapper.getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus(device);
-    }
-
+    @Override
     public List<DeviceIoTEquipmentStatisticsVO> getIoTEquipmentStatistics(Long deptId) {
         long startTime = System.currentTimeMillis(); // 记录开始时间
         List<DeviceIoTEquipmentStatisticsVO> returnList = new ArrayList<>();
@@ -1331,6 +774,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
     /**
      * 离线原因数量地区分布
      */
+    @Override
     public List<Map<String, List>> getOfflineReasonCountStatistics(List<SysDept> sysDepartments) {
         long startTime = System.currentTimeMillis(); // 记录开始时间
         int threadPoolSize = 8; // 设置线程池大小
@@ -1392,6 +836,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
     /**
      * 在线设备分析
      */
+    @Override
     public Map<String, List> getDeviceAnalysis(Long deptId) {
         long startTime = System.currentTimeMillis(); // 记录开始时间
         CentermonitorTMonitoringDevice centermonitorTMonitoringDevice = new CentermonitorTMonitoringDevice();
@@ -1464,6 +909,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
     /**
      * 采集数量分析
      */
+    @Override
     public Map<String, List> getSensorDataCount(Long deptId) {
         long startTime = System.currentTimeMillis(); // 记录开始时间
         CentermonitorTMonitoringDevice centermonitorTMonitoringDevice = new CentermonitorTMonitoringDevice();
@@ -1664,7 +1110,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
         centermonitorTMonitoringDevice.setDeviceCode(deviceCode);
         centermonitorTMonitoringDevice.setDeviceType(deviceType);
         CenterMonitorIoTEquipmentDetailsVO centerMonitorIoTEquipmentDetailsVO = this.centermonitorTMonitoringDeviceMapper.getIoTEquipmentDetails(centermonitorTMonitoringDevice);
-        if (ObjectUtils.isNotEmpty(centerMonitorIoTEquipmentDetailsVO)) {
+        if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(centerMonitorIoTEquipmentDetailsVO)) {
             centerMonitorIoTEquipmentDetailsVO.setDateList(dateList);
             switch (deviceType) {
                 case "1":
@@ -1744,7 +1190,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             LocalDate currentDate = date.minusDays(i);
             String formattedDate = formatter.format(currentDate);
             CentermonitorTMonitoringDataWaterQualityIoTResult addEntity = centermonitorTMonitoringDeviceMapper.getIoTWaterQuality(deviceCode, formattedDate);
-            if (ObjectUtils.isEmpty(addEntity)) {
+            if (org.apache.commons.lang3.ObjectUtils.isEmpty(addEntity)) {
                 CentermonitorTMonitoringDataWaterQualityIoTResult centermonitorTMonitoringDataWaterQualityIoTResult = new CentermonitorTMonitoringDataWaterQualityIoTResult(formattedDate, "0", "0", "0", "0", "0");
                 returnList.add(centermonitorTMonitoringDataWaterQualityIoTResult);
             } else {
@@ -1785,7 +1231,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             LocalDate currentDate = date.minusDays(i);
             String formattedDate = formatter.format(currentDate);
             CentermonitorTMonitoringDataSoilMoistureIoTResult addEntity = centermonitorTMonitoringDeviceMapper.getIoTSoil(deviceCode, formattedDate);
-            if (ObjectUtils.isEmpty(addEntity)) {
+            if (org.apache.commons.lang3.ObjectUtils.isEmpty(addEntity)) {
                 CentermonitorTMonitoringDataSoilMoistureIoTResult centermonitorTMonitoringDataSoilMoistureIoTResult = new CentermonitorTMonitoringDataSoilMoistureIoTResult(formattedDate, "0", "0", "0", "0", "0", "0", "0");
                 returnList.add(centermonitorTMonitoringDataSoilMoistureIoTResult);
             } else {
@@ -1831,7 +1277,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             LocalDate currentDate = date.minusDays(i);
             String formattedDate = formatter.format(currentDate);
             CentermonitorTMonitoringDataInsectPestsIoTResult addEntity = centermonitorTMonitoringDeviceMapper.getIoTInsectPests(deviceCode, formattedDate);
-            if (ObjectUtils.isEmpty(addEntity)) {
+            if (org.apache.commons.lang3.ObjectUtils.isEmpty(addEntity)) {
                 CentermonitorTMonitoringDataInsectPestsIoTResult centermonitorTMonitoringDataInsectPestsIoTResult = new CentermonitorTMonitoringDataInsectPestsIoTResult(formattedDate, 0);
                 returnList.add(centermonitorTMonitoringDataInsectPestsIoTResult);
             } else {
@@ -1864,7 +1310,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             LocalDate currentDate = date.minusDays(i);
             String formattedDate = formatter.format(currentDate);
             CentermonitorTMonitoringDataAtmosphereIoTResult addEntity = centermonitorTMonitoringDeviceMapper.getIoTAtmosphere(deviceCode, formattedDate);
-            if (ObjectUtils.isEmpty(addEntity)) {
+            if (org.apache.commons.lang3.ObjectUtils.isEmpty(addEntity)) {
                 CentermonitorTMonitoringDataAtmosphereIoTResult centermonitorTMonitoringDataAtmosphereIoTResult = new CentermonitorTMonitoringDataAtmosphereIoTResult(formattedDate, "0", "0", "0", "0", "0", "0");
                 returnList.add(centermonitorTMonitoringDataAtmosphereIoTResult);
             } else {
@@ -1908,7 +1354,7 @@ public class CentermonitorTMonitoringDeviceServiceImpl extends BaseService imple
             LocalDate currentDate = date.minusDays(i);
             String formattedDate = formatter.format(currentDate);
             CentermonitorTMonitoringDataWaterPressureIoTResult addEntity = centermonitorTMonitoringDeviceMapper.getIoTWaterPressure(deviceCode, formattedDate);
-            if (ObjectUtils.isEmpty(addEntity)) {
+            if (org.apache.commons.lang3.ObjectUtils.isEmpty(addEntity)) {
                 CentermonitorTMonitoringDataWaterPressureIoTResult centermonitorTMonitoringDataWaterPressureIoTResult = new CentermonitorTMonitoringDataWaterPressureIoTResult(formattedDate, "0", "0", "0");
                 returnList.add(centermonitorTMonitoringDataWaterPressureIoTResult);
             } else {

+ 308 - 308
src/main/java/com/sooka/sponest/monitor/haikang/HikSubscription.java

@@ -1,80 +1,80 @@
-package com.sooka.sponest.monitor.haikang;
-
-import com.alibaba.fastjson.JSONObject;
-import com.hikvision.artemis.sdk.ArtemisHttpUtil;
-import com.hikvision.artemis.sdk.config.ArtemisConfig;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.Map;
-
-/******************************
- * 海康订阅事件
- * @author yanhongliang
- * @date 2021-03-26 12:26
- ******************************/
-
-public class HikSubscription {
-
-    static {
-//        ArtemisConfig.host = "218.27.1.154:54321";// 代理API网关nginx服务器ip端口
-//        ArtemisConfig.appKey = "22654202";// 秘钥appkey
-//        ArtemisConfig.appSecret = "d7HlmRIaiXp3MQBmsuUg";// 秘钥appSecret
-        ArtemisConfig.host = "36.49.108.22:1443";// 代理API网关nginx服务器ip端口
-        ArtemisConfig.appKey = "24699060";// 秘钥appkey
-        ArtemisConfig.appSecret = "tt1pMbsrlwGZUWucdAPw";// 秘钥appSecret
-    }
-
-    /**
-     * 能力开放平台的网站路径
-     * TODO 路径不用修改,就是/artemis
-     */
-    private static final String ARTEMIS_PATH = "/artemis";
-
-
-    /**
-     * 调用POST请求类型(application/json)接口,这里以入侵报警事件日志为例
-     * https://open.hikvision.com/docs/918519baf9904844a2b608e558b21bb6#e6798840
-     *
-     * @return
-     */
-    public static String callPostStringApi() {
-        /**
-         * http://10.33.47.50/artemis/api/scpms/v1/eventLogs/searches
-         * 根据API文档可以看出来,这是一个POST请求的Rest接口,而且传入的参数值为一个json
-         * ArtemisHttpUtil工具类提供了doPostStringArtemis这个函数,一共六个参数在文档里写明其中的意思,因为接口是https,
-         * 所以第一个参数path是一个hashmap类型,请put一个key-value,query为传入的参数,body为传入的json数据
-         * 传入的contentType为application/json,accept不指定为null
-         * header没有额外参数可不传,指定为null
-         *
-         */
-        final String getCamsApi = ARTEMIS_PATH + "/api/scpms/v1/eventLogs/searches";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", getCamsApi);//根据现场环境部署确认是http还是https
-            }
-        };
-
-        JSONObject jsonBody = new JSONObject();
-
-        jsonBody.put("pageNo", 1);
-        jsonBody.put("pageSize", 3);
-        String body = jsonBody.toJSONString();
-
-        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请求application/json类型参数
-        return result;
-    }
-
-    /**
-     * 调用POST请求下载图片类型接口,这里以获取访客记录中的图片接口为例
-     * https://open.hikvision.com/docs/a0a1a0a24701a00aa904f7b151f97410#f11f3208
-     *
-     * @return
-     */
+//package com.sooka.sponest.event.centereventteventcatalogue;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.hikvision.artemis.sdk.ArtemisHttpUtil;
+//import com.hikvision.artemis.sdk.config.ArtemisConfig;
+//import org.apache.http.HttpEntity;
+//import org.apache.http.HttpResponse;
+//
+//import java.io.BufferedReader;
+//import java.io.InputStream;
+//import java.io.InputStreamReader;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+///******************************
+// * 海康订阅事件
+// * @author yanhongliang
+// * @date 2021-03-26 12:26
+// ******************************/
+//
+//public class HikSubscription {
+//
+//    static {
+////        ArtemisConfig.host = "218.27.1.154:54321";// 代理API网关nginx服务器ip端口
+////        ArtemisConfig.appKey = "22654202";// 秘钥appkey
+////        ArtemisConfig.appSecret = "d7HlmRIaiXp3MQBmsuUg";// 秘钥appSecret
+//        ArtemisConfig.host = "36.49.108.22:1443";// 代理API网关nginx服务器ip端口
+//        ArtemisConfig.appKey = "24699060";// 秘钥appkey
+//        ArtemisConfig.appSecret = "tt1pMbsrlwGZUWucdAPw";// 秘钥appSecret
+//    }
+//
+//    /**
+//     * 能力开放平台的网站路径
+//     * TODO 路径不用修改,就是/artemis
+//     */
+//    private static final String ARTEMIS_PATH = "/artemis";
+//
+//
+//    /**
+//     * 调用POST请求类型(application/json)接口,这里以入侵报警事件日志为例
+//     * https://open.hikvision.com/docs/918519baf9904844a2b608e558b21bb6#e6798840
+//     *
+//     * @return
+//     */
+//    public static String callPostStringApi() {
+//        /**
+//         * http://10.33.47.50/artemis/api/scpms/v1/eventLogs/searches
+//         * 根据API文档可以看出来,这是一个POST请求的Rest接口,而且传入的参数值为一个json
+//         * ArtemisHttpUtil工具类提供了doPostStringArtemis这个函数,一共六个参数在文档里写明其中的意思,因为接口是https,
+//         * 所以第一个参数path是一个hashmap类型,请put一个key-value,query为传入的参数,body为传入的json数据
+//         * 传入的contentType为application/json,accept不指定为null
+//         * header没有额外参数可不传,指定为null
+//         *
+//         */
+//        final String getCamsApi = ARTEMIS_PATH + "/api/scpms/v1/eventLogs/searches";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", getCamsApi);//根据现场环境部署确认是http还是https
+//            }
+//        };
+//
+//        JSONObject jsonBody = new JSONObject();
+//
+//        jsonBody.put("pageNo", 1);
+//        jsonBody.put("pageSize", 3);
+//        String body = jsonBody.toJSONString();
+//
+//        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请求application/json类型参数
+//        return result;
+//    }
+//
+//    /**
+//     * 调用POST请求下载图片类型接口,这里以获取访客记录中的图片接口为例
+//     * https://open.hikvision.com/docs/a0a1a0a24701a00aa904f7b151f97410#f11f3208
+//     *
+//     * @return
+//     */
 //    public static void callPostImgStringApi() {
 //        /**
 //         * http://10.33.47.50/api/visitor/v1/record/pictures
@@ -113,162 +113,118 @@ public class HikSubscription {
 //            e.printStackTrace();
 //        }
 //    }
-
-
-    /**
-     * 按事件类型订阅事件
-     */
-    public static int eventSubscriptionByEventTypes(long[] types,String eventDest) {
-        int res = 0;
-        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventSubscriptionByEventTypes";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", VechicleDataApi);
-            }
-        };
-
-        JSONObject jsonBody = new JSONObject();
-        jsonBody.put("eventTypes", types);
-
-        jsonBody.put("eventDest", eventDest);
-        jsonBody.put("subType", 0);
-        //jsonBody.put("eventLvl", 3);
-        String body = jsonBody.toJSONString();
-        System.out.println("body: " + body);
-        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, body, null, null, "application/json", null);
-        System.out.println("reslut ::" + result);
-        try {
-            HttpResponse resp = result;
-            if (200 == resp.getStatusLine().getStatusCode()) {
-                HttpEntity entity = resp.getEntity();
-                InputStream in = entity.getContent();
-                BufferedReader br = new BufferedReader(new InputStreamReader(in));
-                String str = br.readLine();
-                System.out.println("str="+str);
-                System.out.println("订阅成功:");
-                res = 1;
-            } else {
-                System.out.println("订阅出错");
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
-
-
-    /**
-     * 查询订阅事件
-     * @return
-     */
-    public static String eventSubscriptionView() {
-        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventSubscriptionView";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", VechicleDataApi);
-            }
-        };
-
-//		JSONObject jsonBody = new JSONObject();
-//		jsonBody.put("eventTypes", "169001001L");
-//		jsonBody.put("eventDest", "http://121.89.200.81:9090/business/app/hikc/cameraHik/");
-//		jsonBody.put("subType", "0");
-//		jsonBody.put("eventLvl", "3");
-//		String body = jsonBody.toJSONString();
-//		System.out.println("body: "+body);
-        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, null, null, null, "application/json", null);
-        System.out.println("reslut ::" + result);
-        String str = null;
-        try {
-            HttpResponse resp = result;
-            if (200 == resp.getStatusLine().getStatusCode()) {
-                HttpEntity entity = resp.getEntity();
-                InputStream in = entity.getContent();
-                BufferedReader br = new BufferedReader(new InputStreamReader(in));
-                str = br.readLine();
-                System.out.println("str="+str);
-//                System.out.println("in length :"+in.available());
-                int a = in.read();
-                while(a != -1){
-                    System.out.println(a+"*");
-                    a = in.read();
-                }
-//                byte[] b = new byte[in.available()];
-//                in.read(b);
-//                System.out.println("查询成功:" + b.length);
-            } else {
-                System.out.println("查询出错");
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return str;
-    }
-
-
-
-    public static String eventUnSubscriptionByEventTypes(long[] types){
-        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventUnSubscriptionByEventTypes";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", VechicleDataApi);
-            }
-        };
-
-        JSONObject jsonBody = new JSONObject();
-        jsonBody.put("eventTypes", types);
-        //jsonBody.put("eventLvl", 3);
-        String body = jsonBody.toJSONString();
-        System.out.println("body: " + body);
-        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, body, null, null, "application/json", null);
-        System.out.println("reslut ::" + result);
-        String str = null;
-        try {
-            HttpResponse resp = result;
-            if (200 == resp.getStatusLine().getStatusCode()) {
-                HttpEntity entity = resp.getEntity();
-                InputStream in = entity.getContent();
-                BufferedReader br = new BufferedReader(new InputStreamReader(in));
-                str = br.readLine();
-                System.out.println("str="+str);
-                System.out.println("取消订阅成功:");
-            } else {
-                System.out.println("取消订阅出错");
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return str;
-    }
-
-
-    public static String playbackURLs(String cameraId,String begintime,String endtime,String protocol) {
-        //api/video/v2/cameras/playbackURLs
-        final String VechicleDataApi = ARTEMIS_PATH + "/api/video/v2/cameras/playbackURLs";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", VechicleDataApi);
-            }
-        };
-
-        JSONObject jsonBody = new JSONObject();
-        jsonBody.put("cameraIndexCode", cameraId);
-        jsonBody.put("beginTime", begintime+"+08:00");
-        jsonBody.put("endTime", endtime+"+08:00");
-//        jsonBody.put("beginTime", "2021-03-24T00:08:00.000+08:00");
-//        jsonBody.put("endTime", "2021-03-24T00:18:05.000+08:00");
-        jsonBody.put("protocol", protocol);
-//        jsonBody.put("cameraIndexCode", "");
-//        jsonBody.put("cameraIndexCode", "");
-        //jsonBody.put("eventLvl", 3);
-        String body = jsonBody.toJSONString();
-        System.out.println("body: " + body);
-        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);
-        System.out.println("reslut ::" + result);
-        String str = null;
+//
+//
+//    /**
+//     * 按事件类型订阅事件
+//     */
+//    public static int eventSubscriptionByEventTypes(long[] types,String eventDest) {
+//        int res = 0;
+//        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventSubscriptionByEventTypes";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", VechicleDataApi);
+//            }
+//        };
+//
+//        JSONObject jsonBody = new JSONObject();
+//        jsonBody.put("eventTypes", types);
+//
+//        jsonBody.put("eventDest", eventDest);
+//        jsonBody.put("subType", 0);
+//        //jsonBody.put("eventLvl", 3);
+//        String body = jsonBody.toJSONString();
+//        System.out.println("body: " + body);
+//        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, body, null, null, "application/json", null);
+//        System.out.println("reslut ::" + result);
+//        try {
+//            HttpResponse resp = result;
+//            if (200 == resp.getStatusLine().getStatusCode()) {
+//                HttpEntity entity = resp.getEntity();
+//                InputStream in = entity.getContent();
+//                BufferedReader br = new BufferedReader(new InputStreamReader(in));
+//                String str = br.readLine();
+//                System.out.println("str="+str);
+//                System.out.println("订阅成功:");
+//                res = 1;
+//            } else {
+//                System.out.println("订阅出错");
+//            }
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
+//
+//
+//    /**
+//     * 查询订阅事件
+//     * @return
+//     */
+//    public static String eventSubscriptionView() {
+//        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventSubscriptionView";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", VechicleDataApi);
+//            }
+//        };
+//
+////		JSONObject jsonBody = new JSONObject();
+////		jsonBody.put("eventTypes", "169001001L");
+////		jsonBody.put("eventDest", "http://121.89.200.81:9090/business/app/hikc/cameraHik/");
+////		jsonBody.put("subType", "0");
+////		jsonBody.put("eventLvl", "3");
+////		String body = jsonBody.toJSONString();
+////		System.out.println("body: "+body);
+//        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, null, null, null, "application/json", null);
+//        System.out.println("reslut ::" + result);
+//        String str = null;
+//        try {
+//            HttpResponse resp = result;
+//            if (200 == resp.getStatusLine().getStatusCode()) {
+//                HttpEntity entity = resp.getEntity();
+//                InputStream in = entity.getContent();
+//                BufferedReader br = new BufferedReader(new InputStreamReader(in));
+//                str = br.readLine();
+//                System.out.println("str="+str);
+////                System.out.println("in length :"+in.available());
+//                int a = in.read();
+//                while(a != -1){
+//                    System.out.println(a+"*");
+//                    a = in.read();
+//                }
+////                byte[] b = new byte[in.available()];
+////                in.read(b);
+////                System.out.println("查询成功:" + b.length);
+//            } else {
+//                System.out.println("查询出错");
+//            }
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return str;
+//    }
+//
+//
+//
+//    public static String eventUnSubscriptionByEventTypes(long[] types){
+//        final String VechicleDataApi = ARTEMIS_PATH + "/api/eventService/v1/eventUnSubscriptionByEventTypes";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", VechicleDataApi);
+//            }
+//        };
+//
+//        JSONObject jsonBody = new JSONObject();
+//        jsonBody.put("eventTypes", types);
+//        //jsonBody.put("eventLvl", 3);
+//        String body = jsonBody.toJSONString();
+//        System.out.println("body: " + body);
+//        HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(path, body, null, null, "application/json", null);
+//        System.out.println("reslut ::" + result);
+//        String str = null;
 //        try {
 //            HttpResponse resp = result;
 //            if (200 == resp.getStatusLine().getStatusCode()) {
@@ -276,84 +232,128 @@ public class HikSubscription {
 //                InputStream in = entity.getContent();
 //                BufferedReader br = new BufferedReader(new InputStreamReader(in));
 //                str = br.readLine();
-//                System.out.println("str=" + str);
-//                System.out.println("视频查询成功:");
+//                System.out.println("str="+str);
+//                System.out.println("取消订阅成功:");
 //            } else {
-//                System.out.println("视频查询出错");
+//                System.out.println("取消订阅出错");
 //            }
 //
 //        } catch (Exception e) {
 //            e.printStackTrace();
 //        }
-        return result;
-    }
-
-
-    public static String previewURLs(String cameraId, String protocol) {
-        //api/video/v2/cameras/playbackURLs
-        final String VechicleDataApi = ARTEMIS_PATH + "/api/video/v1/cameras/previewURLs";
-        Map<String, String> path = new HashMap<String, String>(2) {
-            {
-                put("https://", VechicleDataApi);
-            }
-        };
-
-        JSONObject jsonBody = new JSONObject();
-        jsonBody.put("cameraIndexCode", cameraId);
-        jsonBody.put("protocol", protocol);
-        jsonBody.put("streamType", 0);
-        String body = jsonBody.toJSONString();
-        System.out.println("body: " + body);
-        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);
-        System.out.println("reslut ::" + result);
-
-        return result;
-    }
-
-    public static void main(String[] args) {
-
-//        String result = previewURLs("6bc3ac0fd5c6475ea22fccc75ab2e619","ws");
-//        System.out.println("-=-=-=-=-=-=-="+result);
-
-//        /api/video/v1/cameras/previewURLs
-
-
-        //*
-
-        //订阅
-
-//        火
-//        long[] subscription = {169001001L};
-//        String url = "http://36.49.108.22:10003/AlarmEventController/haikang@insertFireEvent";
-
-        //城管
-//        long[] subscription = {7617069059L};
-//        String url = "http://36.49.108.22:10003/AlarmEventController/haikang@insertCityEvent";
-//
-//        eventSubscriptionByEventTypes(subscription,url);
-
-        //取消订阅
-//        long[] unSubscription = {7617069059L};
-//        eventUnSubscriptionByEventTypes(unSubscription);
-
-        //查询已经订阅的事件
-//        eventSubscriptionView();
-
-        //*/
-
-        //订阅警戒头事件
-//        eventSubscriptionByEventTypes(131588,"https://192.168.10.15:9090/business/app/hikc/cameraHikByEventRcv/");
-
-//        eventUnSubscriptionByEventTypes(131588);
-
-        //查看历史回放
-//        {"protocol":"hls","beginTime":"2021-03-26T11:10:50.000+08:00","endTime":"2021-03-26T11:12:50.000+08:00","cameraIndexCode":"a0b060ae228b463785d72102339b88e5"}
-//        playbackURLs("d6819d298c0f422a9f871e94edb568f3",
-//                "2021-03-26T11:10:50.000",
-//                "2021-03-26T11:12:50.000",
-//                "rtsp"
-//        );
-//        eventSubscriptionView();
-    }
-
-}
+//        return str;
+//    }
+//
+//
+//    public static String playbackURLs(String cameraId,String begintime,String endtime,String protocol) {
+//        //api/video/v2/cameras/playbackURLs
+//        final String VechicleDataApi = ARTEMIS_PATH + "/api/video/v2/cameras/playbackURLs";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", VechicleDataApi);
+//            }
+//        };
+//
+//        JSONObject jsonBody = new JSONObject();
+//        jsonBody.put("cameraIndexCode", cameraId);
+//        jsonBody.put("beginTime", begintime+"+08:00");
+//        jsonBody.put("endTime", endtime+"+08:00");
+////        jsonBody.put("beginTime", "2021-03-24T00:08:00.000+08:00");
+////        jsonBody.put("endTime", "2021-03-24T00:18:05.000+08:00");
+//        jsonBody.put("protocol", protocol);
+////        jsonBody.put("cameraIndexCode", "");
+////        jsonBody.put("cameraIndexCode", "");
+//        //jsonBody.put("eventLvl", 3);
+//        String body = jsonBody.toJSONString();
+//        System.out.println("body: " + body);
+//        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);
+//        System.out.println("reslut ::" + result);
+//        String str = null;
+////        try {
+////            HttpResponse resp = result;
+////            if (200 == resp.getStatusLine().getStatusCode()) {
+////                HttpEntity entity = resp.getEntity();
+////                InputStream in = entity.getContent();
+////                BufferedReader br = new BufferedReader(new InputStreamReader(in));
+////                str = br.readLine();
+////                System.out.println("str=" + str);
+////                System.out.println("视频查询成功:");
+////            } else {
+////                System.out.println("视频查询出错");
+////            }
+////
+////        } catch (Exception e) {
+////            e.printStackTrace();
+////        }
+//        return result;
+//    }
+//
+//
+//    public static String previewURLs(String cameraId, String protocol) {
+//        //api/video/v2/cameras/playbackURLs
+//        final String VechicleDataApi = ARTEMIS_PATH + "/api/video/v1/cameras/previewURLs";
+//        Map<String, String> path = new HashMap<String, String>(2) {
+//            {
+//                put("https://", VechicleDataApi);
+//            }
+//        };
+//
+//        JSONObject jsonBody = new JSONObject();
+//        jsonBody.put("cameraIndexCode", cameraId);
+//        jsonBody.put("protocol", protocol);
+//        jsonBody.put("streamType", 0);
+//        String body = jsonBody.toJSONString();
+//        System.out.println("body: " + body);
+//        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);
+//        System.out.println("reslut ::" + result);
+//
+//        return result;
+//    }
+//
+//    public static void main(String[] args) {
+//
+////        String result = previewURLs("6bc3ac0fd5c6475ea22fccc75ab2e619","ws");
+////        System.out.println("-=-=-=-=-=-=-="+result);
+//
+////        /api/video/v1/cameras/previewURLs
+//
+//
+//        //*
+//
+//        //订阅
+//
+////        火
+////        long[] subscription = {169001001L};
+////        String url = "http://36.49.108.22:10003/AlarmEventController/haikang@insertFireEvent";
+//
+//        //城管
+////        long[] subscription = {7617069059L};
+////        String url = "http://36.49.108.22:10003/AlarmEventController/haikang@insertCityEvent";
+////
+////        eventSubscriptionByEventTypes(subscription,url);
+//
+//        //取消订阅
+////        long[] unSubscription = {7617069059L};
+////        eventUnSubscriptionByEventTypes(unSubscription);
+//
+//        //查询已经订阅的事件
+////        eventSubscriptionView();
+//
+//        //*/
+//
+//        //订阅警戒头事件
+////        eventSubscriptionByEventTypes(131588,"https://192.168.10.15:9090/business/app/hikc/cameraHikByEventRcv/");
+//
+////        eventUnSubscriptionByEventTypes(131588);
+//
+//        //查看历史回放
+////        {"protocol":"hls","beginTime":"2021-03-26T11:10:50.000+08:00","endTime":"2021-03-26T11:12:50.000+08:00","cameraIndexCode":"a0b060ae228b463785d72102339b88e5"}
+////        playbackURLs("d6819d298c0f422a9f871e94edb568f3",
+////                "2021-03-26T11:10:50.000",
+////                "2021-03-26T11:12:50.000",
+////                "rtsp"
+////        );
+////        eventSubscriptionView();
+//    }
+//
+//}

+ 0 - 8
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankDevicesController.java

@@ -139,12 +139,4 @@ public class GasTankDevicesController extends BaseController {
         return AjaxResult.success(list);
     }
 
-    /**
-     * 远程调用新增煤气罐设备信息
-     */
-    @Log(title = "煤气罐设备信息", businessType = BusinessType.INSERT)
-    @PostMapping("/gpsTankInsertBatch")
-    public AjaxResult insertBatch(@RequestBody JSONObject jsonObject) {
-        return gasTankDevicesService.insertBatch(jsonObject);
-    }
 }

+ 2 - 12
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankHistoricalTrajectoryController.java

@@ -1,17 +1,15 @@
 package com.sooka.sponest.monitor.meiqiguan.gps.controller;
 
-import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.sooka.sponest.monitor.meiqiguan.gps.domain.GasTankHistoricalTrajectory;
 import com.sooka.sponest.monitor.meiqiguan.gps.service.IGasTankHistoricalTrajectoryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import com.ruoyi.common.log.annotation.Log;
-
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
@@ -92,12 +90,4 @@ public class GasTankHistoricalTrajectoryController extends BaseController {
         return AjaxResult.success(gasTankHistoricalTrajectoryService.selectGasTankHistoricalTrajectoryListByDeviceid(gasTankHistoricalTrajectory));
     }
 
-    /**
-     * 远程调用新增历史轨迹
-     */
-    @Log(title = "历史轨迹", businessType = BusinessType.INSERT)
-    @PostMapping(value = "/remoteInsertBatch")
-    public AjaxResult remoteInsertBatch(@RequestBody JSONObject obj) {
-        return gasTankHistoricalTrajectoryService.insertBatch(obj);
-    }
 }

+ 0 - 36
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankTravelMileageController.java

@@ -1,36 +0,0 @@
-package com.sooka.sponest.monitor.meiqiguan.gps.controller;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.sooka.sponest.monitor.meiqiguan.gps.service.IGasTankTravelMileageService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 历史行程Controller
- *
- * @author ruoyi
- * @date 2024-09-09
- */
-@RestController
-@RequestMapping("/gps/mileage")
-public class GasTankTravelMileageController extends BaseController {
-    @Autowired
-    private IGasTankTravelMileageService gasTankTravelMileageService;
-
-
-    /**
-     * 远程调用新增历史行程
-     */
-    @Log(title = "历史行程", businessType = BusinessType.INSERT)
-    @PostMapping(value = "/remoteInsertBatch")
-    public AjaxResult remoteInsertBatch(@RequestBody JSONObject obj) {
-        return gasTankTravelMileageService.insertBatch(obj);
-    }
-}

+ 0 - 3
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankDevicesMapper.java

@@ -66,9 +66,6 @@ public interface GasTankDevicesMapper {
     public int deleteGasTankDevicesByIds(Long[] ids);
 
 
-    int insertBatch(List<GasTankDevices> list);
-
-
     List<GasTankDevicesVo> selectGasTankDevicesListAll(GasTankDevices gasTankDevices);
 
     List<GasTankDevices> selectGasTankDevicesNewEndTime();

+ 0 - 2
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankHistoricalTrajectoryMapper.java

@@ -62,8 +62,6 @@ public interface GasTankHistoricalTrajectoryMapper {
      */
     public int deleteGasTankHistoricalTrajectoryByIds(Long[] ids);
 
-    int insertBatch(@Param("deviceid") String deviceid, @Param("list")List<GasTankHistoricalTrajectory> list);
-
     List<GasTankHistoricalTrajectory> selectGasTankHistoricalTrajectoryListByDeviceid(GasTankHistoricalTrajectory gasTankHistoricalTrajectory);
 
     List<GasTankHistoricalTrajectoryVo> selectHistoricalTrajectoryListByDeviceId(@Param("deviceid") String deviceid);

+ 0 - 4
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankTravelMileageMapper.java

@@ -2,16 +2,12 @@ package com.sooka.sponest.monitor.meiqiguan.gps.mapper;
 
 import com.sooka.sponest.monitor.meiqiguan.gps.domain.GasTankHistoricalTrajectory;
 import com.sooka.sponest.monitor.meiqiguan.gps.domain.GasTankTravelMileage;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 
 public interface GasTankTravelMileageMapper {
 
-
-    int insertBatch(@Param("deviceid") String deviceid, @Param("list")List<GasTankTravelMileage> list);
-
     List<GasTankTravelMileage> selectGasTankTravelMileageListByDeviceid(GasTankHistoricalTrajectory gasTankHistoricalTrajectory);
 
 

+ 0 - 2
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankDevicesService.java

@@ -66,8 +66,6 @@ public interface IGasTankDevicesService {
      */
     public int deleteGasTankDevicesById(Long id);
 
-    AjaxResult insertBatch(JSONObject jsonObject);
-
     List<GasTankDevicesVo> selectGasTankDevicesListAll(GasTankDevices gasTankDevices);
 
     List<GasTankDevices> selectGasTankDevicesNewEndTime();

+ 0 - 2
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankHistoricalTrajectoryService.java

@@ -65,6 +65,4 @@ public interface IGasTankHistoricalTrajectoryService {
 
     Map<String, List> selectGasTankHistoricalTrajectoryListByDeviceid(GasTankHistoricalTrajectory gasTankHistoricalTrajectory);
 
-    AjaxResult insertBatch(JSONObject obj);
-
 }

+ 0 - 17
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankTravelMileageService.java

@@ -1,17 +0,0 @@
-package com.sooka.sponest.monitor.meiqiguan.gps.service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-
-
-/**
- * 历史行程Service接口
- *
- * @author ruoyi
- * @date 2024-09-09
- */
-public interface IGasTankTravelMileageService {
-
-    AjaxResult insertBatch(JSONObject obj);
-
-}

+ 0 - 15
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankDevicesServiceImpl.java

@@ -106,21 +106,6 @@ public class GasTankDevicesServiceImpl implements IGasTankDevicesService {
     }
 
     /**
-     * 批量保存大华云台日志
-     */
-    @Override
-    public AjaxResult insertBatch(JSONObject jsonObject) {
-        List<GasTankDevicesDTO> list = JSON.parseArray(JSON.toJSONString(jsonObject.get("groups")), GasTankDevicesDTO.class);
-        if (CollectionUtils.isNotEmpty(list) && CollectionUtils.isNotEmpty(list.get(0).getDevices())) {
-            GasTankDevicesDTO listAll = list.get(0);
-            List<GasTankDevices> firstDevice = listAll.getDevices();
-            int count = gasTankDevicesMapper.insertBatch(firstDevice);
-        }
-        return AjaxResult.success();
-    }
-
-
-    /**
      * 查询煤气罐设备列表与轨迹
      * @param gasTankDevices
      * @return

+ 0 - 13
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankHistoricalTrajectoryServiceImpl.java

@@ -134,17 +134,4 @@ public class GasTankHistoricalTrajectoryServiceImpl implements IGasTankHistorica
         return map;
     }
 
-    @Override
-    public AjaxResult insertBatch(JSONObject obj) {
-        if (ObjectUtils.isNotEmpty(obj) && obj.get("records") != null) {
-            List<GasTankHistoricalTrajectory> list = JSON.parseArray(JSON.toJSONString(obj.get("records")),GasTankHistoricalTrajectory.class);
-            if (CollectionUtils.isNotEmpty(list)) {
-                List<List<GasTankHistoricalTrajectory>> partition = Lists.partition(list, 500);
-                partition.forEach(item -> {
-                    gasTankHistoricalTrajectoryMapper.insertBatch(obj.get("deviceid").toString(), item);
-                });
-            }
-        }
-        return AjaxResult.success();
-    }
 }

+ 0 - 95
src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankTravelMileageServiceImpl.java

@@ -1,95 +0,0 @@
-package com.sooka.sponest.monitor.meiqiguan.gps.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.sooka.sponest.monitor.meiqiguan.gps.domain.GasTankTravelMileage;
-import com.sooka.sponest.monitor.meiqiguan.gps.mapper.GasTankTravelMileageMapper;
-import com.sooka.sponest.monitor.meiqiguan.gps.service.IGasTankTravelMileageService;
-import com.sooka.sponest.monitor.remoteapi.service.center.data.RemoteDataBaseService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.ObjectUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 历史行程Service业务层处理
- *
- * @author ruoyi
- * @date 2024-09-09
- */
-@Slf4j
-@Service
-public class GasTankTravelMileageServiceImpl implements IGasTankTravelMileageService {
-    @Autowired
-    private GasTankTravelMileageMapper gasTankTravelMileageMapper;
-    @Resource
-    private RemoteDataBaseService remoteDataBaseService;
-
-    @Override
-    public AjaxResult insertBatch(JSONObject obj) {
-        if (ObjectUtils.isNotEmpty(obj) && obj.get("totaltrips") != null && CollectionUtils.isNotEmpty(JSON.parseArray(JSON.toJSONString(obj.get("totaltrips")), GasTankTravelMileage.class))) {
-            List<GasTankTravelMileage> list = JSON.parseArray(JSON.toJSONString(obj.get("totaltrips")), GasTankTravelMileage.class);
-            if (CollectionUtils.isNotEmpty(list)) {
-                //向数据中心推送数据
-                R dataResult = remoteDataBaseService.sendGpsEvent(obj.toString());
-                if (dataResult.getCode() == 200) {
-                    log.info("北斗卫星定位车辆gps历史轨迹对接,数据推送成功");
-                } else {
-                    log.error("北斗卫星定位车辆gps历史轨迹对接,数据推送失败,原因:{}", dataResult.getMsg());
-                }
-                if (obj.get("addressmap") != null) {
-                    Map<String, String> addressmap = (Map<String, String>) obj.get("addressmap");
-                    if (ObjectUtils.isNotEmpty(addressmap)) {
-                        for (GasTankTravelMileage var : list) {
-                            String str = Float.parseFloat(getStr(var.getSlat())) + "_" + Float.parseFloat(getStr(var.getSlon()));
-                            var.setAddressmap(addressmap.get(str));
-                        }
-                    }
-                }
-                List<List<GasTankTravelMileage>> partition = Lists.partition(list, 500);
-                partition.forEach(item -> {
-                    gasTankTravelMileageMapper.insertBatch(obj.get("deviceid").toString(), item);
-                });
-            }
-        }
-        return AjaxResult.success();
-    }
-
-    /**
-     * @param str 需要截取的数字(保留小数点后5位,没有四舍五入,如果第五位是0,转换成数字,0自动去掉,也就是说第五位是0,则保留四位小数)
-     */
-    public String getStr(String str) {
-        // 判断是整数还是小数,如果是整数,则小数点后用0补位
-        if (!str.contains(".")) {
-            String b = ".";
-            for (int a = 0; a < 5; a++) {
-                b = b + "0";
-            }
-            return str + b;
-        }
-        // 获取小数点的位置
-        int index = str.indexOf(".");
-        String beforeNum = str.substring(0, index + 1);
-        // 获取小数点后面是否有num位,不足用0补位
-        String afterNum = str.replace(beforeNum, "");
-        // 判断小数点后位数是否大于保留的位数
-        if (afterNum.length() <= 5) {
-            for (int a = afterNum.length(); a < 5; a++) {
-                afterNum = afterNum + "0";
-            }
-        } else {
-            afterNum = afterNum.substring(0, 5);
-        }
-        return beforeNum + afterNum;
-    }
-
-}

+ 0 - 6
src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/data/RemoteDataBaseServiceFallbackFactory.java

@@ -24,12 +24,6 @@ public class RemoteDataBaseServiceFallbackFactory implements FallbackFactory<Rem
             @PostMapping("/attach/insertAttach")
             public void insertAttach(CenterdataTAttach centerdataTAttach){}
 
-            @Override
-            public R sendGpsEvent(String jsonArray) {
-                return null;
-            }
-
-
         };
 
 

+ 2 - 9
src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/event/RemoteEventBaseServiceFallbackFactory.java

@@ -2,7 +2,6 @@ package com.sooka.sponest.monitor.remoteapi.fallback.center.event;
 
 
 import com.ruoyi.common.core.domain.R;
-import com.sooka.sponest.monitor.camera.domain.GiveAnAlarmResultDTO;
 import com.sooka.sponest.monitor.camera.domain.VisuForestCloudMapVO;
 import com.sooka.sponest.monitor.device.domain.SensorEventVo;
 import com.sooka.sponest.monitor.remoteapi.service.center.event.RemoteEventBaseService;
@@ -35,23 +34,17 @@ public class RemoteEventBaseServiceFallbackFactory implements FallbackFactory<Re
                 return null;
             }
 
-            @Override
-            public R insertSensorEvent(@RequestBody SensorEventVo sensorEventVo) {
-                return null;
-            }
 
             @Override
-            public R downloads(@RequestBody CentereventTDownloads centereventTDownloads) {
+            public R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVOs) {
                 return null;
             }
 
             @Override
-            public R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVOs) {
+            public R downloads(@RequestBody CentereventTDownloads centereventTDownloads) {
                 return null;
             }
 
-
-
         };
 
 

+ 0 - 34
src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/lawenforcement/RemoteLawenforcementBaseServiceFallbackFactory.java

@@ -1,34 +0,0 @@
-package com.sooka.sponest.monitor.remoteapi.fallback.center.lawenforcement;
-
-
-import com.ruoyi.common.core.domain.R;
-import com.sooka.sponest.monitor.remoteapi.service.center.lawenforcement.RemoteLawenforcementBaseService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-
-@Component
-public class RemoteLawenforcementBaseServiceFallbackFactory implements FallbackFactory<RemoteLawenforcementBaseService> {
-
-    private static final Logger log = LoggerFactory.getLogger(RemoteLawenforcementBaseServiceFallbackFactory.class);
-
-    @Override
-    public RemoteLawenforcementBaseService create(Throwable cause) {
-        log.error("执法中心-服务调用失败:{}", cause.getMessage());
-
-        return new RemoteLawenforcementBaseService() {
-
-            @Override
-            public R deviceOpenOrClose(List<Map<String, Object>> arr) {
-                return null;
-            }
-        };
-
-
-
-    }
-}

+ 5 - 1
src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/system/RemoteSystemBaseServiceFallbackFactory.java

@@ -86,13 +86,17 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             }
 
             /**
-             * 根据用户名查询dept_id, parent_id, ancestors, dept_name
+             * 根据DEPT_ID查询下级的乡镇或区县部门列表,如果传入市级部门则查询区县,如果传入区县部门则查询乡镇街道(不带数据权限)
+             *
+             * @param dept 部门id
+             * @return 部门信息集合
              */
             @Override
             public R<List<SysDept>> selectChildrenCountyOrVillagesDeptListByDeptId(Long dept) {
                 return null;
             }
 
+
         };
     }
 }

+ 0 - 4
src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/data/RemoteDataBaseService.java

@@ -21,8 +21,4 @@ public interface RemoteDataBaseService {
     @PostMapping("/attach/insertAttach")
     public void insertAttach(CenterdataTAttach centerdataTAttach);
 
-    @PostMapping("/taskHandler/sendGpsEvent")
-    public R sendGpsEvent(@RequestBody String jsonArray);
-
-
 }

+ 1 - 5
src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/event/RemoteEventBaseService.java

@@ -2,7 +2,6 @@ package com.sooka.sponest.monitor.remoteapi.service.center.event;
 
 
 import com.ruoyi.common.core.domain.R;
-import com.sooka.sponest.monitor.camera.domain.GiveAnAlarmResultDTO;
 import com.sooka.sponest.monitor.camera.domain.VisuForestCloudMapVO;
 import com.sooka.sponest.monitor.device.domain.SensorEventVo;
 import com.sooka.sponest.monitor.remoteapi.fallback.center.event.RemoteEventBaseServiceFallbackFactory;
@@ -26,11 +25,8 @@ public interface RemoteEventBaseService {
     @GetMapping("/eventtype/getCentereventTEventtypeByParentId")
     R<List<CentereventTEventtype>> selectFirstEventType(@RequestParam("parentId") String parentId);
 
-    @PostMapping("/fireIncident/insertSensorEvent")
-    R insertSensorEvent(@RequestBody SensorEventVo sensorEventVo);
-
     @PostMapping("/eventreport/getEventGjnums")
-    R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO);
+    public R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO);
 
     @PutMapping("/downloads")
     R downloads(@RequestBody CentereventTDownloads centereventTDownloads);

+ 0 - 24
src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/lawenforcement/RemoteLawenforcementBaseService.java

@@ -1,24 +0,0 @@
-package com.sooka.sponest.monitor.remoteapi.service.center.lawenforcement;
-
-
-import com.ruoyi.common.core.domain.R;
-import com.sooka.sponest.monitor.remoteapi.fallback.center.lawenforcement.RemoteLawenforcementBaseServiceFallbackFactory;
-import com.sooka.sponest.monitor.remoteapi.service.ModulesServiceNameContants;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-
-import java.util.List;
-import java.util.Map;
-
-
-@FeignClient(
-        contextId = "RemoteLawenforcementBaseService",
-        value = ModulesServiceNameContants.CENTER_LAWENFORCEMENT,
-        fallbackFactory = RemoteLawenforcementBaseServiceFallbackFactory.class
-)
-public interface RemoteLawenforcementBaseService {
-
-    @PostMapping("/device/deviceOpenOrClose")
-    public R deviceOpenOrClose(List<Map<String, Object>> arr);
-
-}

+ 0 - 5
src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/system/RemoteService.java

@@ -6,10 +6,6 @@ import com.ruoyi.system.api.domain.SysUser;
 import com.sooka.sponest.monitor.remoteapi.fallback.center.system.RemoteSystemBaseServiceFallbackFactory;
 import com.sooka.sponest.monitor.remoteapi.service.ModulesServiceNameContants;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -61,7 +57,6 @@ public interface RemoteService {
     @GetMapping(value = "/dept/findDeptIdByUserName/{userName}")
     R<SysDept> findDeptIdByUserName(@PathVariable("userName") String userName);
 
-
     /**
      * 根据DEPT_ID查询下级的乡镇或区县部门列表,如果传入市级部门则查询区县,如果传入区县部门则查询乡镇街道(不带数据权限)
      *

+ 0 - 137
src/main/java/com/sooka/sponest/monitor/util/ScheduledTasks.java

@@ -1,137 +0,0 @@
-package com.sooka.sponest.monitor.util;
-
-import com.ruoyi.common.core.utils.DateUtils;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.sooka.sponest.monitor.device.domain.*;
-import com.sooka.sponest.monitor.device.service.ICentermonitorTMonitoringDeviceService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-import static org.springframework.web.bind.annotation.RequestMethod.GET;
-
-@Configuration
-@EnableScheduling
-@Component
-@Api(tags = "传感器设备定时任务")
-@RestController
-@RequestMapping("/device/quartz")
-public class ScheduledTasks {
-
-    protected static final Logger logger = LoggerFactory.getLogger(ScheduledTasks.class);
-
-    @Autowired
-    private ICentermonitorTMonitoringDeviceService centermonitorTMonitoringDeviceService; // 你的业务逻辑服务
-
-//    @Scheduled(cron = "0 0 0 * * ?") // 每天0点执行
-//    @Scheduled(cron = "0 0 */2 * * ?") // 每两小时执行一次
-//        @Scheduled(cron = "0 */1 * * * ?") // 每分钟执行一次
-    @Log(title = "传感器设备定时任务", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "传感器设备定时任务", notes = "传感器设备定时任务")
-    @RequestMapping(value = "/updateDeviceStatusQuartz", method = GET)
-    public void updateStatus() {
-        logger.info("执行定时任务=>{}", DateUtils.dateTimeNow());
-        // 获取最近一次更新时间超过24小时的数据
-        List<CentermonitorTMonitoringDevice> deviceMainList = centermonitorTMonitoringDeviceService.getDeviceListToJudgeWorkingStatus(new CentermonitorTMonitoringDevice());
-        for (CentermonitorTMonitoringDevice deviceMain : deviceMainList) {
-            if (isOffline(deviceMain)){// 是否离线
-                deviceMain.setWorkingStatus("1");// 设备离线
-            } else {
-                deviceMain.setWorkingStatus("0");// 设备在线
-            }
-            centermonitorTMonitoringDeviceService.updateDeviceListToJudgeWorkingStatus(deviceMain); // 保存更新后的数据列表
-        }
-    }
-
-    private boolean isOffline(CentermonitorTMonitoringDevice device) {
-        String deviceType = device.getDeviceType();// 设备类型
-        String deviceCode = device.getDeviceCode();// 设备编码
-        String createTime = new String();// 数据创建时间
-        if(deviceType.equals("5")){//大气
-            CentermonitorTMonitoringDataAtmosphere atmosphere = new CentermonitorTMonitoringDataAtmosphere();
-            atmosphere.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataAtmosphere data = centermonitorTMonitoringDeviceService.getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus(atmosphere);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else if(deviceType.equals("4")){//病虫害
-            CentermonitorTMonitoringDataInsectPests insectPests = new CentermonitorTMonitoringDataInsectPests();
-            insectPests.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataInsectPests data = centermonitorTMonitoringDeviceService.getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus(insectPests);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else if(deviceType.equals("2")){//土壤
-            CentermonitorTMonitoringDataSoilMoisture soilMoisture = new CentermonitorTMonitoringDataSoilMoisture();
-            soilMoisture.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataSoilMoisture data = centermonitorTMonitoringDeviceService.getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus(soilMoisture);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else if(deviceType.equals("6")){//水压
-            CentermonitorTMonitoringDataWaterPressure waterPressure = new CentermonitorTMonitoringDataWaterPressure();
-            waterPressure.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataWaterPressure data = centermonitorTMonitoringDeviceService.getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus(waterPressure);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else if(deviceType.equals("1")){//水质
-            CentermonitorTMonitoringDataWaterQuality waterQuality = new CentermonitorTMonitoringDataWaterQuality();
-            waterQuality.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataWaterQuality data = centermonitorTMonitoringDeviceService.getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus(waterQuality);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else if(deviceType.equals("7")){//水流速
-            CentermonitorTMonitoringDataWaterVelocity waterVelocity =  new CentermonitorTMonitoringDataWaterVelocity();
-            waterVelocity.setDeviceCode(deviceCode);
-            CentermonitorTMonitoringDataWaterVelocity data = centermonitorTMonitoringDeviceService.getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus(waterVelocity);
-            if(data != null){
-                createTime = data.getCreateTime();
-            }else {
-                return true;
-            }
-        }else {
-            return true;
-        }
-        // 日期字符串转日期对象
-        Date currentTime = new Date();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Date date = null;
-        try {
-            date = sdf.parse(createTime);
-        } catch (ParseException e) {
-            e.printStackTrace();
-        }
-        long elapsedTime = currentTime.getTime() - date.getTime(); // 当前时间与最新一条数据时间差(毫秒)
-        return elapsedTime>=86400000L;
-//        return ((elapsedTime)/(1000*60*60))>=24;
-//        long hours = TimeUnit.MILLISECONDS.toHours(elapsedTime); //  当前时间与最新一条数据时间差(小时)
-//        return hours >= 24;
-//            return TimeUnit.MILLISECONDS.toHours(new Date().getTime() - new Date(createTime).getTime()) >= 24;
-    }
-}
-

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -18,7 +18,7 @@ spring:
       config:
         # 配置中心地址
         server-addr: www.sooka.onest.com:8848
-#        server-addr: 127.0.0.1:8848--
+#        server-addr: 127.0.0.1:8848
         # 配置文件格式
         file-extension: yml
         # 共享配置

+ 2 - 1
src/main/resources/mapper/monitor/LabelManagement/CentermonitorSetLabelServiceMapper.xml

@@ -20,6 +20,7 @@
         <result property="channelNum" column="channel_num"/>
         <result property="cameraUse" column="camera_use"/>
         <result property="cameraRadius" column="camera_radius"/>
+        <result property="cameraRegion" column="cameraRegion"/>
         <result property="cameraImg" column="camera_img"/>
         <result property="longitude" column="longitude"/>
         <result property="latitude" column="latitude"/>
@@ -171,6 +172,7 @@
             b.offline_reason,
             b.working_status,
             b.camera_radius,
+            b.camera_region,
             c.camera_img
         FROM
             centermonitor_t_label_mapping a
@@ -212,7 +214,6 @@
         a.img_url
         FROM
         centermonitor_t_label a
-        LEFT JOIN centermonitor_t_label_type b ON a.id = b.label_id
         WHERE 1 = 1
         <if test="level != null and level != ''">
             and a.level = #{level}

+ 1 - 0
src/main/resources/mapper/monitor/aidevicedept/CenterdataTAidevicedeptMapper.xml

@@ -137,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
     <delete id="deleteCenterdataTAidevicedeptByCameraIds" parameterType="String">
         delete from centermonitor_t_aidevicedept where device_id in
         <foreach item="id" collection="array" open="(" separator="," close=")">

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 743 - 802
src/main/resources/mapper/monitor/camera/CentermonitorTCameraMapper.xml


+ 0 - 4
src/main/resources/mapper/monitor/dahua/CenternonitorTDahuaOperateLogMapper.xml

@@ -199,10 +199,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </insert>
 
-    <select id="getLastCreateTime" resultType="java.util.Date">
-        select create_time from centernonitor_t_dahua_operate_log order by create_time desc limit 1
-    </select>
-
     <select id="selectDeviceNameList" resultType="com.sooka.sponest.monitor.dahua.vo.ChannelCodeVO">
         select
             ctc.camera_name as cameraName,

+ 74 - 453
src/main/resources/mapper/monitor/device/CentermonitorTMonitoringDeviceMapper.xml

@@ -554,12 +554,6 @@
         where device_number = #{deviceNumber} order by create_time desc limit 1
     </select>
 
-    <select id="selectCentermonitorTMonitoringDeviceByDeviceCode" parameterType="string"
-            resultMap="CentermonitorTMonitoringDeviceResult">
-        <include refid="selectCentermonitorTMonitoringDeviceVo"/>
-        where device_code = #{deviceCode}
-    </select>
-
     <insert id="insertCentermonitorTMonitoringDevice" parameterType="CentermonitorTMonitoringDevice"
             useGeneratedKeys="true" keyProperty="id">
         insert into centermonitor_t_monitoring_device
@@ -623,22 +617,6 @@
         where id = #{id}
     </update>
 
-    <update id="updateDeviceListToJudgeWorkingStatus" parameterType="CentermonitorTMonitoringDevice">
-        update centermonitor_t_monitoring_device
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="workingStatus != null">working_status = #{workingStatus},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="updateDeviceWorkingStatusByDeviceCode" parameterType="CentermonitorTMonitoringDevice">
-        update centermonitor_t_monitoring_device
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="workingStatus != null">working_status = #{workingStatus},</if>
-        </trim>
-        where device_code = #{deviceCode}
-    </update>
-
     <delete id="deleteCentermonitorTMonitoringDeviceById" parameterType="String">
         delete from centermonitor_t_monitoring_device where id = #{id}
     </delete>
@@ -678,66 +656,6 @@
         GROUP BY a.id
     </select>
 
-    <select id="getDevideCodeMapByTypes" resultType="java.util.HashMap">
-        select
-        device_code,
-        device_type
-        from centermonitor_t_monitoring_device
-        where device_type in
-        <foreach collection="array" open="(" separator="," close=")" index="index" item="item">
-            #{item}
-        </foreach>
-    </select>
-
-
-    <insert id="saveWaterMonitoringData" parameterType="CentermonitorTMonitoringDataWaterVelocity">
-        insert into centermonitor_t_monitoring_data_water_velocity
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="ST != null">`ST`,</if>
-            <if test="FUN != null">`FUN`,</if>
-            <if test="TT != null">`TT`,</if>
-            <if test="VER != null">`VER`,</if>
-            <if test="TM != null">`TM`,</if>
-            <if test="MARK != null">`MARK`,</if>
-            <if test="SERIAL != null">`SERIAL`,</if>
-            <if test="TYPE != null">`TYPE`,</if>
-            <if test="DTEMP != null">`DTEMP`,</if>
-            <if test="BAT != null">`BAT`,</if>
-            <if test="SIGNAL != null">`SIGNAL`,</if>
-            <if test="VT != null">`VT`,</if>
-            <if test="Q1 != null">`Q1`,</if>
-            <if test="Q2 != null">`Q2`,</if>
-            <if test="V1 != null">`V1`,</if>
-            <if test="Z1 != null">`Z1`,</if>
-            <if test="Z != null">`Z`,</if>
-            <if test="Q != null">`Q`,</if>
-            <if test="CQ1 != null">`CQ1`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="ST != null">#{ST},</if>
-            <if test="FUN != null">#{FUN},</if>
-            <if test="TT != null">#{TT},</if>
-            <if test="VER != null">#{VER},</if>
-            <if test="TM != null">#{TM},</if>
-            <if test="MARK != null">#{MARK},</if>
-            <if test="SERIAL != null">#{SERIAL},</if>
-            <if test="TYPE != null">#{TYPE},</if>
-            <if test="DTEMP != null">#{DTEMP},</if>
-            <if test="BAT != null">#{BAT},</if>
-            <if test="SIGNAL != null">#{SIGNAL},</if>
-            <if test="VT != null">#{VT},</if>
-            <if test="Q1 != null">#{Q1},</if>
-            <if test="Q2 != null">#{Q2},</if>
-            <if test="V1 != null">#{V1},</if>
-            <if test="Z1 != null">#{Z1},</if>
-            <if test="Z != null">#{Z},</if>
-            <if test="Q != null">#{Q},</if>
-            <if test="CQ1 != null">#{CQ1},</if>
-        </trim>
-    </insert>
-
     <insert id="insertCentermonitorTCameraType" parameterType="CentermonitorTCameraType">
         insert into centermonitor_t_type
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -766,50 +684,49 @@
         delete from centermonitor_t_aidevicedept where device_id = '${id}'
     </delete>
 
-    <delete id="deleteAtmosphereDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_atmosphere where device_code = '${deviceCode}'
+    <delete id="deleteAtmosphereThresholdByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_threshold_atmosphere where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteInsectPestsDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_insect_pests where device_number = '${deviceCode}'
+    <delete id="deleteSoilMoistureThresholdByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_threshold_soil_moisture where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteSoilMoistureDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_soil_moisture where device_code = '${deviceCode}'
+    <delete id="deleteWaterQualityThresholdByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_threshold_water_quality where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterPressureDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_water_pressure where IMEI = '${deviceCode}'
+    <delete id="deleteWaterVelocityThresholdByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_threshold_water_velocity where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterQualityDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_water_quality where device_code = '${deviceCode}'
+    <delete id="deleteWaterPressureThresholdByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_warn_water_pressure where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterVelocityDataByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_data_water_velocity where ST = '${deviceCode}'
+    <delete id="deleteAtmosphereDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_atmosphere where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteAtmosphereThresholdByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_threshold_atmosphere where device_code = '${deviceCode}'
+    <delete id="deleteSoilMoistureDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_soil_moisture where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteSoilMoistureThresholdByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_threshold_soil_moisture where device_code = '${deviceCode}'
+    <delete id="deleteWaterQualityDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_water_quality where device_code = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterQualityThresholdByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_threshold_water_quality where device_code = '${deviceCode}'
+    <delete id="deleteInsectPestsDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_insect_pests where device_number = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterVelocityThresholdByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_threshold_water_velocity where device_code = '${deviceCode}'
+    <delete id="deleteWaterPressureDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_water_pressure where IMEI = '${deviceCode}'
     </delete>
 
-    <delete id="deleteWaterPressureThresholdByCode" parameterType="String">
-        delete from centermonitor_t_monitoring_warn_water_pressure where device_code = '${deviceCode}'
+    <delete id="deleteWaterVelocityDataByCode" parameterType="String">
+        delete from centermonitor_t_monitoring_data_water_velocity where ST = '${deviceCode}'
     </delete>
-
     <select id="selectWaterVelocityMonitoringData" parameterType="CentermonitorTMonitoringDataWaterVelocity"
             resultMap="CentermonitorTMonitoringDataWaterVelocityResult">
         SELECT
@@ -1016,231 +933,6 @@
         ORDER BY d.create_time DESC
     </select>
 
-    <select id="selectInsectPestsNewDeviceData" parameterType="CentermonitorTMonitoringDataInsectPests"
-            resultMap="CentermonitorTMonitoringDataInsectPestsResult">
-       select new_time  from centermonitor_t_monitoring_data_insect_pests
-       where device_number = #{deviceNumber} order by new_time desc limit 1
-    </select>
-
-    <select id="selectSoilMoistureNewDeviceData" parameterType="CentermonitorTMonitoringDataSoilMoisture"
-            resultMap="CentermonitorTMonitoringDataSoilMoistureResult">
-       select create_time  from centermonitor_t_monitoring_data_soil_moisture
-       where device_code = #{deviceCode} order by create_time desc limit 1
-    </select>
-
-    <select id="selectAtmosphereNewDeviceData" parameterType="CentermonitorTMonitoringDataAtmosphere"
-            resultMap="CentermonitorTMonitoringDataAtmosphereResult">
-       select create_time  from centermonitor_t_monitoring_data_atmosphere
-       where device_code = #{deviceCode} order by create_time desc limit 1
-    </select>
-
-    <select id="selectWaterQualityNewDeviceData" parameterType="CentermonitorTMonitoringDataWaterQuality"
-            resultMap="CentermonitorTMonitoringDataWaterQualityResult">
-       select create_time  from centermonitor_t_monitoring_data_water_quality
-       where device_code = #{deviceCode} order by create_time desc limit 1
-    </select>
-
-
-    <insert id="saveDataSoilMoistureMonitoringData" parameterType="CentermonitorTMonitoringDataSoilMoisture">
-        insert into centermonitor_t_monitoring_data_soil_moisture
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="deviceCode != null">`device_code`,</if>
-            <if test="createTime != null">`create_time`,</if>
-            <if test="temperature != null">`temperature`,</if>
-            <if test="humidity != null">`humidity`,</if>
-            <if test="ph != null">`ph`,</if>
-            <if test="conductivity != null">`conductivity`,</if>
-            <if test="nitrogen != null">`nitrogen`,</if>
-            <if test="phosphorus != null">`phosphorus`,</if>
-            <if test="potassium != null">`potassium`,</if>
-            <if test="latitude != null">`latitude`,</if>
-            <if test="longitude != null">`longitude`,</if>
-            <if test="signalStrength != null">`signal_strength`,</if>
-            <if test="errorCode != null">`error_code`,</if>
-            <if test="version != null">`version`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="deviceCode != null">#{deviceCode},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="temperature != null">#{temperature},</if>
-            <if test="humidity != null">#{humidity},</if>
-            <if test="ph != null">#{ph},</if>
-            <if test="conductivity != null">#{conductivity},</if>
-            <if test="nitrogen != null">#{nitrogen},</if>
-            <if test="phosphorus != null">#{phosphorus},</if>
-            <if test="potassium != null">#{potassium},</if>
-            <if test="latitude != null">#{latitude},</if>
-            <if test="longitude != null">#{longitude},</if>
-            <if test="signalStrength != null">#{signalStrength},</if>
-            <if test="errorCode != null">#{errorCode},</if>
-            <if test="version != null">#{version},</if>
-        </trim>
-    </insert>
-
-    <insert id="saveDataAtmosphereMonitoringData" parameterType="CentermonitorTMonitoringDataAtmosphere">
-        insert into centermonitor_t_monitoring_data_atmosphere
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="deviceCode != null">`device_code`,</if>
-            <if test="createTime != null">`create_time`,</if>
-            <if test="fineParticle != null">`fine_particle`,</if>
-            <if test="suctionParticle != null">`suction_particle`,</if>
-            <if test="sulfurDioxide != null">`sulfur_dioxide`,</if>
-            <if test="nitrogenDioxide != null">`nitrogen_dioxide`,</if>
-            <if test="ozone != null">`ozone`,</if>
-            <if test="carbonMonoxide != null">`carbon_monoxide`,</if>
-            <if test="temperature != null">`temperature`,</if>
-            <if test="humidity != null">`humidity`,</if>
-            <if test="atmos != null">`atmos`,</if>
-            <if test="illuminance != null">`illuminance`,</if>
-            <if test="latitude != null">`latitude`,</if>
-            <if test="longitude != null">`longitude`,</if>
-            <if test="signalStrength != null">`signal_strength`,</if>
-            <if test="errorCode != null">`error_code`,</if>
-            <if test="version != null">`version`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="deviceCode != null">#{deviceCode},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="fineParticle != null">#{fineParticle},</if>
-            <if test="suctionParticle != null">#{suctionParticle},</if>
-            <if test="sulfurDioxide != null">#{sulfurDioxide},</if>
-            <if test="nitrogenDioxide != null">#{nitrogenDioxide},</if>
-            <if test="ozone != null">#{ozone},</if>
-            <if test="carbonMonoxide != null">#{carbonMonoxide},</if>
-            <if test="temperature != null">#{temperature},</if>
-            <if test="humidity != null">#{humidity},</if>
-            <if test="atmos != null">#{atmos},</if>
-            <if test="illuminance != null">#{illuminance},</if>
-            <if test="latitude != null">#{latitude},</if>
-            <if test="longitude != null">#{longitude},</if>
-            <if test="signalStrength != null">#{signalStrength},</if>
-            <if test="errorCode != null">#{errorCode},</if>
-            <if test="version != null">#{version},</if>
-        </trim>
-    </insert>
-
-    <insert id="saveDataWaterQualityMonitoringData" parameterType="CentermonitorTMonitoringDataWaterQuality">
-        insert into centermonitor_t_monitoring_data_water_quality
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="deviceCode != null">`device_code`,</if>
-            <if test="createTime != null">`create_time`,</if>
-            <if test="waterPh != null">`water_ph`,</if>
-            <if test="waterTemperature != null">`water_temperature`,</if>
-            <if test="waterQualitySuspension != null">`water_quality_suspension`,</if>
-            <if test="waterTemperatureTwo != null">`water_temperature_two`,</if>
-            <if test="conductivity != null">`conductivity`,</if>
-            <if test="ammoniaNitrogen != null">`ammonia_nitrogen`,</if>
-            <if test="cod != null">`cod`,</if>
-            <if test="latitude != null">`latitude`,</if>
-            <if test="longitude != null">`longitude`,</if>
-            <if test="signalStrength != null">`signal_strength`,</if>
-            <if test="errorCode != null">`error_code`,</if>
-            <if test="version != null">`version`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="deviceCode != null">#{deviceCode},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="waterPh != null">#{waterPh},</if>
-            <if test="waterTemperature != null">#{waterTemperature},</if>
-            <if test="waterQualitySuspension != null">#{waterQualitySuspension},</if>
-            <if test="waterTemperatureTwo != null">#{waterTemperatureTwo},</if>
-            <if test="conductivity != null">#{conductivity},</if>
-            <if test="ammoniaNitrogen != null">#{ammoniaNitrogen},</if>
-            <if test="cod != null">#{cod},</if>
-            <if test="latitude != null">#{latitude},</if>
-            <if test="longitude != null">#{longitude},</if>
-            <if test="signalStrength != null">#{signalStrength},</if>
-            <if test="errorCode != null">#{errorCode},</if>
-            <if test="version != null">#{version},</if>
-        </trim>
-    </insert>
-
-    <insert id="saveWaterPressureDeviceData" parameterType="CentermonitorTMonitoringDataWaterPressure">
-        insert into centermonitor_t_monitoring_data_water_pressure
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="IMEI != null">`IMEI`,</if>
-            <if test="createTime != null">`create_time`,</if>
-            <if test="thresholdLowEnable != null">`threshold_low_enable`,</if>
-            <if test="thresholdHighEnable != null">`threshold_high_enable`,</if>
-            <if test="signalPower != null">`signal_power`,</if>
-            <if test="hydraulicValue != null">`hydraulic_value`,</if>
-            <if test="hydraulicThresholdMin != null">`hydraulic_threshold_min`,</if>
-            <if test="hydraulicThresholdMax != null">`hydraulic_threshold_max`,</if>
-            <if test="heartbeatTime != null">`heartbeat_time`,</if>
-            <if test="batteryVoltage != null">`battery_voltage`,</if>
-            <if test="batteryValue != null">`battery_value`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="IMEI != null">#{IMEI},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="thresholdLowEnable != null">#{thresholdLowEnable},</if>
-            <if test="thresholdHighEnable != null">#{thresholdHighEnable},</if>
-            <if test="signalPower != null">#{signalPower},</if>
-            <if test="hydraulicValue != null">#{hydraulicValue},</if>
-            <if test="hydraulicThresholdMin != null">#{hydraulicThresholdMin},</if>
-            <if test="hydraulicThresholdMax != null">#{hydraulicThresholdMax},</if>
-            <if test="heartbeatTime != null">#{heartbeatTime},</if>
-            <if test="batteryVoltage != null">#{batteryVoltage},</if>
-            <if test="batteryValue != null">#{batteryValue},</if>
-        </trim>
-    </insert>
-
-    <insert id="saveInsectPestsDeviceData" parameterType="CentermonitorTMonitoringDataInsectPests">
-        insert into centermonitor_t_monitoring_data_insect_pests
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">`id`,</if>
-            <if test="deviceCode != null">`device_code`,</if>
-            <if test="createTime != null">`create_time`,</if>
-            <if test="downloadUrl != null">`download_url`,</if>
-            <if test="downloadUrlCompress != null">`download_url_compress`,</if>
-            <if test="taggingImgUrl != null">`tagging_img_url`,</if>
-            <if test="taggingImgUrlCompress != null">`tagging_img_url_compress`,</if>
-            <if test="deviceNumber != null">`device_number`,</if>
-            <if test="newTime != null">`new_time`,</if>
-            <if test="results != null">`results`,</if>
-            <if test="newCount != null">`new_count`,</if>
-            <if test="typeCount != null">`type_count`,</if>
-            <if test="oldCount != null">`old_count`,</if>
-            <if test="oldTime != ''">`old_time`,</if>
-            <if test="oldResults != null">`old_results`,</if>
-            <if test="oldTypeCount != null">`old_type_count`,</if>
-            <if test="oldDownloadUrl != null">`old_download_url`,</if>
-            <if test="oldTaggingImgUrl != null">`old_tagging_img_url`,</if>
-            <if test="oldDownloadUrlCompress != null">`old_download_url_compress`,</if>
-            <if test="oldTaggingImgUrlCompress != null">`old_tagging_img_url_compress`,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="deviceCode != null">#{deviceCode},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="downloadUrl != null">#{downloadUrl},</if>
-            <if test="downloadUrlCompress != null">#{downloadUrlCompress},</if>
-            <if test="taggingImgUrl != null">#{taggingImgUrl},</if>
-            <if test="taggingImgUrlCompress != null">#{taggingImgUrlCompress},</if>
-            <if test="deviceNumber != null">#{deviceNumber},</if>
-            <if test="newTime != null">#{newTime},</if>
-            <if test="results != null">#{results},</if>
-            <if test="newCount != null">#{newCount},</if>
-            <if test="typeCount != null">#{typeCount},</if>
-            <if test="oldCount != null">#{oldCount},</if>
-            <if test="oldTime != ''">#{oldTime},</if>
-            <if test="oldResults != null">#{oldResults},</if>
-            <if test="oldTypeCount != null">#{oldTypeCount},</if>
-            <if test="oldDownloadUrl != null">#{oldDownloadUrl},</if>
-            <if test="oldTaggingImgUrl != null">#{oldTaggingImgUrl},</if>
-            <if test="oldDownloadUrlCompress != null">#{oldDownloadUrlCompress},</if>
-            <if test="oldTaggingImgUrlCompress != null">#{oldTaggingImgUrlCompress},</if>
-        </trim>
-    </insert>
-
     <select id="selectAtmosphereAVGData" parameterType="String"
             resultMap="CentermonitorTMonitoringDataAtmosphereResult">
         SELECT
@@ -1534,75 +1226,6 @@
         limit 1
     </select>
 
-    <select id="getDeviceListToJudgeWorkingStatus" resultMap="CentermonitorTMonitoringDeviceResult">
-        <include refid="selectCentermonitorTMonitoringDeviceVo"/>
-        <where>
-            <if test="deviceType != 8 ">and device_type = #{deviceType}</if>
-        </where>
-
-    </select>
-
-    <select id="getDeviceData_1_Atmosphere_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataAtmosphere">
-       SELECT
-	create_time AS createTime
-        FROM
-	centermonitor_t_monitoring_data_atmosphere
-        WHERE
-	device_code = #{deviceCode}
-	order by createTime desc limit 1
-    </select>
-
-    <select id="getDeviceData_2_Insect_pests_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataInsectPests">
-       SELECT
-	create_time AS createTime
-        FROM
-	centermonitor_t_monitoring_data_insect_pests
-        where device_number = #{deviceCode}
-        ORDER BY
-	createTime DESC
-	LIMIT 1
-    </select>
-
-    <select id="getDeviceData_3_SoilMoisture_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataSoilMoisture">
-      SELECT
-	create_time AS createTime
-        FROM
-	centermonitor_t_monitoring_data_soil_moisture
-        WHERE
-	device_code = #{deviceCode}
-	order by createTime desc limit 1
-    </select>
-
-    <select id="getDeviceData_4_WaterPressure_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataWaterPressure">
-       SELECT
-	create_time AS createTime
-        FROM
-	centermonitor_t_monitoring_data_water_pressure
-        WHERE
-	IMEI = #{deviceCode}
-	order by createTime desc limit 1
-    </select>
-
-    <select id="getDeviceData_5_WaterQuality_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataWaterQuality">
-       select create_time as createTime
-       from centermonitor_t_monitoring_data_water_quality
-       where device_code = #{deviceCode}
-       order by createTime desc limit 1
-    </select>
-
-    <select id="getDeviceData_6_WaterVelocity_ListToJudgeWorkingStatus"
-            resultType="CentermonitorTMonitoringDataWaterVelocity">
-        select TT as createTime
-        from centermonitor_t_monitoring_data_water_velocity
-        where ST = #{deviceCode}
-        order by createTime desc limit 1
-    </select>
-
     <select id="selectDeviceListByDeptIdAndWorkingStatus" parameterType="CentermonitorTMonitoringDevice"
             resultMap="CentermonitorTMonitoringDeviceResult">
         SELECT
@@ -1624,7 +1247,6 @@
         WHERE
             working_status = #{workingStatus}
     </select>
-
     <resultMap id="selectIoTEquipmentStatistics" type="DeviceIoTEquipmentStatisticsResult">
         <result property="deviceType" column="deviceType"></result>
         <result property="count" column="count"></result>
@@ -1815,7 +1437,7 @@
     </resultMap>
     <select id="getIoTEquipmentDetails" resultMap="selectIoTEquipmentDetails">
         select device_name,device_code,address from centermonitor_t_monitoring_device ctmd
-        LEFT JOIN ${database_system}.sys_dept d ON ctmd.dept_id = d.dept_id
+                                                        LEFT JOIN ${database_system}.sys_dept d ON ctmd.dept_id = d.dept_id
         where (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0) and device_type = #{deviceType} and device_code = #{deviceCode}
     </select>
     <!--水质监测-->
@@ -1867,22 +1489,22 @@
     </resultMap>
     <select id="getIoTSoil" resultMap="selectCentermonitorTMonitoringDataSoilIoTResult">
         SELECT
-        s.id,
-        s.temperature,
-        s.humidity,
-        s.ph,
-        s.conductivity,
-        s.nitrogen,
-        s.phosphorus,
-        s.potassium,
-        s.create_time
+            s.id,
+            s.temperature,
+            s.humidity,
+            s.ph,
+            s.conductivity,
+            s.nitrogen,
+            s.phosphorus,
+            s.potassium,
+            s.create_time
         FROM
-        centermonitor_t_monitoring_data_soil_moisture s
+            centermonitor_t_monitoring_data_soil_moisture s
         WHERE
-        s.device_code = #{deviceCode}
-        and date_format(s.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
+            s.device_code = #{deviceCode}
+          and date_format(s.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
         ORDER BY s.create_time DESC
-        limit 1
+            limit 1
     </select>
     <!--病虫害监测-->
     <resultMap type="CentermonitorTMonitoringDataInsectPestsIoTResult" id="selectCentermonitorTMonitoringDataInsectPestsIoTResult">
@@ -1892,16 +1514,16 @@
     </resultMap>
     <select id="getIoTInsectPests" resultMap="selectCentermonitorTMonitoringDataInsectPestsIoTResult">
         SELECT
-        i.id,
-        i.new_count,
-        i.create_time
+            i.id,
+            i.new_count,
+            i.create_time
         FROM
-        centermonitor_t_monitoring_data_insect_pests i
+            centermonitor_t_monitoring_data_insect_pests i
         WHERE
-        i.device_number = #{deviceCode}
-        and date_format(i.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
+            i.device_number = #{deviceCode}
+          and date_format(i.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
         ORDER BY i.create_time DESC
-        limit 1
+            limit 1
     </select>
     <!--大气监测-->
     <resultMap type="CentermonitorTMonitoringDataAtmosphereIoTResult" id="selectCentermonitorTMonitoringDataAtmosphereIoTResult">
@@ -1915,21 +1537,21 @@
     </resultMap>
     <select id="getIoTAtmosphere" resultMap="selectCentermonitorTMonitoringDataAtmosphereIoTResult">
         SELECT
-        a.id,
-        a.sulfur_dioxide,
-        a.nitrogen_dioxide,
-        a.fine_particle,
-        a.temperature,
-        a.humidity,
-        a.carbon_monoxide,
-        a.create_time
+            a.id,
+            a.sulfur_dioxide,
+            a.nitrogen_dioxide,
+            a.fine_particle,
+            a.temperature,
+            a.humidity,
+            a.carbon_monoxide,
+            a.create_time
         FROM
-        centermonitor_t_monitoring_data_atmosphere a
+            centermonitor_t_monitoring_data_atmosphere a
         WHERE
-        a.device_code = #{deviceCode}
-        and date_format(a.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
+            a.device_code = #{deviceCode}
+          and date_format(a.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
         ORDER BY a.create_time DESC
-        limit 1
+            limit 1
     </select>
     <!--水压监测-->
     <resultMap type="CentermonitorTMonitoringDataWaterPressureIoTResult" id="selectCentermonitorTMonitoringDataWaterPressureIoTResult">
@@ -1940,18 +1562,18 @@
     </resultMap>
     <select id="getIoTWaterPressure" resultMap="selectCentermonitorTMonitoringDataWaterPressureIoTResult">
         SELECT
-        a.id,
-        a.create_time,
-        CONVERT(a.hydraulic_value, DECIMAL(10,2)) hydraulic_value,
-        a.hydraulic_threshold_min,
-        a.hydraulic_threshold_max
+            a.id,
+            a.create_time,
+            CONVERT(a.hydraulic_value, DECIMAL(10,2)) hydraulic_value,
+            a.hydraulic_threshold_min,
+            a.hydraulic_threshold_max
         FROM
-        centermonitor_t_monitoring_data_water_pressure a
+            centermonitor_t_monitoring_data_water_pressure a
         WHERE
-        a.IMEI = #{deviceCode}
-        and date_format(a.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
+            a.IMEI = #{deviceCode}
+          and date_format(a.create_time,'%y%m%d') = date_format(#{date},'%y%m%d')
         ORDER BY a.create_time DESC
-        limit 1
+            limit 1
     </select>
     <!--水流速-->
     <resultMap type="CentermonitorTMonitoringDataWaterVelocityIoTResult" id="selectCentermonitorTMonitoringDataWaterVelocityIoTResult">
@@ -1963,21 +1585,20 @@
     </resultMap>
     <select id="getIoTWaterVelocity" resultMap="selectCentermonitorTMonitoringDataWaterVelocityIoTResult">
         SELECT
-        w.id,
-        w.TT as createTime,
-        CONVERT(w.Q, DECIMAL(10,2)) Q,
-        CONVERT(w.V1, DECIMAL(10,2)) V1,
-        CONVERT(w.Z, DECIMAL(10,2)) Z,
-        CONVERT(w.Z1, DECIMAL(10,2)) Z1
+            w.id,
+            w.TT as createTime,
+            CONVERT(w.Q, DECIMAL(10,2)) Q,
+            CONVERT(w.V1, DECIMAL(10,2)) V1,
+            CONVERT(w.Z, DECIMAL(10,2)) Z,
+            CONVERT(w.Z1, DECIMAL(10,2)) Z1
         FROM
-        centermonitor_t_monitoring_data_water_velocity w
+            centermonitor_t_monitoring_data_water_velocity w
         WHERE
-        w.ST = #{deviceCode}
-        and date_format(w.TT,'%y%m%d') = date_format(#{date},'%y%m%d')
+            w.ST = #{deviceCode}
+          and date_format(w.TT,'%y%m%d') = date_format(#{date},'%y%m%d')
         ORDER BY w.TT DESC
-        limit 1
+            limit 1
     </select>
-
     <insert id="insertCentermonitorTDeviceImg" parameterType="List">
         insert into centermonitor_t_monitoring_device_img
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 0 - 10
src/main/resources/mapper/monitor/meiqiguan/gps/GasTankDevicesMapper.xml

@@ -306,16 +306,6 @@
         </foreach>
     </delete>
 
-    <insert id="insertBatch" parameterType="int">
-        INSERT INTO centernonitor_t_gas_tank_devices (id, deviceid, devicename, devicetype, simnum, overduetime, expirnotifytime,
-        remark, creater, videochannelcount, lastactivetime, isfree, allowedit, icon, stared, loginname) VALUES
-        <foreach collection="list" item="item" separator="," index="index">
-            (#{item.id},#{item.deviceid},#{item.devicename},#{item.devicetype},#{item.simnum},#{item.overduetime},#{item.expirnotifytime},#{item.remark},
-            #{item.creater},#{item.videochannelcount},#{item.lastactivetime},#{item.isfree},#{item.allowedit},#{item.icon},#{item.stared},#{item.loginname})
-        </foreach>
-    </insert>
-
-
     <select id="selectGasTankDevicesListAll" parameterType="GasTankDevicesVo" resultMap="GasTankDevicesVoResult">
         -- 获取当天所有数据,对于 create_time 相同的记录只保留最新一条
         SELECT

+ 0 - 23
src/main/resources/mapper/monitor/meiqiguan/gps/GasTankHistoricalTrajectoryMapper.xml

@@ -672,29 +672,6 @@
             #{id}
         </foreach>
     </delete>
-    <insert id="insertBatch" parameterType="int">
-        insert into centernonitor_t_gas_tank_historical_trajectory (deviceid,updatetime, status, speed, callat, callon, altitude, course,
-        totaldistance, totalad, totalnotrunningad, ad0, ad1, ad2, ad3,
-        srcad0, srcad1, srcad2, srcad3, track_count, starttime, endtime,
-        trackid, arrivedtime, radius, recorderspeed, strstatus, strstatusen,
-        gotsrc, rxlevel, reportmode, gpsvalidnum, weight, reissue, address,
-        voltage, temp1, temp2, temp3, temp4, humi1, humi2, oilrate,
-        startdistance, enddistance, indistance, outdistance, durationidle,
-        region, stralarm, stralarmen, messagetype,create_time)
-        values
-        <foreach collection="list" item="item" separator=",">
-            (#{deviceid},#{item.updatetime}, #{item.status}, #{item.speed}, #{item.callat}, #{item.callon}, #{item.altitude},
-            #{item.course}, #{item.totaldistance}, #{item.totalad}, #{item.totalnotrunningad}, #{item.ad0},
-            #{item.ad1}, #{item.ad2}, #{item.ad3}, #{item.srcad0}, #{item.srcad1}, #{item.srcad2}, #{item.srcad3},
-            #{item.trackCount}, #{item.starttime}, #{item.endtime}, #{item.trackid}, #{item.arrivedtime},
-            #{item.radius},
-            #{item.recorderspeed}, #{item.strstatus}, #{item.strstatusen}, #{item.gotsrc}, #{item.rxlevel},
-            #{item.reportmode}, #{item.gpsvalidnum}, #{item.weight}, #{item.reissue}, #{item.address}, #{item.voltage},
-            #{item.temp1}, #{item.temp2}, #{item.temp3}, #{item.temp4}, #{item.humi1}, #{item.humi2}, #{item.oilrate},
-            #{item.startdistance}, #{item.enddistance}, #{item.indistance}, #{item.outdistance}, #{item.durationidle},
-            #{item.region}, #{item.stralarm}, #{item.stralarmen}, #{item.messagetype},now())
-        </foreach>
-    </insert>
 
     <select id="selectGasTankHistoricalTrajectoryListByDeviceid" parameterType="GasTankHistoricalTrajectory"
             resultMap="GasTankHistoricalTrajectoryResult">

+ 0 - 12
src/main/resources/mapper/monitor/meiqiguan/gps/GasTankTravelMileageMapper.xml

@@ -47,18 +47,6 @@
         from centernonitor_t_gas_tank_travel_mileage
     </sql>
 
-
-    <insert id="insertBatch" parameterType="int">
-        INSERT INTO centernonitor_t_gas_tank_travel_mileage(deviceid, maxspeed, tripdistance, triptime, starttime,
-        endtime, parktime, averagespeed, slat, slon, elat, elon,
-        trackstarttime, trackendtime, fuelreport, addressmap,create_time) values
-        <foreach collection="list" item="item" separator=",">
-            (#{deviceid}, #{item.maxspeed}, #{item.tripdistance}, #{item.triptime}, #{item.starttime},
-            #{item.endtime}, #{item.parktime}, #{item.averagespeed}, #{item.slat}, #{item.slon}, #{item.elat}, #{item.elon},
-            #{item.trackstarttime}, #{item.trackendtime}, #{item.fuelreport}, #{item.addressmap},now())
-        </foreach>
-    </insert>
-
     <select id="selectGasTankTravelMileageListByDeviceid" parameterType="GasTankTravelMileage"
             resultMap="GasTankTravelMileageResult">
         <include refid="selectGasTankTravelMileageVo"/>