From 102fc745cef1c4ef04fdf62e6569209b03d10cf4 Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Tue, 19 Nov 2024 19:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E4=BB=A3=E5=86=85=E7=BD=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AEV2.1s=20=E6=A8=A1=E6=8B=9F=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DataGenderTaskServiceImpl.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/bonus-modules/base/src/main/java/com/bonus/base/screen/service/impl/DataGenderTaskServiceImpl.java b/bonus-modules/base/src/main/java/com/bonus/base/screen/service/impl/DataGenderTaskServiceImpl.java index a735a76..4efad0a 100644 --- a/bonus-modules/base/src/main/java/com/bonus/base/screen/service/impl/DataGenderTaskServiceImpl.java +++ b/bonus-modules/base/src/main/java/com/bonus/base/screen/service/impl/DataGenderTaskServiceImpl.java @@ -288,18 +288,18 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // 拉力传感器数据--拉力、设备电量 String laliDataString = "{\"edgeId\":\"UN2394845JH\",\"list\":[{\"createTime\":1730967555000,\"dataTime\":" + timestampInMilliseconds +"," + "\"alarmThreshold\":\"10\",\"model\":\"pull_monitoringpull_monitoring\",\"updateTime\":1730967555000,\"id\":3323," + - "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (Math.random() * (1 - 300 + 1)) + 1 +"\",\"capacity\":\""+ (Math.random() * (1 - 99 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; + "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (int) (Math.random() * (300 - 1 + 1)) + 1 +"\",\"capacity\":\""+ (int) (Math.random() * (99 - 1 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; // 倾角传感器--X轴、Y轴、Z轴、设备电量 - String qjDataString = "{\"edgeId\":\"UN2394845JH\",\"list\":[{\"angleX\":\""+ (Math.random() * (60 - 99 + 1)) + 60 +"\",\"angleY\":\""+ (Math.random() * (2 - 15 + 1)) + 2 +"\",\"angleZ\":\"6\"," + + String qjDataString = "{\"edgeId\":\"UN2394845JH\",\"list\":[{\"angleX\":\""+ (int) (Math.random() * (99 - 60 + 1)) + 60 +"\",\"angleY\":\""+ (int) (Math.random() * (15 - 2 + 1)) + 2 +"\",\"angleZ\":\"6\"," + "\"data\":\"0\",\"alarmThreshold\":\"0.2\",\"updateTime\":1730967554000,\"delFlag\":\"0\",\"deviceId\":\"18\"," + "\"capacity\":\"0.8\",\"createTime\":1730967554000,\"dataTime\":"+ timestampInMilliseconds +",\"model\":\"angle_monitoring\"," + "\"id\":3338,\"serviceId\":\"a121\",\"nodeId\":\"111\"}],\"type\":\"angles\"}"; // 室外环境监测--温度、湿度、风速、风向、设备电量、PM2.5、PM10 - String outDataString = "{\"edgeId\":\"UN2394845JH\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (Math.random() * (10 - 50 + 1)) + 10 + "\",\"windForce\":\""+ (Math.random() * (0.2 - 0.9 + 1)) + 0.1 +"\"," + - "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (Math.random() * (11 - 28 + 1)) + 11 +"\"," + - "\"pm25\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"humidity\":\""+ (Math.random() * (20 - 95 + 1)) + 20 +"\"," + + String outDataString = "{\"edgeId\":\"UN2394845JH\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 + "\",\"windForce\":\""+ (int) (Math.random() * (0.9 - 0.2 + 0.1)) + 0.1 +"\"," + + "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (int) (Math.random() * (28 - 11 + 1)) + 11 +"\"," + + "\"pm25\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"humidity\":\""+ (int) (Math.random() * (95 - 20 + 1)) + 20 +"\"," + "\"model\":\"environmental_monitoring\",\"id\":3335,\"windDirection\":\"西北风\"}]," + "\"type\":\"environmental\"}"; @@ -504,18 +504,18 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // 拉力传感器数据--拉力、设备电量 String laliDataStringV2 = "{\"edgeId\":\"UN2394845JHV2\",\"list\":[{\"createTime\":1730967555000,\"dataTime\":" + timestampInMilliseconds +"," + "\"alarmThreshold\":\"10\",\"model\":\"pull_monitoringpull_monitoring\",\"updateTime\":1730967555000,\"id\":3323," + - "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (Math.random() * (1 - 300 + 1)) + 1 +"\",\"capacity\":\""+ (Math.random() * (1 - 99 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; + "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (int) (Math.random() * (300 - 1 + 1)) + 1 +"\",\"capacity\":\""+ (int) (Math.random() * (99 - 1 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; // 倾角传感器--X轴、Y轴、Z轴、设备电量 - String qjDataStringV2 = "{\"edgeId\":\"UN2394845JHV2\",\"list\":[{\"angleX\":\""+ (Math.random() * (60 - 99 + 1)) + 60 +"\",\"angleY\":\""+ (Math.random() * (2 - 15 + 1)) + 2 +"\",\"angleZ\":\"6\"," + + String qjDataStringV2 = "{\"edgeId\":\"UN2394845JHV2\",\"list\":[{\"angleX\":\""+ (int) (Math.random() * (99 - 60 + 1)) + 60 +"\",\"angleY\":\""+ (int) (Math.random() * (15 - 2 + 1)) + 2 +"\",\"angleZ\":\"6\"," + "\"data\":\"0\",\"alarmThreshold\":\"0.2\",\"updateTime\":1730967554000,\"delFlag\":\"0\",\"deviceId\":\"18\"," + "\"capacity\":\"0.8\",\"createTime\":1730967554000,\"dataTime\":"+ timestampInMilliseconds +",\"model\":\"angle_monitoring\"," + "\"id\":3338,\"serviceId\":\"a121\",\"nodeId\":\"111\"}],\"type\":\"angles\"}"; // 室外环境监测--温度、湿度、风速、风向、设备电量、PM2.5、PM10 - String outDataStringV2 = "{\"edgeId\":\"UN2394845JHV2\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (Math.random() * (10 - 50 + 1)) + 10 + "\",\"windForce\":\""+ (Math.random() * (0.2 - 0.9 + 1)) + 0.1 +"\"," + - "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (Math.random() * (11 - 28 + 1)) + 11 +"\"," + - "\"pm25\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"humidity\":\""+ (Math.random() * (20 - 95 + 1)) + 20 +"\"," + + String outDataStringV2 = "{\"edgeId\":\"UN2394845JHV2\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 + "\",\"windForce\":\""+ (int) (Math.random() * (0.9 - 0.2 + 0.1)) + 0.1 +"\"," + + "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (int) (Math.random() * (28 - 11 + 1)) + 11 +"\"," + + "\"pm25\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"humidity\":\""+ (int) (Math.random() * (95 - 20 + 1)) + 20 +"\"," + "\"model\":\"environmental_monitoring\",\"id\":3335,\"windDirection\":\"西北风\"}]," + "\"type\":\"environmental\"}"; @@ -714,18 +714,18 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // 拉力传感器数据--拉力、设备电量 String laliDataStringV3 = "{\"edgeId\":\"UN2394845JHV3\",\"list\":[{\"createTime\":1730967555000,\"dataTime\":" + timestampInMilliseconds +"," + "\"alarmThreshold\":\"10\",\"model\":\"pull_monitoringpull_monitoring\",\"updateTime\":1730967555000,\"id\":3323," + - "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (Math.random() * (1 - 300 + 1)) + 1 +"\",\"capacity\":\""+ (Math.random() * (1 - 99 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; + "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (int) (Math.random() * (300 - 1 + 1)) + 1 +"\",\"capacity\":\""+ (int) (Math.random() * (99 - 1 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; // 倾角传感器--X轴、Y轴、Z轴、设备电量 - String qjDataStringV3 = "{\"edgeId\":\"UN2394845JHV3\",\"list\":[{\"angleX\":\""+ (Math.random() * (60 - 99 + 1)) + 60 +"\",\"angleY\":\""+ (Math.random() * (2 - 15 + 1)) + 2 +"\",\"angleZ\":\"6\"," + + String qjDataStringV3 = "{\"edgeId\":\"UN2394845JHV3\",\"list\":[{\"angleX\":\""+ (int) (Math.random() * (99 - 60 + 1)) + 60 +"\",\"angleY\":\""+ (int) (Math.random() * (15 - 2 + 1)) + 2 +"\",\"angleZ\":\"6\"," + "\"data\":\"0\",\"alarmThreshold\":\"0.2\",\"updateTime\":1730967554000,\"delFlag\":\"0\",\"deviceId\":\"18\"," + "\"capacity\":\"0.8\",\"createTime\":1730967554000,\"dataTime\":"+ timestampInMilliseconds +",\"model\":\"angle_monitoring\"," + "\"id\":3338,\"serviceId\":\"a121\",\"nodeId\":\"111\"}],\"type\":\"angles\"}"; // 室外环境监测--温度、湿度、风速、风向、设备电量、PM2.5、PM10 - String outDataStringV3 = "{\"edgeId\":\"UN2394845JHV3\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (Math.random() * (10 - 50 + 1)) + 10 + "\",\"windForce\":\""+ (Math.random() * (0.2 - 0.9 + 1)) + 0.1 +"\"," + - "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (Math.random() * (11 - 28 + 1)) + 11 +"\"," + - "\"pm25\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"humidity\":\""+ (Math.random() * (20 - 95 + 1)) + 20 +"\"," + + String outDataStringV3 = "{\"edgeId\":\"UN2394845JHV3\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 + "\",\"windForce\":\""+ (int) (Math.random() * (0.9 - 0.2 + 0.1)) + 0.1 +"\"," + + "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (int) (Math.random() * (28 - 11 + 1)) + 11 +"\"," + + "\"pm25\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"humidity\":\""+ (int) (Math.random() * (95 - 20 + 1)) + 20 +"\"," + "\"model\":\"environmental_monitoring\",\"id\":3335,\"windDirection\":\"西北风\"}]," + "\"type\":\"environmental\"}"; @@ -931,18 +931,18 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // 拉力传感器数据--拉力、设备电量 String laliDataStringV4 = "{\"edgeId\":\"UN2394845JHV4\",\"list\":[{\"createTime\":1730967555000,\"dataTime\":" + timestampInMilliseconds +"," + "\"alarmThreshold\":\"10\",\"model\":\"pull_monitoringpull_monitoring\",\"updateTime\":1730967555000,\"id\":3323," + - "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (Math.random() * (1 - 300 + 1)) + 1 +"\",\"capacity\":\""+ (Math.random() * (1 - 99 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; + "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (int) (Math.random() * (300 - 1 + 1)) + 1 +"\",\"capacity\":\""+ (int) (Math.random() * (99 - 1 + 1)) + 1 +"\"}],\"type\":\"pull\"}"; // 倾角传感器--X轴、Y轴、Z轴、设备电量 - String qjDataStringV4 = "{\"edgeId\":\"UN2394845JHV4\",\"list\":[{\"angleX\":\""+ (Math.random() * (60 - 99 + 1)) + 60 +"\",\"angleY\":\""+ (Math.random() * (2 - 15 + 1)) + 2 +"\",\"angleZ\":\"6\"," + + String qjDataStringV4 = "{\"edgeId\":\"UN2394845JHV4\",\"list\":[{\"angleX\":\""+ (int) (Math.random() * (99 - 60 + 1)) + 60 +"\",\"angleY\":\""+ (int) (Math.random() * (15 - 2 + 1)) + 2 +"\",\"angleZ\":\"6\"," + "\"data\":\"0\",\"alarmThreshold\":\"0.2\",\"updateTime\":1730967554000,\"delFlag\":\"0\",\"deviceId\":\"18\"," + "\"capacity\":\"0.8\",\"createTime\":1730967554000,\"dataTime\":"+ timestampInMilliseconds +",\"model\":\"angle_monitoring\"," + "\"id\":3338,\"serviceId\":\"a121\",\"nodeId\":\"111\"}],\"type\":\"angles\"}"; // 室外环境监测--温度、湿度、风速、风向、设备电量、PM2.5、PM10 - String outDataStringV4 = "{\"edgeId\":\"UN2394845JHV4\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (Math.random() * (10 - 50 + 1)) + 10 + "\",\"windForce\":\""+ (Math.random() * (0.2 - 0.9 + 1)) + 0.1 +"\"," + - "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (Math.random() * (11 - 28 + 1)) + 11 +"\"," + - "\"pm25\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"humidity\":\""+ (Math.random() * (20 - 95 + 1)) + 20 +"\"," + + String outDataStringV4 = "{\"edgeId\":\"UN2394845JHV4\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 + "\",\"windForce\":\""+ (int) (Math.random() * (0.9 - 0.2 + 0.1)) + 0.1 +"\"," + + "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (int) (Math.random() * (28 - 11 + 1)) + 11 +"\"," + + "\"pm25\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"humidity\":\""+ (int) (Math.random() * (95 - 20 + 1)) + 20 +"\"," + "\"model\":\"environmental_monitoring\",\"id\":3335,\"windDirection\":\"东南风\"}]," + "\"type\":\"environmental\"}"; @@ -1142,10 +1142,10 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // 拉力传感器数据--拉力、设备电量 String laliDataStringV5 = "{\"edgeId\":\"UN2394845JHV5\",\"list\":[{\"createTime\":1730967555000,\"dataTime\":" + timestampInMilliseconds +"," + "\"alarmThreshold\":\"10\",\"model\":\"pull_monitoringpull_monitoring\",\"updateTime\":1730967555000,\"id\":3323," + - "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (Math.random() * (1 - 300 + 1)) + 1 +"\",\"capacity\":\"100\"}],\"type\":\"pull\"}"; + "\"delFlag\":\"0\",\"deviceId\":\"21\",\"tractionData\":\""+ (int) (Math.random() * (300 - 1 + 1)) + 1 +"\",\"capacity\":\"100\"}],\"type\":\"pull\"}"; // 倾角传感器--X轴、Y轴、Z轴、设备电量 - String qjDataStringV5 = "{\"edgeId\":\"UN2394845JHV5\",\"list\":[{\"angleX\":\""+ (Math.random() * (60 - 99 + 1)) + 60 +"\",\"angleY\":\""+ (Math.random() * (2 - 15 + 1)) + 2 +"\",\"angleZ\":\"6\"," + + String qjDataStringV5 = "{\"edgeId\":\"UN2394845JHV5\",\"list\":[{\"angleX\":\""+ (int) (Math.random() * (99 - 60 + 1)) + 60 +"\",\"angleY\":\""+ (int) (Math.random() * (15 - 2 + 1)) + 2 +"\",\"angleZ\":\"6\"," + "\"data\":\"0\",\"alarmThreshold\":\"0.2\",\"updateTime\":1730967554000,\"delFlag\":\"0\",\"deviceId\":\"18\"," + "\"capacity\":\"0.8\",\"createTime\":1730967554000,\"dataTime\":"+ timestampInMilliseconds +",\"model\":\"angle_monitoring\"," + "\"id\":3338,\"serviceId\":\"a121\",\"nodeId\":\"111\"}],\"type\":\"angles\"}"; @@ -1161,9 +1161,9 @@ public class DataGenderTaskServiceImpl implements CommandLineRunner { // "\"type\":\"environmental\"}"; // 室外环境监测--温度、湿度、风速、风向、设备电量、PM2.5、PM10 - String outDataStringV5 = "{\"edgeId\":\"UN2394845JHV5\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (Math.random() * (10 - 50 + 1)) + 10 + "\",\"windForce\":\""+ (Math.random() * (0.2 - 0.9 + 1)) + 0.1 +"\"," + - "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (Math.random() * (11 - 28 + 1)) + 11 +"\"," + - "\"pm25\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (Math.random() * (10 - 50 + 1)) + 10 +"\",\"humidity\":\""+ (Math.random() * (20 - 95 + 1)) + 20 +"\"," + + String outDataStringV5 = "{\"edgeId\":\"UN2394845JHV5\",\"list\":[{\"grain50\":\"611\",\"pm10\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 + "\",\"windForce\":\""+ (int) (Math.random() * (0.9 - 0.2 + 0.1)) + 0.1 +"\"," + + "\"updateTime\":1730967555000,\"pressure\":\"89\",\"delFlag\":\"0\",\"deviceId\":\"4\",\"airTemperature\":\""+ (int) (Math.random() * (28 - 11 + 1)) + 11 +"\"," + + "\"pm25\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"createTime\":1730967555000,\"dataTime\":"+ timestampInMilliseconds +",\"noise\":\""+ (int) (Math.random() * (50 - 10 + 1)) + 10 +"\",\"humidity\":\""+ (int) (Math.random() * (95 - 20 + 1)) + 20 +"\"," + "\"model\":\"environmental_monitoring\",\"id\":3335,\"windDirection\":\"西南风\"}]," + "\"type\":\"environmental\"}";