From 28ab28fbca6a4253bfc1f0b213576bf43e42c407 Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Mon, 09 Mar 2026 11:23:23 +0800
Subject: [PATCH] 1. 增加根据点云ID查询航线名称接口。 2. 优化查询精细化巡检分组细节,增加查询条件。
---
ard-inspection/src/main/resources/mapper/ArdPointCloudMapper.xml | 61 ++++++++------
ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloud.java | 5 -
ard-inspection/src/main/java/com/ard/inspection/domain/NotCould.java | 17 ++++
ard-inspection/src/main/java/com/ard/inspection/mapper/ArdPointCloudMapper.java | 8 +
ard-admin/src/main/java/com/ard/web/controller/inspection/ArdPointCloudController.java | 23 ++++-
ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloudRoute.java | 63 +++++++++++++++
ard-inspection/src/main/java/com/ard/inspection/service/IArdPointCloudService.java | 6 +
ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java | 11 ++
8 files changed, 153 insertions(+), 41 deletions(-)
diff --git a/ard-admin/src/main/java/com/ard/web/controller/inspection/ArdPointCloudController.java b/ard-admin/src/main/java/com/ard/web/controller/inspection/ArdPointCloudController.java
index 06920f7..e3d7f5c 100644
--- a/ard-admin/src/main/java/com/ard/web/controller/inspection/ArdPointCloudController.java
+++ b/ard-admin/src/main/java/com/ard/web/controller/inspection/ArdPointCloudController.java
@@ -1,18 +1,17 @@
package com.ard.web.controller.inspection;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
import com.ard.common.annotation.Log;
import com.ard.common.core.controller.BaseController;
import com.ard.common.core.domain.AjaxResult;
import com.ard.common.core.page.TableDataInfo;
import com.ard.common.enums.BusinessType;
-import com.ard.common.utils.poi.ExcelUtil;
+import com.ard.inspection.domain.ArdPointCloudRoute;
+import com.ard.inspection.domain.NotCould;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -102,10 +101,22 @@
*/
@ApiOperation("查询未选择点云文件列表")
//@PreAuthorize("@ss.hasPermi('inspection:cloud:list')")
- @GetMapping("/notList/{ids}")
- public TableDataInfo notList(@PathVariable String[] ids) {
+ @GetMapping("/notList")
+ public TableDataInfo notList(NotCould notCould) {
startPage();
- List<ArdPointCloud> list = ardPointCloudService.selectArdPointCloudNotList(ids);
+ List<ArdPointCloud> list = ardPointCloudService.selectArdPointCloudNotList(notCould);
+ return getDataTable(list);
+ }
+
+ /**
+ * 根据点云ID查询航线名称
+ */
+ @ApiOperation("根据点云ID查询航线名称")
+ //@PreAuthorize("@ss.hasPermi('inspection:cloud:list')")
+ @GetMapping("/listRoute/{id}")
+ public TableDataInfo listRoute(@PathVariable("id") String id) {
+ startPage();
+ List<ArdPointCloudRoute> list = ardPointCloudService.selectPointCloudRoute(id);
return getDataTable(list);
}
diff --git a/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloud.java b/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloud.java
index 771c990..42c8518 100644
--- a/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloud.java
+++ b/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloud.java
@@ -45,11 +45,6 @@
private String associatedState;
/**
- * 航线ID
- */
- private String routeId;
-
- /**
* 分组ID
*/
private String groupId;
diff --git a/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloudRoute.java b/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloudRoute.java
new file mode 100644
index 0000000..a38247d
--- /dev/null
+++ b/ard-inspection/src/main/java/com/ard/inspection/domain/ArdPointCloudRoute.java
@@ -0,0 +1,63 @@
+package com.ard.inspection.domain;
+
+import lombok.Data;
+
+/**
+ * @author xia
+ */
+@Data
+public class ArdPointCloudRoute {
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 点云名称
+ */
+ private String cloudName;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 文件夹名称
+ */
+ private String folderName;
+
+ /**
+ * 文件大小
+ */
+ private String fileSize;
+
+ /**
+ * 关联状态
+ * 0:未关联
+ * 1:已关联
+ */
+ private String associatedState;
+
+ /**
+ * 分组ID
+ */
+ private String groupId;
+
+ /**
+ * 文件路径
+ */
+ private String filePath;
+
+ /**
+ * 航线ID
+ */
+ private String routeId;
+
+ /**
+ * 航线名称
+ */
+ private String name;
+
+}
diff --git a/ard-inspection/src/main/java/com/ard/inspection/domain/NotCould.java b/ard-inspection/src/main/java/com/ard/inspection/domain/NotCould.java
new file mode 100644
index 0000000..6028053
--- /dev/null
+++ b/ard-inspection/src/main/java/com/ard/inspection/domain/NotCould.java
@@ -0,0 +1,17 @@
+package com.ard.inspection.domain;
+
+import lombok.Data;
+
+/**
+ * @author xia
+ */
+@Data
+public class NotCould {
+
+ private String[] ids;
+
+ private String cloudName;
+
+ private String groupId;
+
+}
diff --git a/ard-inspection/src/main/java/com/ard/inspection/mapper/ArdPointCloudMapper.java b/ard-inspection/src/main/java/com/ard/inspection/mapper/ArdPointCloudMapper.java
index 25bd35c..c8b0778 100644
--- a/ard-inspection/src/main/java/com/ard/inspection/mapper/ArdPointCloudMapper.java
+++ b/ard-inspection/src/main/java/com/ard/inspection/mapper/ArdPointCloudMapper.java
@@ -2,6 +2,8 @@
import java.util.List;
import com.ard.inspection.domain.ArdPointCloud;
+import com.ard.inspection.domain.ArdPointCloudRoute;
+import org.apache.ibatis.annotations.Param;
/**
* 点云文件Mapper接口
@@ -64,6 +66,10 @@
/**
* 根据航线ID,查询航线名称
*/
- public List<ArdPointCloud> selectArdPointCloudNotList(String[] ids);
+ public List<ArdPointCloud> selectArdPointCloudNotList(@Param("ids") String[] ids,
+ @Param("cloudName") String cloudName,
+ @Param("groupId") String groupId);
+
+ public List<ArdPointCloudRoute> selectPointCloudRoute(String id);
}
diff --git a/ard-inspection/src/main/java/com/ard/inspection/service/IArdPointCloudService.java b/ard-inspection/src/main/java/com/ard/inspection/service/IArdPointCloudService.java
index 8791987..7c6fd43 100644
--- a/ard-inspection/src/main/java/com/ard/inspection/service/IArdPointCloudService.java
+++ b/ard-inspection/src/main/java/com/ard/inspection/service/IArdPointCloudService.java
@@ -2,6 +2,8 @@
import java.util.List;
import com.ard.inspection.domain.ArdPointCloud;
+import com.ard.inspection.domain.ArdPointCloudRoute;
+import com.ard.inspection.domain.NotCould;
/**
* 点云文件Service接口
@@ -61,6 +63,8 @@
public ArdPointCloud selectArdPointCloudByFileName(String filename);
- public List<ArdPointCloud> selectArdPointCloudNotList(String[] ids);
+ public List<ArdPointCloud> selectArdPointCloudNotList(NotCould notCould);
+
+ public List<ArdPointCloudRoute> selectPointCloudRoute(String id);
}
diff --git a/ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java b/ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java
index 483ac0b..0520752 100644
--- a/ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java
+++ b/ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java
@@ -4,6 +4,8 @@
import com.ard.common.utils.DateUtils;
import com.ard.common.utils.uuid.IdUtils;
+import com.ard.inspection.domain.ArdPointCloudRoute;
+import com.ard.inspection.domain.NotCould;
import com.ard.inspection.utils.ZipFileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -114,8 +116,13 @@
}
@Override
- public List<ArdPointCloud> selectArdPointCloudNotList(String[] ids) {
- return ardPointCloudMapper.selectArdPointCloudNotList(ids);
+ public List<ArdPointCloud> selectArdPointCloudNotList(NotCould notCould) {
+ return ardPointCloudMapper.selectArdPointCloudNotList(notCould.getIds(),notCould.getCloudName(),notCould.getGroupId());
+ }
+
+ @Override
+ public List<ArdPointCloudRoute> selectPointCloudRoute(String id) {
+ return ardPointCloudMapper.selectPointCloudRoute(id);
}
}
diff --git a/ard-inspection/src/main/resources/mapper/ArdPointCloudMapper.xml b/ard-inspection/src/main/resources/mapper/ArdPointCloudMapper.xml
index 4556039..9df8940 100644
--- a/ard-inspection/src/main/resources/mapper/ArdPointCloudMapper.xml
+++ b/ard-inspection/src/main/resources/mapper/ArdPointCloudMapper.xml
@@ -11,7 +11,6 @@
<result property="folderName" column="folder_name" />
<result property="fileSize" column="file_size" />
<result property="associatedState" column="associated_state" />
- <result property="routeId" column="route_id" />
<result property="groupId" column="group_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
@@ -20,19 +19,18 @@
<result property="filePath" column="file_path" />
</resultMap>
-<!-- <resultMap type="ArdPointCloud" id="ArdPointCloudRouteNameResult">-->
-<!-- <result property="id" column="id" />-->
-<!-- <result property="cloudName" column="cloud_name" />-->
-<!-- <result property="fileName" column="file_name" />-->
-<!-- <result property="folderName" column="folder_name" />-->
-<!-- <result property="fileSize" column="file_size" />-->
-<!-- <result property="associatedState" column="associated_state" />-->
-<!-- <result property="routeId" column="route_id" />-->
-<!-- <result property="groupId" column="group_id" />-->
-<!-- <result property="filePath" column="file_path" />-->
-<!-- <result property="filePath" column="file_path" />-->
-<!-- <result property="filePath" column="file_path" />-->
-<!-- </resultMap>-->
+ <resultMap type="ArdPointCloudRoute" id="ArdPointCloudRouteNameResult">
+ <result property="id" column="id" />
+ <result property="cloudName" column="cloud_name" />
+ <result property="fileName" column="file_name" />
+ <result property="folderName" column="folder_name" />
+ <result property="fileSize" column="file_size" />
+ <result property="associatedState" column="associated_state" />
+ <result property="groupId" column="group_id" />
+ <result property="filePath" column="file_path" />
+ <result property="routeId" column="route_id" />
+ <result property="name" column="name" />
+ </resultMap>
<sql id="selectArdPointCloudVo">
select id,
@@ -41,7 +39,6 @@
folder_name,
file_size,
associated_state,
- route_id,
group_id,
create_by,
create_time,
@@ -59,10 +56,9 @@
a.folder_name,
a.file_size,
a.associated_state,
- a.route_id,
a.group_id,
a.file_path,
- c.id,
+ c.id as route_id,
c.name
FROM ard_point_cloud a
LEFT JOIN ard_route_cloud b ON a.id = b.cloud_id
@@ -76,7 +72,6 @@
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="associatedState != null and associatedState != ''"> and associated_state = #{associatedState}</if>
- <if test="routeId != null and routeId != ''"> and route_id = #{routeId}</if>
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
@@ -102,7 +97,6 @@
<if test="folderName != null">folder_name,</if>
<if test="fileSize != null">file_size,</if>
<if test="associatedState != null">associated_state,</if>
- <if test="routeId != null">route_id,</if>
<if test="groupId != null">group_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@@ -117,7 +111,6 @@
<if test="folderName != null">#{folderName},</if>
<if test="fileSize != null">#{fileSize},</if>
<if test="associatedState != null">#{associatedState},</if>
- <if test="routeId != null">#{routeId},</if>
<if test="groupId != null">#{groupId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@@ -135,7 +128,6 @@
<if test="folderName != null">folder_name = #{folderName},</if>
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="associatedState != null">associated_state = #{associatedState},</if>
- <if test="routeId != null">route_id = #{routeId},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@@ -162,12 +154,29 @@
where file_name = #{fileName}
</select>
- <select id="selectArdPointCloudNotList" parameterType="String" resultMap="ArdPointCloudResult">
+ <select id="selectArdPointCloudNotList" resultMap="ArdPointCloudResult">
<include refid="selectArdPointCloudVo"/>
- where id NOT IN
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
+ where 1=1
+ <if test="ids != null and ids.length > 0">
+ and id NOT IN
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </if>
+ <if test="cloudName != null and cloudName != ''">
+ and cloud_name like concat('%', #{cloudName}, '%')
+ </if>
+ <if test="groupId != null and groupId != ''">
+ and group_id = #{groupId}
+ </if>
+ </select>
+
+ <select id="selectPointCloudRoute" parameterType="String" resultMap="ArdPointCloudRouteNameResult">
+ <include refid="selectArdPointCloudRouteName"/>
+ <where>
+ c.id is NOT NULL
+ <if test="id != null and id != ''"> and a.id = #{id}</if>
+ </where>
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3