添加挤岔恢复指令

This commit is contained in:
joylink_zhangsai 2021-01-22 21:12:01 +08:00
parent efeda41423
commit e351662dcc
4 changed files with 19 additions and 0 deletions

View File

@ -77,6 +77,8 @@ public class Operation {
Switch_Hook_Lock,
/** 道岔强解 */
Switch_Force_Unlock,
/** 挤岔恢复 */
Switch_Squeeze_Recovery,
//--------------------------- 区段 ---------------------------
/** 封锁 */

View File

@ -260,4 +260,10 @@ public class SwitchOperateHandler {
public void switchForceTurn(Simulation simulation, String switchCode, Boolean normal) {
ciApiService.switchForceTurn(simulation, switchCode, normal);
}
/** 挤岔恢复 */
@OperateHandlerMapping(type = Operation.Type.Switch_Squeeze_Recovery)
public void switchSqueezeRecovery(Simulation simulation, String switchCode) {
ciApiService.switchSqueezeRecovery(simulation, switchCode);
}
}

View File

@ -329,4 +329,9 @@ public interface CiApiService {
* 道岔计轴预复位
*/
void switchAxlePreReset(Simulation simulation, String switchCode);
/**
* 挤岔恢复
*/
void switchSqueezeRecovery(Simulation simulation, String switchCode);
}

View File

@ -508,4 +508,10 @@ public class CiApiServiceImpl implements CiApiService {
Switch aSwitch = simulation.getRepository().getByCode(switchCode, Switch.class);
aSwitch.setPreReset(true);
}
@Override
public void switchSqueezeRecovery(Simulation simulation, String switchCode) {
Switch aSwitch = simulation.getRepository().getByCode(switchCode, Switch.class);
Switch.SwitchFault.SQUEEZE.fix(aSwitch);
}
}