From 72b1ef00568a95d4d185c923e8b88ff862a3479e Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Fri, 3 Nov 2023 11:00:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ats/warn/PlatformAlertMonitoringTask.java | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/main/java/club/joylink/xiannccda/ats/warn/PlatformAlertMonitoringTask.java b/src/main/java/club/joylink/xiannccda/ats/warn/PlatformAlertMonitoringTask.java index b1f20f0..f28f280 100644 --- a/src/main/java/club/joylink/xiannccda/ats/warn/PlatformAlertMonitoringTask.java +++ b/src/main/java/club/joylink/xiannccda/ats/warn/PlatformAlertMonitoringTask.java @@ -67,9 +67,6 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask { } } - private void removeTrainRecordOnly(TrainRecord.Builder trainRecord) { - this.trainRecordMap.remove(trainRecord.getTrainId()); - } @Override public String getName() { @@ -125,31 +122,18 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask { //车辆停靠超时,车辆停靠没关门,没开门 this.alert(platformBuild, AlertType.PLATFORM_DOOR_CANNOT_OPEN, PLATFORM_IS_OPEN, isUpWay, record); } - /*if (!isOpen && !isClose && platformBuild.getTrainberth() && this.timeOver(platformBuild.getReceiveTime(), guardConfig.getCanNotOpenTimes())) { - //车辆停靠超时,车辆停靠没关门,没开门 - this.alert(platformBuild, AlertType.PLATFORM_DOOR_CANNOT_OPEN, PLATFORM_IS_OPEN, isUpWay, record); - } else if (isOpen && this.timeOver(platformBuild.getReceiveTime(), (int) stayTimeSecond + guardConfig.getCanNotCloseTimes())) { - //车辆停靠,只开门 超过等待时间+阈值时间 - this.alert(platformBuild, AlertType.PLATFORM_DOOR_CANNOT_CLOSE, PLATFORM_IS_CLOSE, isUpWay, record); - - } else if (!isOpen && platformBuild.getPsdOpen()) { - alertManager.putAlterDevice(platformBuild.getLineId(), PLATFORM_IS_OPEN, platformBuild.getId()); - } else if (isOpen && Objects.equals(false, platformBuild.getPsdOpen())) { - //开门后,在阈值内关门 - alertManager.putAlterDevice(platformBuild.getLineId(), PLATFORM_IS_CLOSE, platformBuild.getId()); - }*/ } private void alert(Platform.Builder platformBuild, AlertType alertType, String customName, boolean isUpWay, TrainRecord.Builder record) { int lineId = platformBuild.getLineId(); boolean alertAdd = alertManager.putAlterDevice(lineId, customName, platformBuild.getId()); - /*log.info("列车开关门是否已经报警检测,线路[{}] 列车表号[{}] 列车车次号[{}] 车站id[{}] 站台门id[{}] 上下行[{}] 解析屏蔽门code[{}],接收时间[{}], 告警类型[{}] 告警名称[{}]", - record.getLineId(), record.getTrainId(), record.getGlobalId(), record.getStationId(), record.getSideId(), isUpWay, platformBuild.getId(), platformBuild.getReceiveTime(), alertType, - customName);*/ if (alertAdd) { - log.info("列车开关门是否已经报警检测,线路[{}] 列车表号[{}] 列车车次号[{}] 车站id[{}] 站台门id[{}] 上下行[{}] 解析屏蔽门code[{}],接收时间[{}], 告警类型[{}] 告警名称[{}]", - record.getLineId(), record.getTrainId(), record.getGlobalId(), record.getStationId(), record.getSideId(), isUpWay, platformBuild.getId(), platformBuild.getReceiveTime(), alertType, - customName); + if (log.isDebugEnabled()) { + log.info("列车开关门是否已经报警检测,线路[{}] 列车表号[{}] 列车车次号[{}] 车站id[{}] 站台门id[{}] 上下行[{}] 解析屏蔽门code[{}],接收时间[{}], 告警类型[{}] 告警名称[{}]", + record.getLineId(), record.getTrainId(), record.getGlobalId(), record.getStationId(), record.getSideId(), isUpWay, platformBuild.getId(), platformBuild.getReceiveTime(), alertType, + customName); + } + LayoutGraphicsProto.Platform platform = LineGraphicDataRepository.getDeviceByCode(lineId, platformBuild.getId(), LayoutGraphicsProto.Platform.class); String openClose = alertType == AlertType.PLATFORM_DOOR_CANNOT_CLOSE ? "关闭" : "打开"; String wayType = isUpWay ? "上行" : "下行";