|
@ -3,6 +3,7 @@ package com.iflytop.handacid.app.core.state; |
|
|
import cn.hutool.json.JSONObject; |
|
|
import cn.hutool.json.JSONObject; |
|
|
import com.iflytop.handacid.app.common.enums.ChannelCode; |
|
|
import com.iflytop.handacid.app.common.enums.ChannelCode; |
|
|
import com.iflytop.handacid.app.common.enums.ChannelStateCode; |
|
|
import com.iflytop.handacid.app.common.enums.ChannelStateCode; |
|
|
|
|
|
import com.iflytop.handacid.app.common.enums.SolutionAddMode; |
|
|
import com.iflytop.handacid.common.model.entity.User; |
|
|
import com.iflytop.handacid.common.model.entity.User; |
|
|
import io.swagger.v3.oas.annotations.media.Schema; |
|
|
import io.swagger.v3.oas.annotations.media.Schema; |
|
|
import lombok.Data; |
|
|
import lombok.Data; |
|
@ -24,6 +25,9 @@ public class DeviceState { |
|
|
@Schema(description = "是否停止加液") |
|
|
@Schema(description = "是否停止加液") |
|
|
private volatile boolean solutionAddStop = false; |
|
|
private volatile boolean solutionAddStop = false; |
|
|
|
|
|
|
|
|
|
|
|
@Schema(description = "加液模式") |
|
|
|
|
|
private volatile SolutionAddMode mode; |
|
|
|
|
|
|
|
|
@Schema(description = "虚拟模式,true为虚拟") |
|
|
@Schema(description = "虚拟模式,true为虚拟") |
|
|
private volatile boolean virtual = false; |
|
|
private volatile boolean virtual = false; |
|
|
|
|
|
|
|
@ -36,6 +40,7 @@ public class DeviceState { |
|
|
public JSONObject toJSON() { |
|
|
public JSONObject toJSON() { |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONObject json = new JSONObject(); |
|
|
json.putOnce("channelState", new ArrayList<>(channelStateMap.values())); |
|
|
json.putOnce("channelState", new ArrayList<>(channelStateMap.values())); |
|
|
|
|
|
json.putOnce("mode", mode); |
|
|
json.putOnce("virtual", virtual); |
|
|
json.putOnce("virtual", virtual); |
|
|
json.putOnce("emergencyStop", emergencyStop); |
|
|
json.putOnce("emergencyStop", emergencyStop); |
|
|
json.putOnce("currentUser", currentUser); |
|
|
json.putOnce("currentUser", currentUser); |
|
|