From 5ca3132c493dc43ce4232d9768a7e5a366f6e7d1 Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Fri, 15 Dec 2023 15:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BF=83=E8=B7=B3=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E9=87=8D=E6=96=B0=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 5 +++- .../warn/SwitchLostAlertMonitoringTask2.java | 4 ++-- src/main/resources/application.yml | 24 ++++++++++++++++--- xian-ncc-da-message | 2 +- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 154ef28..b26a903 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,10 @@ org.springframework.boot spring-boot-starter-security - + + org.springframework.boot + spring-boot-starter-actuator + org.springframework.boot spring-boot-starter-oauth2-resource-server diff --git a/src/main/java/club/joylink/xiannccda/ats/warn/SwitchLostAlertMonitoringTask2.java b/src/main/java/club/joylink/xiannccda/ats/warn/SwitchLostAlertMonitoringTask2.java index 9039156..5229b4f 100644 --- a/src/main/java/club/joylink/xiannccda/ats/warn/SwitchLostAlertMonitoringTask2.java +++ b/src/main/java/club/joylink/xiannccda/ats/warn/SwitchLostAlertMonitoringTask2.java @@ -102,10 +102,10 @@ public class SwitchLostAlertMonitoringTask2 implements AlertMonitoringTask { boolean timeOver = this.timeOver(switchBuild.getReceiveTime(), guardConfig.getSwitchLostTimes()); String switchPutName = this.getDefaultName(AlertType.SWITCH_LOST, lineId, switchBuild.getRtuId()); if (saveIsLost && timeOver) { - log.info("道岔失表超时,准备报警 线路[{}] 设备[{}] 接受时间[{}] 发送时间[{}] 对应地图设备id[{}]" - , lineId, switchBuild.getId(), switchBuild.getReceiveTime(), switchBuild.getTimestamp(), turnout.getCommon().getId()); //失表超时 if (alertManager.putAlterDevice(lineId, switchPutName, switchBuild.getId())) { + log.info("道岔失表超时,准备报警 线路[{}] 设备[{}] 接受时间[{}] 发送时间[{}] 对应地图设备id[{}]" + , lineId, switchBuild.getId(), switchBuild.getReceiveTime(), switchBuild.getTimestamp(), turnout.getCommon().getId()); String alertMsg = String.format("设备[%s]失表", switchBuild.getId()); NccAlertInfo alertInfo = this.alertInfoService.createAlert2(Optional.empty(), AlertType.SWITCH_LOST, switchBuild, alertMsg, turnout.getCommon().getId(), AlertDeviceType.DEVICE_TYPE_SWITCH, false); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ee3aa48..a9b9e0c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,6 @@ server: port: 9081 + shutdown: "graceful" spring: profiles: active: local @@ -46,10 +47,27 @@ jwt: key: pub: classpath:app.pub prv: classpath:app.key -#过滤OCC 数据中的rtu -occ-not-handle-rtu: '{3: "81,82"}' +occ-not-handle: + lineId: 3 + #过滤OCC 数据中的rtu + filterRtuIds: + - 81 + - 82 + + #长时间没有接收occ数据超时,重新获取基础数据时间(小时) receive-msg-timeout: 1 #检测硬件变化(cpu,内存) monitor-handware-change: true - +#management: +# endpoints: +# web: +# exposure: +# include: '*' +# server: +# port: 9081 +# endpoint: +# shutdown: +# enabled: true +# health: +# show-details: always diff --git a/xian-ncc-da-message b/xian-ncc-da-message index 226023c..ee5fb20 160000 --- a/xian-ncc-da-message +++ b/xian-ncc-da-message @@ -1 +1 @@ -Subproject commit 226023c351e10e7e07cc7c48e1dbde661091b6b5 +Subproject commit ee5fb2079424cb1ac7a049ead18e0c50aa98606b