连锁重启操作交出车站控制权
This commit is contained in:
parent
9839992d0c
commit
6c5da045f7
@ -516,12 +516,15 @@ public class AtsStationService {
|
|||||||
station.setRestartTime(LocalTime.now());
|
station.setRestartTime(LocalTime.now());
|
||||||
Station.Fault.INTERLOCK_FAULT.fix(station); //恢复联锁机故障
|
Station.Fault.INTERLOCK_FAULT.fix(station); //恢复联锁机故障
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
for (StatusDevice value : station.getDeviceMap().values()) {
|
//该站范围内区段故障锁闭
|
||||||
if (value instanceof Section) { //联锁区所有区段故障锁闭
|
station.getDeviceMap().values().stream()
|
||||||
Section section = (Section) value;
|
.filter(v -> v instanceof Section)
|
||||||
section.recursivelySetFaultLock(true);
|
.map(v -> (Section) v)
|
||||||
} else if (value instanceof Station) { //联锁区所有车站交出控制权
|
.forEach(section -> section.recursivelySetFaultLock(true));
|
||||||
Station station1 = (Station) value;
|
//车站交出控制权
|
||||||
|
station.setControlMode(Station.ControlMode.None);
|
||||||
|
for (Station station1 : repository.getStationList()) {
|
||||||
|
if (Objects.equals(station, station1.getDeviceStation())) {
|
||||||
station1.setControlMode(Station.ControlMode.None);
|
station1.setControlMode(Station.ControlMode.None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user