Browse Source

fix:修复设备状态门应当为boolean类型,温度应当为double类型

master
白凤吉 5 months ago
parent
commit
3125e73045
  1. 1
      src/main/java/com/qyft/gd/device/handler/DeviceMessageHandler.java
  2. 4
      src/main/java/com/qyft/gd/device/model/bo/DeviceStatus.java

1
src/main/java/com/qyft/gd/device/handler/DeviceMessageHandler.java

@ -37,7 +37,6 @@ public class DeviceMessageHandler extends ChannelInboundHandlerAdapter {
public void channelRead(ChannelHandlerContext ctx, Object msg) { public void channelRead(ChannelHandlerContext ctx, Object msg) {
ByteBuf buf = (ByteBuf) msg; ByteBuf buf = (ByteBuf) msg;
String serverMsg = buf.toString(CharsetUtil.UTF_8); String serverMsg = buf.toString(CharsetUtil.UTF_8);
log.debug("TCP服务消息:{}", serverMsg);
try { try {
JsonRpcResponse jsonRpcResponse = JSONUtil.toBean(serverMsg, JsonRpcResponse.class); JsonRpcResponse jsonRpcResponse = JSONUtil.toBean(serverMsg, JsonRpcResponse.class);
if (TcpMessageType.STATUS.equals(jsonRpcResponse.getType())) {//设备状态 if (TcpMessageType.STATUS.equals(jsonRpcResponse.getType())) {//设备状态

4
src/main/java/com/qyft/gd/device/model/bo/DeviceStatus.java

@ -15,7 +15,7 @@ public class DeviceStatus {
@Schema(description = "是否是急停状态,true为急停") @Schema(description = "是否是急停状态,true为急停")
private Boolean emergencyStop; private Boolean emergencyStop;
@Schema(description = "门状态,0为关闭状态,1为开启状态")
@Schema(description = "门状态,true为开启状态,false为关闭状态")
private Boolean doorStatus; private Boolean doorStatus;
@Schema(description = "导轨机械臂状态") @Schema(description = "导轨机械臂状态")
@ -95,7 +95,7 @@ public class DeviceStatus {
@Schema(description = "拍子密封状态,true为已密封,false为未密封") @Schema(description = "拍子密封状态,true为已密封,false为未密封")
private Boolean isSealed; private Boolean isSealed;
@Schema(description = "加热器当前温度") @Schema(description = "加热器当前温度")
private Boolean temperature;
private Double temperature;
} }

Loading…
Cancel
Save