|
|
|
|
@ -176,8 +176,10 @@ public class BsTowerReportServiceImpl extends BaseServiceImpl<BsTowerReportMappe |
|
|
|
|
List<BsTowerReportEntity> unprocessedAlarms = list( |
|
|
|
|
Wrappers.lambdaQuery(BsTowerReportEntity.class) |
|
|
|
|
.lt(BsTowerReportEntity::getStartTime, threeMinutesAgoDate) |
|
|
|
|
.eq(BsTowerReportEntity::getDealStatus, "false") |
|
|
|
|
.eq(BsTowerReportEntity::getDealStatus, false) |
|
|
|
|
.eq(BsTowerReportEntity::getReminder, 0) |
|
|
|
|
.isNotNull(BsTowerReportEntity::getStartTime) |
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (unprocessedAlarms == null || unprocessedAlarms.isEmpty()) { |
|
|
|
|
@ -226,10 +228,11 @@ public class BsTowerReportServiceImpl extends BaseServiceImpl<BsTowerReportMappe |
|
|
|
|
if (result != null && result.isSuccess()) { |
|
|
|
|
log.info("D,报警ID: {}, 编码: {}", alarm.getId(), alarm.getBtCode()); |
|
|
|
|
} else { |
|
|
|
|
log.error("发送酸雾塔报警提醒失败,报警ID: {}, 错误信息: {}", |
|
|
|
|
alarm.getId(), result != null ? result.getMsg() : "返回结果为空"); |
|
|
|
|
throw new RuntimeException("发送酸雾塔报警提醒失败: " + (result != null ? result.getMsg() : "返回结果为空")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
alarm.setReminder(1); |
|
|
|
|
updateById(alarm); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("处理酸雾塔报警提醒时发生异常,报警ID: {}", alarm.getId(), e); |
|
|
|
|
} |
|
|
|
|
|