From 064c2e8e53f6b6875ae25011211b1fab06555f3c Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期三, 01 十一月 2023 16:36:14 +0800
Subject: [PATCH] 增加雷达角度引导信息反馈转发
---
ard-work/pom.xml | 5 -----
ard-work/src/main/java/com/ruoyi/device/radar/controller/ArdEquipRadarController.java | 16 ++++++++++++++--
ard-work/src/main/java/com/ruoyi/utils/forest/RadarClient.java | 16 ++++++++++++++++
ard-work/src/main/java/com/ruoyi/device/radar/domain/GuideInfo.java | 15 +++++++++++++++
4 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/ard-work/pom.xml b/ard-work/pom.xml
index cb6af83..de2d1f7 100644
--- a/ard-work/pom.xml
+++ b/ard-work/pom.xml
@@ -32,11 +32,6 @@
</dependency>
<!--娴峰悍褰曞儚鏈轰簩娆″紑鍙戜緷璧杍ar鍖�-->
<dependency>
- <groupId>net.java.jna</groupId>
- <artifactId>jna</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
<groupId>net.java.examples</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
diff --git a/ard-work/src/main/java/com/ruoyi/device/radar/controller/ArdEquipRadarController.java b/ard-work/src/main/java/com/ruoyi/device/radar/controller/ArdEquipRadarController.java
index ccbbc0a..62de8d8 100644
--- a/ard-work/src/main/java/com/ruoyi/device/radar/controller/ArdEquipRadarController.java
+++ b/ard-work/src/main/java/com/ruoyi/device/radar/controller/ArdEquipRadarController.java
@@ -1,9 +1,12 @@
package com.ruoyi.device.radar.controller;
import java.util.List;
+import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.device.radar.domain.GuideInfo;
+import com.ruoyi.utils.forest.RadarClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -36,9 +39,10 @@
@Api(tags = "闆疯揪绠$悊鎺ュ彛")
public class ArdEquipRadarController extends BaseController
{
- @Autowired
+ @Resource
private IArdEquipRadarService ardEquipRadarService;
-
+ @Resource
+ private RadarClient radarClient;
/**
* 鏌ヨradar鍒楄〃
*/
@@ -112,4 +116,12 @@
{
return toAjax(ardEquipRadarService.deleteArdEquipRadarByIds(ids));
}
+
+ @ApiOperation(value = "瑙掑害寮曞淇℃伅鍙嶉")
+ @PostMapping("/guideInfo")
+ public AjaxResult guideInfoBack(@RequestBody GuideInfo guideInfo)
+ {
+ return radarClient.guideInfoBack(guideInfo);
+ }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/radar/domain/GuideInfo.java b/ard-work/src/main/java/com/ruoyi/device/radar/domain/GuideInfo.java
new file mode 100644
index 0000000..552aa5b
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/device/radar/domain/GuideInfo.java
@@ -0,0 +1,15 @@
+package com.ruoyi.device.radar.domain;
+
+import lombok.Data;
+
+/**
+ * @Description:
+ * @ClassName: GuideInfo
+ * @Author: 鍒樿嫃涔�
+ * @Date: 2023骞�11鏈�01鏃�15:45:10
+ **/
+@Data
+public class GuideInfo {
+ String radarId;
+ double[] targetPosition;
+}
diff --git a/ard-work/src/main/java/com/ruoyi/utils/forest/RadarClient.java b/ard-work/src/main/java/com/ruoyi/utils/forest/RadarClient.java
new file mode 100644
index 0000000..6c62313
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/utils/forest/RadarClient.java
@@ -0,0 +1,16 @@
+package com.ruoyi.utils.forest;
+
+import com.dtflys.forest.annotation.BaseRequest;
+import com.dtflys.forest.annotation.JSONBody;
+import com.dtflys.forest.annotation.Post;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.device.radar.domain.GuideInfo;
+
+@BaseRequest(baseURL = "http://127.0.0.1:8088/radar")
+public interface RadarClient {
+ /**
+ * 瑙掑害寮曞淇℃伅鍙嶉
+ */
+ @Post("/guideInfoBack")
+ public AjaxResult guideInfoBack(@JSONBody GuideInfo guideInfo);
+}
--
Gitblit v1.9.3