diff --git a/src/main/java/com/iflytop/handacid/app/core/state/ChannelState.java b/src/main/java/com/iflytop/handacid/app/core/state/ChannelState.java index a66ef46..58ba77d 100644 --- a/src/main/java/com/iflytop/handacid/app/core/state/ChannelState.java +++ b/src/main/java/com/iflytop/handacid/app/core/state/ChannelState.java @@ -17,31 +17,31 @@ import org.springframework.stereotype.Component; @JsonIgnoreProperties(value = {"advisors", "frozen", "preFiltered", "proxyTargetClass", "targetSource", "exposeProxy", "advisorCount", "proxiedInterfaces", "targetClass"}) public class ChannelState { @Schema(description = "通道code") - private ChannelCode channelCode; + private volatile ChannelCode channelCode; @Schema(description = "当前通道状态") - private ChannelStateCode stateCode = ChannelStateCode.IDLE; + private volatile ChannelStateCode stateCode = ChannelStateCode.IDLE; @Schema(description = "是否已预充") private volatile boolean pre = false; @Schema(description = "剩余容量(单位:mL)") - private Double remainingVolume; + private volatile Double remainingVolume; @Schema(description = "溶液id") - private Long solutionId; + private volatile Long solutionId; @Schema(description = "溶液名称") - private String solutionName; + private volatile String solutionName; @Schema(description = "溶液浓度") - private String concentration; + private volatile String concentration; @Schema(description = "是否选中") private volatile boolean selected = false; @Schema(description = "目标加液量(单位:mL)") - private Double targetVolume; + private volatile Double targetVolume; public ChannelState(ChannelCode channelCode, Double remainingVolume, Long solutionId, String solutionName, String concentration) { this.channelCode = channelCode; diff --git a/src/main/java/com/iflytop/handacid/app/core/state/DeviceState.java b/src/main/java/com/iflytop/handacid/app/core/state/DeviceState.java index 96669f8..6048e08 100644 --- a/src/main/java/com/iflytop/handacid/app/core/state/DeviceState.java +++ b/src/main/java/com/iflytop/handacid/app/core/state/DeviceState.java @@ -35,7 +35,7 @@ public class DeviceState { private volatile boolean emergencyStop = false; @Schema(description = "当前登录用户") - private User currentUser; + private volatile User currentUser; public JSONObject toJSON() { JSONObject json = new JSONObject();