From 3db92a6fff18c1591b298fa0bf8085dfcbdb6747 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Sat, 06 Jul 2024 15:08:11 +0800
Subject: [PATCH] 修改智能航线规划,修改南昌机场和西安机场人工接管时图片绑定图斑问题
---
src/main/java/com/dji/sample/manage/controller/DeviceController.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/dji/sample/manage/controller/DeviceController.java b/src/main/java/com/dji/sample/manage/controller/DeviceController.java
index 9fcc72d..4b8ec09 100644
--- a/src/main/java/com/dji/sample/manage/controller/DeviceController.java
+++ b/src/main/java/com/dji/sample/manage/controller/DeviceController.java
@@ -79,11 +79,25 @@
* @return
*/
@GetMapping("/{workspace_id}/devices")
- public ResponseResult<List<DeviceDTO>> getDevices(@PathVariable("workspace_id") String workspaceId) {
- List<DeviceDTO> devicesList = deviceService.getDevicesTopoForWeb(workspaceId);
+ public ResponseResult<List<DeviceDTO>> getDevices(@PathVariable("workspace_id") String workspaceId,String reserveId) {
+ List<DeviceDTO> devicesList = deviceService.getDevicesTopoForWeb(workspaceId,reserveId);
return ResponseResult.success(devicesList);
}
+
+// @GetMapping("/{device_sn}/subscribeTopic2")
+// public ResponseResult<List<DeviceDTO>> testBinding(@PathVariable("device_sn") String deviceSn) {
+// deviceService.subscribeTopicOnline(deviceSn);
+//
+// return ResponseResult.success();
+// }
+//
+// @GetMapping("/{device_sn}/unsubscribeTopic2")
+// public ResponseResult<List<DeviceDTO>> testUnBinding(@PathVariable("device_sn") String deviceSn) {
+// deviceService.unsubscribeTopicOffline(deviceSn);
+//
+// return ResponseResult.success();
+// }
/**
* After binding the device to the workspace, the device data can only be seen on the web.
@@ -108,7 +122,7 @@
public ResponseResult getDevice(@PathVariable("workspace_id") String workspaceId,
@PathVariable("device_sn") String deviceSn) {
Optional<DeviceDTO> deviceOpt = deviceService.getDeviceBySn(deviceSn);
- return deviceOpt.isEmpty() ? ResponseResult.error("device not found.") : ResponseResult.success(deviceOpt.get());
+ return deviceOpt.isEmpty() ? ResponseResult.error("设备未找到") : ResponseResult.success(deviceOpt.get());
}
/**
@@ -189,4 +203,4 @@
deviceService.devicePropertySet(workspaceId, dockSn, propertyEnumOpt.get(), param.get(property));
return ResponseResult.success();
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3