fix: 电话通知报警,逻辑完善,改为报警电话列表获取电话号码,通知成功后24小时不再打电话等等。
This commit is contained in:
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* VMS 回执处理定时任务
|
||||
* 对应 C# AlarmProcessor 中的 ProcessVmsCallbacks + CleanupExpiredNotifications 定时逻辑
|
||||
* 对应 C# AlarmProcessor 中的 ProcessVmsCallbacks + CleanupExpiredNotifications + 待发通知扫描 定时逻辑
|
||||
*
|
||||
* @author intc-iot
|
||||
*/
|
||||
@@ -51,4 +51,21 @@ public class VmsCallbackProcessTask {
|
||||
log.error("[VMS超时清理] 清理超时记录异常: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时扫描到期待发的语音通知记录并发送
|
||||
* 每 30 秒执行一次
|
||||
* 对应注释:“如失败则后续通知记录会在定时任务中按时间发送”
|
||||
*/
|
||||
@Scheduled(fixedDelay = 30000)
|
||||
public void sendPendingNotifications() {
|
||||
try {
|
||||
int count = warnCallNoticeService.processPendingNotifications();
|
||||
if (count > 0) {
|
||||
log.info("[待发通知扫描] 本次发送了 {} 条到期通知", count);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("[待发通知扫描] 处理待发通知异常: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user