From a4e4884721c3963e05157eeedf583b5633ec2ca7 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Tue, 19 Jan 2021 18:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A0=E8=BE=93=E4=BF=A1=E5=8F=B7=E6=9C=BA?= =?UTF-8?q?=E4=B8=8D=E6=9E=84=E5=BB=BA=E5=9C=B0=E5=9B=BE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/build/MapDeviceBuilder.java | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/build/MapDeviceBuilder.java b/src/main/java/club/joylink/rtss/simulation/cbtc/build/MapDeviceBuilder.java index 1c8a08a11..ba043587f 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/build/MapDeviceBuilder.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/build/MapDeviceBuilder.java @@ -930,38 +930,6 @@ public class MapDeviceBuilder { deviceMap.put(virtualRealitySignal.getCode(), virtualRealitySignal); } }); - signalList.stream().filter(signalVO -> Signal.SignalType.TRANSMISSION.equals(signalVO.getType())).forEach(signalVO->{ - Signal signal = new Signal(signalVO.getCode(), signalVO.getUniqueName()); - if (Objects.nonNull(elementMap.get(signal.getCode()))) { - errMsgList.add(String.format("编码为[%s]的信号机不唯一", signal.getCode())); - } - elementMap.put(signal.getCode(), signal); - // 检查关联信号机 - if (signalVO.getLinkSignalCode() == null) { - errMsgList.add(String.format("传输信号机[%s(%s)]未关联信号机", signal.getName(), signal.getCode())); - } else { - Signal linkSignal = (Signal) elementMap.get(signalVO.getLinkSignalCode()); - if (linkSignal == null) { - errMsgList.add(String.format("传输信号机[%s(%s)]关联的信号机不存在", signal.getName(), signal.getCode())); - } else { - signal.setLinkSignal(linkSignal); - } - } - // 检查关联区段及偏移量 - Section section = (Section) elementMap.get(signalVO.getSectionCode()); - if (Objects.isNull(section)) { - errMsgList.add(String.format("信号机[%s(%s)]未关联区段或关联区段不存在", signal.getName(), signal.getCode())); - } else { - if (Objects.isNull(signalVO.getSectionOffset()) || - (Objects.nonNull(section) && Objects.nonNull(section.getLen()) && - (signalVO.getSectionOffset() < 0 || signalVO.getSectionOffset() > section.getLen()))) { - errMsgList.add(String.format("信号机[%s(%s)]的区段偏移量未设置或数据异常[%s]", - signal.getName(), signal.getCode(), signalVO.getSectionOffset())); - } else { - signal.setOffset(signalVO.getSectionOffset()); - } - } - }); } /**