先恢复旧字段相关逻辑(route和signal的)

This commit is contained in:
walker-sheng 2021-09-02 17:30:56 +08:00
parent 085f7ba632
commit 2cef80778a
3 changed files with 28 additions and 28 deletions

View File

@ -10,16 +10,11 @@ import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
import club.joylink.rtss.util.JsonUtils; import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.vo.map.*; import club.joylink.rtss.vo.map.CiGenerateResultVO;
import club.joylink.rtss.vo.map.logic.MapAutoReentryVO; import club.joylink.rtss.vo.map.MapCiGenerateConfig;
import club.joylink.rtss.vo.map.logic.MapAutoSignalNewVO; import club.joylink.rtss.vo.map.MapRoutingSectionNewVO;
import club.joylink.rtss.vo.map.logic.MapDestinationCodeDefinitionVO; import club.joylink.rtss.vo.map.MapVO;
import club.joylink.rtss.vo.map.logic.MapOverlapVO; import club.joylink.rtss.vo.map.logic.*;
import club.joylink.rtss.vo.map.logic.MapRouteFlankProtectionNewVO;
import club.joylink.rtss.vo.map.logic.MapRouteNewVO;
import club.joylink.rtss.vo.map.logic.MapRoutingDataVO;
import club.joylink.rtss.vo.map.logic.MapSignalApproachSectionVO;
import club.joylink.rtss.vo.map.logic.MapStationRunLevelVO;
import lombok.Getter; import lombok.Getter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -530,7 +525,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
clone.setInterlockStation(route.getInterlockStation()); clone.setInterlockStation(route.getInterlockStation());
clone.setStart(route.getStart()); clone.setStart(route.getStart());
clone.setDestination(route.getDestination()); clone.setDestination(route.getDestination());
// clone.setOpenGreen(route.isOpenGreen()); clone.setOpenGreen(route.isOpenGreen());
clone.setAspect(route.getAspect()); clone.setAspect(route.getAspect());
clone.setSectionList(route.getSectionList()); clone.setSectionList(route.getSectionList());
clone.setSwitchList(route.getSwitchList()); clone.setSwitchList(route.getSwitchList());
@ -1199,7 +1194,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
tbRoute.setSwitchList(route.getSwitchList()); tbRoute.setSwitchList(route.getSwitchList());
tbRoute.setSetOverlapInCtc(route.isSetOverlapInCtc()); tbRoute.setSetOverlapInCtc(route.isSetOverlapInCtc());
tbRoute.setOverlap(route.getOverlap()); tbRoute.setOverlap(route.getOverlap());
// tbRoute.setOpenGreen(route.isOpenGreen()); tbRoute.setOpenGreen(route.isOpenGreen());
tbRoute.setAspect(route.getAspect()); tbRoute.setAspect(route.getAspect());
// 根据信号机和区段是否同向设置进路联锁自排和是否车队模式 // 根据信号机和区段是否同向设置进路联锁自排和是否车队模式
tbRoute.setFlt(route.isFlt()); tbRoute.setFlt(route.isFlt());
@ -1314,20 +1309,20 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
route.setAspect(SignalAspect.W); route.setAspect(SignalAspect.W);
break; break;
} }
// if (alwaysGreen) { // 进路始端信号机是否总是开绿灯 if (alwaysGreen) { // 进路始端信号机是否总是开绿灯
// route.setOpenGreen(true); route.setOpenGreen(true);
// } else { // 根据进路道岔是否有反位设置开绿灯/黄灯 } else { // 根据进路道岔是否有反位设置开绿灯/黄灯
// boolean greenOpen = true; boolean greenOpen = true;
// if (!CollectionUtils.isEmpty(sectionPath.getSwitchList())) { if (!CollectionUtils.isEmpty(sectionPath.getSwitchList())) {
// for (SwitchElement switchElement : sectionPath.getSwitchList()) { for (SwitchElement switchElement : sectionPath.getSwitchList()) {
// if (!switchElement.isNormal()) { if (!switchElement.isNormal()) {
// greenOpen = false; greenOpen = false;
// break; break;
// } }
// } }
// } }
// route.setOpenGreen(greenOpen); route.setOpenGreen(greenOpen);
// } }
route.setTurnBack(false); route.setTurnBack(false);
// 根据信号机和区段是否同向设置进路联锁自排和是否车队模式 // 根据信号机和区段是否同向设置进路联锁自排和是否车队模式
boolean ars = true; // 联锁自排 boolean ars = true; // 联锁自排

View File

@ -12,7 +12,12 @@ import club.joylink.rtss.simulation.cbtc.constant.SignalModel;
import club.joylink.rtss.simulation.cbtc.data.map.Signal; import club.joylink.rtss.simulation.cbtc.data.map.Signal;
import club.joylink.rtss.util.JsonUtils; import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.util.VersionUtil; import club.joylink.rtss.util.VersionUtil;
import club.joylink.rtss.vo.map.*; import club.joylink.rtss.vo.map.MapCheckConfig;
import club.joylink.rtss.vo.map.MapGraphDataNewVO;
import club.joylink.rtss.vo.map.MapLogicDataNewVO;
import club.joylink.rtss.vo.map.MapVO;
import club.joylink.rtss.vo.map.graph.MapSignalNewVO;
import club.joylink.rtss.vo.map.logic.MapRouteNewVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -221,7 +221,7 @@ public class MapRouteNewVO {
vo.setStartSignalCode(route.getStart().getCode()); vo.setStartSignalCode(route.getStart().getCode());
vo.setEndSignalCode(route.getDestination().getCode()); vo.setEndSignalCode(route.getDestination().getCode());
vo.setEndButtonSignalCode(Objects.nonNull(route.getDestinationButtonSignal()) ? route.getDestinationButtonSignal().getCode() : null); vo.setEndButtonSignalCode(Objects.nonNull(route.getDestinationButtonSignal()) ? route.getDestinationButtonSignal().getCode() : null);
// vo.setGreenOpen(route.isOpenGreen()); vo.setGreenOpen(route.isOpenGreen());
vo.setAspect(route.getAspect()); vo.setAspect(route.getAspect());
vo.setTurnBack(route.isTurnBack()); vo.setTurnBack(route.isTurnBack());
vo.setAtp(route.isAtp()); vo.setAtp(route.isAtp());