实训bug相关修改

This commit is contained in:
DU 2020-12-03 11:01:50 +08:00
parent 2eb8da551d
commit b2f6c6a71d
5 changed files with 31 additions and 21 deletions

2
sql/20201203.sql Normal file
View File

@ -0,0 +1,2 @@
ALTER TABLE `training`
ADD INDEX `map_id` (`map_id`);

View File

@ -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;

View File

@ -281,26 +281,27 @@ public class SignalGeneratorNew implements GeneratorNew {
}
case Signal_Set_Guide: {
// 若信号机可开引导信号则生成实训暂不设置背景暂时先简单处理此处业务比较复杂需明确后再生成各种情况的实训
if (!signal.isCallOn()) { // 不是引导信号机不生成
continue;
} else {
//非折返进路办理引导
List<Route> 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<Route> 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: {
// 若信号可开放引导信号生成实训背景设置为开放引导进路/开放引导信号

View File

@ -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:{

View File

@ -76,6 +76,9 @@ public class SectionService {
}
}
section.faultUnlock();
if(section.isShowLogic()){
section.getLogicList().forEach(ls -> ls.faultUnlock());
}
}
}