From 54f4867e4ab00726d2e218dc97ad159b2cf9eb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Wed, 19 Mar 2025 19:31:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=80=A5=E5=81=9C=E6=94=BE=E5=88=B0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/qyft/ms/system/service/device/DeviceCommandService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/qyft/ms/system/service/device/DeviceCommandService.java b/src/main/java/com/qyft/ms/system/service/device/DeviceCommandService.java index 8dc1c65..c0a0771 100644 --- a/src/main/java/com/qyft/ms/system/service/device/DeviceCommandService.java +++ b/src/main/java/com/qyft/ms/system/service/device/DeviceCommandService.java @@ -1,14 +1,12 @@ package com.qyft.ms.system.service.device; import cn.hutool.json.JSONObject; -import com.qyft.ms.app.common.constant.WebSocketMessageType; import com.qyft.ms.app.device.status.DeviceStatus; import com.qyft.ms.system.common.constant.CommandStatus; import com.qyft.ms.system.common.device.command.CommandFuture; import com.qyft.ms.system.core.client.DeviceTcpClient; import com.qyft.ms.system.model.bo.DeviceCommand; import com.qyft.ms.system.model.form.FrontCmdControlForm; -import com.qyft.ms.system.service.WebSocketService; import com.qyft.ms.system.service.front.FrontCommandService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -92,10 +90,11 @@ public class DeviceCommandService { completeCommandResponse(deviceResult); } else if ("event".equals(tag)) { String eventType = deviceResult.getStr("event_type"); - if("system_e_stop_pressed".equals(eventType)) {//系统急停按钮被按下 + if ("system_e_stop_pressed".equals(eventType)) {//系统急停按钮被按下 deviceStatus.setStopPressed(true); - }else if("system_e_stop_released".equals(eventType)) {//系统急停按钮被释放 - } deviceStatus.setStopPressed(false); + } else if ("system_e_stop_released".equals(eventType)) {//系统急停按钮被释放 + deviceStatus.setStopPressed(false); + } } else if ("status".equals(tag)) { }