发给前端的列车状态增加停站状态
This commit is contained in:
parent
b0d30ed58c
commit
2316deb8d3
@ -141,6 +141,8 @@ public class TrainStatus extends DeviceStatus {
|
||||
|
||||
private int runningTime;
|
||||
|
||||
private boolean parking;
|
||||
|
||||
private int parkingRemainTime;
|
||||
|
||||
private String turnBackStrategy;
|
||||
@ -185,6 +187,7 @@ public class TrainStatus extends DeviceStatus {
|
||||
this.startStation = train.getStartStation();
|
||||
this.endStation = train.getEndStation();
|
||||
this.runningTime = train.getRunningTimeInSeconds();
|
||||
this.parking = train.isParking();
|
||||
this.parkingRemainTime = train.getParkingRemainTimeInSeconds();
|
||||
this.turnBackStrategy = train.getTurnBackStrategy();
|
||||
this.turnBackStatus = train.getTurnBackStatus();
|
||||
@ -330,6 +333,11 @@ public class TrainStatus extends DeviceStatus {
|
||||
status.setRunningTime(this.runningTime);
|
||||
change = true;
|
||||
}
|
||||
if (!Objects.equals(this.parking, train.isParking())) {
|
||||
this.parking = train.isParking();
|
||||
status.setParking(this.parking);
|
||||
change = true;
|
||||
}
|
||||
if (!Objects.equals(this.parkingRemainTime, train.getParkingRemainTimeInSeconds())) {
|
||||
this.parkingRemainTime = train.getParkingRemainTimeInSeconds();
|
||||
status.setParkingRemainTime(this.parkingRemainTime);
|
||||
|
@ -141,6 +141,8 @@ public class TrainStatusVO extends DeviceStatusVO {
|
||||
|
||||
private Integer runningTime;
|
||||
|
||||
private Boolean parking;
|
||||
|
||||
private Integer parkingRemainTime;
|
||||
|
||||
private String turnBackStrategy;
|
||||
@ -183,6 +185,7 @@ public class TrainStatusVO extends DeviceStatusVO {
|
||||
this.startStation = train.getStartStation();
|
||||
this.endStation = train.getEndStation();
|
||||
this.runningTime = train.getRunningTime();
|
||||
this.parking = train.isParking();
|
||||
this.parkingRemainTime = train.getParkingRemainTime();
|
||||
this.turnBackStrategy = train.getTurnBackStrategy();
|
||||
this.turnBackStatus = train.getTurnBackStatus();
|
||||
|
Loading…
Reference in New Issue
Block a user