|
|
@@ -82,6 +82,10 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
|
|
|
String path = "/api/status/sensorCommon";
|
|
|
List<NorthError> errors = new ArrayList<>();
|
|
|
Map<String, List<IotSensor>> productDeviceMap = getAllDevice();
|
|
|
+ if (ObjectUtil.isEmpty(productDeviceMap)){
|
|
|
+ LogUtils.DIRECT_HOST_SENSOR_STATUS.error("处理动环传感器状态时,未查询到传感器数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
List<IotSensor> sensorList = new ArrayList<>();
|
|
|
List<IotSensorLog> sensorLogList = new ArrayList<>();
|
|
|
for (SensorStatusDto status : request.getData()) {
|
|
|
@@ -269,7 +273,7 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
|
|
|
}
|
|
|
|
|
|
private String convertDeviceType(String deviceType) {
|
|
|
- if (ObjectUtil.isNotNull(deviceType)){
|
|
|
+ if (ObjectUtil.isEmpty(deviceType)){
|
|
|
return null;
|
|
|
}
|
|
|
return DictUtils.getDictLabel(DictConstants.SENSOR_DEVICE_TYPE, Integer.parseInt(deviceType));
|