zhaowenyu
2025-12-16 eb999e84f6f2d14b1440db9e654fd3c2b2d6b473
ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
@@ -145,7 +145,7 @@
        String deviceSn = receiver.getGateway();
        if(method.equals("cover_close")){
            _deviceService.updateWorkType(deviceSn, 2L);
            RedisOpsUtils.setWithExpire(RedisConst.OSD_STATUS_PREFIX + deviceSn, 2, RedisConst.DEVICE_ALIVE_SECOND);
            RedisOpsUtils.set(RedisConst.OSD_STATUS_PREFIX + deviceSn, 2);
        }
        String sn = RedisOpsUtils.get(key).toString();
        receiver.setType(MessageType.PROGRESS.getType());
@@ -180,7 +180,7 @@
        // 更新设备列表状态--飞行器开机中...
        if(method.equals("drone_open")){
            _deviceService.updateWorkType(device.getChildDeviceSn(), 7L);
            RedisOpsUtils.setWithExpire(RedisConst.OSD_STATUS_PREFIX + device.getChildDeviceSn(), 7, RedisConst.DEVICE_ALIVE_SECOND);
            RedisOpsUtils.set(RedisConst.OSD_STATUS_PREFIX + device.getChildDeviceSn(), 7);
        }
        String dockProgress ="";
@@ -191,7 +191,7 @@
            e.printStackTrace();
        }
        // 设备控制进度消息websocket发给前端
        _dockWebSocketHandler.sendMessageToSubscribers(sn, MessageType.PROGRESS.getType(), dockProgress);
        _dockWebSocketHandler.sendMessageToSubscribers(sn, MessageType.PROGRESS.getType(), dockProgress, "");
        if (receiver.getNeedReply() != null && receiver.getNeedReply() == 1) {
            String topic = headers.get(MqttHeaders.RECEIVED_TOPIC) + TopicConst._REPLY_SUF;