From cbd092b3c66ab5a1556420970d820455fb3765c6 Mon Sep 17 00:00:00 2001 From: Jade Date: Thu, 25 Nov 2021 17:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=BA=8C=20=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86=20=E5=B2=94?= =?UTF-8?q?=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../training/generatornew/base/SectionGeneratorNew.java | 3 +++ .../club/joylink/rtss/simulation/cbtc/data/map/Section.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SectionGeneratorNew.java b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SectionGeneratorNew.java index 167163653..5f26c4c73 100644 --- a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SectionGeneratorNew.java +++ b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SectionGeneratorNew.java @@ -61,6 +61,9 @@ public class SectionGeneratorNew implements GeneratorNew { if (section.isCross() && !sectionTypes.contains(BusinessConsts.Section.SectionType.Type05)) { continue; } + if (section.getParent() != null && section.getParent().isCross()) { + continue; + } } switch (Operation.Type.valueOf(operateDefinitionVO.getOperateType())) { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java index 8637ac02f..a4dff0125 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java @@ -510,7 +510,7 @@ public class Section extends DelayUnlockDevice { * @return */ public boolean isLogicSection() { - return !this.physical && !this.axleCounter && Objects.nonNull(this.parent); + return !this.physical && !this.axleCounter && !this.isCross() && Objects.nonNull(this.parent); } /**