|
|
@@ -111,7 +111,7 @@ public class WarnService {
|
|
|
warnResult.setConfig(warnConfigInfo);
|
|
|
warnResult.setOffline(true);
|
|
|
warnResult.setTriggered(true);
|
|
|
- warnResult.setMessage(WarnMessageBuilderUtil.buildWarningOfflineMessage(iotDevice.getDevtypeBid(), iotDevice.getDevCode(), StringUtils.isEmpty(iotDevice.getDevUpdateddate())?iotDevice.getDevCreateddate():iotDevice.getDevUpdateddate()));
|
|
|
+ warnResult.setMessage(WarnMessageBuilderUtil.buildWarningOfflineMessage(iotDevice.getDevtypeBid(), iotDevice.getDevCode(), StringUtils.isEmpty(iotDevice.getDevUpdateddate()) ? iotDevice.getDevCreateddate() : iotDevice.getDevUpdateddate()));
|
|
|
// 处理警告记录前的日志
|
|
|
log.info("[设备告警] 正在为设备{}处理警告记录:{}", iotDevice.getDevBid(), warnResult);
|
|
|
handleWarnRecord(warnResult);
|
|
|
@@ -545,12 +545,15 @@ public class WarnService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
try {
|
|
|
for (IotDevice iotDevice : iotDeviceList) {
|
|
|
+
|
|
|
//离线转在线
|
|
|
if (IotDeviceStatusTypeEnum.OFFLINE.getCode().equals(iotDevice.getDevOriginalStatus())
|
|
|
&& IotDeviceStatusTypeEnum.ONLINE.getCode().equals(iotDevice.getDevStatus()
|
|
|
)) {
|
|
|
- log.info("[离线告警]自动处理离线告警消息: {}", iotDevice.getDevBid());
|
|
|
+ log.info("[离线告警]自动处理离线告警消息:设备号: {} ,bid:{}", iotDevice.getDevCode(), iotDevice.getDevBid());
|
|
|
autoDealWarnOfflineLog(iotDevice.getDevBid());
|
|
|
+ } else {
|
|
|
+ log.info("[离线告警]自动处理离线告警消息:设备号: {} ,bid:{} ,原始状态:", iotDevice.getDevCode(), iotDevice.getDevBid(), iotDevice.getDevOriginalStatus());
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|