优化绘图逻辑,补充接口逻辑等

This commit is contained in:
mi9688
2024-12-11 18:04:18 +08:00
parent 73042e17af
commit f9c7354301
5 changed files with 54 additions and 21 deletions

View File

@ -119,7 +119,7 @@ public class DeviceRealtimedataMeteorologyServiceImpl extends ServiceImpl<Device
return rest;
}
devicePropertiesList.add(DeviceProperties.builder().name("空气温度").value(meteorology.getAirTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("空气湿度").value(meteorology.getAirHumi().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("空气湿度").value(meteorology.getAirHumi().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("风速").value(meteorology.getWindSpeed().toString()).unit("m/s").build());
devicePropertiesList.add(DeviceProperties.builder().name("风向").value(meteorology.getWindDir().toString()).unit("°").build());
devicePropertiesList.add(DeviceProperties.builder().name("大气压力").value(meteorology.getAirPre().toString()).unit("hPa").build());
@ -130,11 +130,16 @@ public class DeviceRealtimedataMeteorologyServiceImpl extends ServiceImpl<Device
devicePropertiesList.add(DeviceProperties.builder().name("日雨量").value(meteorology.getDayRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("蒸发量").value(meteorology.getZhengfa().toString()).unit("t/h").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤温度").value(meteorology.getSoilTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤湿度").value(meteorology.getSoilHumi().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤湿度").value(meteorology.getSoilHumi().toString()).unit("%").build());
Map<String,Object> info=new HashMap<>();
info.put("deviceEncoding", meteorology.getDeviceId());
rest.put("info",info);
return rest;
}
/**
* 风向数据映射
*/
}

View File

@ -124,9 +124,9 @@ public class DeviceRealtimedataMoistureServiceImpl extends ServiceImpl<DeviceRea
devicePropertiesList.add(DeviceProperties.builder().name("四层土壤湿度").value(moisture.getSoilHumi4().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("环境温度").value(moisture.getAirTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("设备温度").value(moisture.getMppTemp().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池电量").value(moisture.getBatteryCap().toString()).unit("MAh").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池电量").value(moisture.getBatteryCap().toString()).unit("mAh").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池电压").value(moisture.getBatteryVolt().toString()).unit("V").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池电流").value(moisture.getBatteryCur().toString()).unit("I").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池电流").value(moisture.getBatteryCur().toString()).unit("A").build());
devicePropertiesList.add(DeviceProperties.builder().name("电池功率").value(moisture.getBatteryPower().toString()).unit("W").build());
devicePropertiesList.add(DeviceProperties.builder().name("负载电压").value(moisture.getLoadVolt().toString()).unit("V").build());
devicePropertiesList.add(DeviceProperties.builder().name("负载电流").value(moisture.getLoadCur().toString()).unit("I").build());