修改:进路办理检查内容(自动进路)
新增:<进路联锁不包含站台扣车>联锁配置及相关逻辑
This commit is contained in:
parent
f70c7a51c6
commit
6c1c8d1b43
@ -500,14 +500,14 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
// 生成引导信号
|
// 生成引导信号
|
||||||
if (!CollectionUtils.isEmpty(groundRouteList)) {
|
if (!CollectionUtils.isEmpty(groundRouteList)) {
|
||||||
for (Route route : groundRouteList) {
|
for (Route route : groundRouteList) {
|
||||||
Route guide = this.buildGuideRouteFromGroundRoute(route, routeCodeGenerator);
|
Route guide = this.buildGuideRouteFromGroundRoute(route, routeCodeGenerator, config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||||
routeList.add(guide);
|
routeList.add(guide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return routeList;
|
return routeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Route buildGuideRouteFromGroundRoute(Route route, CodeGenerator routeCodeGenerator) {
|
private Route buildGuideRouteFromGroundRoute(Route route, CodeGenerator routeCodeGenerator, boolean noStandHold) {
|
||||||
Route clone = new Route(routeCodeGenerator.next(), route.getName());
|
Route clone = new Route(routeCodeGenerator.next(), route.getName());
|
||||||
clone.setArs(false);
|
clone.setArs(false);
|
||||||
clone.setGuide(true);
|
clone.setGuide(true);
|
||||||
@ -519,7 +519,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
clone.setSwitchList(route.getSwitchList());
|
clone.setSwitchList(route.getSwitchList());
|
||||||
clone.setPsdList(route.getPsdList());
|
clone.setPsdList(route.getPsdList());
|
||||||
clone.setEspList(route.getEspList());
|
clone.setEspList(route.getEspList());
|
||||||
clone.setStandHoldList(route.getStandHoldList());
|
if (!noStandHold) {
|
||||||
|
clone.setStandHoldList(route.getStandHoldList());
|
||||||
|
}
|
||||||
clone.setDestinationButtonSignal(route.getDestinationButtonSignal());
|
clone.setDestinationButtonSignal(route.getDestinationButtonSignal());
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
@ -609,7 +611,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
String code = routeCodeGenerator.next();
|
String code = routeCodeGenerator.next();
|
||||||
String name = String.format("%s-%s_%s", start.getName(), endName, index);
|
String name = String.format("%s-%s_%s", start.getName(), endName, index);
|
||||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||||
routeOverlap, config.isRouteSignalAlwaysGreen());
|
routeOverlap, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||||
routeList.add(route);
|
routeList.add(route);
|
||||||
++index;
|
++index;
|
||||||
}
|
}
|
||||||
@ -617,7 +619,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
String code = routeCodeGenerator.next();
|
String code = routeCodeGenerator.next();
|
||||||
String name = String.format("%s-%s", start.getName(), endName);
|
String name = String.format("%s-%s", start.getName(), endName);
|
||||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||||
null, config.isRouteSignalAlwaysGreen());
|
null, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||||
routeList.add(route);
|
routeList.add(route);
|
||||||
} else {
|
} else {
|
||||||
String code = routeCodeGenerator.next();
|
String code = routeCodeGenerator.next();
|
||||||
@ -627,7 +629,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
overlap = overlapList.get(0);
|
overlap = overlapList.get(0);
|
||||||
}
|
}
|
||||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||||
overlap, config.isRouteSignalAlwaysGreen());
|
overlap, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||||
routeList.add(route);
|
routeList.add(route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1159,7 +1161,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
String code = routeCodeGenerator.next();
|
String code = routeCodeGenerator.next();
|
||||||
Route tbRoute = new Route(code, name);
|
Route tbRoute = new Route(code, name);
|
||||||
// 拷贝进路其他属性
|
// 拷贝进路其他属性
|
||||||
this.copyToTurnBackRoute(route, tbRoute);
|
this.copyToTurnBackRoute(route, tbRoute, config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||||
tbRoute.setTurnBack(true);
|
tbRoute.setTurnBack(true);
|
||||||
// 如果生成进路按钮,折返进路按钮默认为终端信号机
|
// 如果生成进路按钮,折返进路按钮默认为终端信号机
|
||||||
if (config.isRouteButton()) {
|
if (config.isRouteButton()) {
|
||||||
@ -1172,7 +1174,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
return tbRouteList;
|
return tbRouteList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyToTurnBackRoute(Route route, Route tbRoute) {
|
private void copyToTurnBackRoute(Route route, Route tbRoute, boolean noStandHold) {
|
||||||
tbRoute.setInterlockStation(route.getInterlockStation());
|
tbRoute.setInterlockStation(route.getInterlockStation());
|
||||||
tbRoute.setStart(route.getStart());
|
tbRoute.setStart(route.getStart());
|
||||||
tbRoute.setDestination(route.getDestination());
|
tbRoute.setDestination(route.getDestination());
|
||||||
@ -1184,7 +1186,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
tbRoute.setFlt(route.isFlt());
|
tbRoute.setFlt(route.isFlt());
|
||||||
tbRoute.setArs(route.isArs());
|
tbRoute.setArs(route.isArs());
|
||||||
// 根据区段设置进路联锁站台相关元素
|
// 根据区段设置进路联锁站台相关元素
|
||||||
tbRoute.setStandHoldList(route.getStandHoldList());
|
if (!noStandHold) {
|
||||||
|
tbRoute.setStandHoldList(route.getStandHoldList());
|
||||||
|
}
|
||||||
tbRoute.setPsdList(route.getPsdList());
|
tbRoute.setPsdList(route.getPsdList());
|
||||||
tbRoute.setEspList(route.getEspList());
|
tbRoute.setEspList(route.getEspList());
|
||||||
}
|
}
|
||||||
@ -1264,11 +1268,12 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
* @param sectionPath
|
* @param sectionPath
|
||||||
* @param routeOverlap
|
* @param routeOverlap
|
||||||
* @param alwaysGreen 进路始端信号是否总是开绿灯
|
* @param alwaysGreen 进路始端信号是否总是开绿灯
|
||||||
|
* @param noStandHold
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Route buildRoute(String code, String name,
|
private Route buildRoute(String code, String name,
|
||||||
Signal start, Signal end, Signal endButton,
|
Signal start, Signal end, Signal endButton,
|
||||||
SectionPath sectionPath, RouteOverlap routeOverlap, boolean alwaysGreen) {
|
SectionPath sectionPath, RouteOverlap routeOverlap, boolean alwaysGreen, boolean noStandHold) {
|
||||||
Route route = new Route(code, name);
|
Route route = new Route(code, name);
|
||||||
route.setInterlockStation(start.getInterlockStation());
|
route.setInterlockStation(start.getInterlockStation());
|
||||||
route.setStart(start);
|
route.setStart(start);
|
||||||
@ -1337,7 +1342,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
route.setStandHoldList(standHoldList);
|
if (!noStandHold) {
|
||||||
|
route.setStandHoldList(standHoldList);
|
||||||
|
}
|
||||||
route.setPsdList(psdList);
|
route.setPsdList(psdList);
|
||||||
route.setEspList(espList);
|
route.setEspList(espList);
|
||||||
return route;
|
return route;
|
||||||
|
@ -308,7 +308,7 @@ public class RouteService {
|
|||||||
log.info(String.format("进路[%s]排列检查失败,无法排列:%s", route.debugStr(), check.debugStr()));
|
log.info(String.format("进路[%s]排列检查失败,无法排列:%s", route.debugStr(), check.debugStr()));
|
||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
if (route.isLock()) {
|
if (route.isLock() && !route.isFleetMode()) {
|
||||||
log.info(String.format("进路[%s]已经锁闭", route.debugStr()));
|
log.info(String.format("进路[%s]已经锁闭", route.debugStr()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
@ -81,7 +82,9 @@ public class MapAutoSignalNewVO {
|
|||||||
vo.setCode(autoSignal.getCode());
|
vo.setCode(autoSignal.getCode());
|
||||||
vo.setSignalCode(autoSignal.getSignal().getCode());
|
vo.setSignalCode(autoSignal.getSignal().getCode());
|
||||||
vo.setSectionList(autoSignal.getSectionList().stream().map(Section::getCode).collect(Collectors.toList()));
|
vo.setSectionList(autoSignal.getSectionList().stream().map(Section::getCode).collect(Collectors.toList()));
|
||||||
vo.setHoldStandList(autoSignal.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
if (!CollectionUtils.isEmpty(autoSignal.getStandHoldList())) {
|
||||||
|
vo.setHoldStandList(autoSignal.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
vo.setPsdList(autoSignal.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
vo.setPsdList(autoSignal.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
||||||
vo.setEspList(autoSignal.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
vo.setEspList(autoSignal.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
||||||
vo.setConflictRouteList(autoSignal.getConflictRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
vo.setConflictRouteList(autoSignal.getConflictRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
||||||
|
@ -121,6 +121,9 @@ public class MapCiGenerateConfig {
|
|||||||
/** 上下行站台共享紧急关闭效果的车站 */
|
/** 上下行站台共享紧急关闭效果的车站 */
|
||||||
private Set<String> sharingECStations = new HashSet<>();
|
private Set<String> sharingECStations = new HashSet<>();
|
||||||
|
|
||||||
|
/** 进路联锁不包含站台扣车 */
|
||||||
|
private boolean routeInterlockDoNotIncludeStandHoldTrain;
|
||||||
|
|
||||||
// @ApiModelProperty(value = "是否分开生成ATP联锁和地面信号联锁")
|
// @ApiModelProperty(value = "是否分开生成ATP联锁和地面信号联锁")
|
||||||
// private boolean apartGroundAndAtp;
|
// private boolean apartGroundAndAtp;
|
||||||
|
|
||||||
|
@ -223,7 +223,9 @@ public class MapRouteNewVO {
|
|||||||
if (Objects.nonNull(route.getOverlap())) {
|
if (Objects.nonNull(route.getOverlap())) {
|
||||||
vo.setOverlapCode(route.getOverlap().getCode());
|
vo.setOverlapCode(route.getOverlap().getCode());
|
||||||
}
|
}
|
||||||
vo.setHoldStandList(route.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
if (!CollectionUtils.isEmpty(route.getStandHoldList())) {
|
||||||
|
vo.setHoldStandList(route.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
vo.setPsdList(route.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
vo.setPsdList(route.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
||||||
vo.setEspList(route.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
vo.setEspList(route.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
||||||
vo.setConflictRouteList(route.getConflictingRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
vo.setConflictRouteList(route.getConflictingRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
||||||
|
Loading…
Reference in New Issue
Block a user