【车站直接转中控】
This commit is contained in:
parent
2316deb8d3
commit
5372e55b44
File diff suppressed because it is too large
Load Diff
|
@ -16,332 +16,360 @@ import club.joylink.rtss.simulation.cbtc.data.vo.ControlTransferReplyVO;
|
|||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@Slf4j
|
||||
@OperateHandler
|
||||
public class StationOperateHandler {
|
||||
|
||||
@Autowired
|
||||
private AtsStationService atsStationService;
|
||||
@Autowired
|
||||
private CiApiService ciApiService;
|
||||
@Autowired
|
||||
private AtsStationService atsStationService;
|
||||
@Autowired
|
||||
private CiApiService ciApiService;
|
||||
|
||||
/**
|
||||
* 设置折返站折返策略
|
||||
*
|
||||
* @param simulation
|
||||
* @param stationCode 折返车站code
|
||||
* @param id 折返策略id
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Turn_Back_Strategy)
|
||||
public void setTurnBackStrategy(Simulation simulation, String stationCode, Integer id) {
|
||||
this.atsStationService.setTurnBackStrategy(simulation, stationCode, id);
|
||||
}
|
||||
/**
|
||||
* 设置折返站折返策略
|
||||
*
|
||||
* @param simulation
|
||||
* @param stationCode 折返车站code
|
||||
* @param id 折返策略id
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Turn_Back_Strategy)
|
||||
public void setTurnBackStrategy(Simulation simulation, String stationCode, Integer id) {
|
||||
this.atsStationService.setTurnBackStrategy(simulation, stationCode, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全站设置联锁自动触发
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto_Trigger)
|
||||
public void setCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.setCiAutoTrigger(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 全站设置联锁自动触发
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto_Trigger)
|
||||
public void setCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.setCiAutoTrigger(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全站取消联锁自动触发
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto_Trigger)
|
||||
public void cancelCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.cancelCiAutoTrigger(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 全站取消联锁自动触发
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto_Trigger)
|
||||
public void cancelCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.cancelCiAutoTrigger(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有进路自排开
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Open_Auto_Setting)
|
||||
public void openAutoSetting(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.openAutoSetting(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 所有进路自排开
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Open_Auto_Setting)
|
||||
public void openAutoSetting(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.openAutoSetting(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有进路自排关
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_Auto_Setting)
|
||||
public void closeAutoSetting(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.closeAutoSetting(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 所有进路自排关
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_Auto_Setting)
|
||||
public void closeAutoSetting(Simulation simulation, String stationCode) {
|
||||
this.atsStationService.closeAutoSetting(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行关键操作测试
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Key_Operation_Test)
|
||||
public void keyOperationTest() {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "功能暂未实现");
|
||||
}
|
||||
/**
|
||||
* 执行关键操作测试
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Key_Operation_Test)
|
||||
public void keyOperationTest() {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "功能暂未实现");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上电解锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Power_On_Unlock)
|
||||
public void powerOnUnlock(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
ciApiService.powerOnUnlock(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
/**
|
||||
* 上电解锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Power_On_Unlock)
|
||||
public void powerOnUnlock(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
ciApiService.powerOnUnlock(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示车站信息
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Info)
|
||||
public StationStatus info(Simulation simulation, String stationCode) {
|
||||
return atsStationService.info(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 显示车站信息
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Info)
|
||||
public StationStatus info(Simulation simulation, String stationCode) {
|
||||
return atsStationService.info(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置引导总锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Master_Guide_Lock)
|
||||
public void setMasterGuideLock(Simulation simulation, String stationCode) {
|
||||
atsStationService.setMasterGuideLock(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 设置引导总锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Master_Guide_Lock)
|
||||
public void setMasterGuideLock(Simulation simulation, String stationCode) {
|
||||
atsStationService.setMasterGuideLock(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消引导总锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Master_Guide_Lock)
|
||||
public void cancelMasterGuideLock(Simulation simulation, String stationCode) {
|
||||
atsStationService.cancelMasterGuideLock(simulation, stationCode);
|
||||
}
|
||||
/**
|
||||
* 取消引导总锁
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Master_Guide_Lock)
|
||||
public void cancelMasterGuideLock(Simulation simulation, String stationCode) {
|
||||
atsStationService.cancelMasterGuideLock(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求站控lc
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Station_Control)
|
||||
public void applyForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
||||
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
/**
|
||||
* 请求站控lc
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Station_Control)
|
||||
public void applyForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||
List<String> stationCodes) {
|
||||
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求中控lc
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Center_Control)
|
||||
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
||||
atsStationService.applyForCenterControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
/**
|
||||
* 请求中控lc
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Center_Control)
|
||||
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember,
|
||||
List<String> stationCodes) {
|
||||
atsStationService.applyForCenterControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 连锁控
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Interlock_Control)
|
||||
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
||||
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Direct_Turn_Center_Control)
|
||||
public void directTurnCenterControl(Simulation simulation, String stationCode) {
|
||||
atsStationService.directTurnCenterControl(simulation, stationCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 强制站控-l
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
||||
public void forceForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
||||
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
/**
|
||||
* 连锁控
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Interlock_Control)
|
||||
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember,
|
||||
List<String> stationCodes) {
|
||||
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 紧急站控-l
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
||||
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
||||
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
/**
|
||||
* 强制站控-l
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
||||
public void forceForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||
List<String> stationCodes) {
|
||||
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 紧急站控-l
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
||||
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember,
|
||||
List<String> stationCodes) {
|
||||
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 回复站控请求c
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Station_Control)
|
||||
public void replyForStationControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
||||
atsStationService.replyForStationControl(simulation, replyVOList);
|
||||
}
|
||||
/**
|
||||
* 回复站控请求c
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Station_Control)
|
||||
public void replyForStationControl(Simulation simulation,
|
||||
List<ControlTransferReplyVO> replyVOList) {
|
||||
atsStationService.replyForStationControl(simulation, replyVOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复中控请求c
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Center_Control)
|
||||
public void replyForCenterControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
||||
atsStationService.replyForCenterControl(simulation, replyVOList);
|
||||
}
|
||||
/**
|
||||
* 回复中控请求c
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Center_Control)
|
||||
public void replyForCenterControl(Simulation simulation,
|
||||
List<ControlTransferReplyVO> replyVOList) {
|
||||
atsStationService.replyForCenterControl(simulation, replyVOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关站信号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_AllSignal)
|
||||
public void closeAllSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
repository.getSignalList().stream()
|
||||
.filter(s -> s.getStation() != null && Objects.equals(stationCode, s.getStation().getCode()))
|
||||
.forEach(signal -> {
|
||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||
if (signal.getLockedRoute() != null) {
|
||||
ciApiService.closeSignal(simulation, signal.getCode());
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 关站信号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_AllSignal)
|
||||
public void closeAllSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
repository.getSignalList().stream()
|
||||
.filter(
|
||||
s -> s.getStation() != null && Objects.equals(stationCode, s.getStation().getCode()))
|
||||
.forEach(signal -> {
|
||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||
if (signal.getLockedRoute() != null) {
|
||||
ciApiService.closeSignal(simulation, signal.getCode());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 关区信号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_CIArea_Close_AllSignal)
|
||||
public void closeCIAreaAllSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
repository.getSignalList().stream()
|
||||
.filter(s -> Objects.equals(stationCode, s.getInterlockStation().getCode()))
|
||||
.forEach(signal -> {
|
||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||
ciApiService.closeSignal(simulation, signal.getCode());
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 关区信号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_CIArea_Close_AllSignal)
|
||||
public void closeCIAreaAllSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
repository.getSignalList().stream()
|
||||
.filter(s -> Objects.equals(stationCode, s.getInterlockStation().getCode()))
|
||||
.forEach(signal -> {
|
||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||
ciApiService.closeSignal(simulation, signal.getCode());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 交出控制权/下放站控
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Surrender_Control)
|
||||
public void surrenderControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.surrenderControl(simulation, member, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
/**
|
||||
* 交出控制权/下放站控
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Surrender_Control)
|
||||
public void surrenderControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.surrenderControl(simulation, member,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收控制权
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Receive_Control)
|
||||
public void receiveControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.receiveControl(simulation, member, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
/**
|
||||
* 接收控制权
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Receive_Control)
|
||||
public void receiveControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.receiveControl(simulation, member,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart)
|
||||
public void restart(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.ciApiService.restart(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart)
|
||||
public void restart(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.ciApiService.restart(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Release)
|
||||
public void release(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.ciApiService.release(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Release)
|
||||
public void release(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.ciApiService.release(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto)
|
||||
public void setCIAuto(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.setCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto)
|
||||
public void setCIAuto(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.setCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto)
|
||||
public void cancelCIAuto(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.cancelCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto)
|
||||
public void cancelCIAuto(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.cancelCIAuto(simulation,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Or_Cancel_Force_Physical_Signal)
|
||||
public void setOrCancelForcePhysicalSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.setOrCancelForcePhysicalSignal(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Or_Cancel_Force_Physical_Signal)
|
||||
public void setOrCancelForcePhysicalSignal(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.setOrCancelForcePhysicalSignal(simulation,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Apply)
|
||||
public void applyControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
||||
this.atsStationService.applyControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Apply)
|
||||
public void applyControl(Simulation simulation, List<String> stationCodes,
|
||||
SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||
"未选择车站");
|
||||
this.atsStationService.applyControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Transfer)
|
||||
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree, SimulationMember simulationMember) {
|
||||
this.atsStationService.transferControl(simulation, stationCodes, agree, simulationMember);
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Transfer)
|
||||
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree,
|
||||
SimulationMember simulationMember) {
|
||||
this.atsStationService.transferControl(simulation, stationCodes, agree, simulationMember);
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Devolve)
|
||||
public void devolveControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
||||
this.atsStationService.devolveControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Devolve)
|
||||
public void devolveControl(Simulation simulation, List<String> stationCodes,
|
||||
SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||
"未选择车站");
|
||||
this.atsStationService.devolveControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Revoke)
|
||||
public void revokeControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
||||
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Revoke)
|
||||
public void revokeControl(Simulation simulation, List<String> stationCodes,
|
||||
SimulationMember simulationMember) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||
"未选择车站");
|
||||
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Pre_Reset)
|
||||
public void preReset(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.preReset(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Pre_Reset)
|
||||
public void preReset(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.preReset(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Pre_Reset)
|
||||
public void cancelPreReset(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.cancelPreReset(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Pre_Reset)
|
||||
public void cancelPreReset(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.cancelPreReset(simulation,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart_Interlock_Machine)
|
||||
public void restartInterlock(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.restartInterlock(simulation, repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart_Interlock_Machine)
|
||||
public void restartInterlock(Simulation simulation, String stationCode) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
this.atsStationService.restartInterlock(simulation,
|
||||
repository.getByCode(stationCode, Station.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 引导总锁(大铁)
|
||||
*
|
||||
* @param stationCode 车站
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Lock)
|
||||
public void masterLock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||
ciApiService.switchMasterLock(simulation, stationCode, throat);
|
||||
}
|
||||
/**
|
||||
* 引导总锁(大铁)
|
||||
*
|
||||
* @param stationCode 车站
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Lock)
|
||||
public void masterLock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||
ciApiService.switchMasterLock(simulation, stationCode, throat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解除引导总锁(大铁)
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Unlock)
|
||||
public void masterUnlock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||
ciApiService.switchMasterUnlock(simulation, stationCode, throat);
|
||||
}
|
||||
/**
|
||||
* 解除引导总锁(大铁)
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Unlock)
|
||||
public void masterUnlock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||
ciApiService.switchMasterUnlock(simulation, stationCode, throat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大铁非常站控(大铁)
|
||||
*
|
||||
* @param stationCode 车站编号
|
||||
* @param pressDown 弹起:0;按下:1
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Special_Station_Control)
|
||||
public void specialStationControl(Simulation simulation, SimulationMember fromMember, String stationCode, Integer pressDown) {
|
||||
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
||||
}
|
||||
/**
|
||||
* 大铁非常站控(大铁)
|
||||
*
|
||||
* @param stationCode 车站编号
|
||||
* @param pressDown 弹起:0;按下:1
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CM_Special_Station_Control)
|
||||
public void specialStationControl(Simulation simulation, SimulationMember fromMember,
|
||||
String stationCode, Integer pressDown) {
|
||||
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
||||
}
|
||||
|
||||
/**
|
||||
* 车站状态选择切换
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Route_Set_Model)
|
||||
public void switchRouteSetModel(Simulation simulation, List<RouteModelParam> routeSetModeParams) {
|
||||
atsStationService.switchRouteSetModel(simulation, routeSetModeParams);
|
||||
}
|
||||
/**
|
||||
* 车站状态选择切换
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Route_Set_Model)
|
||||
public void switchRouteSetModel(Simulation simulation, List<RouteModelParam> routeSetModeParams) {
|
||||
atsStationService.switchRouteSetModel(simulation, routeSetModeParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* 车站在分散自律时,操作模式转换
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Control_Operation_Mode)
|
||||
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember, List<OperationModeParam> params) {
|
||||
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
||||
}
|
||||
/**
|
||||
* 车站在分散自律时,操作模式转换
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Control_Operation_Mode)
|
||||
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember,
|
||||
List<OperationModeParam> params) {
|
||||
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分散自律同意、不同意转换模式操作
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Handle_Operation_Mode_Apply)
|
||||
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes, List<String> noAgreeStationCodes) {
|
||||
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
||||
}
|
||||
/**
|
||||
* 分散自律同意、不同意转换模式操作
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Station_Handle_Operation_Mode_Apply)
|
||||
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes,
|
||||
List<String> noAgreeStationCodes) {
|
||||
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue