diff --git a/.idea/httpRequests/http-requests-log.http b/.idea/httpRequests/http-requests-log.http index ab74258..d0be8a9 100644 --- a/.idea/httpRequests/http-requests-log.http +++ b/.idea/httpRequests/http-requests-log.http @@ -1,1063 +1,318 @@ -GET http://localhost:9601/monitorPlatform/monitorPercentage +POST http://localhost:9601/monitorPlatform/selectLatestDataByTags -<> 2023-09-13T042534.200.json +<> 2023-09-13T061701.200.json ### -GET http://localhost:9601/monitorPlatform/monitorPercentage +POST http://localhost:9601/monitorPlatform/selectLatestDataByTags -<> 2023-09-13T041522.200.json +<> 2023-09-13T061655.200.json ### -GET http://localhost:9601/monitorPlatform/monitorUnitPercentage +POST http://localhost:9601/monitorPlatform/selectLatestDataByTags -<> 2023-09-13T041504.200.json +<> 2023-09-13T061503.200.json ### -GET http://localhost:9601/monitorPlatform/monitorUnitPercentage +POST http://localhost:9601/monitorPlatform/selectLatestDataByTags -<> 2023-09-13T035712.200.json +<> 2023-09-13T061452.200.json ### -POST http://localhost:9601/monitorPlatform/selectDeviceByDeviceModeByMonitorUnitId -{21321321}: +POST http://localhost:9601/monitorPlatform/SelectSecne -<> 2023-09-13T035612.400.html +<> 2023-09-13T061340.200.json ### -GET http://localhost:9601/monitorPlatform/monitorUnitPercentage +POST http://localhost:9601/monitorPlatform/SelectSecne -<> 2023-09-13T035551.200.json +<> 2023-09-13T061335.200.json ### -GET http://localhost:9601/monitorPlatform/monitorUnitPercentage +POST http://localhost:9601/monitorPlatform/getDeviceOperations -<> 2023-09-13T035541.200.json +<> 2023-09-13T061308.200.json ### -POST http://localhost:9601/monitorPlatform/treeList +POST http://localhost:9601/monitorPlatform/getDeviceOperations -<> 2023-09-13T035533.200.json +<> 2023-09-13T061257.200.json ### -GET http://localhost:9601/tenant/list +POST http://localhost:9601/monitorPlatform/SelectSecne -<> 2023-09-11T045735.200.json +<> 2023-09-13T061249.200.json ### -GET http://localhost:9601/monitorUnit/alarmStats +POST http://localhost:9601/monitorPlatform/selectLatestDataByTags -<> 2023-09-11T045659.200.json +<> 2023-09-13T061231.200.json ### -POST http://localhost:9601/monitorUnit/SelectSecne - -<> 2023-09-11T045623.200.json +POST http://localhost:9601/monitorPlatform/selectMonitorUnitSub ### -POST http://localhost/monitorUnit/getDeviceOperations +POST http://localhost:9601/monitorPlatform/ElectronicNumVo - } +<> 2023-09-13T061202.200.json ### -POST http://localhost:9601/monitorUnit/export +POST http://localhost:9601/monitorPlatform/SubDevice +{: +{"sceneId": "123"} +}: -<> 2023-09-05T031749.200.json +<> 2023-09-13T061009.400.html ### -GET http://localhost:9601/monitorUnit/ElectronicNumVo +POST http://localhost:9601/monitorPlatform/SubDevice +{"sceneId": "123"} +<> 2023-09-13T060718.200.json: +<> 2023-09-13T060624.200.json: -<> 2023-09-05T031734.200.json +<> 2023-09-13T060937.400.html ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 71 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": { "beginTime":1666666666666,"endTime":1766666666666 } +POST http://localhost:9601/monitorPlatform/SubDevice +{sceneId: 123} +<> 2023-09-13T060718.200.json: +<> 2023-09-13T060624.200.json: -} - -<> 2023-09-05T151123.200.json +<> 2023-09-13T060905.400.html ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 71 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": { "beginTime":1666666666666,"endTime":1766666666666 } +POST http://localhost:9601/monitorPlatform/SubDevice -} - -<> 2023-09-05T151121.200.json +<> 2023-09-13T060718.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 71 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": { "beginTime":1666666666666,"endTime":1766666666666 } +POST http://localhost:9601/monitorPlatform/SubDevice -} - -<> 2023-09-05T151106.200.json +<> 2023-09-13T060624.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 102 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/alarmStats -{ - "params": {"superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} - -<> 2023-09-05T150635.200.json +<> 2023-09-13T060618.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 102 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +POST http://localhost:9601/monitorPlatform/limitSubMonitorUnit -<> 2023-09-05T150420.200.json +<> 2023-09-13T060616.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/alarmStats -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_4", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693683999996 - } - ] -} - -<> 2023-09-05T150015.200.json +<> 2023-09-13T060506.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +POST http://localhost:9601/monitorPlatform/limitSubMonitorUnit -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_4", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693583999996 - } - ] -} - -<> 2023-09-05T150007.200.json +<> 2023-09-13T060502.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_4", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693582999996 - } - ] -} +GET http://localhost:9601/monitorPlatform/sceneAllNums -<> 2023-09-05T150004.200.json +<> 2023-09-13T060450.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/sceneAllNums -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_4", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693581999996 - } - ] -} - -<> 2023-09-05T145959.200.json +<> 2023-09-13T060330.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/allNums -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693772969706 - } - ] -} - -<> 2023-09-05T145949.200.json +<> 2023-09-13T060322.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693772969106 - } - ] -} +GET http://localhost:9601/monitorPlatform/allNums -<> 2023-09-05T145933.200.json +<> 2023-09-13T060138.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/allNums -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693672969106 - } - ] -} - -<> 2023-09-05T145928.200.json +<> 2023-09-13T055901.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/allNums -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693572969106 - } - ] -} - -<> 2023-09-05T145916.200.json +<> 2023-09-13T055320.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693572949106 - } - ] -} +GET http://localhost:9601/monitorPlatform/allNums -<> 2023-09-05T145911.200.json +<> 2023-09-13T055144.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_3", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693571949106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145907.200.json +<> 2023-09-13T051210.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip +GET http://localhost:9601/monitorPlatform/alarmStats -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_2", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693326578166 - } - ] -} - -<> 2023-09-05T145851.200.json +<> 2023-09-13T051159.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_2", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693326378166 - } - ] -} +GET http://localhost:9601/monitorPlatform/alarmStats -<> 2023-09-05T145821.200.json +<> 2023-09-13T050258.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_2", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693326368166 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorPercentage -<> 2023-09-05T145814.200.json +<> 2023-09-13T044426.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_2", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693316368166 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorPercentage -<> 2023-09-05T145810.200.json +<> 2023-09-13T044310.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_1", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693766689106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145759.200.json +<> 2023-09-13T044215.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_1", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693666689106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorPercentage -<> 2023-09-05T145750.200.json +<> 2023-09-13T044040.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_1", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693616689106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorPercentage -<> 2023-09-05T145745.200.json +<> 2023-09-13T042534.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_1", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 1 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693616589106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorPercentage -<> 2023-09-05T145741.200.json +<> 2023-09-13T041522.200.json ### -POST http://localhost:9602/tdengine/insertTable -Content-Type: application/json -Content-Length: 292 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "tableName": "t_ds_1", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "fieldValue": 0 - }, - { - "fieldName": "deviceType", - "fieldValue": 1 - }, - { - "fieldName": "ts", - "fieldValue": 1693616189106 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145734.200.json +<> 2023-09-13T041504.200.json ### -POST http://localhost:9602/tdengine/createTable -Content-Type: application/json -Content-Length: 494 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "superTableName": "st_ds", - "tableName": "t_ds_4", - "tagsFieldValues": [ - { - "fieldName": "deviceCode", - "fieldValue": "'0009340109040_33a'" - }, - { - "fieldName": "deviceName", - "fieldValue": "'定位传感器'" - }, - { - "fieldName": "deviceModeId", - "fieldValue": 1 - }, - { - "fieldName": "monitorUnitId", - "fieldValue": 1 - }, - { - "fieldName": "sceneId", - "fieldValue": 1 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145715.200.json +<> 2023-09-13T035712.200.json ### -POST http://localhost:9602/tdengine/createTable -Content-Type: application/json -Content-Length: 492 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "superTableName": "st_ds", - "tableName": "t_ds_3", - "tagsFieldValues": [ - { - "fieldName": "deviceCode", - "fieldValue": "0009340109040924" - }, - { - "fieldName": "deviceName", - "fieldValue": "'温度传感器2'" - }, - { - "fieldName": "deviceModeId", - "fieldValue": 1 - }, - { - "fieldName": "monitorUnitId", - "fieldValue": 1 - }, - { - "fieldName": "sceneId", - "fieldValue": 1 - } - ] -} +POST http://localhost:9601/monitorPlatform/selectDeviceByDeviceModeByMonitorUnitId +{21321321}: -<> 2023-09-05T145711.200.json +<> 2023-09-13T035612.400.html ### -POST http://localhost:9602/tdengine/createTable -Content-Type: application/json -Content-Length: 492 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "superTableName": "st_ds", - "tableName": "t_ds_2", - "tagsFieldValues": [ - { - "fieldName": "deviceCode", - "fieldValue": "0009340109040126" - }, - { - "fieldName": "deviceName", - "fieldValue": "'温度传感器1'" - }, - { - "fieldName": "deviceModeId", - "fieldValue": 1 - }, - { - "fieldName": "monitorUnitId", - "fieldValue": 1 - }, - { - "fieldName": "sceneId", - "fieldValue": 1 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145708.200.json +<> 2023-09-13T035551.200.json ### -POST http://localhost:9602/tdengine/createTable -Content-Type: application/json -Content-Length: 467 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "superTableName": "st_ds", - "tableName": "t_ds_1", - "tagsFieldValues": [ - { - "fieldName": "deviceCode", - "fieldValue": "1" - }, - { - "fieldName": "deviceName", - "fieldValue": "'基站'" - }, - { - "fieldName": "deviceModeId", - "fieldValue": 1 - }, - { - "fieldName": "monitorUnitId", - "fieldValue": 1 - }, - { - "fieldName": "sceneId", - "fieldValue": 1 - } - ] -} +GET http://localhost:9601/monitorPlatform/monitorUnitPercentage -<> 2023-09-05T145704.200.json +<> 2023-09-13T035541.200.json ### -POST http://localhost:9602/tdengine/createSuperTable -Content-Type: application/json -Content-Length: 667 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "databaseName": "db_hwsaas", - "superTableName": "st_ds", - "firstFieldName": "ts", - "schemaFields": [ - { - "fieldName": "onlineStatus", - "dataTypeCode": 8 - }, - { - "fieldName": "deviceType", - "dataTypeCode": 8 - } - ], - "tagsFields": [ - { - "fieldName": "deviceCode", - "dataTypeCode": 10, - "size": 50 - }, - { - "fieldName": "deviceName", - "dataTypeCode": 10, - "size": 200 - }, - { - "fieldName": "deviceModeId", - "dataTypeCode": 2 - }, - { - "fieldName": "monitorUnitId", - "dataTypeCode": 2 - }, - { - "fieldName": "sceneId", - "dataTypeCode": 2 - } - ] -} +POST http://localhost:9601/monitorPlatform/treeList -<> 2023-09-05T145614.200.json +<> 2023-09-13T035533.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +GET http://localhost:9601/tenant/list -<> 2023-09-05T144005.200.json +<> 2023-09-11T045735.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +GET http://localhost:9601/monitorUnit/alarmStats -<> 2023-09-05T144003.200.json +<> 2023-09-11T045659.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +POST http://localhost:9601/monitorUnit/SelectSecne -<> 2023-09-05T143711.200.json +<> 2023-09-11T045623.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +POST http://localhost/monitorUnit/getDeviceOperations -<> 2023-09-05T143237.200.json + } ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +POST http://localhost:9601/monitorUnit/export -<> 2023-09-05T142515.200.json +<> 2023-09-05T031749.200.json ### -POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay -Content-Type: application/json -Content-Length: 130 -Connection: Keep-Alive -User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) -Accept-Encoding: br,deflate,gzip,x-gzip - -{ - "params": {"databaseName":"db_scene_1","superTableName":"st_ds_1", - "beginTime":1666666666666,"endTime":1766666666666 } - -} +GET http://localhost:9601/monitorUnit/ElectronicNumVo -<> 2023-09-05T142512.200.json +<> 2023-09-05T031734.200.json ### POST http://localhost:9602/tdengine/getOnlineDevicesGroupByDay Content-Type: application/json -Content-Length: 128 +Content-Length: 71 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8) Accept-Encoding: br,deflate,gzip,x-gzip { - "params": {"databaseName":"db_scene_1","superTableName":"st_ds", - "beginTime":1666666666666,"endTime":1766666666666 } + "params": { "beginTime":1666666666666,"endTime":1766666666666 } } -<> 2023-09-05T142508.200.json +<> 2023-09-05T151123.200.json ### diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/controller/HwMonitorPlatformController.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/controller/HwMonitorPlatformController.java index 497a52d..569ad52 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/controller/HwMonitorPlatformController.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/controller/HwMonitorPlatformController.java @@ -195,9 +195,9 @@ public class HwMonitorPlatformController extends BaseController { * @param sceneId 场景id * */ @PostMapping("/getDeviceOperations") - public Integer selectTdengine(String beginTime,String endTime,Long sceneId){ - int ints = hwMonitorUnitService.selectTdengine(beginTime,endTime,sceneId); - return ints; + public int[] selectTdengine(String beginTime,String endTime,Long sceneId){ + int ints[] = hwMonitorUnitService.selectTdengine(beginTime,endTime,sceneId); + return ints; } /** * 设备汇总 diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/VO/HwSceneVo.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/VO/HwSceneVo.java new file mode 100644 index 0000000..6f48cbf --- /dev/null +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/VO/HwSceneVo.java @@ -0,0 +1,245 @@ +package com.ruoyi.business.domain.VO; + +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; + +/** + * @ClassName : HwSceneVo + * @Description : + * @Author : + * @Date: 2023-09-12 14:28 + */ +public class HwSceneVo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 场景ID */ + private Long sceneId; + + /** 场景名称 */ + @Excel(name = "场景名称") + private String sceneName; + + /** 租户ID,关联hw_tenant的tenant_id */ + @Excel(name = "租户ID,关联hw_tenant的tenant_id") + private Long tenantId; + + private String tenantName; + + /** 场景类型,关联表hw_scene_mode的scene_mode_id */ + @Excel(name = "场景类型,关联表hw_scene_mode的scene_mode_id") + private Long sceneModeId; + + private String sceneModeName; + + /** 场景图片地址 */ + @Excel(name = "场景图片地址") + private String scenePic; + + /** 是否默认(1、正常 0、否) */ + @Excel(name = "是否默认", readConverterExp = "1=、正常,0=、否") + private String defaultFlag; + + /** 状态(1、正常 9、删除) */ + @NotNull(message = "{user.login.username}") + @Excel(name = "状态", readConverterExp = "1=、正常,9=、删除") + private String sceneStatus; + + /** 认证方式(1、密钥认证) */ + @Excel(name = "认证方式", readConverterExp = "1=、密钥认证") + private String authMode; + + /** 场景账号(暂时不用) */ + @Excel(name = "场景账号", readConverterExp = "暂=时不用") + private String modeAccount; + + /** 场景key(一场景一密) */ + @Excel(name = "场景key", readConverterExp = "一=场景一密") + private String modeKey; + + /** 场景secret */ + @Excel(name = "场景secret") + private String modeSecret; + + /** 保存周期(单位:天)默认90天 */ + @Excel(name = "保存周期(单位:天)默认90天") + private BigDecimal preserveTime; + + /** 测试环境保存周期(单位:天)默认30天 */ + @Excel(name = "测试环境保存周期(单位:天)默认30天") + private BigDecimal testPreserveTime; + + /** 预留字段,租户环境(0:测试环境,1:正式环境) */ + @Excel(name = "预留字段,租户环境", readConverterExp = "0=:测试环境,1:正式环境") + private String sceneEnvironment; + + /** 预留字段 */ + @Excel(name = "预留字段") + private String sceneField; + + private String contactName; + + private String contactPhone; + + public Long getSceneId() { + return sceneId; + } + + public void setSceneId(Long sceneId) { + this.sceneId = sceneId; + } + + public String getSceneName() { + return sceneName; + } + + public void setSceneName(String sceneName) { + this.sceneName = sceneName; + } + + public Long getTenantId() { + return tenantId; + } + + public void setTenantId(Long tenantId) { + this.tenantId = tenantId; + } + + public String getTenantName() { + return tenantName; + } + + public void setTenantName(String tenantName) { + this.tenantName = tenantName; + } + + public Long getSceneModeId() { + return sceneModeId; + } + + public void setSceneModeId(Long sceneModeId) { + this.sceneModeId = sceneModeId; + } + + public String getSceneModeName() { + return sceneModeName; + } + + public void setSceneModeName(String sceneModeName) { + this.sceneModeName = sceneModeName; + } + + public String getScenePic() { + return scenePic; + } + + public void setScenePic(String scenePic) { + this.scenePic = scenePic; + } + + public String getDefaultFlag() { + return defaultFlag; + } + + public void setDefaultFlag(String defaultFlag) { + this.defaultFlag = defaultFlag; + } + + public String getSceneStatus() { + return sceneStatus; + } + + public void setSceneStatus(String sceneStatus) { + this.sceneStatus = sceneStatus; + } + + public String getAuthMode() { + return authMode; + } + + public void setAuthMode(String authMode) { + this.authMode = authMode; + } + + public String getModeAccount() { + return modeAccount; + } + + public void setModeAccount(String modeAccount) { + this.modeAccount = modeAccount; + } + + public String getModeKey() { + return modeKey; + } + + public void setModeKey(String modeKey) { + this.modeKey = modeKey; + } + + public String getModeSecret() { + return modeSecret; + } + + public void setModeSecret(String modeSecret) { + this.modeSecret = modeSecret; + } + + public BigDecimal getPreserveTime() { + return preserveTime; + } + + public void setPreserveTime(BigDecimal preserveTime) { + this.preserveTime = preserveTime; + } + + public BigDecimal getTestPreserveTime() { + return testPreserveTime; + } + + public void setTestPreserveTime(BigDecimal testPreserveTime) { + this.testPreserveTime = testPreserveTime; + } + + public String getSceneEnvironment() { + return sceneEnvironment; + } + + public void setSceneEnvironment(String sceneEnvironment) { + this.sceneEnvironment = sceneEnvironment; + } + + public String getSceneField() { + return sceneField; + } + + public void setSceneField(String sceneField) { + this.sceneField = sceneField; + } + + @Override + public String toString() { + return "HwSceneVo{" + + "sceneId=" + sceneId + + ", sceneName='" + sceneName + '\'' + + ", tenantId=" + tenantId + + ", tenantName='" + tenantName + '\'' + + ", sceneModeId=" + sceneModeId + + ", sceneModeName='" + sceneModeName + '\'' + + ", scenePic='" + scenePic + '\'' + + ", defaultFlag='" + defaultFlag + '\'' + + ", sceneStatus='" + sceneStatus + '\'' + + ", authMode='" + authMode + '\'' + + ", modeAccount='" + modeAccount + '\'' + + ", modeKey='" + modeKey + '\'' + + ", modeSecret='" + modeSecret + '\'' + + ", preserveTime=" + preserveTime + + ", testPreserveTime=" + testPreserveTime + + ", sceneEnvironment='" + sceneEnvironment + '\'' + + ", sceneField='" + sceneField + '\'' + + '}'; + } +} diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceMapper.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceMapper.java index 0a96cf5..40a40af 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceMapper.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceMapper.java @@ -21,6 +21,7 @@ public interface HwDeviceMapper */ public HwDevice selectHwDeviceByDeviceId(Long deviceId); List selectDeviceByMonitorId(Long monitorUnitId); + Integer selectSumDeviceFlagNot0(); /** * 查询3. 设备各类型占所有设备数量百分比饼状图(左下角) diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceModeFunctionMapper.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceModeFunctionMapper.java deleted file mode 100644 index 380cea6..0000000 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwDeviceModeFunctionMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.business.mapper; - -import java.util.List; -import com.ruoyi.business.domain.HwDeviceModeFunction; - -/** - * 设备模型功能Mapper接口 - * - * @author xins - * @date 2023-09-05 - */ -public interface HwDeviceModeFunctionMapper -{ - /** - * 查询设备模型功能 - * - * @param modeFunctionId 设备模型功能主键 - * @return 设备模型功能 - */ - public HwDeviceModeFunction selectHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId); - - /** - * 查询设备模型功能列表 - * - * @param hwDeviceModeFunction 设备模型功能 - * @return 设备模型功能集合 - */ - public List selectHwDeviceModeFunctionList(HwDeviceModeFunction hwDeviceModeFunction); - - /** - * 新增设备模型功能 - * - * @param hwDeviceModeFunction 设备模型功能 - * @return 结果 - */ - public int insertHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction); - - /** - * 修改设备模型功能 - * - * @param hwDeviceModeFunction 设备模型功能 - * @return 结果 - */ - public int updateHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction); - - /** - * 删除设备模型功能 - * - * @param modeFunctionId 设备模型功能主键 - * @return 结果 - */ - public int deleteHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId); - - /** - * 批量删除设备模型功能 - * - * @param modeFunctionIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteHwDeviceModeFunctionByModeFunctionIds(Long[] modeFunctionIds); -} diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwMonitorUnitMapper.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwMonitorUnitMapper.java index df73d1d..44186c2 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwMonitorUnitMapper.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/mapper/HwMonitorUnitMapper.java @@ -40,7 +40,7 @@ public interface HwMonitorUnitMapper * */ public List selectLimitSubMonitorUnit(); Integer selectReleatedDeviceIdNums(Long deviceCode); - Integer selectDeviceNums(); + String selectDeviceNums(); Integer selectSubDeviceSum(Long sceneId); /** diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/IHwMonitorUnitService.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/IHwMonitorUnitService.java index 8ce773d..9c03b12 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/IHwMonitorUnitService.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/IHwMonitorUnitService.java @@ -71,7 +71,7 @@ public interface IHwMonitorUnitService * 通过tdengine获取设备运行情况 * * @return*/ - public int selectTdengine(String beginTime,String endTime,Long sceneId); + public int[] selectTdengine(String beginTime, String endTime, Long sceneId); /** * 设备汇总 * diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwMonitorUnitServiceImpl.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwMonitorUnitServiceImpl.java index e851f7f..891d803 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwMonitorUnitServiceImpl.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwMonitorUnitServiceImpl.java @@ -8,16 +8,13 @@ import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; -import com.github.pagehelper.PageHelper; import com.ruoyi.business.domain.HwDevice; -import com.ruoyi.business.domain.HwElectronicFence; import com.ruoyi.business.domain.VO.*; import com.ruoyi.business.mapper.HwDeviceMapper; import com.ruoyi.business.mapper.HwElectronicFenceMapper; import com.ruoyi.common.core.constant.TdEngineConstants; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.StringUtils; -import com.ruoyi.system.api.domain.SysDept; import com.ruoyi.tdengine.api.RemoteTdEngineService; import com.ruoyi.tdengine.api.domain.DeviceStatus; import com.ruoyi.tdengine.api.domain.TdSelectDto; @@ -108,17 +105,38 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService public AllNumsVo selectAllNums() { //监控单元 String monitor = hwMonitorUnitMapper.selectSubSetNums(); - Integer integer = hwMonitorUnitMapper.selectDeviceNums(); - + String integer = hwMonitorUnitMapper.selectDeviceNums(); + System.out.println(monitor+" dsaas "+integer); + Integer monitor1 = 0; + Integer monitor2 = 0; AllNumsVo vo = new AllNumsVo(); - vo.setSubSum(Integer.valueOf(monitor)); - vo.setSum(integer); + if (monitor == null){ + monitor1 = 0; + } + else { + monitor1 = Integer.valueOf(monitor); + } + if (integer == null){ + monitor2 = 0; + } + else { + monitor2 = Integer.valueOf(integer); + } + vo.setSubSum(monitor1); + vo.setSum(monitor2); return vo; } + public static void main(String[] args) { + String str1 = "1"; + String str2 = null; + int q = Integer.valueOf(str2); + System.out.println(q); + } + @Override public List selectSenceAllNums() { List allNumsVos = hwMonitorUnitMapper.selectAllNums(); @@ -191,7 +209,7 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService @Override // 加一个begintime参数,endtime参数 stream时间戳 从开始时间0点开始,结束时间23.59.59结束 - public int selectTdengine(String beginTime,String endTime,Long sceneId) { + public int[] selectTdengine(String beginTime, String endTime, Long sceneId) { DeviceStatus queryDeviceStatus = new DeviceStatus(); Map params = queryDeviceStatus.getParams(); @@ -209,21 +227,21 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService if (sceneId != null) { queryDeviceStatus.setSceneId(sceneId); } - int value = 0; + int sum = 0; + int values[] = new int[10]; //todo 使用id(以解决) //map key时间戳,value List 对象 List list = (List) remoteTdEgineService.getOnlineDevicesGroupByDay(queryDeviceStatus); for (int i = 0; i < list.size(); i++) { if (list.get(i).getDeviceType()==1) { - sum =sum+ hwMonitorUnitMapper.selectReleatedDeviceIdNums(list.get(i).getDeviceId()); + values[i]=hwMonitorUnitMapper.selectReleatedDeviceIdNums(list.get(i).getDeviceId()); } else { - value++; + values[i] = hwDeviceMapper.selectSumDeviceFlagNot0(); } - value = value+sum; } - return value; + return values; //设备类型==网关 根据releated_device_id = 网关设备设备id查询个数 //网关子设备数+非网关设备数(getDeviceType()!=1) diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml index 3083707..0dee03a 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -32,27 +32,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + - - - select device_id, device_code, device_name, scene_id, monitor_unit_id, device_type, networking_mode, access_protocol, data_format, releated_device_id, device_mode_id, access_gw_protocol, active_status, device_status, active_time, device_pic, ip_address, area_id, device_location, current_module_version, current_singlechip_version, remark, create_by, create_time, update_by, update_time, device_field from hw_device - - + - @@ -62,19 +60,25 @@ LEFT JOIN (SELECT device_mode_id,count(*) as sum FROM hw_device GROUP BY device_ + + + + select device_id, device_code, device_name, scene_id, monitor_unit_id, device_type, networking_mode, access_protocol, data_format, releated_device_id, device_mode_id, access_gw_protocol, active_status, device_status, active_time, device_pic, ip_address, area_id, device_location, current_module_version, current_singlechip_version, remark, create_by, create_time, update_by, update_time, device_field, tenant_id, online_status from hw_device + + - + - + insert into hw_device @@ -133,6 +139,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI update_by, update_time, device_field, + tenant_id, + online_status, #{deviceCode}, @@ -161,6 +169,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI #{updateBy}, #{updateTime}, #{deviceField}, + #{tenantId}, + #{onlineStatus}, @@ -193,6 +203,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI update_by = #{updateBy}, update_time = #{updateTime}, device_field = #{deviceField}, + tenant_id = #{tenantId}, + online_status = #{onlineStatus}, where device_id = #{deviceId} @@ -202,9 +214,9 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI - delete from hw_device where device_id in + delete from hw_device where device_id in #{deviceId} - + \ No newline at end of file diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml index 88ccd9b..ae27fc5 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml @@ -97,13 +97,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select * from hw_monitor_unit where monitor_unit_id - not in (select parent_id from hw_monitor_unit) + not in (select parent_id from hw_monitor_unit where parent_id is not null) @@ -158,7 +158,7 @@ select b.monitor_unit_id,b.monitor_unit_name,sum from diff --git a/ruoyi-ui/src/api/board/GPS.js b/ruoyi-ui/src/api/board/GPS.js new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-ui/src/api/board/equipmentMonitoring.js b/ruoyi-ui/src/api/board/equipmentMonitoring.js new file mode 100644 index 0000000..19a549c --- /dev/null +++ b/ruoyi-ui/src/api/board/equipmentMonitoring.js @@ -0,0 +1,19 @@ +import request from '@/utils/request' + +// 查询定时任务调度列表 +export function listJob(query) { + return request({ + url: '/schedule/job/list', + method: 'get', + params: query + }) +} + +// 新增定时任务调度 +export function addJob(data) { + return request({ + url: '/schedule/job', + method: 'post', + data: data + }) +} diff --git a/ruoyi-ui/src/api/board/index.js b/ruoyi-ui/src/api/board/index.js new file mode 100644 index 0000000..8ea2845 --- /dev/null +++ b/ruoyi-ui/src/api/board/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 查询定时任务调度列表 +export function monitorUnitPercentage(query) { + return request({ + url: '/business/monitorUnit/monitorUnitPercentage', + method: 'get', + }) +} diff --git a/ruoyi-ui/src/api/board/senso.js b/ruoyi-ui/src/api/board/senso.js new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-ui/src/api/board/smartScene.js b/ruoyi-ui/src/api/board/smartScene.js new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-ui/src/assets/board/equipment/bg.jpg b/ruoyi-ui/src/assets/board/equipment/bg.jpg new file mode 100644 index 0000000..a257795 Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipment/bg.jpg differ diff --git a/ruoyi-ui/src/assets/board/equipment/icon.png b/ruoyi-ui/src/assets/board/equipment/icon.png new file mode 100644 index 0000000..5de951d Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipment/icon.png differ diff --git a/ruoyi-ui/src/assets/board/equipment/iconBg.png b/ruoyi-ui/src/assets/board/equipment/iconBg.png new file mode 100644 index 0000000..987361f Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipment/iconBg.png differ diff --git a/ruoyi-ui/src/assets/board/equipment/item.png b/ruoyi-ui/src/assets/board/equipment/item.png new file mode 100644 index 0000000..f49cca2 Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipment/item.png differ diff --git a/ruoyi-ui/src/assets/board/equipment/right.png b/ruoyi-ui/src/assets/board/equipment/right.png new file mode 100644 index 0000000..56ad201 Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipment/right.png differ diff --git a/ruoyi-ui/src/assets/board/equipmentMonitoring/bg.jpg b/ruoyi-ui/src/assets/board/equipmentMonitoring/bg.jpg new file mode 100644 index 0000000..b49a5de Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipmentMonitoring/bg.jpg differ diff --git a/ruoyi-ui/src/assets/board/equipmentMonitoring/item.png b/ruoyi-ui/src/assets/board/equipmentMonitoring/item.png new file mode 100644 index 0000000..f715f75 Binary files /dev/null and b/ruoyi-ui/src/assets/board/equipmentMonitoring/item.png differ diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 248170e..23b0508 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -119,6 +119,12 @@ export const constantRoutes = [ name: 'Index', meta: { title: '5', icon: 'dashboard', affix: true } }, + { + path: '/board6', + component: () => import('@/views/board/equipment'), + name: 'Index', + meta: { title: '5', icon: 'dashboard', affix: true } + }, ] // 动态路由,基于用户权限动态去加载 diff --git a/ruoyi-ui/src/views/board/equipment/index.vue b/ruoyi-ui/src/views/board/equipment/index.vue new file mode 100644 index 0000000..e3f9ad1 --- /dev/null +++ b/ruoyi-ui/src/views/board/equipment/index.vue @@ -0,0 +1,405 @@ + + + + diff --git a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue index 127c182..db93726 100644 --- a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue +++ b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue @@ -2,6 +2,84 @@
+
+
+ 温度传感器 +
+
+
+ +
+ + style="width: 100%"> + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
@@ -15,21 +93,469 @@ export default { }, data() { return { + tableShow: false, + form: { + data1: '', + data2: '', + data3: null + }, + maxHeight: 0, + tableData: [ + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + { + data1: 'data1', + data2: 'data2', + data3: 'data3', + data4: 'data4', + data5: 'data5', + data6: 'data6', + data7: 'data7', + data8: 'data8', + data9: 'data9', + }, + ] } }, mounted() { + this.maxHeight = this.$refs.right.clientHeight - this.$refs.search.clientHeight - this.$refs.pagination.clientHeight - 12 + this.tableShow = true }, methods: { + setStyle(e) { + if (e.rowIndex % 2 === 0) { + return {textAlign: 'center', backgroundColor: '#08406f', color: '#05aaba'} + } else { + return {textAlign: 'center', backgroundColor: '#063468', color: '#05aaba'} + } + } } }; - diff --git a/ruoyi-ui/src/views/board/index/index.vue b/ruoyi-ui/src/views/board/index/index.vue index e986fc9..d99ae52 100644 --- a/ruoyi-ui/src/views/board/index/index.vue +++ b/ruoyi-ui/src/views/board/index/index.vue @@ -139,6 +139,7 @@ import Chart from "@/components/Charts/Chart"; import vueSeamlessScroll from "vue-seamless-scroll"; import BoardTopNav from '@/components/BoardTopNav' import * as echarts from 'echarts'; +import {monitorUnitPercentage} from '@/api/board/index' export default { components: { @@ -481,8 +482,14 @@ export default { ], } this.$refs.chart3.setData(option3) + this.setChart1() }, - methods: {} + methods: { + async setChart1 () { + const data = await monitorUnitPercentage() + console.log(data) + } + } };