|
|
@ -2,6 +2,7 @@ package com.qyft.gd.service; |
|
|
|
|
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import com.qyft.gd.common.constant.Commands; |
|
|
|
import com.qyft.gd.common.constant.WebSocketMessageType; |
|
|
|
import com.qyft.gd.common.result.CMDResultCode; |
|
|
|
import com.qyft.gd.device.service.DeviceService; |
|
|
|
import com.qyft.gd.model.form.CMDForm; |
|
|
@ -332,13 +333,13 @@ public class CMDService { |
|
|
|
log.error("指令执行异常: {}", JSONUtil.toJsonStr(form)); |
|
|
|
executionResult.setStatus(CMDResultCode.FAILURE.getCode()); |
|
|
|
executionResult.setMessage(CMDResultCode.FAILURE.getMsg()); |
|
|
|
webSocketService.pushMsg("cmd", executionResult); |
|
|
|
webSocketService.pushMsg(WebSocketMessageType.CMD, executionResult); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
executionResult.setStatus(CMDResultCode.SUCCESS.getCode()); |
|
|
|
executionResult.setMessage(CMDResultCode.SUCCESS.getMsg()); |
|
|
|
webSocketService.pushMsg("cmd", executionResult); |
|
|
|
webSocketService.pushMsg(WebSocketMessageType.CMD, executionResult); |
|
|
|
} |
|
|
|
|
|
|
|
public boolean executeCommand(CMDForm cmdForm) { |
|
|
|