|
|
@ -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)) { |
|
|
|
|
|
|
|
} |
|
|
|