|
@@ -229,10 +229,9 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
|
.collect(Collectors.toList());
|
|
|
for (DeviceFaultMonitorConfigDto.Vo config : configSortedList) {
|
|
|
Integer eventNum = config.getEventNum();
|
|
|
-
|
|
|
Long minuteNum = config.getMinuteNum();
|
|
|
-
|
|
|
Integer faultLevel = config.getFaultLevel();
|
|
|
+ Long monitorId = config.getMonitorId();
|
|
|
|
|
|
// 获取当前时间
|
|
|
Date now = DateUtil.date();
|
|
@@ -265,7 +264,8 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
|
deviceInfoService.updateById(new DeviceInfo().setDeviceId(deviceId).setFaultLevel(faultLevel));
|
|
|
}
|
|
|
//累加次数
|
|
|
- deviceFaultInfo.setEventNum(deviceFaultInfo.getEventNum() + 1);
|
|
|
+ deviceFaultInfo.setEventNum(deviceFaultInfo.getEventNum() + 1).setMonitorId(monitorId);
|
|
|
+
|
|
|
deviceFaultInfoService.updateById(deviceFaultInfo);
|
|
|
} else {
|
|
|
deviceFaultInfoService.save(new DeviceFaultInfo()
|
|
@@ -275,6 +275,7 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
|
.setFaultLevel(faultLevel)
|
|
|
.setEventCode(code)
|
|
|
.setEventNum(count.intValue())
|
|
|
+ .setMonitorId(monitorId)
|
|
|
);
|
|
|
deviceInfoService.updateById(new DeviceInfo().setDeviceId(deviceId).setFaultLevel(faultLevel));
|
|
|
}
|