【大铁的上电解锁操作】
This commit is contained in:
parent
bfb50c52a9
commit
756d658b20
@ -572,6 +572,11 @@ public class Operation {
|
||||
* 分路不良(大铁)
|
||||
*/
|
||||
Station_Set_Defective_Shunting,
|
||||
|
||||
/**
|
||||
* 上电解锁(大铁)
|
||||
*/
|
||||
Station_Power_On_Unlock_Railroad,
|
||||
//--------------------------- 列车 ---------------------------
|
||||
/**
|
||||
* 在指定区段加载一辆计划列车(本地开发使用)
|
||||
|
@ -292,6 +292,7 @@ public class StationOperateHandler {
|
||||
|
||||
/**
|
||||
* 引导总锁(大铁)
|
||||
*
|
||||
* @param stationCode 车站
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Lock)
|
||||
@ -308,7 +309,7 @@ public class StationOperateHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* 大铁非常站控
|
||||
* 大铁非常站控(大铁)
|
||||
*
|
||||
* @param stationCode 车站编号
|
||||
* @param pressDown 弹起:0;按下:1
|
||||
@ -319,7 +320,7 @@ public class StationOperateHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* 车站设置分路不良
|
||||
* 车站设置分路不良(大铁)
|
||||
*
|
||||
* @param simulation 仿真实体
|
||||
* @param stationCode 车站编码
|
||||
@ -328,4 +329,15 @@ public class StationOperateHandler {
|
||||
public void setDefectiveShunting(Simulation simulation, String stationCode) {
|
||||
atsStationService.setDefectiveShunting(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上电解锁(大铁)
|
||||
*
|
||||
* @param simulation 仿真实体
|
||||
* @param stationCode 车站编码
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Power_On_Unlock_Railroad)
|
||||
public void powerOnUnlockRailroad(Simulation simulation, String stationCode) {
|
||||
atsStationService.powerOnUnlockRailroad(simulation, stationCode);
|
||||
}
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ public class AtsStationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 大铁非常站控
|
||||
* 大铁非常站控(大铁)
|
||||
*
|
||||
* @param simulation 仿真实体
|
||||
* @param fromMember
|
||||
@ -580,7 +580,7 @@ public class AtsStationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 按下分路不良
|
||||
* 按下分路不良(大铁)
|
||||
*
|
||||
* @param simulation 仿真实体
|
||||
* @param stationCode 车站编码
|
||||
@ -593,4 +593,18 @@ public class AtsStationService {
|
||||
station.setDefectiveShunting(true);
|
||||
station.getDefectiveShuntingRemain().set(15);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上电解锁(大铁)
|
||||
*
|
||||
* @param simulation 仿真实体
|
||||
* @param stationCode 车站编码
|
||||
*/
|
||||
public void powerOnUnlockRailroad(Simulation simulation, String stationCode) {
|
||||
if (StringUtils.isEmpty(stationCode)) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "车站不能为空");
|
||||
}
|
||||
List<Section> sectionList = simulation.getRepository().getSectionList();
|
||||
sectionList.stream().filter(section -> stationCode.equals(section.getStation().getCode())).forEach(Section::faultUnlock);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user