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