Commit 925f7211 by 李小龙

fix: 设备告警数据

parent 49a6f210
......@@ -365,7 +365,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
;
//todo 要支持 设备绑定多个空间
List<PlatRoomBedDevice> platRoomBedDeviceList = platRoomBedDeviceService.list(roomBedDeviceLambdaQueryWrapper);
if(CollectionUtils.isNotEmpty(platRoomBedDeviceList)){
if(CollectionUtils.isEmpty(platRoomBedDeviceList)){
log.error("设备没绑定房间:"+platDevice.getId());
return;
}
......
......@@ -94,13 +94,13 @@ public class PushCallback implements MqttCallback {
//iot设备id
PlatDevice platDevice = deviceCacheUtil.get(deviceId + ":" + iot_tenantId);
if (platDevice == null) {
logger.error("获取设备信息异常,设备iot-id:" + deviceId);
logger.error("获取设备信息异常,设备iot-id,iot_tenantId:" + deviceId+","+iot_tenantId);
return;
}
List<PlatAlarmConfig> deviceAlarmConfigList = alarmConfigCacheUtil.getDeviceAlarmConfigMap(platDevice);
deviceAlarmConfigList.removeIf(Objects::isNull);
if (CollectionUtils.isEmpty(deviceAlarmConfigList)) {
logger.error("该设备没有告警配置,设备iot-id:" + deviceId);
logger.error("该设备没有告警配置,设备iot-id,iot_tenantId:" + deviceId+","+iot_tenantId);
return;
}
for (PlatAlarmConfig config : deviceAlarmConfigList) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment