From b2f6c6a71d3128505570db542cdd7661151fbe5a Mon Sep 17 00:00:00 2001 From: DU Date: Thu, 3 Dec 2020 11:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=ADbug=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/20201203.sql | 2 + .../base/SectionGeneratorNew.java | 5 ++- .../generatornew/base/SignalGeneratorNew.java | 41 ++++++++++--------- .../generatornew/base/SwitchGeneratorNew.java | 1 + .../cbtc/CI/service/SectionService.java | 3 ++ 5 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 sql/20201203.sql diff --git a/sql/20201203.sql b/sql/20201203.sql new file mode 100644 index 000000000..470bd848e --- /dev/null +++ b/sql/20201203.sql @@ -0,0 +1,2 @@ +ALTER TABLE `training` + ADD INDEX `map_id` (`map_id`); 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 75e5b9b28..a1cf46eb7 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 @@ -76,10 +76,13 @@ public class SectionGeneratorNew implements GeneratorNew { case Section_Fault_Unlock: // 设置区段故障锁闭(这只是区故解的一种情况,后面再补其他情况) section.setFaultLock(true); + if (section.isShowLogic()) { + section.getLogicList().forEach(s -> s.setFaultLock(true)); + } break; case Section_Axis_Pre_Reset: // todo 因为操作暂未实现,此实训暂不生成 - break; + continue; default: // 其他操作,不生成 continue; diff --git a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SignalGeneratorNew.java b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SignalGeneratorNew.java index 42873b668..7c8a15ebd 100644 --- a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SignalGeneratorNew.java +++ b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SignalGeneratorNew.java @@ -281,26 +281,27 @@ public class SignalGeneratorNew implements GeneratorNew { } case Signal_Set_Guide: { // 若信号机可开引导信号,则生成实训,暂不设置背景(暂时先简单处理,此处业务比较复杂,需明确后再生成各种情况的实训) - if (!signal.isCallOn()) { // 不是引导信号机,不生成 - continue; - } else { - //非折返进路办理引导 - List notTurnBackRouteList = routeList.stream() - .filter(route -> !route.isTurnBack()) - .collect(Collectors.toList()); - if (routeLikeHa1) { - // 对于ATP进路、地面联锁进路、引导进路类的,取引导进路 - notTurnBackRouteList = notTurnBackRouteList.stream() - .filter(route -> route.isGuide()) - .collect(Collectors.toList()); - } - for (Route route : notTurnBackRouteList) { - trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); - // 仿真重置 - simulation.reset(); - } - continue; - } +// if (!signal.isCallOn()) { // 不是引导信号机,不生成 +// continue; +// } else { +// //非折返进路办理引导 +// List notTurnBackRouteList = routeList.stream() +// .filter(route -> !route.isTurnBack()) +// .collect(Collectors.toList()); +// if (routeLikeHa1) { +// // 对于ATP进路、地面联锁进路、引导进路类的,取引导进路 +// notTurnBackRouteList = notTurnBackRouteList.stream() +// .filter(route -> route.isGuide()) +// .collect(Collectors.toList()); +// } +// for (Route route : notTurnBackRouteList) { +// trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); +// // 仿真重置 +// simulation.reset(); +// } +// continue; +// } + continue; } case Signal_Close_Guide: { // 若信号可开放引导信号,生成实训,背景设置为开放引导进路/开放引导信号 diff --git a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SwitchGeneratorNew.java b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SwitchGeneratorNew.java index 0c32ea57d..8c36d14a6 100644 --- a/src/main/java/club/joylink/rtss/services/training/generatornew/base/SwitchGeneratorNew.java +++ b/src/main/java/club/joylink/rtss/services/training/generatornew/base/SwitchGeneratorNew.java @@ -92,6 +92,7 @@ public class SwitchGeneratorNew implements GeneratorNew { // 背景为道岔区段故障锁闭 aSwitch.getA().setFaultLock(true); aSwitch.getB().setFaultLock(true); + aSwitch.getC().setFaultLock(true); break; } case Switch_Axle_Pre_Reset:{ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/SectionService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/SectionService.java index 3aaf357b8..7e26d3ac7 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/SectionService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/SectionService.java @@ -76,6 +76,9 @@ public class SectionService { } } section.faultUnlock(); + if(section.isShowLogic()){ + section.getLogicList().forEach(ls -> ls.faultUnlock()); + } } }