From 317ef4ef96e47cb73726c4bbc3a5ba8a5ba54c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Wed, 30 Jul 2025 10:35:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=9D=E8=AF=81=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=E9=97=B4=E8=8E=B7=E5=8F=96=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=AB=8B=E5=8D=B3=E4=BB=8E=E5=86=85=E5=AD=98?= =?UTF-8?q?=E4=B8=AD=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iflytop/handacid/app/core/state/ChannelState.java | 14 +++++++------- .../com/iflytop/handacid/app/core/state/DeviceState.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) 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();