【准备状态修改】
【发车灯逻辑判断修改】
This commit is contained in:
parent
c09bed0506
commit
b213ddc9ac
@ -377,8 +377,10 @@ public class StationDirection extends MapNamedElement {
|
||||
receiveAspect = judgeSignalLock() ? IndicatorStatusEnum.O : IndicatorStatusEnum.F;
|
||||
} else if (ReceiveAndDeliverModel.D.equals(this.runStatus)) {
|
||||
receiveAspect = IndicatorStatusEnum.F;
|
||||
// 信号机进路锁闭
|
||||
Section section = this.getSignal().getSection();
|
||||
// 发车进路锁闭
|
||||
deliverAspect = judgeSignalLock() ? IndicatorStatusEnum.O : IndicatorStatusEnum.F;
|
||||
deliverAspect = judgeSignalLock() || section.isRouteLock() ? IndicatorStatusEnum.O : IndicatorStatusEnum.F;
|
||||
} else {
|
||||
receiveAspect = this.receiveAspect;
|
||||
deliverAspect = this.receiveAspect;
|
||||
|
@ -71,26 +71,11 @@ public class StationDirectionStatus extends DeviceStatus {
|
||||
*/
|
||||
private AtomicInteger remain;
|
||||
|
||||
/**
|
||||
* 闭塞按钮
|
||||
*/
|
||||
private boolean blockStatus;
|
||||
|
||||
/**
|
||||
* 复原按钮
|
||||
*/
|
||||
private boolean restoreStatus;
|
||||
|
||||
/**
|
||||
* 预备状态
|
||||
*/
|
||||
private boolean readyStatus;
|
||||
|
||||
/**
|
||||
* 事故
|
||||
*/
|
||||
private boolean accidentStatus;
|
||||
|
||||
public StationDirectionStatus(StationDirection stationDirection) {
|
||||
super(stationDirection.getCode(), stationDirection.getDeviceType());
|
||||
this.runModel = stationDirection.getRunModel();
|
||||
@ -106,10 +91,7 @@ public class StationDirectionStatus extends DeviceStatus {
|
||||
this.receiveAssistStatus = stationDirection.isReceiveAssistStatus();
|
||||
this.deliverAssistStatus = stationDirection.isDeliverAssistStatus();
|
||||
this.remain = new AtomicInteger(stationDirection.getRemain().intValue());
|
||||
this.blockStatus = stationDirection.isBlockStatus();
|
||||
this.restoreStatus = stationDirection.isRestoreStatus();
|
||||
this.readyStatus = stationDirection.isReadyStatus();
|
||||
this.accidentStatus = stationDirection.isAccidentStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -177,30 +159,12 @@ public class StationDirectionStatus extends DeviceStatus {
|
||||
status.setRemain(remain.intValue());
|
||||
change = true;
|
||||
}
|
||||
// 闭塞状态
|
||||
if (!Objects.equals(stationDirection.isBlockStatus(), blockStatus)) {
|
||||
this.blockStatus = stationDirection.isBlockStatus();
|
||||
status.setBlockStatus(stationDirection.isBlockStatus());
|
||||
change = true;
|
||||
}
|
||||
// 复原状态
|
||||
if (!Objects.equals(stationDirection.isRestoreStatus(), restoreStatus)) {
|
||||
this.restoreStatus = stationDirection.isRestoreStatus();
|
||||
status.setRestoreStatus(stationDirection.isRestoreStatus());
|
||||
change = true;
|
||||
}
|
||||
// 预备状态
|
||||
if (!Objects.equals(stationDirection.isReadyStatus(), readyStatus)) {
|
||||
this.readyStatus = stationDirection.isReadyStatus();
|
||||
status.setReadyStatus(stationDirection.isReadyStatus());
|
||||
change = true;
|
||||
}
|
||||
// 预备状态
|
||||
if (!Objects.equals(stationDirection.isAccidentStatus(), accidentStatus)) {
|
||||
this.accidentStatus = stationDirection.isAccidentStatus();
|
||||
status.setAccidentStatus(stationDirection.isAccidentStatus());
|
||||
change = true;
|
||||
}
|
||||
return change;
|
||||
}
|
||||
|
||||
@ -220,10 +184,7 @@ public class StationDirectionStatus extends DeviceStatus {
|
||||
statusVO.setReceiveAssistStatus(receiveAssistStatus);
|
||||
statusVO.setDeliverAssistStatus(deliverAssistStatus);
|
||||
statusVO.setRemain(remain.intValue());
|
||||
statusVO.setBlockStatus(blockStatus);
|
||||
statusVO.setRestoreStatus(restoreStatus);
|
||||
statusVO.setReadyStatus(readyStatus);
|
||||
statusVO.setAccidentStatus(accidentStatus);
|
||||
return statusVO;
|
||||
}
|
||||
}
|
||||
|
@ -65,26 +65,11 @@ public class StationDirectionStatusVO extends DeviceStatusVO {
|
||||
*/
|
||||
private Integer remain;
|
||||
|
||||
/**
|
||||
* 闭塞按钮
|
||||
*/
|
||||
private Boolean blockStatus;
|
||||
|
||||
/**
|
||||
* 复原按钮
|
||||
*/
|
||||
private Boolean restoreStatus;
|
||||
|
||||
/**
|
||||
* 预备状态
|
||||
*/
|
||||
private Boolean readyStatus;
|
||||
|
||||
/**
|
||||
* 事故
|
||||
*/
|
||||
private Boolean accidentStatus;
|
||||
|
||||
public StationDirectionStatusVO(StationDirection stationDirection) {
|
||||
super(stationDirection.getCode(), stationDirection.getDeviceType());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user