From ffbb75ea4d775bb176efe3100cbd1e7ec1dbefe9 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 30 Jun 2021 15:18:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9AStandStatus=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8A=98=E8=BF=94=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/data/status/StandStatus.java | 6 ++++++ .../joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java index 4f2a2be1c..2cac59cd2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java @@ -117,6 +117,7 @@ public class StandStatus extends DeviceStatus { this.trainLimit = stand.getTrainLimit(); this.parkingTime = stand.getParkingTime(); this.parkingAlwaysValid = stand.isParkingAlwaysValid(); + this.typeStrategy = stand.getTypeStrategy(); this.noStatus = stand.isNoStatus(); this.closed = stand.isClosed(); this.fault = Objects.nonNull(stand.getFault())?((Stand.Fault)stand.getFault()).name():null; @@ -214,6 +215,11 @@ public class StandStatus extends DeviceStatus { status.setParkingAlwaysValid(this.parkingAlwaysValid); change = true; } + if (!Objects.equals(this.typeStrategy, stand.getTypeStrategy())) { + this.typeStrategy = stand.getTypeStrategy(); + status.setTypeStrategy(this.typeStrategy); + change = true; + } if (!Objects.equals(this.noStatus, stand.isNoStatus())) { this.noStatus = stand.isNoStatus(); status.setNoStatus(noStatus); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java index 7de033b8c..80d2f9792 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java @@ -77,6 +77,8 @@ public class StandStatusVO extends DeviceStatusVO { @JsonSerialize(using = Boolean2NumSerializer.class) private Boolean parkingAlwaysValid; + private Stand.TurnBackType typeStrategy; + @JsonSerialize(using = Boolean2NumSerializer.class) private Boolean noStatus; @@ -84,7 +86,7 @@ public class StandStatusVO extends DeviceStatusVO { private Boolean closed; /**故障*/ - @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonInclude() private String fault; public StandStatusVO(Stand stand) {