Kaynağa Gözat

同步代码

bihuisong 2 ay önce
ebeveyn
işleme
f7785bd3ba
93 değiştirilmiş dosya ile 3599 ekleme ve 4551 silme
  1. BIN
      monitor_ui/public/favicon.ico
  2. 0 44
      monitor_ui/src/api/uav/uav.js
  3. 0 44
      monitor_ui/src/api/uav/uavdept/uavdept.js
  4. BIN
      monitor_ui/src/assets/logo/logo.png
  5. 2 2
      monitor_ui/src/views/centerMonitor/camera/index.vue
  6. 1 4
      monitor_ui/src/views/centerMonitor/device/index.vue
  7. 0 396
      monitor_ui/src/views/uav/index.vue
  8. 0 272
      monitor_ui/src/views/uav/uavdept/monitoruavdept.vue
  9. 0 42
      sql/centernonitor_t_gas_tank_devices.sql
  10. 0 81
      sql/centernonitor_t_gas_tank_historical_trajectory.sql
  11. 0 45
      sql/centernonitor_t_gas_tank_travel_mileage.sql
  12. 868 0
      sql/onest_monitor.sql
  13. 2 0
      src/main/java/com/sooka/sponest/monitor/LabelManagement/domain/CentermonitorSetLabel.java
  14. 16 0
      src/main/java/com/sooka/sponest/monitor/aidevicedept/domain/CenterdataTAidevicedeptDTO.java
  15. 4 0
      src/main/java/com/sooka/sponest/monitor/aidevicedept/mapper/CenterdataTAidevicedeptMapper.java
  16. 92 71
      src/main/java/com/sooka/sponest/monitor/camera/controller/CentermonitorTCameraController.java
  17. 3 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCamera.java
  18. 31 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraCallLog.java
  19. 12 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraCallLogStatisticsDTO.java
  20. 11 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraVideoStatisticsDTO.java
  21. 27 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraVideoStatisticsVO.java
  22. 12 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/GiveAnAlarmResultDTO.java
  23. 7 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudCameraBO.java
  24. 1 0
      src/main/java/com/sooka/sponest/monitor/camera/domain/VisuForestCloudMapVO.java
  25. 27 0
      src/main/java/com/sooka/sponest/monitor/camera/mapper/CentermonitorTCameraCallLogMapper.java
  26. 34 23
      src/main/java/com/sooka/sponest/monitor/camera/mapper/CentermonitorTCameraMapper.java
  27. 0 119
      src/main/java/com/sooka/sponest/monitor/camera/quartz/IndexLineChartCountTask.java
  28. 50 0
      src/main/java/com/sooka/sponest/monitor/camera/service/ICentermonitorTCameraService.java
  29. 429 4
      src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCameraServiceImpl.java
  30. 0 277
      src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogBlackTask.java
  31. 0 154
      src/main/java/com/sooka/sponest/monitor/dahua/quartz/EquipmentStatusTask.java
  32. 1 3
      src/main/java/com/sooka/sponest/monitor/dahua/service/impl/CenternonitorTDahuaOperateLogServiceImpl.java
  33. 1 1
      src/main/java/com/sooka/sponest/monitor/dahua/service/impl/DahuaServiceImpl.java
  34. 105 181
      src/main/java/com/sooka/sponest/monitor/device/controller/CentermonitorTMonitoringDeviceController.java
  35. 52 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CenterMonitorIoTEquipmentDetailsVO.java
  36. 33 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataAtmosphereIoTResult.java
  37. 18 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataInsectPestsIoTResult.java
  38. 36 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataSoilMoistureIoTResult.java
  39. 30 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterPressureIoTResult.java
  40. 32 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterQualityIoTResult.java
  41. 33 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterVelocityIoTResult.java
  42. 7 0
      src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDevice.java
  43. 17 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceEquipmentFaultStatistics.java
  44. 15 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceEquipmentFaultStatisticsVO.java
  45. 14 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceIoTEquipmentStatisticsResult.java
  46. 14 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceIoTEquipmentStatisticsVO.java
  47. 19 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceOfflineSensorStatisticsVO.java
  48. 26 0
      src/main/java/com/sooka/sponest/monitor/device/domain/DeviceOnLineSensorStatisticsVO.java
  49. 35 91
      src/main/java/com/sooka/sponest/monitor/device/mapper/CentermonitorTMonitoringDeviceMapper.java
  50. 33 74
      src/main/java/com/sooka/sponest/monitor/device/service/ICentermonitorTMonitoringDeviceService.java
  51. 765 545
      src/main/java/com/sooka/sponest/monitor/device/service/impl/CentermonitorTMonitoringDeviceServiceImpl.java
  52. 7 10
      src/main/java/com/sooka/sponest/monitor/haikang/service/impl/HaiKangServiceImpl.java
  53. 0 8
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankDevicesController.java
  54. 2 12
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankHistoricalTrajectoryController.java
  55. 0 36
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/controller/GasTankTravelMileageController.java
  56. 0 3
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankDevicesMapper.java
  57. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankHistoricalTrajectoryMapper.java
  58. 0 4
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/mapper/GasTankTravelMileageMapper.java
  59. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankDevicesService.java
  60. 0 2
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankHistoricalTrajectoryService.java
  61. 0 17
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/IGasTankTravelMileageService.java
  62. 0 15
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankDevicesServiceImpl.java
  63. 0 13
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankHistoricalTrajectoryServiceImpl.java
  64. 0 95
      src/main/java/com/sooka/sponest/monitor/meiqiguan/gps/service/impl/GasTankTravelMileageServiceImpl.java
  65. 0 6
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/data/RemoteDataBaseServiceFallbackFactory.java
  66. 3 1
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/event/RemoteEventBaseServiceFallbackFactory.java
  67. 0 34
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/lawenforcement/RemoteLawenforcementBaseServiceFallbackFactory.java
  68. 12 0
      src/main/java/com/sooka/sponest/monitor/remoteapi/fallback/center/system/RemoteSystemBaseServiceFallbackFactory.java
  69. 0 4
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/data/RemoteDataBaseService.java
  70. 3 2
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/event/RemoteEventBaseService.java
  71. 0 24
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/lawenforcement/RemoteLawenforcementBaseService.java
  72. 8 1
      src/main/java/com/sooka/sponest/monitor/remoteapi/service/center/system/RemoteService.java
  73. 0 181
      src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavController.java
  74. 0 85
      src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavdeptController.java
  75. 0 186
      src/main/java/com/sooka/sponest/monitor/uav/domain/CentermonitorTUav.java
  76. 0 48
      src/main/java/com/sooka/sponest/monitor/uav/domain/CentermonitorTUavdept.java
  77. 0 71
      src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavMapper.java
  78. 0 63
      src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavdeptMapper.java
  79. 0 67
      src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavService.java
  80. 0 61
      src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavdeptService.java
  81. 0 100
      src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavServiceImpl.java
  82. 0 91
      src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavdeptServiceImpl.java
  83. 0 137
      src/main/java/com/sooka/sponest/monitor/util/ScheduledTasks.java
  84. 2 0
      src/main/resources/mapper/monitor/LabelManagement/CentermonitorSetLabelServiceMapper.xml
  85. 13 0
      src/main/resources/mapper/monitor/aidevicedept/CenterdataTAidevicedeptMapper.xml
  86. 51 0
      src/main/resources/mapper/monitor/camera/CentermonitorTCameraCallLogMapper.xml
  87. 210 40
      src/main/resources/mapper/monitor/camera/CentermonitorTCameraMapper.xml
  88. 373 399
      src/main/resources/mapper/monitor/device/CentermonitorTMonitoringDeviceMapper.xml
  89. 0 10
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankDevicesMapper.xml
  90. 0 23
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankHistoricalTrajectoryMapper.xml
  91. 0 12
      src/main/resources/mapper/monitor/meiqiguan/gps/GasTankTravelMileageMapper.xml
  92. 0 127
      src/main/resources/mapper/monitor/uav/CentermonitorTUavMapper.xml
  93. 0 86
      src/main/resources/mapper/monitor/uav/CentermonitorTUavdeptMapper.xml

BIN
monitor_ui/public/favicon.ico


+ 0 - 44
monitor_ui/src/api/uav/uav.js

@@ -1,44 +0,0 @@
-import request from '@/utils/request'
-
-// 查询无人机列表
-export function listUav(query) {
-  return request({
-    url: '/center-monitor/uav/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询无人机详细
-export function getUav(id) {
-  return request({
-    url: '/center-monitor/uav/' + id,
-    method: 'get'
-  })
-}
-
-// 新增无人机
-export function addUav(data) {
-  return request({
-    url: '/center-monitor/uav',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改无人机
-export function updateUav(data) {
-  return request({
-    url: '/center-monitor/uav',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除无人机
-export function delUav(id) {
-  return request({
-    url: '/center-monitor/uav/' + id,
-    method: 'delete'
-  })
-}

+ 0 - 44
monitor_ui/src/api/uav/uavdept/uavdept.js

@@ -1,44 +0,0 @@
-import request from '@/utils/request'
-
-// 查询无人机部门关联列表
-export function listUavdept(query) {
-  return request({
-    url: '/center-monitor/uavdept/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询无人机部门关联详细
-export function getUavdept(id) {
-  return request({
-    url: '/center-monitor/uavdept/' + id,
-    method: 'get'
-  })
-}
-
-// 新增无人机部门关联
-export function addUavdept(data) {
-  return request({
-    url: '/center-monitor/uavdept',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改无人机部门关联
-export function updateUavdept(data) {
-  return request({
-    url: '/center-monitor/uavdept',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除无人机部门关联
-export function delUavdept(id) {
-  return request({
-    url: '/center-monitor/uavdept/' + id,
-    method: 'delete'
-  })
-}

BIN
monitor_ui/src/assets/logo/logo.png


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

@@ -642,7 +642,7 @@ export default {
       return date.getTime() > new Date().getTime() - 24 * 60 * 60 * 1000
     }
     return {
-      pageName: '四平态势感知平台',
+      pageName: '态势感知平台',
       pickerOptions: {
         disabledDate,
         // selectableRange 用来限制时分秒的选择,这里要求只能选择当前时间之后到0点的时间点 但应该只限今天
@@ -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' }
-        ],
       }
     }
   },

+ 0 - 396
monitor_ui/src/views/uav/index.vue

@@ -1,396 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px">
-      <el-form-item label="基站名称" prop="baseStationName">
-        <el-input
-          v-model="queryParams.baseStationName"
-          placeholder="请输入基站名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="无人机名称" prop="uavName">
-        <el-input
-          v-model="queryParams.uavName"
-          placeholder="请输入无人机名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-        >新增
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-        >修改
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-        >删除
-        </el-button>
-      </el-col>
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="warning"-->
-      <!--          plain-->
-      <!--          icon="el-icon-download"-->
-      <!--          size="mini"-->
-      <!--          @click="handleExport"-->
-      <!--        >导出-->
-      <!--        </el-button>-->
-      <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="uavList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="序号" align="center" type="index"/>
-      <el-table-column label="基站名称" align="center" prop="baseStationName"/>
-      <el-table-column label="机库ID" align="center" prop="baseStationId"/>
-      <el-table-column label="机库SN" align="center" prop="baseStationSn"/>
-      <el-table-column label="经度" align="center" prop="longitude"/>
-      <el-table-column label="纬度" align="center" prop="latitude"/>
-      <el-table-column label="海拔高度" align="center" prop="height"/>
-      <el-table-column label="无人机名称" align="center" prop="uavName"/>
-      <el-table-column label="无人机ID" align="center" prop="uavId"/>
-      <el-table-column label="无人机SN" align="center" prop="uavSn"/>
-      <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-          >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-          >删除
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-s-management"
-            @click="handleUavDept(scope.row)"
-          >部门管理
-          </el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改无人机对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
-      <el-form ref="form" :inline="true" :model="form" :rules="rules" label-width="140px">
-        <el-form-item label="基站名称" prop="baseStationName">
-          <el-input v-model="form.baseStationName" placeholder="请输入基站名称"/>
-        </el-form-item>
-        <el-form-item label="机库ID" prop="baseStationId">
-          <el-input v-model="form.baseStationId" placeholder="请输入机库ID"/>
-        </el-form-item>
-        <el-form-item label="机库SN" prop="baseStationSn">
-          <el-input v-model="form.baseStationSn" placeholder="请输入机库SN"/>
-        </el-form-item>
-        <el-form-item label="经度" prop="longitude">
-          <el-input v-model="form.longitude" placeholder="请输入经度"/>
-        </el-form-item>
-        <el-form-item label="纬度" prop="latitude">
-          <el-input v-model="form.latitude" placeholder="请输入纬度"/>
-        </el-form-item>
-        <el-form-item label="海拔高度" prop="height">
-          <el-input v-model="form.height" placeholder="请输入海拔高度"/>
-        </el-form-item>
-        <el-form-item label="无人机名称" prop="uavName">
-          <el-input v-model="form.uavName" placeholder="请输入无人机名称"/>
-        </el-form-item>
-        <el-form-item label="无人机ID" prop="uavId">
-          <el-input v-model="form.uavId" placeholder="请输入无人机ID"/>
-        </el-form-item>
-        <el-form-item label="无人机SN" prop="uavSn">
-          <el-input v-model="form.uavSn" placeholder="请输入无人机SN"/>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 部门管理弹框 -->
-    <el-dialog title="部门管理列表" :visible.sync="showUavDept" @close="closeDialog">
-      <monitoruavdept v-if="showUavDept" ref="monitorDept" :uavId="uavIdValue" :uavName="uavNameValue"
-                      style="width: 100%;height: 100%;"
-      ></monitoruavdept>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import {listUav, getUav, delUav, addUav, updateUav} from "@/api/uav/uav";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import {treeselect} from "@/api/system/dept";
-import {checkLat, checkLon, checkPositiveDecimal} from '@/api/system/rules'
-import monitoruavdept from "@/views/uav/uavdept/monitoruavdept.vue";
-
-export default {
-  name: "Uav",
-  components: {monitoruavdept, Treeselect},
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 无人机表格数据
-      uavList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        baseStationName: null,
-        baseStationId: null,
-        baseStationSn: null,
-        longitude: null,
-        latitude: null,
-        height: null,
-        uavName: null,
-        uavId: null,
-        uavSn: null,
-        deptId: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        baseStationName: [
-          {required: true, message: "基站名称不能为空", trigger: "blur"},
-        ],
-        baseStationId: [
-          {required: true, message: "机库ID不能为空", trigger: "blur"},
-        ],
-        baseStationSn: [
-          {required: true, message: "机库SN不能为空", trigger: "blur"},
-        ],
-        uavName: [
-          {required: true, message: "无人机名称不能为空", trigger: "blur"},
-        ],
-        uavId: [
-          {required: true, message: "无人机ID不能为空", trigger: "blur"},
-        ],
-        uavSn: [
-          {required: true, message: "无人机SN不能为空", trigger: "change"},
-        ],
-        longitude: [
-          {required: true, message: "经度不能为空", trigger: "change"},
-          {validator: checkLon, trigger: 'blur'}
-        ],
-        latitude: [
-          {required: true, message: "纬度不能为空", trigger: "change"},
-          {validator: checkLat, trigger: 'blur'}
-        ],
-        height: [
-          {required: true, message: '海拔高度不能为空', trigger: 'blur'},
-          {validator: checkPositiveDecimal, trigger: 'blur'}
-        ],
-      },
-      // 表格树数据
-      deptList: [],
-      // 部门树选项
-      deptOptions: [],
-      // 过滤掉已禁用部门树选项
-      enabledDeptOptions: undefined,
-      showUavDept: false,
-      uavIdValue: null,
-      uavNameValue: null,
-    };
-  },
-  created() {
-    this.getList();
-    this.getDeptTree()
-  },
-  methods: {
-    handleUavDept(row) {
-      const id = row.id
-      const uavName = row.uavName
-      this.uavIdValue = id
-      this.uavNameValue = uavName
-      this.showUavDept = true
-      this.getDeptTree()
-    },
-    closeDialog() {
-      this.showUavDept = false
-    },
-    /** 查询无人机列表 */
-    getList() {
-      this.loading = true;
-      listUav(this.queryParams).then(response => {
-        this.uavList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 查询部门下拉树结构 */
-    getDeptTree() {
-      treeselect().then(response => {
-        this.deptOptions = response.data;
-        this.enabledDeptOptions = this.filterDisabledDept(JSON.parse(JSON.stringify(response.data)));
-      });
-    },
-    // 过滤禁用的部门
-    filterDisabledDept(deptList) {
-      return deptList.filter(dept => {
-        if (dept.disabled) {
-          return false;
-        }
-        if (dept.children && dept.children.length) {
-          dept.children = this.filterDisabledDept(dept.children);
-        }
-        return true;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        baseStationName: null,
-        baseStationId: null,
-        baseStationSn: null,
-        longitude: null,
-        latitude: null,
-        height: null,
-        uavName: null,
-        uavId: null,
-        uavSn: null,
-        deptId: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加无人机";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getUav(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改无人机";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateUav(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addUav(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除无人机编号为"' + ids + '"的数据项?').then(function () {
-        return delUav(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {
-      });
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('system/uav/export', {
-        ...this.queryParams
-      }, `uav_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>

+ 0 - 272
monitor_ui/src/views/uav/uavdept/monitoruavdept.vue

@@ -1,272 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-        >新增
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-        >修改
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-        >删除
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-        >导出
-        </el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="uavdeptList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="部门名称" align="center" prop="deptName"/>
-      <el-table-column label="添加时间" align="center" prop="createTime"/>
-      <el-table-column label="修改时间" align="center" prop="updateTime"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-          >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-          >删除
-          </el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改AI对应部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="部门名称" prop="deptId">
-          <treeselect :options="deptOptions" v-model="form.deptId" :show-count="true" placeholder="请选择部门名称"
-                      @select="hx"/>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import {
-  listUavdept,
-  getUavdept,
-  delUavdept,
-  addUavdept,
-  updateUavdept
-} from "@/api/uav/uavdept/uavdept";
-import {treeselect} from "@/api/system/dept";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-
-export default {
-  name: "Uavdept",
-  components: {
-    Treeselect
-  },
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // AI对应部门表格数据
-      uavdeptList: [],
-      // 部门树选项
-      deptOptions: undefined,
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        uavId: null,
-        uavName: null,
-        deptId: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        deptId: [
-          {required: true, message: "部门名称不能为空", trigger: "blur"}
-        ],
-      },
-    };
-  },
-  props: {
-    uavId: null,
-    uavName: null,
-  },
-  created() {
-    this.getList();
-    this.getTreeselect();
-  },
-  methods: {
-    /** 查询AI对应部门列表 */
-    getList() {
-      this.loading = true;
-      this.queryParams.uavId = this.uavId;
-      listUavdept(this.queryParams).then(response => {
-        this.uavdeptList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 查询部门下拉树结构 */
-    getTreeselect() {
-      treeselect().then(response => {
-        this.deptOptions = response.data;
-      });
-    },
-    //部门ID、部门名称赋值
-    hx(node) {
-      this.form.deptId = node.id;
-      this.form.deptName = node.label
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        uavId: null,
-        deptId: null,
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.form.uavId = this.uavId;
-      this.form.uavName = this.uavName
-      this.open = true;
-      this.title = "添加无人机对应部门";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getUavdept(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改无人机对应部门";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateUavdept(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addUavdept(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除数据项?').then(function () {
-        return delUavdept(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {
-      });
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('center-monitor/aidevicedept/export', {
-        ...this.queryParams
-      }, `aidevicedept_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>

+ 0 - 42
sql/centernonitor_t_gas_tank_devices.sql

@@ -1,45 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : 192.168.1.13
- Source Server Type    : MySQL
- Source Server Version : 50721
- Source Host           : 192.168.1.13:63306
- Source Schema         : onest_monitor_yanshi
-
- Target Server Type    : MySQL
- Target Server Version : 50721
- File Encoding         : 65001
-
- Date: 26/09/2024 09:58:39
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
-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 = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '煤气罐设备信息表' ROW_FORMAT = DYNAMIC;
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 81
sql/centernonitor_t_gas_tank_historical_trajectory.sql

@@ -1,84 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : 192.168.1.13
- Source Server Type    : MySQL
- Source Server Version : 50721
- Source Host           : 192.168.1.13:63306
- Source Schema         : onest_monitor_yanshi
-
- Target Server Type    : MySQL
- Target Server Version : 50721
- File Encoding         : 65001
-
- Date: 26/09/2024 09:58:47
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
-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
-) ENGINE = InnoDB AUTO_INCREMENT = 415670 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '历史轨迹' ROW_FORMAT = DYNAMIC;
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 45
sql/centernonitor_t_gas_tank_travel_mileage.sql

@@ -1,48 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : 192.168.1.13
- Source Server Type    : MySQL
- Source Server Version : 50721
- Source Host           : 192.168.1.13:63306
- Source Schema         : onest_monitor_yanshi
-
- Target Server Type    : MySQL
- Target Server Version : 50721
- File Encoding         : 65001
-
- Date: 26/09/2024 09:58:54
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
-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 = 3959 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 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;

+ 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

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

@@ -0,0 +1,16 @@
+package com.sooka.sponest.monitor.aidevicedept.domain;
+
+import lombok.Data;
+
+
+@Data
+public class CenterdataTAidevicedeptDTO {
+
+
+    private Long mapDeptId;
+
+    private String mapDeptName;
+
+
+}
+

+ 4 - 0
src/main/java/com/sooka/sponest/monitor/aidevicedept/mapper/CenterdataTAidevicedeptMapper.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.monitor.aidevicedept.mapper;
 
 import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedept;
+import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedeptDTO;
 
 import java.util.List;
 
@@ -75,4 +76,7 @@ public interface CenterdataTAidevicedeptMapper
      * @return 结果
      */
      List<CenterdataTAidevicedept> selectDeptByDeviceCode(String deviceCode);
+
+    List<CenterdataTAidevicedeptDTO> getByDeviceCode(String deviceCode);
+
 }

+ 92 - 71
src/main/java/com/sooka/sponest/monitor/camera/controller/CentermonitorTCameraController.java

@@ -671,83 +671,104 @@ public class CentermonitorTCameraController extends BaseController {
     }
 
     /**
-     * 海康插件融合预览回放
-     */
-    @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.INSERT)
+    @ApiOperation(value = "摄像头调用、被调用部门保存", notes = "摄像头调用、被调用部门保存")
+    @PostMapping(value = "/saveCameraCallLog")
+    public R saveCameraCallLog(@RequestBody JSONObject deviceCode) {
+        return centermonitorTCameraService.saveCameraCallLog(deviceCode);
     }
 
-
     /**
-     * 根据部门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);
-    }
+     * 视频融合中台统一入口
+     * @param deptId 部门id
+     **/
+    @Log(title = "视频融合中台统一入口", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "视频融合中台统一入口", notes = "视频融合中台统一入口")
+    @GetMapping(value = "/getVideoFusionUnifyInlet")
+    public R getVideoFusionUnifyInlet(@RequestParam(value = "deptId", required = false) Long deptId) {
+        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);
+        }
 
-    /**
-     * 根据部门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));
-    }
 
+        /**
+         * 查询全部摄像头用于和检测设备一对多绑定
+         */
+        @Log(title = "摄像头", businessType = BusinessType.OTHER)
+        @ApiOperation(value = "查询全部摄像头用于和检测设备一对多绑定", notes = "查询全部摄像头用于和检测设备一对多绑定")
+        @RequestMapping(value = "/selectAllCameraList", method = GET)
+        public R<?> selectAllCameraList () {
+            return R.ok(centermonitorTCameraService.selectAllCameraList());
+        }
 
-    /**
-     * 根据通道编码查询摄像头信息和通道信息
-     */
-    @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));
-    }
+
+        /**
+         * 根据部门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));
+        }
 
 }
 

+ 3 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCamera.java

@@ -32,6 +32,9 @@ public class CentermonitorTCamera extends BaseBusinessEntity {
      */
     private String id;
     private String type;
+    private String name;//通用名字
+    private String total;//视频总数
+    private String access;//接入总数
     private String typeName;
     /**
      * 数据状态(1-可用 2-不可用 )

+ 31 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraCallLog.java

@@ -0,0 +1,31 @@
+package com.sooka.sponest.monitor.camera.domain;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class CentermonitorTCameraCallLog {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private String id;
+
+    private String deviceCode;
+
+    /**
+     * 调用状态(0:调用;1被调用)
+     */
+    private String type;
+
+    private Long mapDeptId;
+
+    private String mapDeptName;
+
+    private Long createBy;
+
+    private String createName;
+
+    private Date createTime;
+}

+ 12 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraCallLogStatisticsDTO.java

@@ -0,0 +1,12 @@
+package com.sooka.sponest.monitor.camera.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTCameraCallLogStatisticsDTO {
+
+
+    private String name;
+
+    private Integer value;
+}

+ 11 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraVideoStatisticsDTO.java

@@ -0,0 +1,11 @@
+package com.sooka.sponest.monitor.camera.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTCameraVideoStatisticsDTO {
+
+    private Integer number;
+
+    private String cameraRadius;
+}

+ 27 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/CentermonitorTCameraVideoStatisticsVO.java

@@ -0,0 +1,27 @@
+package com.sooka.sponest.monitor.camera.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTCameraVideoStatisticsVO {
+
+    private String name;
+
+    private Integer addressOne;
+
+    private Integer addressTwo;
+
+    private Integer addressThree;
+
+    private Integer addressFour;
+
+    private Integer addressFive;
+
+    private Integer addressSix;
+
+    private Integer addressSeven;
+
+    private Integer addressEight;
+
+
+}

+ 12 - 0
src/main/java/com/sooka/sponest/monitor/camera/domain/GiveAnAlarmResultDTO.java

@@ -0,0 +1,12 @@
+package com.sooka.sponest.monitor.camera.domain;
+
+import lombok.Data;
+
+@Data
+public class GiveAnAlarmResultDTO {
+
+    private String name;
+
+    private Integer number;
+
+}

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

@@ -1,6 +1,7 @@
 package com.sooka.sponest.monitor.camera.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.annotation.Excel;
 import com.ruoyi.common.core.web.domain.BaseEntity;
 import lombok.Getter;
 import lombok.Setter;
@@ -64,6 +65,12 @@ public class VisuForestCloudCameraBO extends BaseEntity {
 
     private String cameraFactory;
 
+    /**
+     * 融合平台(海康、大华)
+     */
+    @Excel(name = "融合平台(海康、大华)", readConverterExp = "0=海康平台,1=大华平台")
+    private String convergencePlatform;
+
     /** 所属区域 */
 
     private String cameraRegion;

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

@@ -45,4 +45,5 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
     private String [] eventTypeIdDl;
     /** 设备编码 */
     private String deviceCode;
+    private List<Long> deptIds;
 }

+ 27 - 0
src/main/java/com/sooka/sponest/monitor/camera/mapper/CentermonitorTCameraCallLogMapper.java

@@ -0,0 +1,27 @@
+package com.sooka.sponest.monitor.camera.mapper;
+
+import com.sooka.sponest.monitor.camera.domain.CentermonitorTCamera;
+import com.sooka.sponest.monitor.camera.domain.CentermonitorTCameraCallLog;
+import com.sooka.sponest.monitor.camera.domain.CentermonitorTCameraCallLogStatisticsDTO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 摄像头Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-06-08
+ */
+@Repository
+public interface CentermonitorTCameraCallLogMapper{
+
+    void insertInto(@Param("list") List<CentermonitorTCameraCallLog> save);
+
+    List<CentermonitorTCameraCallLogStatisticsDTO> getCameraCallDepartmentLogOneStatistics(CentermonitorTCamera centermonitorTCamera);
+    List<CentermonitorTCameraCallLogStatisticsDTO> getCameraCallDepartmentLogTwoStatistics(CentermonitorTCamera centermonitorTCamera);
+
+    Integer getCameraCallLogStatistics(CentermonitorTCamera centermonitorTCamera);
+}
+

+ 34 - 23
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,6 +315,40 @@ public interface CentermonitorTCameraMapper {
     void deleteImageByCameraId(@Param("cameraId") String cameraId);
 
     /**
+     * 接入设备情况-厂商-雷达图
+     */
+    List<CentermonitorTCamera> getAccessManufacturer(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 设备离线情况-设备型号
+     */
+    public List<CentermonitorTCamera> getDeviceOffline(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 设备离线情况-设备品牌
+     */
+    public List<CentermonitorTCamera> getDeviceBrand(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 设备离线情况-运营商
+     */
+    public List<CentermonitorTCamera> getOperator(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 设备离线类型
+     */
+    public List<CentermonitorTCamera> getOfflineType(CentermonitorTCamera centermonitorTCamera);
+
+    Integer getEquipmentStatistics(CentermonitorTCamera centermonitorTCamera);
+
+    List<CentermonitorTCameraVideoStatisticsDTO> getVideoCountyStatistics(CentermonitorTCamera centermonitorTCamera);
+
+    /**
+     * 视频目录统计
+     */
+    public List<CentermonitorTCamera> getVideoDirectory(CentermonitorTCamera centermonitorTCamera);
+
+    /**
      * 查询全部摄像头用于和检测设备一对多绑定
      **/
     List<CameraCodeAndNameVO> selectAllCameraList();
@@ -338,27 +371,5 @@ public interface CentermonitorTCameraMapper {
 
     CentermonitorTCamera selectCameraInfoByChannelCode(@Param("channelCode") String channelCode);
 
-
-    /**
-     * 更新执法仪在离线状态
-     *
-     * @param list
-     */
-    void updateBatchLawEnforcementInstrumentState(List<Map<String, Object>> list);
-
-
-    /**
-     * 更新摄像头类型为录像机离线状态
-     *
-     * @param list
-     */
-    void updateBatchVideoRecorderOfflineState(List<String> list);
-
-    /**
-     * 更新摄像头类型为录像机在线状态
-     *
-     * @param list
-     */
-    void updateBatchVideoRecorderOnlineState(List<String> list);
 }
 

+ 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;
-    }
-}

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

@@ -1,9 +1,13 @@
 package com.sooka.sponest.monitor.camera.service;
 
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.system.api.domain.SysDept;
 import com.sooka.sponest.monitor.camera.domain.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 摄像头Service接口
@@ -275,6 +279,52 @@ public interface ICentermonitorTCameraService
      * **/
     List<CameraCodeAndNameVO> selectAllCameraList();
 
+    R saveCameraCallLog(JSONObject deviceCode);
+    /**
+     * 接入设备情况-厂商-雷达图
+     */
+    Map<String, List> getAccessManufacturer(Long deptId);
+
+    /**
+     * 设备离线情况-设备型号
+     */
+    Map<String, List> getDeviceOffline(Long deptId);
+
+    /**
+     * 设备离线情况-设备品牌
+     */
+    Map<String, List> getDeviceBrand(Long deptId);
+
+    /**
+     * 设备离线情况-运营商
+     */
+    Map<String, List> getOperator(Long deptId);
+
+    /**
+     * 设备离线类型
+     */
+    Map<String, List> getOfflineType(Long deptId);
+
+    /**
+     * 视频目录统计
+     */
+    Map<String, List> getVideoDirectory(Long deptId);
+
+
+    Map<String, List> getCameraCallDepartmentLogOneStatistics(List<SysDept> sysDeptList);
+
+    Map<String, List> getCameraCallDepartmentLogTwoStatistics(List<SysDept> sysDeptList);
+
+    Map<String, List> getCameraCallLogStatistics(Long deptId);
+
+    Map<String, List> getEquipmentStatistics(List<SysDept> sysDeptList);
+
+    List<CentermonitorTCameraVideoStatisticsVO> getVideoCountyStatistics(List<SysDept> sysDeptList);
+
+    List<GiveAnAlarmResultDTO> selectEventGjnums(List<SysDept> sysDeptList);
+
+    R getVideoFusionUnifyInlet(Long deptId);
+
     /**
      * 根据部门ID获取执法记录仪列表
      * **/

+ 429 - 4
src/main/java/com/sooka/sponest/monitor/camera/service/impl/CentermonitorTCameraServiceImpl.java

@@ -1,5 +1,6 @@
 package com.sooka.sponest.monitor.camera.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
@@ -9,24 +10,32 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.DictUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.domain.SysDept;
 import com.ruoyi.system.api.domain.SysDictData;
 import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedept;
+import com.sooka.sponest.monitor.aidevicedept.domain.CenterdataTAidevicedeptDTO;
 import com.sooka.sponest.monitor.aidevicedept.mapper.CenterdataTAidevicedeptMapper;
 import com.sooka.sponest.monitor.aideviceevent.mapper.CenterdataTAideviceeventMapper;
 import com.sooka.sponest.monitor.base.service.impl.BaseService;
 import com.sooka.sponest.monitor.camera.domain.*;
+import com.sooka.sponest.monitor.camera.mapper.CentermonitorTCameraCallLogMapper;
 import com.sooka.sponest.monitor.camera.mapper.CentermonitorTCameraMapper;
 import com.sooka.sponest.monitor.camera.mapper.CentermonitorTCamerachannelMapper;
 import com.sooka.sponest.monitor.camera.service.ICentermonitorTCameraService;
+import com.sooka.sponest.monitor.remoteapi.service.center.event.RemoteEventBaseService;
 import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.lang.reflect.Field;
+import java.util.*;
+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;
 
 /**
  * 摄像头Service业务层处理
@@ -52,6 +61,12 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
     @Resource
     private RemoteService remoteService;
 
+    @Resource
+    private RemoteEventBaseService remoteEventBaseService;
+
+    @Resource
+    private CentermonitorTCameraCallLogMapper centermonitorTCameraCallLogMapper;
+
     /**
      * 查询摄像头
      *
@@ -605,6 +620,414 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
         return centermonitorTCameraMapper.selectAllCameraList();
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R saveCameraCallLog(JSONObject json) {
+        Date date = new Date();
+        String deviceCode = JSONObject.toJSONString(json.get("deviceCode"));
+        List<SysDept> list = SecurityUtils.getLoginUser().getSysUser().getDepts();
+        List<CentermonitorTCameraCallLog> saveOneList = new ArrayList<>();
+        if (!CollectionUtils.isEmpty(list)) {
+            for (SysDept var : list) {
+                CentermonitorTCameraCallLog save = new CentermonitorTCameraCallLog();
+                save.setId(IdUtils.simpleUUID());
+                save.setDeviceCode(deviceCode);
+                save.setMapDeptId(var.getDeptId());
+                save.setMapDeptName(var.getDeptName());
+                save.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId());
+                save.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+                save.setCreateTime(date);
+                save.setType("0");
+                saveOneList.add(save);
+            }
+        }
+        centermonitorTCameraCallLogMapper.insertInto(saveOneList);
+
+        List<CentermonitorTCameraCallLog> saveTwoList = new ArrayList<>();
+        List<CenterdataTAidevicedeptDTO> byDeviceCode = centerdataTAidevicedeptMapper.getByDeviceCode(deviceCode);
+        if (!CollectionUtils.isEmpty(byDeviceCode)) {
+            for (CenterdataTAidevicedeptDTO var : byDeviceCode) {
+                CentermonitorTCameraCallLog save = new CentermonitorTCameraCallLog();
+                save.setId(IdUtils.simpleUUID());
+                save.setDeviceCode(deviceCode);
+                save.setMapDeptId(var.getMapDeptId());
+                save.setMapDeptName(var.getMapDeptName());
+                save.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId());
+                save.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+                save.setCreateTime(date);
+                save.setType("1");
+                saveTwoList.add(save);
+            }
+        }
+        centermonitorTCameraCallLogMapper.insertInto(saveTwoList);
+        return R.ok();
+    }
+
+
+    /**
+     * 接入设备情况-厂商-雷达图
+     */
+    @Override
+    public Map<String, List> getAccessManufacturer(Long deptId) {
+        Map<String, List> nameCountList = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> manufacturer = centermonitorTCameraMapper.getAccessManufacturer(centermonitorTCamera);
+        for (CentermonitorTCamera tar : manufacturer) {
+            nameList.add(tar.getName());
+            countList.add(tar.getCount());
+        }
+        nameCountList.put("manufacturerName", nameList);
+        nameCountList.put("manufacturerCount", countList);
+        return nameCountList;
+    }
+
+    /**
+     * 设备离线情况-设备型号
+     */
+    @Override
+    public Map<String, List> getDeviceOffline(Long deptId) {
+        Map<String, List> OfflineList = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> Offline = centermonitorTCameraMapper.getDeviceOffline(centermonitorTCamera);
+        for (CentermonitorTCamera tar : Offline) {
+            nameList.add(tar.getName());
+            countList.add(tar.getCount());
+        }
+        OfflineList.put("offlineName", nameList);
+        OfflineList.put("offlineCount", countList);
+        return OfflineList;
+    }
+
+    /**
+     * 设备离线情况-设备品牌
+     */
+    public Map<String, List> getDeviceBrand(Long deptId) {
+        Map<String, List> brandList = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> brand = centermonitorTCameraMapper.getDeviceBrand(centermonitorTCamera);
+        for (CentermonitorTCamera tar : brand) {
+            nameList.add(tar.getName());
+            countList.add(tar.getCount());
+        }
+        brandList.put("brandName", nameList);
+        brandList.put("brandCount", countList);
+        return brandList;
+    }
+
+    /**
+     * 设备离线情况-运营商
+     */
+    public Map<String, List> getOperator(Long deptId) {
+        Map<String, List> operatorList = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> operator = centermonitorTCameraMapper.getOperator(centermonitorTCamera);
+        for (CentermonitorTCamera tar : operator) {
+            nameList.add(tar.getName());
+            countList.add(tar.getCount());
+        }
+        operatorList.put("operatorName", nameList);
+        operatorList.put("operatorCount", countList);
+        return operatorList;
+    }
+
+    /**
+     * 设备离线类型 - 离线原因
+     */
+    @Override
+    public Map<String, List> getOfflineType(Long deptId) {
+        Map<String, List> offlineTypeList = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> manufacturer = centermonitorTCameraMapper.getOfflineType(centermonitorTCamera);
+        for (CentermonitorTCamera tar : manufacturer) {
+            nameList.add(tar.getName());
+            countList.add(tar.getCount());
+        }
+        offlineTypeList.put("offlineTypeName", nameList);
+        offlineTypeList.put("offlineTypeCount", countList);
+        return offlineTypeList;
+    }
+
+    /**
+     * 视频目录统计
+     */
+    @Override
+    public Map<String, List> getVideoDirectory(Long deptId) {
+        Map<String, List> offlineTypeList = new HashMap<>();
+        List<String> countList = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        List<CentermonitorTCamera> manufacturer = centermonitorTCameraMapper.getVideoDirectory(centermonitorTCamera);
+        for (CentermonitorTCamera tar : manufacturer) {
+            countList.add(tar.getTotal());
+            countList.add(tar.getAccess());
+            countList.add(String.valueOf(tar.getOnline()));
+            countList.add(String.valueOf(tar.getOffline()));
+        }
+        offlineTypeList.put("videoDirectoryCount", countList);
+        return offlineTypeList;
+    }
+
+    @Override
+    public Map<String, List> getCameraCallDepartmentLogOneStatistics(List<SysDept> sysDeptList) {
+        Map<String, List> map = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<Integer> numberList = new ArrayList<>();
+        for (SysDept var : sysDeptList) {
+            CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+            centermonitorTCamera.setDeptId(var.getDeptId().toString());
+            setSookaDataBase(centermonitorTCamera);
+            List<CentermonitorTCameraCallLogStatisticsDTO> list = centermonitorTCameraCallLogMapper.getCameraCallDepartmentLogOneStatistics(centermonitorTCamera);
+            for (CentermonitorTCameraCallLogStatisticsDTO tar : list) {
+                nameList.add(tar.getName());
+                numberList.add(tar.getValue());
+            }
+        }
+        map.put("videoCallNameOneList", nameList);
+        map.put("videoCallNumberOneList", numberList);
+        return map;
+    }
+
+    @Override
+    public Map<String, List> getCameraCallDepartmentLogTwoStatistics(List<SysDept> sysDeptList) {
+        Map<String, List> map = new HashMap<>();
+        List<String> nameList = new ArrayList<>();
+        List<Integer> numberList = new ArrayList<>();
+        for (SysDept var : sysDeptList) {
+            CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+            centermonitorTCamera.setDeptId(var.getDeptId().toString());
+            setSookaDataBase(centermonitorTCamera);
+            List<CentermonitorTCameraCallLogStatisticsDTO> list = centermonitorTCameraCallLogMapper.getCameraCallDepartmentLogTwoStatistics(centermonitorTCamera);
+            for (CentermonitorTCameraCallLogStatisticsDTO tar : list) {
+                nameList.add(tar.getName());
+                numberList.add(tar.getValue());
+            }
+        }
+        map.put("videoCallNameTwoList", nameList.subList(0,Math.min(nameList.size(),10)));
+        map.put("videoCallNumberTwoList", numberList.subList(0,Math.min(numberList.size(),10)));
+        return map;
+    }
+
+    @Override
+    public Map<String, List> getCameraCallLogStatistics(Long deptId) {
+        Map<String, List> map = new HashMap<>();
+        Date today = new Date();
+        List<Integer> todayVideoStatistics = new ArrayList<>();
+        List<Integer> totalVideoStatistics = new ArrayList<>();
+        CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+        centermonitorTCamera.setCreateTime(today);
+        centermonitorTCamera.setDeptId(deptId == null ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : deptId.toString());
+        setSookaDataBase(centermonitorTCamera);
+        todayVideoStatistics.add(centermonitorTCameraCallLogMapper.getCameraCallLogStatistics(centermonitorTCamera));
+        centermonitorTCamera.setCreateTime(null);
+        totalVideoStatistics.add(centermonitorTCameraCallLogMapper.getCameraCallLogStatistics(centermonitorTCamera));
+        map.put("todayVideoStatistics", todayVideoStatistics);
+        map.put("totalVideoStatistics", totalVideoStatistics);
+        return map;
+    }
+
+    @Override
+    public Map<String, List> getEquipmentStatistics(List<SysDept> sysDeptList) {
+//        List<SysDept> list = SecurityUtils.getLoginUser().getSysUser().getDepts();
+        List<Integer> equipmentNumberList = new ArrayList<>();
+        for (SysDept var : sysDeptList) {
+            CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+            centermonitorTCamera.setDeptId(var.getDeptId().toString());
+            setSookaDataBase(centermonitorTCamera);
+            Integer equipmentStatistics = centermonitorTCameraMapper.getEquipmentStatistics(centermonitorTCamera);
+            equipmentNumberList.add(equipmentStatistics);
+        }
+        Map<String, List> map = new HashMap<>();
+        map.put("equipmentNameList", sysDeptList.stream().map(SysDept::getDeptName).collect(Collectors.toList()));
+        map.put("equipmentNumberList", equipmentNumberList);
+        return map;
+    }
+
+    @Override
+    public List<CentermonitorTCameraVideoStatisticsVO> getVideoCountyStatistics(List<SysDept> sysDeptList) {
+        List<CentermonitorTCameraVideoStatisticsVO> videoNumberList = new ArrayList<>();
+        if (!CollectionUtils.isEmpty(sysDeptList)) {
+            for (SysDept var : sysDeptList) {
+                CentermonitorTCamera centermonitorTCamera = new CentermonitorTCamera();
+                centermonitorTCamera.setDeptId(var.getDeptId().toString());
+                setSookaDataBase(centermonitorTCamera);
+                List<CentermonitorTCameraVideoStatisticsDTO> videoStatistics = centermonitorTCameraMapper.getVideoCountyStatistics(centermonitorTCamera);
+                CentermonitorTCameraVideoStatisticsVO centermonitorTCameraVedioStatisticsVO = new CentermonitorTCameraVideoStatisticsVO();
+                centermonitorTCameraVedioStatisticsVO.setName(var.getDeptName());
+                for (CentermonitorTCameraVideoStatisticsDTO tar : videoStatistics) {
+                    if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("1500")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressOne(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("2000")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressTwo(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("2500")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressThree(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("3000")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressFour(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("3500")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressFive(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("4000")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressSix(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("5000")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressSeven(tar.getNumber());
+                    } else if (StringUtils.isNotEmpty(tar.getCameraRadius()) && tar.getCameraRadius().equals("6000")) {
+                        centermonitorTCameraVedioStatisticsVO.setAddressEight(tar.getNumber());
+                    }
+                }
+                videoNumberList.add(centermonitorTCameraVedioStatisticsVO);
+            }
+            if (!CollectionUtils.isEmpty(videoNumberList)) {
+                for (CentermonitorTCameraVideoStatisticsVO obj : videoNumberList) {
+                    Class<?> objClass = obj.getClass();
+                    // 获取对象的所有字段(包括私有字段)
+                    Field[] fields = objClass.getDeclaredFields();
+                    // 遍历字段
+                    for (Field field : fields) {
+                        field.setAccessible(true); // 设置私有字段可访问
+                        try {
+                            // 如果字段的值为 null,则将其赋值为 0
+                            if (!field.getName().equals("name") && field.get(obj) == null) {
+                                field.set(obj, 0);
+                            }
+                        } catch (IllegalAccessException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            }
+        }
+        return videoNumberList;
+    }
+
+    // TODO: 2024/1/23 改直连了
+    @Override
+    public List<GiveAnAlarmResultDTO> selectEventGjnums(List<SysDept> sysDeptList) {
+        VisuForestCloudMapVO visuForestCloudMapVO = new VisuForestCloudMapVO();
+        List<Long> deptsList = new ArrayList<>();
+        for (SysDept var : sysDeptList) {
+            deptsList.add(var.getDeptId());
+        }
+        visuForestCloudMapVO.setDeptIds(deptsList);
+        R<Map<String, Integer>> keyValuePairs = remoteEventBaseService.getEventGjnums(visuForestCloudMapVO);
+        List<GiveAnAlarmResultDTO> list = new ArrayList<>();
+        for (Map.Entry<String, Integer> entry : keyValuePairs.getData().entrySet()) {
+            String key = entry.getKey();
+            int value = entry.getValue();
+
+            GiveAnAlarmResultDTO giveAnAlarmResultDTO = new GiveAnAlarmResultDTO();
+            giveAnAlarmResultDTO.setName(key);
+            giveAnAlarmResultDTO.setNumber(value);
+            list.add(giveAnAlarmResultDTO);
+        }
+        return list;
+    }
+
+
+    @Override
+    public R getVideoFusionUnifyInlet(Long deptId){
+        Map<String, List> map = new HashMap<>();
+        List<SysDept> sysDepartments = new ArrayList();
+
+        List<SysDept> list = SecurityUtils.getLoginUser().getSysUser().getDepts();
+        if (deptId != null) {
+            R<List<SysDept>> sysDeptList = remoteService.selectChildrenCountyOrVillagesDeptListByDeptId(deptId);
+            sysDepartments.addAll(sysDeptList.getData());
+        } else {
+            for (SysDept var : list) {
+                R<List<SysDept>> sysDeptList = remoteService.selectChildrenCountyOrVillagesDeptListByDeptId(var.getDeptId());
+                sysDepartments.addAll(sysDeptList.getData());
+            }
+        }
+
+        ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
+        Future<Map<String, List>> getEquipmentStatistics = executorService.submit(() -> {
+            return this.getEquipmentStatistics(sysDepartments);
+        });
+//        Future<Map<String, List>> getAccessManufacturer = executorService.submit(() -> {
+//            return this.getAccessManufacturer(deptId);
+//        });
+        Future<List<CentermonitorTCameraVideoStatisticsVO>> getVideoCountyStatistics = executorService.submit(() -> {
+            return this.getVideoCountyStatistics(sysDepartments);
+        });
+//        Future<List<GiveAnAlarmResultDTO>> selectEventGjnums = executorService.submit(() -> {
+//            return this.selectEventGjnums(sysDepartments);
+//        });
+        // 同样的方式继续提交其他任务
+
+        // 等待所有任务完成
+        executorService.shutdown();
+        try {
+            //视频资源分布
+            map.put("videoNumberList", getVideoCountyStatistics.get());
+            //接入设备情况-部门
+            map.put("equipmentNameList", getEquipmentStatistics.get().get("equipmentNameList"));
+            map.put("equipmentNumberList", getEquipmentStatistics.get().get("equipmentNumberList"));
+            //告警情况统计
+//            map.put("giveAnAlarmStatistics", selectEventGjnums.get());
+
+            executorService.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
+        } catch (Exception e) {
+            // 处理中断异常
+        }
+
+        Map<String, List> cameraCallDepartmentLogOneStatisticsMap = this.getCameraCallDepartmentLogOneStatistics(sysDepartments);
+        Map<String, List> cameraCallDepartmentLogTwoStatistics = this.getCameraCallDepartmentLogTwoStatistics(sysDepartments);
+        Map<String, List> cameraCallLogStatistics = this.getCameraCallLogStatistics(deptId);
+        Map<String, List> offlineMap = this.getDeviceOffline(deptId);
+        Map<String, List> brandMap = this.getDeviceBrand(deptId);
+        Map<String, List> operatorMap = this.getOperator(deptId);
+        Map<String, List> accessManufacturerMap = this.getAccessManufacturer(deptId);
+        Map<String, List> offlineTypeMap = this.getOfflineType(deptId);
+        Map<String, List> videoDirectoryMap = this.getVideoDirectory(deptId);
+
+        //视频调阅部门
+        map.put("videoCallNameOneList", cameraCallDepartmentLogOneStatisticsMap.get("videoCallNameOneList"));
+        map.put("videoCallNumberOneList", cameraCallDepartmentLogOneStatisticsMap.get("videoCallNumberOneList"));
+        //视频被调阅部门
+        map.put("videoCallNameTwoList", cameraCallDepartmentLogTwoStatistics.get("videoCallNameTwoList"));
+        map.put("videoCallNumberTwoList", cameraCallDepartmentLogTwoStatistics.get("videoCallNumberTwoList"));
+        //视频调阅统计
+        map.put("todayVideoStatistics", cameraCallLogStatistics.get("todayVideoStatistics"));
+        map.put("totalVideoStatistics", cameraCallLogStatistics.get("totalVideoStatistics"));
+        //设备离线情况-设备型号
+        map.put("offlineName", offlineMap.get("offlineName"));
+        map.put("offlineCount", offlineMap.get("offlineCount"));
+        //接入设备情况-厂商-雷达图
+        map.put("manufacturerName", accessManufacturerMap.get("manufacturerName"));
+        map.put("manufacturerCount", accessManufacturerMap.get("manufacturerCount"));
+        //设备离线情况-设备品牌
+        map.put("brandName", brandMap.get("brandName"));
+        map.put("brandCount", brandMap.get("brandCount"));
+        //设备离线情况-运营商
+        map.put("operatorName", operatorMap.get("operatorName"));
+        map.put("operatorCount", operatorMap.get("operatorCount"));
+        //设备离线类型
+        map.put("offlineTypeName", offlineTypeMap.get("offlineTypeName"));
+        map.put("offlineTypeCount", offlineTypeMap.get("offlineTypeCount"));
+        //视频目录统计
+        map.put("videoDirectoryCount", videoDirectoryMap.get("videoDirectoryCount"));
+        return R.ok(map);
+    }
+
     /**
      * 根据部门ID获取执法记录仪列表
      */
@@ -628,6 +1051,8 @@ public class CentermonitorTCameraServiceImpl extends BaseService implements ICen
     public CentermonitorTCamera selectCameraInfoByChannelCode(String channelCode) {
         return centermonitorTCameraMapper.selectCameraInfoByChannelCode(channelCode);
     }
+
+
 }
 
 

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

@@ -1,277 +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.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("/dahuaBlackOperateLog")
-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("调用操作日志接口报错");
-        }
-    }
-
-}

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

@@ -1,154 +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.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-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";
-    private List<String> orgCodes = Arrays.asList("11033445593778368", "11248668755298496");
-
-
-//    @Scheduled(cron = "0/5 * * * * ?")
-    @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<>();
-        for (String orgCode : orgCodes) {
-            content.put("orgCode", orgCode);
-            getDevicesInfo(ip, port, token, content, orgCode);
-        }
-    }
-
-    private void getDevicesInfo(String ip, int port, String token, Map<String, String> content, String orgCode) {
-        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());
-        updateDeviceState(arr, orgCode);
-    }
-
-    /**
-     * 更新执法仪在离线状态
-     *
-     * @param arr
-     */
-    private void updateDeviceState(List<Map<String, Object>> arr, String orgCode) {
-        log.info("根据组织code编码获取执法仪详情数据:{}", arr.size());
-        if (CollectionUtils.isNotEmpty(arr)) {
-            if (orgCode.equals("11248668755298496")) {
-                List<Map<String, Object>> list = (List<Map<String, Object>>) arr.get(0).get("units");
-                for (Map<String, Object> map : list) {
-                    if (map.get("unitType").toString().equals("1")) {
-                        arr = (List<Map<String, Object>>) map.get("channels");
-                        //更新摄像头类型为录像机在离线状态
-                        List<String> channelCodeAllList = arr.stream().map(item -> item.get("channelCode"))
-                                .filter(channelCode -> channelCode != null)
-                                .map(Object::toString)
-                                .collect(Collectors.toList());
-                        //先把摄像头类型为录像机的状态全部改成离线
-                        if (CollectionUtils.isNotEmpty(channelCodeAllList)) {
-                            centermonitorTCameraMapper.updateBatchVideoRecorderOfflineState(channelCodeAllList);
-                        }
-                        //再修改摄像头类型为录像机的在线状态
-                        List<String> channelCodeList = arr.stream()
-                                .filter(item -> "1".equals(item.get("status")))
-                                .map(item -> item.get("channelCode"))
-                                .filter(channelCode -> channelCode != null)
-                                .map(Object::toString)
-                                .collect(Collectors.toList());
-                        if (CollectionUtils.isNotEmpty(channelCodeList)) {
-                            centermonitorTCameraMapper.updateBatchVideoRecorderOnlineState(channelCodeList);
-                        }
-                        break;
-                    }
-                }
-            } else {
-                //向执法中心推送设备状态
-                R result = remoteLawenforcementBaseService.deviceOpenOrClose(arr);
-                if (result.getCode() != 200) {
-                    log.info("向执法中心推送设备状态失败:{}", result.getMsg());
-                }
-                //更新执法仪在离线状态
-                centermonitorTCameraMapper.updateBatchLawEnforcementInstrumentState(arr);
-            }
-        }
-    }
-
-}

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

@@ -36,8 +36,6 @@ public class CenternonitorTDahuaOperateLogServiceImpl extends BaseService implem
     @Autowired
     private CenternonitorTDahuaOperateLogMapper centernonitorTDahuaOperateLogMapper;
     @Autowired
-    private ICenternonitorTDahuaOperateLogService centernonitorTDahuaOperateLogService;
-    @Autowired
     private DahuaOperateLogWhiteTask dahuaOperateLogTask;
     @Value("${sooka.dahua_interface_server.loginIp}")
     private String loginIp;
@@ -139,7 +137,7 @@ public class CenternonitorTDahuaOperateLogServiceImpl extends BaseService implem
             return R.fail(result.getMsg());
         }
         //同步之前删除已经入库的记录
-        centernonitorTDahuaOperateLogService.deleteByDate(startTime, endTime, operateTypeValue);
+        centernonitorTDahuaOperateLogMapper.deleteByDate(startTime, endTime, operateTypeValue);
 
         String token = result.getData().toString();
         log.info("获取token返回:{}", token);

+ 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();

+ 105 - 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,
@@ -766,4 +585,109 @@ public class CentermonitorTMonitoringDeviceController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 物联设备统计
+     * @param deptId 部门id
+     */
+//    @Log(title = "物联设备统计", businessType = BusinessType.OTHER)
+//    @GetMapping("/getIoTEquipmentStatistics")
+//    @ApiOperation(value = "物联设备统计", notes = "物联设备统计")
+//    public R getIoTEquipmentStatistics(@RequestParam(value = "deptId",required = false) Long deptId){
+//        return centermonitorTMonitoringDeviceService.getIoTEquipmentStatistics(deptId);
+//    }
+
+    /**
+     * 区县传感器统计
+     * @param deptId 部门id
+     */
+    @Log(title = "区县传感器统计", businessType = BusinessType.OTHER)
+    @GetMapping("/getOnLineSensorStatistics")
+    @ApiOperation(value = "区县传感器统计", notes = "区县传感器统计")
+    public R getOnLineSensorStatistics(@RequestParam(value = "deptId",required = false) Long deptId){
+        return R.ok(centermonitorTMonitoringDeviceService.getOnLineSensorStatistics(deptId));
+    }
+
+    /**
+     * 在线设备分析 - 在线离线
+     * @param deptId 部门id
+     */
+//    @Log(title = "在线设备分析", businessType = BusinessType.OTHER)
+//    @GetMapping("/getDeviceAnalysis")
+//    @ApiOperation(value = "在线设备分析", notes = "在线设备分析")
+//    public R getDeviceAnalysis(@RequestParam(value = "deptId",required = false) Long deptId){
+//        return centermonitorTMonitoringDeviceService.getDeviceAnalysis(deptId);
+//    }
+
+    /**
+     * 离线原因数量地区分布
+     * (1:水质环境;2:土壤墒情;3:污染源;4:病虫害监测;5:大气监测 ;6:水压监测;7:水流速;8:水尺)
+     * @param deptId 部门id
+     */
+//    @Log(title = "离线原因数量地区分布", businessType = BusinessType.OTHER)
+//    @GetMapping("/getOfflineReasonCountStatistics")
+//    @ApiOperation(value = "离线原因数量地区分布", notes = "离线原因数量地区分布")
+//    public R getOfflineReasonCountStatistics(@RequestParam(value = "deptId",required = false) Long deptId){
+//        return R.ok(centermonitorTMonitoringDeviceService.getOfflineReasonCountStatistics(deptId));
+//    }
+
+    /**
+     * 设备故障分布
+     * @param deptId 部门id
+     */
+    @Log(title = "设备故障分布", businessType = BusinessType.OTHER)
+    @GetMapping("/getFaultDistribution")
+    @ApiOperation(value = "设备故障分布", notes = "设备故障分布")
+    public Map<String, List> getFaultDistribution(@RequestParam(value = "deptId",required = false) Long deptId){
+        return centermonitorTMonitoringDeviceService.getFaultDistribution(deptId);
+    }
+
+    /**
+     * 采集数量分析(当天)
+     * @param deptId 部门id
+     */
+//    @Log(title = "采集数量分析", businessType = BusinessType.OTHER)
+//    @GetMapping("/getSensorDataCount")
+//    @ApiOperation(value = "采集数量分析", notes = "采集数量分析")
+//    public R getSensorDataCount(@RequestParam(value = "deptId",required = false) Long deptId){
+//        return centermonitorTMonitoringDeviceService.getSensorDataCount(deptId);
+//    }
+
+    /**
+     * 物联广场右上角统计数
+     * @param deptId 部门id
+     */
+    @Log(title = "物联广场右上角统计数", businessType = BusinessType.OTHER)
+    @GetMapping("/getDeviceSquareNumber")
+    @ApiOperation(value = "物联广场右上角统计数", notes = "物联广场右上角统计数")
+    public R getDeviceSquareNumber(@RequestParam(value = "deptId",required = false) Long deptId){
+        return centermonitorTMonitoringDeviceService.getDeviceSquareNumber(deptId);
+    }
+
+    /**
+     * 物联网中台统一入口
+     * @param deptId 部门id
+     **/
+    @Log(title = "物联网中台统一入口", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "物联网中台统一入口", notes = "物联网中台统一入口")
+    @GetMapping(value = "/getInternetOfThings")
+    public R getInternetOfThings(@RequestParam(value = "deptId", required = false) Long deptId) {
+        return centermonitorTMonitoringDeviceService.getInternetOfThings(deptId);
+    }
+
+
+    /**
+     * 物联网中台传感器坐标详情
+     * @param deptId 部门id
+     * @param deviceCode 设备编码
+     * @param deviceType 设备类型
+     **/
+    @Log(title = "物联网中台传感器坐标详情", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "物联网中台传感器坐标详情", notes = "物联网中台传感器坐标详情")
+    @GetMapping(value = "/getIoTEquipmentDetails")
+    public R getIoTEquipmentDetails(@RequestParam(value = "deptId", required = false) Long deptId,
+                                    @RequestParam(value = "deviceCode") String deviceCode,
+                                    @RequestParam(value = "deviceType") String deviceType) {
+        return centermonitorTMonitoringDeviceService.getIoTEquipmentDetails(deptId,deviceCode,deviceType);
+    }
+
 }

+ 52 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CenterMonitorIoTEquipmentDetailsVO.java

@@ -0,0 +1,52 @@
+package com.sooka.sponest.monitor.device.domain;
+
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Data
+public class CenterMonitorIoTEquipmentDetailsVO {
+
+    /**
+     * 设备名称
+     */
+    private String deviceName;
+    /**
+     * 设备编码
+     */
+    private String deviceCode;
+    /**
+     * 设备地址
+     */
+    private String address;
+    /**
+     * 上报时间
+     */
+    private String reportingDate;
+    /**
+     * 报警类型
+     */
+    private String alarmType;
+    /**
+     * 当前水压
+     */
+    private String hydraulicPressure;
+    /**
+     * 情况说明
+     */
+    private String remark;
+    /**
+     * 数据集合
+     */
+    private Map<String, List> dataSourceList = new HashMap<>();
+
+    private List<Map<String,String>> nameList = new ArrayList<>();
+
+    private List<String> dateList = new ArrayList<>();
+
+
+}

+ 33 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataAtmosphereIoTResult.java

@@ -0,0 +1,33 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataAtmosphereIoTResult {
+
+    private String date;
+    //温度
+    private String temperature;
+    //湿度
+    private String humidity;
+    //二氧化氮
+    private String nitrogenDioxide;
+    //二氧化硫
+    private String sulfurDioxide;
+    //一氧化碳
+    private String carbonMonoxide;
+    //可吸入微粒 pm2.51
+    private String fineParticle;
+
+    private String createTime;
+
+    public CentermonitorTMonitoringDataAtmosphereIoTResult(String formattedDate, String temperature, String humidity, String nitrogenDioxide, String sulfurDioxide, String carbonMonoxide, String fineParticle) {
+        this.date = formattedDate;
+        this.temperature = temperature;
+        this.humidity = humidity;
+        this.nitrogenDioxide = nitrogenDioxide;
+        this.sulfurDioxide = sulfurDioxide;
+        this.carbonMonoxide = carbonMonoxide;
+        this.fineParticle = fineParticle;
+    }
+}

+ 18 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataInsectPestsIoTResult.java

@@ -0,0 +1,18 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataInsectPestsIoTResult {
+
+    private String date;
+
+    private String createTime;
+
+    private Integer newCount;
+
+    public CentermonitorTMonitoringDataInsectPestsIoTResult(String formattedDate, int newCount) {
+        this.date = formattedDate;
+        this.newCount = newCount;
+    }
+}

+ 36 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataSoilMoistureIoTResult.java

@@ -0,0 +1,36 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataSoilMoistureIoTResult {
+
+    private String date;
+
+    private String temperature;
+
+    private String humidity;
+
+    private String ph;
+
+    private String conductivity;
+
+    private String nitrogen;
+
+    private String phosphorus;
+
+    private String potassium;
+
+    private String createTime;
+
+    public CentermonitorTMonitoringDataSoilMoistureIoTResult(String formattedDate, String temperature, String humidity, String ph, String conductivity, String nitrogen, String phosphorus, String potassium) {
+        this.date = formattedDate;
+        this.temperature = temperature;
+        this.humidity = humidity;
+        this.ph = ph;
+        this.conductivity = conductivity;
+        this.nitrogen = nitrogen;
+        this.phosphorus = phosphorus;
+        this.potassium = potassium;
+    }
+}

+ 30 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterPressureIoTResult.java

@@ -0,0 +1,30 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataWaterPressureIoTResult {
+
+    private String date;
+    /**
+     * 水压力值
+     * */
+    private String hydraulicValue;
+    /**
+     * 水压下限阈值
+     * */
+    private String hydraulicThresholdMin;
+    /**
+     * 水压上限阈值
+     * */
+    private String hydraulicThresholdMax;
+
+    private String createTime;
+
+    public CentermonitorTMonitoringDataWaterPressureIoTResult(String formattedDate, String hydraulicValue, String hydraulicThresholdMin, String hydraulicThresholdMax) {
+        this.date = formattedDate;
+        this.hydraulicValue = hydraulicValue;
+        this.hydraulicThresholdMin = hydraulicThresholdMin;
+        this.hydraulicThresholdMax = hydraulicThresholdMax;
+    }
+}

+ 32 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterQualityIoTResult.java

@@ -0,0 +1,32 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataWaterQualityIoTResult {
+
+    private String date;
+
+    private String waterPh;
+
+    private String waterTemperature;
+
+    private String waterQualitySuspension;
+
+    private String conductivity;
+
+    private String cod;
+
+    private String createTime;
+
+
+    public CentermonitorTMonitoringDataWaterQualityIoTResult(String formattedDate, String waterPh, String waterTemperature, String waterQualitySuspension, String conductivity, String cod) {
+        this.date = formattedDate;
+        this.waterPh = waterPh;
+        this.waterTemperature = waterTemperature;
+        this.waterQualitySuspension = waterQualitySuspension;
+        this.conductivity = conductivity;
+        this.cod = cod;
+
+    }
+}

+ 33 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDataWaterVelocityIoTResult.java

@@ -0,0 +1,33 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+@Data
+public class CentermonitorTMonitoringDataWaterVelocityIoTResult {
+
+    private String date;
+
+    /**水位*/
+    private Double Z;
+
+    /**瞬时流速*/
+    private Double V1;
+
+    /**水深*/
+    private Double Z1;
+
+    /**两个流量计的瞬时流量之和*/
+    private Double Q;
+
+    private String createTime;
+
+
+    public CentermonitorTMonitoringDataWaterVelocityIoTResult(String date, double Z, double V1, double Z1, double Q) {
+        this.date = date;
+        this.Z = Z;
+        this.V1 = V1;
+        this.Z1 = Z1;
+        this.Q = Q;
+    }
+}
+

+ 7 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/CentermonitorTMonitoringDevice.java

@@ -65,6 +65,13 @@ public class CentermonitorTMonitoringDevice extends BaseBusinessEntity {
     @Excel(name = "所属部门")
     private String deptName;
 
+    //设备通用名称,在线,离线(数),数据(数)
+    private String dictName;
+    private Integer deviceOnline;
+    private Integer deviceOffline;
+    private String sensorType;
+    private Integer dataCount;
+
     /**
      * 工作状态
      */

+ 17 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceEquipmentFaultStatistics.java

@@ -0,0 +1,17 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Data
+public class DeviceEquipmentFaultStatistics {
+
+    private String deptName;
+    private Long deptId;
+
+    private List<Map<String,String>> deviceList;
+
+}

+ 15 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceEquipmentFaultStatisticsVO.java

@@ -0,0 +1,15 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+import java.util.List;
+
+
+@Data
+public class DeviceEquipmentFaultStatisticsVO {
+
+    private List<String> deptNameList;
+
+    private List<DeviceEquipmentFaultStatistics> equipmentFaultList;
+
+}

+ 14 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceIoTEquipmentStatisticsResult.java

@@ -0,0 +1,14 @@
+package com.sooka.sponest.monitor.device.domain;
+
+
+import lombok.Data;
+
+@Data
+public class DeviceIoTEquipmentStatisticsResult {
+
+    private String deviceType;
+
+    private Integer count;
+
+
+}

+ 14 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceIoTEquipmentStatisticsVO.java

@@ -0,0 +1,14 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+import java.util.List;
+
+
+@Data
+public class DeviceIoTEquipmentStatisticsVO {
+
+    private Integer totalNumber;
+
+    private List<DeviceIoTEquipmentStatisticsResult> deviceIoTEquipmentStatisticsResult;
+}

+ 19 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceOfflineSensorStatisticsVO.java

@@ -0,0 +1,19 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+
+@Data
+public class DeviceOfflineSensorStatisticsVO {
+
+    private String name;
+
+    private Integer deviceTypeOne;
+
+    private Integer deviceTypeTwo;
+
+    private Integer deviceTypeThree;
+
+    private Integer deviceTypeFour;
+
+}

+ 26 - 0
src/main/java/com/sooka/sponest/monitor/device/domain/DeviceOnLineSensorStatisticsVO.java

@@ -0,0 +1,26 @@
+package com.sooka.sponest.monitor.device.domain;
+
+import lombok.Data;
+
+
+@Data
+public class DeviceOnLineSensorStatisticsVO {
+
+    private String name;
+
+    private Integer deviceTypeOne;
+
+    private Integer deviceTypeTwo;
+
+    private Integer deviceTypeThree;
+
+    private Integer deviceTypeFour;
+
+    private Integer deviceTypeFive;
+
+    private Integer deviceTypeSix;
+
+    private Integer deviceTypeSeven;
+
+    private Integer deviceTypeEight;
+}

+ 35 - 91
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,36 +243,36 @@ public interface CentermonitorTMonitoringDeviceMapper
      */
      List<CentermonitorTMonitoringDataInsectPests> selectInsectPestsDataByDeviceCodes(String[]  deviceCodes);
 
-    /**
-     * 查询最新一条病虫害传感器监测数据 -- getTimeUpdate
-     */
-     List<CentermonitorTMonitoringDataInsectPests> getTimeUpdate(String[]  deviceCodes);
 
     /**
      * 查询最新一条水质传感器监测数据 -- 根据设备编码
      */
      CentermonitorTMonitoringDataWaterQuality selectWaterQualityDataByDeviceCode(String  deviceCode);
 
-    /**
-     * 获取设备列表以判断工作状态
-     */
-     List<CentermonitorTMonitoringDevice> getDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice device);
+    List<DeviceIoTEquipmentStatisticsResult> getIoTEquipmentStatistics(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
-    /**
-     * 获取设备数据列表以判断工作状态
-     */
-    //大气
-     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);
+    List<DeviceIoTEquipmentStatisticsResult> getOnLineSensorStatistics(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    List<CentermonitorTMonitoringDevice> getDeviceAnalysis(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    List<DeviceIoTEquipmentStatisticsResult> getOfflineReasonCountStatistics(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    List<CentermonitorTMonitoringDevice> getFaultDistribution(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    List<CentermonitorTMonitoringDevice> getSensorDataCount(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    List<CentermonitorTMonitoringDevice> getDeviceSquareNumber(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    CenterMonitorIoTEquipmentDetailsVO getIoTEquipmentDetails(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
+
+    CentermonitorTMonitoringDataWaterQualityIoTResult getIoTWaterQuality(@Param("deviceCode") String deviceCode, @Param("date") String date);
+
+    CentermonitorTMonitoringDataSoilMoistureIoTResult getIoTSoil(@Param("deviceCode") String deviceCode, @Param("date") String date);
+
+    CentermonitorTMonitoringDataInsectPestsIoTResult getIoTInsectPests(@Param("deviceCode") String deviceCode, @Param("date") String date);
+    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);
 
     /**
      * 新增监测设备图片

+ 33 - 74
src/main/java/com/sooka/sponest/monitor/device/service/ICentermonitorTMonitoringDeviceService.java

@@ -1,13 +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接口
  *
@@ -39,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 监测设备
@@ -91,13 +78,6 @@ public interface ICentermonitorTMonitoringDeviceService
      */
      int updateCentermonitorTMonitoringDevice(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
-    /**
-     * 修改监测设备离线在线状态
-     *
-     * @param centermonitorTMonitoringDevice 监测设备
-     * @return 结果
-     */
-     int updateDeviceListToJudgeWorkingStatus(CentermonitorTMonitoringDevice centermonitorTMonitoringDevice);
 
     /**
      * 批量删除监测设备
@@ -124,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 水质传感器
@@ -248,25 +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);
+
+    /**
+     * 采集数量分析
+     */
+    public Map<String, List> getSensorDataCount(Long deptId);
+
+    /**
+     * 物联广场右上角统计数
+     */
+    public R getDeviceSquareNumber(Long deptId);
+
+    /**
+     * 物联网中台统一入口
+     */
+    R getInternetOfThings(Long deptId);
+
+
+    R getIoTEquipmentDetails(Long deptId,String deviceCode,String deviceType);
 
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 765 - 545
src/main/java/com/sooka/sponest/monitor/device/service/impl/CentermonitorTMonitoringDeviceServiceImpl.java


+ 7 - 10
src/main/java/com/sooka/sponest/monitor/haikang/service/impl/HaiKangServiceImpl.java

@@ -22,15 +22,12 @@ public class HaiKangServiceImpl extends BaseService implements HaiKangService {
      * */
     @Override
     public AjaxResult getHaiKangVideoServer(String cameraCode) {
-        HaiKangCameraBO haiKangCameraBO=centermonitorTCamerachannelMapper.getHaiKangVideoServer(cameraCode);
-        if(haiKangCameraBO !=null){
-            haiKangCameraBO.setLoginIp(HkloginIp);
-            haiKangCameraBO.setAppkey(Hkappkey);
-            haiKangCameraBO.setSecret(Hksecret);
-            haiKangCameraBO.setLoginPort(HkloginPort);
-            return AjaxResult.success(haiKangCameraBO);
-        }else{
-            return AjaxResult.error("未查询到摄像头");
-        }
+        HaiKangCameraBO haiKangCameraBO = centermonitorTCamerachannelMapper.getHaiKangVideoServer(cameraCode);
+        if(haiKangCameraBO ==null) haiKangCameraBO = new HaiKangCameraBO();
+        haiKangCameraBO.setLoginIp(HkloginIp);
+        haiKangCameraBO.setAppkey(Hkappkey);
+        haiKangCameraBO.setSecret(Hksecret);
+        haiKangCameraBO.setLoginPort(HkloginPort);
+        return AjaxResult.success(haiKangCameraBO);
     }
 }

+ 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;
-            }
-
-
         };
 
 

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

@@ -2,6 +2,7 @@ package com.sooka.sponest.monitor.remoteapi.fallback.center.event;
 
 
 import com.ruoyi.common.core.domain.R;
+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;
 import com.sooka.sponest.monitor.remoteapi.service.center.event.domain.CentereventTDownloads;
@@ -33,8 +34,9 @@ public class RemoteEventBaseServiceFallbackFactory implements FallbackFactory<Re
                 return null;
             }
 
+
             @Override
-            public R insertSensorEvent(@RequestBody SensorEventVo sensorEventVo) {
+            public R getEventGjnums(@RequestBody VisuForestCloudMapVO visuForestCloudMapVOs) {
                 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;
-            }
-        };
-
-
-
-    }
-}

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

@@ -85,6 +85,18 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
                 return null;
             }
 
+            /**
+             * 根据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);
-
-
 }

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

@@ -2,6 +2,7 @@ package com.sooka.sponest.monitor.remoteapi.service.center.event;
 
 
 import com.ruoyi.common.core.domain.R;
+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;
 import com.sooka.sponest.monitor.remoteapi.service.ModulesServiceNameContants;
@@ -24,8 +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")
+    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);
-
-}

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

@@ -57,6 +57,13 @@ public interface RemoteService {
     @GetMapping(value = "/dept/findDeptIdByUserName/{userName}")
     R<SysDept> findDeptIdByUserName(@PathVariable("userName") String userName);
 
-
+    /**
+     * 根据DEPT_ID查询下级的乡镇或区县部门列表,如果传入市级部门则查询区县,如果传入区县部门则查询乡镇街道(不带数据权限)
+     *
+     * @param deptId 部门id
+     * @return 部门信息集合
+     */
+    @GetMapping(value = "/dept/selectChildrenCountyOrVillagesDeptListByDeptId")
+    R<List<SysDept>> selectChildrenCountyOrVillagesDeptListByDeptId(@RequestParam(value = "deptId") Long deptId);
 
 }

+ 0 - 181
src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavController.java

@@ -1,181 +0,0 @@
-package com.sooka.sponest.monitor.uav.controller;
-
-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.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
-import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavService;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.ssl.SSLContextBuilder;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.*;
-
-import javax.net.ssl.SSLContext;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.List;
-
-/**
- * 无人机Controller
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-@RestController
-@RequestMapping("/uav")
-public class CentermonitorTUavController extends BaseController {
-
-    @Autowired
-    private ICentermonitorTUavService centermonitorTUavService;
-
-    private static final Logger log = LoggerFactory.getLogger(CentermonitorTUavController.class);
-
-    @Value("${sooka.uav_server.username}")
-    private String username;
-
-    @Value("${sooka.uav_server.password}")
-    private String password;
-
-    private static final String REQUEST_URL = "https://47.93.50.30/etkqq/login";
-
-    @GetMapping("/getToken")
-    public String getToken() {
-
-        try (CloseableHttpClient httpClient = createCustomHttpClient()) {
-            HttpPost httpPost = new HttpPost(REQUEST_URL);
-            // 使用 JSON 处理库构建请求体
-            String requestBody = "{\"username\": \"" + username + "\", \"password\": \"" + password + "\"}";
-            StringEntity entity = new StringEntity(requestBody, StandardCharsets.UTF_8);
-            httpPost.setEntity(entity);
-            httpPost.setHeader("Content-Type", "application/json");
-
-            // 发送请求
-            HttpResponse response = httpClient.execute(httpPost);
-            int statusCode = response.getStatusLine().getStatusCode();
-            if (statusCode == 200) {
-                HttpEntity responseEntity = response.getEntity();
-                if (responseEntity != null) {
-                    return EntityUtils.toString(responseEntity, StandardCharsets.UTF_8);
-                } else {
-                    log.error("响应实体为空");
-                    return "响应实体为空";
-                }
-            } else {
-                log.error("请求失败,状态码: {}", statusCode);
-                return "请求失败,状态码: " + statusCode;
-            }
-        } catch (IOException e) {
-            log.error("请求发生异常: {}", e.getMessage(), e);
-            return "请求发生异常: " + e.getMessage();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * 工厂方法:创建自定义配置的 HttpClient
-     *
-     * @return 配置好的 CloseableHttpClient 实例
-     * @throws Exception 如果配置过程中发生错误
-     */
-    private CloseableHttpClient createCustomHttpClient() throws Exception {
-        // 设置请求超时配置
-        RequestConfig requestConfig = RequestConfig.custom()
-                .setConnectTimeout(5000) // 连接超时:5秒
-                .setSocketTimeout(10000) // 读取超时:10秒
-                .setConnectionRequestTimeout(3000) // 请求连接超时:3秒
-                .build();
-
-        // 配置 SSL 上下文(可根据需求启用或禁用 SSL 验证)
-        SSLContext sslContext = SSLContextBuilder.create()
-                .loadTrustMaterial((chain, authType) -> true) // 忽略证书验证(仅用于测试环境)
-                .build();
-
-        return HttpClients.custom()
-                .setDefaultRequestConfig(requestConfig)
-                .setSSLContext(sslContext)
-                .setSSLHostnameVerifier(new NoopHostnameVerifier()) // 忽略主机名验证(仅用于测试环境)
-                .build();
-    }
-
-    /**
-     * 查询无人机列表
-     */
-    @GetMapping("/list")
-    public TableDataInfo list(CentermonitorTUav centermonitorTUav) {
-        startPage();
-        List<CentermonitorTUav> list = centermonitorTUavService.selectCentermonitorTUavList(centermonitorTUav);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出无人机列表
-     */
-    @Log(title = "无人机", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, CentermonitorTUav centermonitorTUav) {
-        List<CentermonitorTUav> list = centermonitorTUavService.selectCentermonitorTUavList(centermonitorTUav);
-        ExcelUtil<CentermonitorTUav> util = new ExcelUtil<CentermonitorTUav>(CentermonitorTUav.class);
-        util.exportExcel(response, list, "无人机数据");
-    }
-
-    /**
-     * 获取无人机详细信息
-     */
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return AjaxResult.success(centermonitorTUavService.selectCentermonitorTUavById(id));
-    }
-
-    /**
-     * 新增无人机
-     */
-    @Log(title = "无人机", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody CentermonitorTUav centermonitorTUav) {
-        return toAjax(centermonitorTUavService.insertCentermonitorTUav(centermonitorTUav));
-    }
-
-    /**
-     * 修改无人机
-     */
-    @Log(title = "无人机", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody CentermonitorTUav centermonitorTUav) {
-        return toAjax(centermonitorTUavService.updateCentermonitorTUav(centermonitorTUav));
-    }
-
-    /**
-     * 删除无人机
-     */
-    @Log(title = "无人机", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(centermonitorTUavService.deleteCentermonitorTUavByIds(ids));
-    }
-
-    /**
-     * 根据部门id查询无人机列表
-     *
-     * @return
-     */
-    @GetMapping("/selectCentermonitorTUavByDeptId")
-    public AjaxResult selectCentermonitorTUavByDeptId() {
-        return AjaxResult.success(centermonitorTUavService.selectCentermonitorTUavByDeptId());
-    }
-}

+ 0 - 85
src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavdeptController.java

@@ -1,85 +0,0 @@
-package com.sooka.sponest.monitor.uav.controller;
-
-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.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavdept;
-import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavdeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 无人机部门关联Controller
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-@RestController
-@RequestMapping("/uavdept")
-public class CentermonitorTUavdeptController extends BaseController {
-    @Autowired
-    private ICentermonitorTUavdeptService centermonitorTUavdeptService;
-
-    /**
-     * 查询无人机部门关联列表
-     */
-    @GetMapping("/list")
-    public TableDataInfo list(CentermonitorTUavdept centermonitorTUavdept) {
-        startPage();
-        List<CentermonitorTUavdept> list = centermonitorTUavdeptService.selectCentermonitorTUavdeptList(centermonitorTUavdept);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出无人机部门关联列表
-     */
-    @Log(title = "无人机部门关联", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, CentermonitorTUavdept centermonitorTUavdept) {
-        List<CentermonitorTUavdept> list = centermonitorTUavdeptService.selectCentermonitorTUavdeptList(centermonitorTUavdept);
-        ExcelUtil<CentermonitorTUavdept> util = new ExcelUtil<CentermonitorTUavdept>(CentermonitorTUavdept.class);
-        util.exportExcel(response, list, "无人机部门关联数据");
-    }
-
-    /**
-     * 获取无人机部门关联详细信息
-     */
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return AjaxResult.success(centermonitorTUavdeptService.selectCentermonitorTUavdeptById(id));
-    }
-
-    /**
-     * 新增无人机部门关联
-     */
-    @Log(title = "无人机部门关联", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody CentermonitorTUavdept centermonitorTUavdept) {
-        return toAjax(centermonitorTUavdeptService.insertCentermonitorTUavdept(centermonitorTUavdept));
-    }
-
-    /**
-     * 修改无人机部门关联
-     */
-    @Log(title = "无人机部门关联", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody CentermonitorTUavdept centermonitorTUavdept) {
-        return toAjax(centermonitorTUavdeptService.updateCentermonitorTUavdept(centermonitorTUavdept));
-    }
-
-    /**
-     * 删除无人机部门关联
-     */
-    @Log(title = "无人机部门关联", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(centermonitorTUavdeptService.deleteCentermonitorTUavdeptByIds(ids));
-    }
-}

+ 0 - 186
src/main/java/com/sooka/sponest/monitor/uav/domain/CentermonitorTUav.java

@@ -1,186 +0,0 @@
-package com.sooka.sponest.monitor.uav.domain;
-
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 无人机对象 centermonitor_t_uav
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-public class CentermonitorTUav extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键id
-     */
-    private Long id;
-
-    /**
-     * 基站名称
-     */
-    @Excel(name = "基站名称")
-    private String baseStationName;
-
-    /**
-     * 机库ID
-     */
-    @Excel(name = "机库ID")
-    private String baseStationId;
-
-    /**
-     * 机库SN
-     */
-    @Excel(name = "机库SN")
-    private String baseStationSn;
-
-    /**
-     * 经度
-     */
-    @Excel(name = "经度")
-    private String longitude;
-
-    /**
-     * 维度
-     */
-    @Excel(name = "维度")
-    private String latitude;
-
-    /**
-     * 高度
-     */
-    @Excel(name = "高度")
-    private String height;
-
-    /**
-     * 无人机名称
-     */
-    @Excel(name = "无人机名称")
-    private String uavName;
-
-    /**
-     * 无人机ID
-     */
-    @Excel(name = "无人机ID")
-    private String uavId;
-
-    /**
-     * 无人机SN
-     */
-    @Excel(name = "无人机SN")
-    private String uavSn;
-
-    /**
-     * 部门id
-     */
-    @Excel(name = "部门id")
-    private String deptId;
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setBaseStationName(String baseStationName) {
-        this.baseStationName = baseStationName;
-    }
-
-    public String getBaseStationName() {
-        return baseStationName;
-    }
-
-    public void setBaseStationId(String baseStationId) {
-        this.baseStationId = baseStationId;
-    }
-
-    public String getBaseStationId() {
-        return baseStationId;
-    }
-
-    public void setBaseStationSn(String baseStationSn) {
-        this.baseStationSn = baseStationSn;
-    }
-
-    public String getBaseStationSn() {
-        return baseStationSn;
-    }
-
-    public void setLongitude(String longitude) {
-        this.longitude = longitude;
-    }
-
-    public String getLongitude() {
-        return longitude;
-    }
-
-    public void setLatitude(String latitude) {
-        this.latitude = latitude;
-    }
-
-    public String getLatitude() {
-        return latitude;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setUavName(String uavName) {
-        this.uavName = uavName;
-    }
-
-    public String getUavName() {
-        return uavName;
-    }
-
-    public void setUavId(String uavId) {
-        this.uavId = uavId;
-    }
-
-    public String getUavId() {
-        return uavId;
-    }
-
-    public void setUavSn(String uavSn) {
-        this.uavSn = uavSn;
-    }
-
-    public String getUavSn() {
-        return uavSn;
-    }
-
-    public void setDeptId(String deptId) {
-        this.deptId = deptId;
-    }
-
-    public String getDeptId() {
-        return deptId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("baseStationName", getBaseStationName())
-                .append("baseStationId", getBaseStationId())
-                .append("baseStationSn", getBaseStationSn())
-                .append("longitude", getLongitude())
-                .append("latitude", getLatitude())
-                .append("height", getHeight())
-                .append("uavName", getUavName())
-                .append("uavId", getUavId())
-                .append("uavSn", getUavSn())
-                .append("deptId", getDeptId())
-                .toString();
-    }
-}

+ 0 - 48
src/main/java/com/sooka/sponest/monitor/uav/domain/CentermonitorTUavdept.java

@@ -1,48 +0,0 @@
-package com.sooka.sponest.monitor.uav.domain;
-
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 无人机部门关联对象 centermonitor_t_uavdept
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-@Data
-public class CentermonitorTUavdept extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键id
-     */
-    private Long id;
-
-    /**
-     * 无人机id
-     */
-    @Excel(name = "无人机id")
-    private Long uavId;
-
-    /**
-     * 无人机名称
-     */
-    @Excel(name = "无人机名称")
-    private String uavName;
-
-    /**
-     * 所属部门id
-     */
-    @Excel(name = "所属部门id")
-    private Long deptId;
-
-    /**
-     * 所属部门名称
-     */
-    @Excel(name = "所属部门名称")
-    private String deptName;
-
-}

+ 0 - 71
src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavMapper.java

@@ -1,71 +0,0 @@
-package com.sooka.sponest.monitor.uav.mapper;
-
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavdept;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 无人机Mapper接口
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-public interface CentermonitorTUavMapper {
-    /**
-     * 查询无人机
-     *
-     * @param id 无人机主键
-     * @return 无人机
-     */
-    public CentermonitorTUav selectCentermonitorTUavById(Long id);
-
-    /**
-     * 查询无人机列表
-     *
-     * @param centermonitorTUav 无人机
-     * @return 无人机集合
-     */
-    public List<CentermonitorTUav> selectCentermonitorTUavList(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 新增无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    public int insertCentermonitorTUav(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 修改无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    public int updateCentermonitorTUav(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 删除无人机
-     *
-     * @param id 无人机主键
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavById(Long id);
-
-    /**
-     * 批量删除无人机
-     *
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavByIds(Long[] ids);
-
-    /**
-     * 根据部门id查询无人机列表
-     * @param deptId
-     * @return
-     */
-    List<CentermonitorTUav> selectCentermonitorTUavByDeptId(@Param("deptId") String deptId);
-
-}

+ 0 - 63
src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavdeptMapper.java

@@ -1,63 +0,0 @@
-package com.sooka.sponest.monitor.uav.mapper;
-
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavdept;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 无人机部门关联Mapper接口
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-public interface CentermonitorTUavdeptMapper {
-    /**
-     * 查询无人机部门关联
-     *
-     * @param id 无人机部门关联主键
-     * @return 无人机部门关联
-     */
-    public CentermonitorTUavdept selectCentermonitorTUavdeptById(Long id);
-
-    /**
-     * 查询无人机部门关联列表
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 无人机部门关联集合
-     */
-    public List<CentermonitorTUavdept> selectCentermonitorTUavdeptList(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 新增无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    public int insertCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 修改无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    public int updateCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 删除无人机部门关联
-     *
-     * @param id 无人机部门关联主键
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavdeptById(Long id);
-
-    /**
-     * 批量删除无人机部门关联
-     *
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavdeptByIds(Long[] ids);
-
-}

+ 0 - 67
src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavService.java

@@ -1,67 +0,0 @@
-package com.sooka.sponest.monitor.uav.service;
-
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
-
-import java.util.List;
-
-/**
- * 无人机Service接口
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-public interface ICentermonitorTUavService {
-    /**
-     * 查询无人机
-     *
-     * @param id 无人机主键
-     * @return 无人机
-     */
-    public CentermonitorTUav selectCentermonitorTUavById(Long id);
-
-    /**
-     * 查询无人机列表
-     *
-     * @param centermonitorTUav 无人机
-     * @return 无人机集合
-     */
-    public List<CentermonitorTUav> selectCentermonitorTUavList(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 新增无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    public int insertCentermonitorTUav(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 修改无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    public int updateCentermonitorTUav(CentermonitorTUav centermonitorTUav);
-
-    /**
-     * 批量删除无人机
-     *
-     * @param ids 需要删除的无人机主键集合
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavByIds(Long[] ids);
-
-    /**
-     * 删除无人机信息
-     *
-     * @param id 无人机主键
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavById(Long id);
-
-    /**
-     * 根据部门id查询无人机列表
-     * @return
-     */
-    List<CentermonitorTUav> selectCentermonitorTUavByDeptId();
-}

+ 0 - 61
src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavdeptService.java

@@ -1,61 +0,0 @@
-package com.sooka.sponest.monitor.uav.service;
-
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavdept;
-
-import java.util.List;
-
-/**
- * 无人机部门关联Service接口
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-public interface ICentermonitorTUavdeptService {
-    /**
-     * 查询无人机部门关联
-     *
-     * @param id 无人机部门关联主键
-     * @return 无人机部门关联
-     */
-    public CentermonitorTUavdept selectCentermonitorTUavdeptById(Long id);
-
-    /**
-     * 查询无人机部门关联列表
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 无人机部门关联集合
-     */
-    public List<CentermonitorTUavdept> selectCentermonitorTUavdeptList(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 新增无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    public int insertCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 修改无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    public int updateCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept);
-
-    /**
-     * 批量删除无人机部门关联
-     *
-     * @param ids 需要删除的无人机部门关联主键集合
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavdeptByIds(Long[] ids);
-
-    /**
-     * 删除无人机部门关联信息
-     *
-     * @param id 无人机部门关联主键
-     * @return 结果
-     */
-    public int deleteCentermonitorTUavdeptById(Long id);
-}

+ 0 - 100
src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavServiceImpl.java

@@ -1,100 +0,0 @@
-package com.sooka.sponest.monitor.uav.service.impl;
-
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
-import com.sooka.sponest.monitor.uav.mapper.CentermonitorTUavMapper;
-import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Collections;
-import java.util.List;
-
-
-/**
- * 无人机Service业务层处理
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-@Service
-public class CentermonitorTUavServiceImpl implements ICentermonitorTUavService {
-    @Autowired
-    private CentermonitorTUavMapper centermonitorTUavMapper;
-
-    /**
-     * 查询无人机
-     *
-     * @param id 无人机主键
-     * @return 无人机
-     */
-    @Override
-    public CentermonitorTUav selectCentermonitorTUavById(Long id) {
-        return centermonitorTUavMapper.selectCentermonitorTUavById(id);
-    }
-
-    /**
-     * 查询无人机列表
-     *
-     * @param centermonitorTUav 无人机
-     * @return 无人机
-     */
-    @Override
-    public List<CentermonitorTUav> selectCentermonitorTUavList(CentermonitorTUav centermonitorTUav) {
-        return centermonitorTUavMapper.selectCentermonitorTUavList(centermonitorTUav);
-    }
-
-    /**
-     * 新增无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    @Override
-    public int insertCentermonitorTUav(CentermonitorTUav centermonitorTUav) {
-        return centermonitorTUavMapper.insertCentermonitorTUav(centermonitorTUav);
-    }
-
-    /**
-     * 修改无人机
-     *
-     * @param centermonitorTUav 无人机
-     * @return 结果
-     */
-    @Override
-    public int updateCentermonitorTUav(CentermonitorTUav centermonitorTUav) {
-        return centermonitorTUavMapper.updateCentermonitorTUav(centermonitorTUav);
-    }
-
-    /**
-     * 批量删除无人机
-     *
-     * @param ids 需要删除的无人机主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCentermonitorTUavByIds(Long[] ids) {
-        return centermonitorTUavMapper.deleteCentermonitorTUavByIds(ids);
-    }
-
-    /**
-     * 删除无人机信息
-     *
-     * @param id 无人机主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCentermonitorTUavById(Long id) {
-        return centermonitorTUavMapper.deleteCentermonitorTUavById(id);
-    }
-
-    /**
-     * 根据部门id查询无人机列表
-     * @return
-     */
-    @Override
-    public List<CentermonitorTUav> selectCentermonitorTUavByDeptId() {
-        Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
-        return centermonitorTUavMapper.selectCentermonitorTUavByDeptId(String.valueOf(deptId));
-    }
-}

+ 0 - 91
src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavdeptServiceImpl.java

@@ -1,91 +0,0 @@
-package com.sooka.sponest.monitor.uav.service.impl;
-
-import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavdept;
-import com.sooka.sponest.monitor.uav.mapper.CentermonitorTUavdeptMapper;
-import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavdeptService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-
-
-/**
- * 无人机部门关联Service业务层处理
- *
- * @author ruoyi
- * @date 2025-03-19
- */
-@Service
-public class CentermonitorTUavdeptServiceImpl implements ICentermonitorTUavdeptService {
-    @Autowired
-    private CentermonitorTUavdeptMapper centermonitorTUavdeptMapper;
-
-    /**
-     * 查询无人机部门关联
-     *
-     * @param id 无人机部门关联主键
-     * @return 无人机部门关联
-     */
-    @Override
-    public CentermonitorTUavdept selectCentermonitorTUavdeptById(Long id) {
-        return centermonitorTUavdeptMapper.selectCentermonitorTUavdeptById(id);
-    }
-
-    /**
-     * 查询无人机部门关联列表
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 无人机部门关联
-     */
-    @Override
-    public List<CentermonitorTUavdept> selectCentermonitorTUavdeptList(CentermonitorTUavdept centermonitorTUavdept) {
-        return centermonitorTUavdeptMapper.selectCentermonitorTUavdeptList(centermonitorTUavdept);
-    }
-
-    /**
-     * 新增无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    @Override
-    public int insertCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept) {
-        centermonitorTUavdept.setCreateTime(new Date());
-        return centermonitorTUavdeptMapper.insertCentermonitorTUavdept(centermonitorTUavdept);
-    }
-
-    /**
-     * 修改无人机部门关联
-     *
-     * @param centermonitorTUavdept 无人机部门关联
-     * @return 结果
-     */
-    @Override
-    public int updateCentermonitorTUavdept(CentermonitorTUavdept centermonitorTUavdept) {
-        centermonitorTUavdept.setUpdateTime(new Date());
-        return centermonitorTUavdeptMapper.updateCentermonitorTUavdept(centermonitorTUavdept);
-    }
-
-    /**
-     * 批量删除无人机部门关联
-     *
-     * @param ids 需要删除的无人机部门关联主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCentermonitorTUavdeptByIds(Long[] ids) {
-        return centermonitorTUavdeptMapper.deleteCentermonitorTUavdeptByIds(ids);
-    }
-
-    /**
-     * 删除无人机部门关联信息
-     *
-     * @param id 无人机部门关联主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCentermonitorTUavdeptById(Long id) {
-        return centermonitorTUavdeptMapper.deleteCentermonitorTUavdeptById(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;
-    }
-}
-

+ 2 - 0
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

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

@@ -25,6 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isCommandCenter"    column="is_command_center"    />
     </resultMap>
 
+
+    <resultMap type="CenterdataTAidevicedeptDTO" id="selectByDeviceCodeDTO">
+        <result property="mapDeptId"    column="map_dept_id"    />
+        <result property="mapDeptName"    column="map_dept_name"    />
+    </resultMap>
+
     <sql id="selectCenterdataTAidevicedeptVo">
         select id, device_type, device_code, device_id, device_name, map_dept_id, map_dept_name, dept_protype, create_by, create_name, create_time, update_by, update_name, update_time, data_status, dept_id, dept_name, is_command_center from centermonitor_t_aidevicedept
     </sql>
@@ -145,4 +151,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where dept_protype = '2' and device_code = #{deviceCode}
     </select>
 
+    <sql id="selectByDeviceCode">
+        select map_dept_id,map_dept_name from centermonitor_t_aidevicedept
+    </sql>
+    <select id="getByDeviceCode" parameterType="String" resultMap="selectByDeviceCodeDTO">
+        <include refid="selectByDeviceCode"/>
+         where device_code = #{deviceCode}
+    </select>
 </mapper>

+ 51 - 0
src/main/resources/mapper/monitor/camera/CentermonitorTCameraCallLogMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.monitor.camera.mapper.CentermonitorTCameraCallLogMapper">
+    <resultMap id="cameraCallLogStatistic" type="CentermonitorTCameraCallLogStatisticsDTO">
+        <result property="name" column="dept_name"/>
+        <result property="value" column="value"/>
+    </resultMap>
+    <insert id="insertInto" parameterType="java.lang.Integer">
+        insert into centermonitor_t_camera_call_log
+        (id,device_code,type,map_dept_id,map_dept_name,create_by,create_name,create_time)
+        VALUES
+        <foreach item="item" collection="list" separator="," index="">
+            (#{item.id},#{item.deviceCode},#{item.type},#{item.mapDeptId},#{item.mapDeptName},#{item.createBy},#{item.createName},#{item.createTime})
+        </foreach>
+    </insert>
+    <select id="getCameraCallDepartmentLogOneStatistics" resultMap="cameraCallLogStatistic">
+        SELECT sd.dept_name,
+               COUNT(1) AS value
+        FROM
+            centermonitor_t_camera_call_log ctccl
+            left join ${database_system}.sys_dept sd
+        on ctccl.map_dept_id = sd.dept_id
+        WHERE
+            ctccl.type = 0 AND (sd.dept_id = #{deptId} or FIND_IN_SET(#{deptId},sd.ancestors))
+        group by map_dept_id order by value desc
+    </select>
+    <select id="getCameraCallDepartmentLogTwoStatistics" resultMap="cameraCallLogStatistic">
+        SELECT sd.dept_name,
+               COUNT(1) AS value
+        FROM
+            centermonitor_t_camera_call_log ctccl
+            left join ${database_system}.sys_dept sd
+        on ctccl.map_dept_id = sd.dept_id
+        WHERE
+            ctccl.type = 1 AND (sd.dept_id = #{deptId} or FIND_IN_SET(#{deptId},sd.ancestors))
+        group by map_dept_id order by value desc
+    </select>
+    <select id="getCameraCallLogStatistics" resultType="java.lang.Integer">
+        SELECT count(1) as value FROM centermonitor_t_camera_call_log ctccl
+        LEFT JOIN ${database_system}.sys_dept sd ON ctccl.map_dept_id = sd.dept_id
+        where ctccl.`type` = 0
+        <if test="deptId != null and deptId != ''">
+            AND (sd.dept_id = #{deptId} or FIND_IN_SET(#{deptId},sd.ancestors))
+        </if>
+        <if test="createTime != null">
+            and date(ctccl.create_time) = date(#{createTime})
+        </if>
+    </select>
+</mapper>

+ 210 - 40
src/main/resources/mapper/monitor/camera/CentermonitorTCameraMapper.xml

@@ -21,6 +21,7 @@
         <result property="cameraPasword" column="camera_pasword"/>
         <result property="cameraCode" column="camera_code"/>
         <result property="cameraFactory" column="camera_factory"/>
+        <result property="convergencePlatform" column="convergence_platform"/>
         <result property="cameraRegion" column="camera_region"/>
         <result property="cameraRadius" column="camera_radius"/>
         <result property="height" column="height"/>
@@ -861,6 +862,7 @@
         ) a
         LEFT JOIN centermonitor_t_camerachannel b ON a.id = b.camera_id
         GROUP BY a.id
+        ORDER BY create_time
     </select>
 
 
@@ -889,7 +891,7 @@
         1 = 1 ${params.dataScope}) a left join centermonitor_t_camerachannel b on a.id= b.camera_id and
         b.channel_type='2' GROUP BY
         a.id
-
+        ORDER BY a.create_time
 
     </select>
 
@@ -1336,10 +1338,213 @@
     </select>
 
     <delete id="deleteImageByCameraId">
-        delete
-        from centermonitor_t_camera_img
-        where camera_id = #{cameraId}
+        delete from centermonitor_t_camera_img where camera_id = #{cameraId}
     </delete>
+
+    <select id="getAccessManufacturer"  resultMap="CentermonitorTCameraResult">
+        SELECT
+        bb.dict_label AS name,
+        COUNT(*) AS count
+        FROM
+        (SELECT
+        aa.id,
+        aa.dict_value,
+        aa.dict_label
+        FROM
+        (SELECT
+        a.id,
+        dict_data.dict_value,
+        dict_data.dict_label
+        FROM
+        centermonitor_t_camera a
+        LEFT JOIN ${database_system}.sys_dict_data dict_data ON dict_data.dict_value = a.camera_factory
+        LEFT JOIN centermonitor_t_aidevicedept b ON a.id = b.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON b.map_dept_id = d.dept_id
+        WHERE
+        dict_data.STATUS = 0
+        AND dict_data.dict_type = 'camera_factory'
+        <if test="deptId != null and deptId != ''">
+            AND (d.dept_id = #{deptId} or FIND_IN_SET(#{deptId},d.ancestors)> 0)
+        </if>
+        ) aa
+        GROUP BY
+        aa.id, aa.dict_value, aa.dict_label
+        ) bb
+        GROUP BY
+        bb.dict_label;
+    </select>
+
+    <select id="getDeviceOffline"  resultMap="CentermonitorTCameraResult">
+        SELECT dict_label AS NAME,
+        IFNULL(count, 0) count
+        FROM
+        ( SELECT dict_data.dict_value, dict_data.dict_label FROM ${database_system}.sys_dict_data dict_data WHERE
+        dict_data.STATUS = 0 AND dict_data.dict_type = 'camera_use' ) a
+        LEFT JOIN (
+        SELECT
+        b.camera_use,count( b.camera_use ) count
+        FROM
+        (
+        SELECT
+        a.id, a.camera_use
+        FROM
+        centermonitor_t_camera a
+        LEFT JOIN centermonitor_t_aidevicedept b ON a.id = b.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON b.map_dept_id = d.dept_id
+        WHERE
+        a.working_status = 1
+        <if test="deptId != null and deptId != ''">
+            AND (d.dept_id = #{deptId} or FIND_IN_SET(#{deptId},d.ancestors)> 0)
+        </if>
+        GROUP BY
+        a.id
+        ) b
+        GROUP BY
+        b.camera_use
+        ) b
+        ON a.dict_value = b.camera_use
+    </select>
+
+    <select id="getDeviceBrand"  resultMap="CentermonitorTCameraResult">
+        SELECT dict_label AS NAME,
+        IFNULL(count, 0) AS count
+        FROM
+        ( SELECT dict_data.dict_value, dict_data.dict_label FROM ${database_system}.sys_dict_data dict_data WHERE
+        dict_data.STATUS = 0 AND dict_data.dict_type = 'camera_factory' ) a
+        LEFT JOIN (
+        SELECT
+        b.camera_factory,count( b.camera_factory ) count
+        FROM
+        (
+        SELECT
+        a.id, a.camera_factory
+        FROM
+        centermonitor_t_camera a
+        LEFT JOIN centermonitor_t_aidevicedept b ON a.id = b.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON b.map_dept_id = d.dept_id
+        WHERE
+        a.working_status = 1
+        <if test="deptId != null and deptId != ''">
+            AND (d.dept_id = #{deptId} or FIND_IN_SET(#{deptId},d.ancestors)> 0)
+        </if>
+        GROUP BY
+        a.id
+        ) b
+        GROUP BY
+        b.camera_factory
+        ) b
+        ON a.dict_value = b.camera_factory
+    </select>
+
+    <select id="getOperator"  resultMap="CentermonitorTCameraResult">
+        SELECT dict_label as name,
+        IFNULL(count, 0) AS count
+        FROM
+        (SELECT
+        dict_data.dict_value, dict_data.dict_label
+        FROM
+        ${database_system}.sys_dict_data dict_data
+        WHERE
+        dict_data.STATUS = 0
+        AND dict_data.dict_type = 'operator_type') AS a
+        LEFT JOIN
+        (SELECT
+        b.operator_type,COUNT(b.operator_type) AS count
+        FROM
+        (SELECT
+        a.id, a.operator_type
+        FROM
+        centermonitor_t_camera a
+        LEFT JOIN centermonitor_t_aidevicedept b ON a.id = b.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON b.map_dept_id = d.dept_id
+        WHERE
+        a.working_status = 1
+        <if test="deptId != null and deptId != ''">
+            AND (d.dept_id = #{deptId} or FIND_IN_SET(#{deptId},d.ancestors)> 0)
+        </if>
+        GROUP BY
+        a.id) AS b
+        GROUP BY
+        b.operator_type) AS b
+        ON dict_value = operator_type;
+    </select>
+
+    <select id="getOfflineType"  resultMap="CentermonitorTCameraResult">
+        SELECT dict_label as name,
+        count(*) as count
+        FROM (SELECT aa.id, aa.dict_value, aa.dict_label
+        FROM (SELECT a.id, dict_data.dict_value, dict_data.dict_label
+        FROM centermonitor_t_camera a
+        LEFT JOIN ${database_system}.sys_dict_data dict_data ON dict_data.dict_value = a.offline_reason
+        LEFT JOIN centermonitor_t_aidevicedept b ON a.id = b.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON b.map_dept_id = d.dept_id
+        WHERE dict_data.STATUS = 0
+        and working_status = 1
+        AND dict_data.dict_type = 'camera_offline_reason'
+        <if test="deptId != null and deptId != ''">
+            AND (d.dept_id = #{deptId} or FIND_IN_SET(#{deptId},d.ancestors)> 0)
+        </if>
+        ) aa
+        GROUP BY aa.id) bb
+        GROUP BY dict_label
+    </select>
+    <select id="getEquipmentStatistics" resultType="java.lang.Integer">
+        SELECT
+        COUNT(DISTINCT ctc.id,ctc.id)
+        FROM
+        centermonitor_t_camera ctc
+        LEFT JOIN centermonitor_t_aidevicedept cta ON ctc.id = cta.device_id
+        LEFT JOIN ${database_system}.sys_dept sd ON cta.map_dept_id = sd.dept_id
+        WHERE 1 = 1 and sd.dept_id = #{deptId} or FIND_IN_SET(#{deptId},sd.ancestors)
+        <!--        <foreach collection="list" item="item">-->
+        <!--            and (sd.dept_id = #{item.deptId} or FIND_IN_SET(#{item.deptId},sd.ancestors))-->
+        <!--        </foreach>-->
+    </select>
+    <resultMap id="selectVideoCountyStatistics" type="CentermonitorTCameraVideoStatisticsDTO">
+        <result property="number" column="number"></result>
+        <result property="cameraRadius" column="camera_radius"></result>
+    </resultMap>
+    <select id="getVideoCountyStatistics" resultMap="selectVideoCountyStatistics">
+        SELECT
+            count(distinct ctc.id,ctc.camera_radius)as number,
+            ctc.camera_radius
+        FROM
+            centermonitor_t_camera ctc
+                LEFT JOIN centermonitor_t_aidevicedept cta ON ctc.id = cta.device_id
+                LEFT JOIN ${database_system}.sys_dept sd ON cta.map_dept_id = sd.dept_id
+        WHERE
+            1 = 1
+          and ctc.camera_radius is not null
+          and ctc.camera_radius > 0
+          AND (sd.dept_id = #{deptId} or FIND_IN_SET(#{deptId},sd.ancestors))
+        GROUP BY
+            ctc.camera_radius
+    </select>
+
+    <select id="getVideoDirectory"  resultMap="CentermonitorTCameraResult">
+        SELECT
+        COUNT(*) AS total,
+        COUNT(DISTINCT id) AS access,
+        count(if(working_status=0,true,null)) online,
+        count(if(working_status=1,true,null)) offline
+        FROM
+        (
+        SELECT
+        DISTINCT(a.id),
+        "camera" type,
+        working_status
+        FROM
+        centermonitor_t_camera a
+        LEFT JOIN centermonitor_t_aidevicedept cta ON a.id = cta.device_id
+        LEFT JOIN ${database_system}.sys_dept d ON cta.map_dept_id = d.dept_id
+
+        <where>
+            <if test="deptId != null and deptId != ''">
+                (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+            </if>
+        </where>
+        ) a
+    </select>
     <select id="selectAllCameraList" parameterType="CameraCodeAndNameVO"
             resultMap="getAllCameraList">
         select camera_code, camera_name, camera_type
@@ -1457,40 +1662,5 @@
                  LEFT JOIN centermonitor_t_camera ct ON ctc.camera_id = ct.id
         WHERE ctc.channel_code = #{channelCode} limit 1
     </select>
-    <update id="updateBatchLawEnforcementInstrumentState">
-        UPDATE centermonitor_t_camera
-        SET working_status = CASE camera_code
-        <foreach collection="list" item="item">
-            WHEN (SELECT channel_code FROM centermonitor_t_camerachannel WHERE device_code = #{item.code} AND
-            channel_type = 2 LIMIT 1) THEN
-            CASE
-            WHEN #{item.status} = '0' THEN '1'
-            ELSE '0'
-            END
-        </foreach>
-        END,
-        offline_reason = ''
-        WHERE camera_code IN (
-        <foreach collection="list" item="item" separator=",">
-            (SELECT channel_code FROM centermonitor_t_camerachannel WHERE device_code = #{item.code} AND channel_type =
-            2 LIMIT 1)
-        </foreach>
-        );
-    </update>
-    <update id="updateBatchVideoRecorderOfflineState">
-        UPDATE centermonitor_t_camera
-        SET working_status = 1
-        WHERE camera_code in
-        <foreach collection="list" item="item" separator="," open="(" close=")">
-            #{item}
-        </foreach>
-    </update>
-    <update id="updateBatchVideoRecorderOnlineState">
-        UPDATE centermonitor_t_camera
-        SET working_status = 0
-        WHERE camera_code in
-        <foreach collection="list" item="item" separator="," open="(" close=")">
-            #{item}
-        </foreach>
-    </update>
+
 </mapper>

+ 373 - 399
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,358 @@
         WHERE
             working_status = #{workingStatus}
     </select>
+    <resultMap id="selectIoTEquipmentStatistics" type="DeviceIoTEquipmentStatisticsResult">
+        <result property="deviceType" column="deviceType"></result>
+        <result property="count" column="count"></result>
+    </resultMap>
+    <select id="getIoTEquipmentStatistics" resultMap="selectIoTEquipmentStatistics">
+        SELECT
+            a.dict_label deviceType,
+            IFNULL( b.count, 0 ) count
+        FROM
+            ( SELECT dict_value, dict_label FROM ${database_system}.sys_dict_data WHERE dict_type = 'device_type' ) AS a
+            LEFT JOIN (
+            SELECT
+            ctmd.device_type,
+            COUNT( DISTINCT ctmd.device_code ) AS count
+            FROM
+            centermonitor_t_monitoring_device ctmd
+            LEFT JOIN centermonitor_t_aidevicedept cta ON ctmd.id = cta.device_id
+            LEFT JOIN ${database_system}.sys_dept sd ON sd.dept_id = cta.map_dept_id
+            WHERE
+            ( sd.dept_id = #{deptId}
+            OR FIND_IN_SET( #{deptId}, sd.ancestors)
+            ) GROUP BY ctmd.device_type ) b ON a.dict_value = b.device_type
+    </select>
+    <select id="getOnLineSensorStatistics" resultMap="selectIoTEquipmentStatistics">
+        SELECT
+        a.dict_label deviceType,
+        IFNULL( b.count, 0 ) count
+        FROM
+        ( SELECT dict_value, dict_label FROM ${database_system}.sys_dict_data WHERE dict_type = 'device_type' ) AS a
+        LEFT JOIN (
+        SELECT
+        ctmd.device_type,
+        COUNT( DISTINCT ctmd.device_code ) AS count
+        FROM
+        centermonitor_t_monitoring_device ctmd
+        LEFT JOIN centermonitor_t_aidevicedept cta ON ctmd.id = cta.device_id
+        <if test="workingStatus != null">
+            and ctmd.working_status = #{workingStatus}
+        </if>
+        LEFT JOIN ${database_system}.sys_dept sd ON sd.dept_id = cta.map_dept_id
+        WHERE
+        ( sd.dept_id = #{deptId} OR FIND_IN_SET( #{deptId}, sd.ancestors))
+        GROUP BY
+        ctmd.device_type
+        ) b ON a.dict_value = b.device_type
+    </select>
 
+    <select id="getDeviceAnalysis" resultMap="CentermonitorTMonitoringDeviceResult">
+        SELECT dict_label                   as dictName,
+               IFNULL(dv.device_offline, 0) AS deviceOffline,
+               IFNULL(dv.device_online, 0)  AS deviceOnline
+        FROM (SELECT dict_data.dict_value,
+                     dict_data.dict_label
+              FROM ${database_system}.sys_dict_data dict_data
+              WHERE dict_data.STATUS = 0
+                AND dict_data.dict_type = 'device_type') AS a
+                 LEFT JOIN
+             (SELECT s.device_type,
+                     SUM(IF(s.working_status = 1, 1, 0)) AS device_offline,
+                     SUM(IF(s.working_status = 0, 1, 0)) AS device_online
+              FROM (SELECT DISTINCT(a.id),
+                                   a.device_type,
+                                   a.working_status
+                    FROM centermonitor_t_monitoring_device a
+                             LEFT JOIN centermonitor_t_aidevicedept ad ON a.id = ad.device_id
+                             LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+                    WHERE (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+                    GROUP BY a.id) AS s
+              GROUP BY s.device_type) as dv
+             on dict_value = device_type;
+    </select>
+    <select id="getOfflineReasonCountStatistics" resultMap="selectIoTEquipmentStatistics">
+        SELECT
+        a.dict_label deviceType,
+        IFNULL( b.count, 0 ) count
+        FROM
+        ( SELECT dict_value, dict_label FROM ${database_system}.sys_dict_data WHERE dict_type = 'device_status' and dict_value not in (0,1)) AS a
+        LEFT JOIN (
+        SELECT
+        ctmd.working_status,
+        COUNT( DISTINCT ctmd.device_code ) AS count
+        FROM
+        centermonitor_t_monitoring_device ctmd
+        LEFT JOIN centermonitor_t_aidevicedept cta ON ctmd.id = cta.device_id
+        LEFT JOIN ${database_system}.sys_dept sd ON sd.dept_id = cta.map_dept_id
+        WHERE
+        (
+        sd.dept_id = #{deptId}
+        OR FIND_IN_SET( #{deptId}
+        , sd.ancestors ))
+        <if test="deviceType != null">
+            and ctmd.device_type = #{deviceType}
+        </if>
+        GROUP BY
+        ctmd.working_status
+        ) b ON a.dict_value = b.working_status
+    </select>
+
+    <select id="getFaultDistribution" resultMap="CentermonitorTMonitoringDeviceResult">
+        SELECT dict_label                   as dictName,
+               IFNULL(dv.device_online, 0)  AS deviceOnline
+        FROM (SELECT dict_data.dict_value,
+                     dict_data.dict_label
+              FROM ${database_system}.sys_dict_data dict_data
+              WHERE dict_data.STATUS = 0
+                AND dict_data.dict_type = 'device_type') AS a
+                 LEFT JOIN
+             (SELECT s.device_type,
+                     SUM(IF(s.working_status = 1, 1, 0)) AS device_online,
+                     SUM(IF(s.working_status = 0, 1, 0)) AS device_offline
+              FROM (SELECT DISTINCT(a.id),
+                                   a.device_type,
+                                   a.working_status
+                    FROM centermonitor_t_monitoring_device a
+                             LEFT JOIN centermonitor_t_aidevicedept ad ON a.id = ad.device_id
+                             LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+                    WHERE (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+                    GROUP BY a.id) AS s
+              GROUP BY s.device_type) as dv
+             on dict_value = device_type;
+    </select>
+    <select id="getSensorDataCount" resultMap="CentermonitorTMonitoringDeviceResult">
+        SELECT '大气监测' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_atmosphere a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.device_code
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.create_time) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+        UNION ALL
+        SELECT '病虫害监测' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_insect_pests a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.device_number
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.create_time) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+        UNION ALL
+        SELECT '土壤墒情' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_soil_moisture a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.device_code
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.create_time) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+        UNION ALL
+        SELECT '水压监测' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_water_pressure a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.IMEI
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.create_time) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+        UNION ALL
+        SELECT '水质监测' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_water_quality a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.device_code
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.create_time) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+        UNION ALL
+        SELECT '水文监测' AS sensortype, COALESCE(COUNT(distinct a.id), 0) AS dataCount
+        FROM centermonitor_t_monitoring_data_water_velocity a
+                 LEFT JOIN centermonitor_t_monitoring_device de ON de.device_code = a.ST
+                 LEFT JOIN centermonitor_t_aidevicedept ad ON de.id = ad.device_id
+                 LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+        WHERE DATE(a.ST) = CURRENT_DATE
+          AND (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)
+    </select>
+
+    <select id="getDeviceSquareNumber" resultMap="CentermonitorTMonitoringDeviceResult">
+        SELECT COUNT(*) AS                               dataCount,
+               count(
+                       IF
+                       (working_status = 1, TRUE, NULL)) deviceOffline
+        FROM (SELECT DISTINCT (a.id),
+                              working_status
+              FROM centermonitor_t_monitoring_device a
+                       LEFT JOIN centermonitor_t_aidevicedept ad ON a.id = ad.device_id
+                       LEFT JOIN ${database_system}.sys_dept d ON ad.map_dept_id = d.dept_id
+              WHERE (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0)) a
+    </select>
+    <resultMap id="selectIoTEquipmentDetails" type="CenterMonitorIoTEquipmentDetailsVO">
+        <result property="deviceName" column="device_name"/>
+        <result property="deviceCode" column="device_code"/>
+        <result property="address" column="address"/>
+    </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
+        where (d.dept_id = #{deptId} OR FIND_IN_SET(#{deptId}, d.ancestors) > 0) and device_type = #{deviceType} and device_code = #{deviceCode}
+    </select>
+    <!--水质监测-->
+    <resultMap type="CentermonitorTMonitoringDataWaterQualityIoTResult" id="selectCentermonitorTMonitoringDataWaterQualityIoTResult">
+        <result property="waterPh" column="water_ph"/>
+        <result property="waterTemperature" column="water_temperature"/>
+        <result property="waterQualitySuspension" column="water_quality_suspension"/>
+        <result property="conductivity" column="conductivity"/>
+        <result property="cod" column="cod"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+    <select id="getIoTWaterQuality" resultMap="selectCentermonitorTMonitoringDataWaterQualityIoTResult">
+        SELECT
+            q.id,
+            ifnull( CONVERT ( q.water_ph, DECIMAL ( 10, 2 )), 0 ) water_ph,
+            CONVERT (
+                    q.water_temperature,
+                    DECIMAL ( 10, 2 )) water_temperature,
+            CONVERT (
+                    q.water_quality_suspension,
+                    DECIMAL ( 10, 2 )) water_quality_suspension,
+            CONVERT (
+                    q.conductivity,
+                    DECIMAL ( 10, 2 )) conductivity,
+            CONVERT (
+                    q.cod,
+                    DECIMAL ( 10, 2 )) cod,
+            q.create_time
+        FROM
+            centermonitor_t_monitoring_data_water_quality q
+        WHERE
+            1 = 1
+          AND q.device_code = #{deviceCode}
+          AND date_format(q.create_time, '%y%m%d' ) = date_format( #{date}, '%y%m%d' )
+        ORDER BY
+            q.create_time DESC
+            limit 1
+    </select>
+    <!--土壤墒情-->
+    <resultMap type="CentermonitorTMonitoringDataSoilMoistureIoTResult" id="selectCentermonitorTMonitoringDataSoilIoTResult">
+        <result property="temperature" column="temperature"/>
+        <result property="humidity" column="humidity"/>
+        <result property="ph" column="ph"/>
+        <result property="conductivity" column="conductivity"/>
+        <result property="nitrogen" column="nitrogen"/>
+        <result property="phosphorus" column="phosphorus"/>
+        <result property="potassium" column="potassium"/>
+        <result property="createTime" column="create_time"/>
+    </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
+        FROM
+            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')
+        ORDER BY s.create_time DESC
+            limit 1
+    </select>
+    <!--病虫害监测-->
+    <resultMap type="CentermonitorTMonitoringDataInsectPestsIoTResult" id="selectCentermonitorTMonitoringDataInsectPestsIoTResult">
+        <result property="id" column="id"/>
+        <result property="newCount" column="new_count"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+    <select id="getIoTInsectPests" resultMap="selectCentermonitorTMonitoringDataInsectPestsIoTResult">
+        SELECT
+            i.id,
+            i.new_count,
+            i.create_time
+        FROM
+            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')
+        ORDER BY i.create_time DESC
+            limit 1
+    </select>
+    <!--大气监测-->
+    <resultMap type="CentermonitorTMonitoringDataAtmosphereIoTResult" id="selectCentermonitorTMonitoringDataAtmosphereIoTResult">
+        <result property="fineParticle" column="fine_particle"/>
+        <result property="sulfurDioxide" column="sulfur_dioxide"/>
+        <result property="nitrogenDioxide" column="nitrogen_dioxide"/>
+        <result property="carbonMonoxide" column="carbon_monoxide"/>
+        <result property="temperature" column="temperature"/>
+        <result property="humidity" column="humidity"/>
+        <result property="createTime" column="create_time"/>
+    </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
+        FROM
+            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')
+        ORDER BY a.create_time DESC
+            limit 1
+    </select>
+    <!--水压监测-->
+    <resultMap type="CentermonitorTMonitoringDataWaterPressureIoTResult" id="selectCentermonitorTMonitoringDataWaterPressureIoTResult">
+        <result property="createTime" column="create_time"/>
+        <result property="hydraulicValue" column="hydraulic_value"/>
+        <result property="hydraulicThresholdMin" column="hydraulic_threshold_min"/>
+        <result property="hydraulicThresholdMax" column="hydraulic_threshold_max"/>
+    </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
+        FROM
+            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')
+        ORDER BY a.create_time DESC
+            limit 1
+    </select>
+    <!--水流速-->
+    <resultMap type="CentermonitorTMonitoringDataWaterVelocityIoTResult" id="selectCentermonitorTMonitoringDataWaterVelocityIoTResult">
+        <result property="createTime" column="TT"/>
+        <result property="Z1" column="Z1"/>
+        <result property="Q" column="Q"/>
+        <result property="V1" column="V1"/>
+        <result property="Z" column="Z"/>
+    </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
+        FROM
+            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')
+        ORDER BY w.TT DESC
+            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"/>

+ 0 - 127
src/main/resources/mapper/monitor/uav/CentermonitorTUavMapper.xml

@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.sooka.sponest.monitor.uav.mapper.CentermonitorTUavMapper">
-
-    <resultMap type="CentermonitorTUav" id="CentermonitorTUavResult">
-        <result property="id" column="id"/>
-        <result property="baseStationName" column="base_station_name"/>
-        <result property="baseStationId" column="base_station_id"/>
-        <result property="baseStationSn" column="base_station_sn"/>
-        <result property="longitude" column="longitude"/>
-        <result property="latitude" column="latitude"/>
-        <result property="height" column="height"/>
-        <result property="uavName" column="uav_name"/>
-        <result property="uavId" column="uav_id"/>
-        <result property="uavSn" column="uav_sn"/>
-        <result property="deptId" column="dept_id"/>
-        <result property="deptNames" column="deptNames"/>
-    </resultMap>
-
-    <sql id="selectCentermonitorTUavVo">
-        select id,
-               base_station_name,
-               base_station_id,
-               base_station_sn,
-               longitude,
-               latitude,
-               height,
-               uav_name,
-               uav_id,
-               uav_sn,
-               dept_id
-        from centermonitor_t_uav
-    </sql>
-
-    <select id="selectCentermonitorTUavList" parameterType="CentermonitorTUav" resultMap="CentermonitorTUavResult">
-        <include refid="selectCentermonitorTUavVo"/>
-        <where>
-            <if test="baseStationName != null  and baseStationName != ''">and base_station_name like concat('%',
-                #{baseStationName}, '%')
-            </if>
-            <if test="baseStationId != null  and baseStationId != ''">and base_station_id = #{baseStationId}</if>
-            <if test="baseStationSn != null  and baseStationSn != ''">and base_station_sn = #{baseStationSn}</if>
-            <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
-            <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
-            <if test="height != null  and height != ''">and height = #{height}</if>
-            <if test="uavName != null  and uavName != ''">and uav_name like concat('%', #{uavName}, '%')</if>
-            <if test="uavId != null  and uavId != ''">and uav_id = #{uavId}</if>
-            <if test="uavSn != null  and uavSn != ''">and uav_sn = #{uavSn}</if>
-            <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if>
-        </where>
-    </select>
-
-    <select id="selectCentermonitorTUavById" parameterType="Long" resultMap="CentermonitorTUavResult">
-        <include refid="selectCentermonitorTUavVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertCentermonitorTUav" parameterType="CentermonitorTUav" useGeneratedKeys="true" keyProperty="id">
-        insert into centermonitor_t_uav
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="baseStationName != null">base_station_name,</if>
-            <if test="baseStationId != null">base_station_id,</if>
-            <if test="baseStationSn != null">base_station_sn,</if>
-            <if test="longitude != null">longitude,</if>
-            <if test="latitude != null">latitude,</if>
-            <if test="height != null">height,</if>
-            <if test="uavName != null">uav_name,</if>
-            <if test="uavId != null">uav_id,</if>
-            <if test="uavSn != null">uav_sn,</if>
-            <if test="deptId != null">dept_id,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="baseStationName != null">#{baseStationName},</if>
-            <if test="baseStationId != null">#{baseStationId},</if>
-            <if test="baseStationSn != null">#{baseStationSn},</if>
-            <if test="longitude != null">#{longitude},</if>
-            <if test="latitude != null">#{latitude},</if>
-            <if test="height != null">#{height},</if>
-            <if test="uavName != null">#{uavName},</if>
-            <if test="uavId != null">#{uavId},</if>
-            <if test="uavSn != null">#{uavSn},</if>
-            <if test="deptId != null">#{deptId},</if>
-        </trim>
-    </insert>
-
-    <update id="updateCentermonitorTUav" parameterType="CentermonitorTUav">
-        update centermonitor_t_uav
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="baseStationName != null">base_station_name = #{baseStationName},</if>
-            <if test="baseStationId != null">base_station_id = #{baseStationId},</if>
-            <if test="baseStationSn != null">base_station_sn = #{baseStationSn},</if>
-            <if test="longitude != null">longitude = #{longitude},</if>
-            <if test="latitude != null">latitude = #{latitude},</if>
-            <if test="height != null">height = #{height},</if>
-            <if test="uavName != null">uav_name = #{uavName},</if>
-            <if test="uavId != null">uav_id = #{uavId},</if>
-            <if test="uavSn != null">uav_sn = #{uavSn},</if>
-            <if test="deptId != null">dept_id = #{deptId},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteCentermonitorTUavById" parameterType="Long">
-        delete
-        from centermonitor_t_uav
-        where id = #{id}
-    </delete>
-
-    <delete id="deleteCentermonitorTUavByIds" parameterType="String">
-        delete from centermonitor_t_uav where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-
-    <select id="selectCentermonitorTUavByDeptId" parameterType="CentermonitorTUav" resultMap="CentermonitorTUavResult">
-        SELECT
-            ctu.*
-        FROM
-            centermonitor_t_uav ctu
-                LEFT JOIN centermonitor_t_uavdept ctud ON ctud.uav_id = ctu.id
-        WHERE
-            ctud.dept_id = #{deptId}
-    </select>
-</mapper>

+ 0 - 86
src/main/resources/mapper/monitor/uav/CentermonitorTUavdeptMapper.xml

@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.sooka.sponest.monitor.uav.mapper.CentermonitorTUavdeptMapper">
-    
-    <resultMap type="CentermonitorTUavdept" id="CentermonitorTUavdeptResult">
-        <result property="id"    column="id"    />
-        <result property="uavId"    column="uav_id"    />
-        <result property="uavName"    column="uav_name"    />
-        <result property="deptId"    column="dept_id"    />
-        <result property="deptName"    column="dept_name"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectCentermonitorTUavdeptVo">
-        select id, uav_id,uav_name, dept_id,dept_name, create_by, create_time, update_by,update_time from centermonitor_t_uavdept
-    </sql>
-
-    <select id="selectCentermonitorTUavdeptList" parameterType="CentermonitorTUavdept" resultMap="CentermonitorTUavdeptResult">
-        <include refid="selectCentermonitorTUavdeptVo"/>
-        <where>
-            <if test="uavId != null ">and uav_id = #{uavId}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-        </where>
-    </select>
-    
-    <select id="selectCentermonitorTUavdeptById" parameterType="Long" resultMap="CentermonitorTUavdeptResult">
-        <include refid="selectCentermonitorTUavdeptVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertCentermonitorTUavdept" parameterType="CentermonitorTUavdept" useGeneratedKeys="true" keyProperty="id">
-        insert into centermonitor_t_uavdept
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="uavId != null">uav_id,</if>
-            <if test="uavName != null">uav_name,</if>
-            <if test="deptId != null">dept_id,</if>
-            <if test="deptName != null">dept_name,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="uavId != null">#{uavId},</if>
-            <if test="uavName != null">#{uavName},</if>
-            <if test="deptId != null">#{deptId},</if>
-            <if test="deptName != null">#{deptName},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateCentermonitorTUavdept" parameterType="CentermonitorTUavdept">
-        update centermonitor_t_uavdept
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="uavId != null">uav_id = #{uavId},</if>
-            <if test="uavName != null">uav_name = #{uavName},</if>
-            <if test="deptId != null">dept_id = #{deptId},</if>
-            <if test="deptName != null">dept_name = #{deptName},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteCentermonitorTUavdeptById" parameterType="Long">
-        delete from centermonitor_t_uavdept where id = #{id}
-    </delete>
-
-    <delete id="deleteCentermonitorTUavdeptByIds" parameterType="String">
-        delete from centermonitor_t_uavdept where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-
-</mapper>