From e4aeeaf6fc665faa0f1e9e71c60609d62a9b093f Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Fri, 21 Nov 2025 17:00:49 +0800
Subject: [PATCH] 修复机场挂载相机无法删除的问题

---
 ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java b/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
index 6197ddb..adacd79 100644
--- a/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
+++ b/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
@@ -69,7 +69,14 @@
             if (Objects.isNull(param)) {
                 return ResponseResult.error(CommonErrorEnum.ILLEGAL_ARGUMENT);
             }
-            BasicDeviceProperty basicDeviceProperty = mapper.convertValue(param.getAction(), controlMethodEnum.getClazz());
+            BasicDeviceProperty basicDeviceProperty = null;
+            if(serviceIdentifier.equals("sdr_workmode_switch")){
+                basicDeviceProperty= mapper.convertValue(param.getLink_workmode(), controlMethodEnum.getClazz());
+            }
+            else
+            {
+                basicDeviceProperty = mapper.convertValue(param.getAction(), controlMethodEnum.getClazz());
+            }
             if (!basicDeviceProperty.valid()) {
                 return ResponseResult.error(CommonErrorEnum.ILLEGAL_ARGUMENT);
             }

--
Gitblit v1.9.3