From 251a426253284826bdf2828c25042fec3923919d Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Wed, 26 Nov 2025 14:36:17 +0800
Subject: [PATCH] 1.修改增加路径。
---
ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInfo.java | 4 ++++
ard-route/pom.xml | 4 ++++
ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml | 7 ++++++-
ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java | 6 ++++++
4 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/ard-route/pom.xml b/ard-route/pom.xml
index 4bdfa32..75701e6 100644
--- a/ard-route/pom.xml
+++ b/ard-route/pom.xml
@@ -59,6 +59,10 @@
<groupId>com.ard</groupId>
<artifactId>ard-work</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.ard</groupId>
+ <artifactId>ard-ossdock</artifactId>
+ </dependency>
</dependencies>
diff --git a/ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInfo.java b/ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInfo.java
index 509e3f5..038cb92 100644
--- a/ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInfo.java
+++ b/ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInfo.java
@@ -29,6 +29,10 @@
@Excel(name = "文件路径")
private String path;
+ /** 文件路径2 */
+ @Excel(name = "文件路径2")
+ private String path1;
+
/** 分组ID */
@Excel(name = "分组ID")
private String groupId;
diff --git a/ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java b/ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java
index 1f84254..3e110ea 100644
--- a/ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java
+++ b/ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java
@@ -14,6 +14,7 @@
import com.ard.data.noflyzone.utils.NoFlyZoneUtils;
import com.ard.oss.model.MinioUploadResult;
import com.ard.oss.service.impl.OssServiceContext;
+import com.ard.ossdock.service.impl.OssDockServiceContext;
import com.ard.route.domain.djuav.ActionGroupReq;
import com.ard.route.domain.djuav.PointActionReq;
import com.ard.route.domain.djuav.RoutePointReq;
@@ -50,6 +51,9 @@
@Autowired
private OssServiceContext ossService;
+
+ @Autowired
+ private OssDockServiceContext ossDockService;
@Autowired
private UavRouteService routeService;
@@ -198,9 +202,11 @@
public MinioUploadResult uploadArdRouteInfo(MultipartFile file) {
try {
String url = ossService.upload("kmz",file);
+ String urlDock = ossDockService.upload("kmz",file);
ArdRouteInfo information = new ArdRouteInfo();
information.setName(file.getOriginalFilename());
information.setPath(url);
+ information.setPath2(urlDock);
information.setGroupId("0"); // 默认分组
information.setReadOnly("1"); // 默认只读
// 增加航线实体类信息
diff --git a/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml b/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
index f1c5619..e715a66 100644
--- a/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
+++ b/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
@@ -8,6 +8,7 @@
<result property="id" column="id" />
<result property="name" column="name" />
<result property="path" column="path" />
+ <result property="path1" column="path1" />
<result property="groupId" column="group_id" />
<result property="type" column="type" />
<result property="aircraft" column="aircraft" />
@@ -25,6 +26,7 @@
select id,
name,
path,
+ path1,
group_id,
type,
aircraft,
@@ -66,6 +68,7 @@
<if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="path != null">path,</if>
+ <if test="path1 != null">path1,</if>
<if test="groupId != null">group_id,</if>
<if test="type != null">type,</if>
<if test="aircraft != null">aircraft,</if>
@@ -82,6 +85,7 @@
<if test="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="path != null">#{path},</if>
+ <if test="path1 != null">#{path1},</if>
<if test="groupId != null">#{groupId},</if>
<if test="type != null">#{type},</if>
<if test="aircraft != null">#{aircraft},</if>
@@ -101,6 +105,7 @@
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="path != null">path = #{path},</if>
+ <if test="path1 != null">path1 = #{path1},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="type != null">type = #{type},</if>
<if test="aircraft != null">aircraft = #{aircraft},</if>
@@ -140,7 +145,7 @@
</delete>
<select id="selectArdRouteInfoByGroupId" parameterType="String" resultMap="ArdRouteInfoResult">
- select id,name,path,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count from ard_route_info
+ select id,name,path,path1,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count from ard_route_info
<where>
<if test="groupId != null "> and group_id = #{groupId}</if>
</where>
--
Gitblit v1.9.3