设置自动通过进路根据配置设置背景

This commit is contained in:
joylink_zhangsai 2021-02-24 10:03:30 +08:00
parent cf2e10b9db
commit aa7e69f7dd

View File

@ -5,14 +5,12 @@ import club.joylink.rtss.services.training.generatornew.GeneratorNew;
import club.joylink.rtss.services.training.generatornew.annotation.GeneratorSelectorNew;
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.build.SimulationBuilder;
import club.joylink.rtss.simulation.cbtc.data.map.Cycle;
import club.joylink.rtss.simulation.cbtc.data.map.Route;
import club.joylink.rtss.simulation.cbtc.data.map.SectionPath;
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
import club.joylink.rtss.simulation.cbtc.tool.DeviceStatusModifyTool;
import club.joylink.rtss.vo.client.training.definition.OperateDefinitionVO;
import club.joylink.rtss.vo.client.training.TrainingNewVO;
import club.joylink.rtss.vo.client.training.definition.OperateDefinitionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
@ -259,7 +257,9 @@ public class SignalGeneratorNew implements GeneratorNew {
.filter(route -> route.isFlt())
.collect(Collectors.toList());
for (Route route : fltRouteList) {
deviceStatusModifyTool.openRouteDirect(simulation, route);
if (simulation.getRepository().getConfig().isSetRouteBeforeSetFlt()) {
deviceStatusModifyTool.openRouteDirect(simulation, route);
}
if (operateDefinitionVO.autoRouteButton()) {
simulation.getBuildParams().getMap().getGraphDataNew().getAutomaticRouteButtonList()
.stream().filter(automaticRouteButtonVO -> automaticRouteButtonVO.getAutomaticRouteCode().equals(route.getCode()))