From 66bfbdb9251c22ffa2b5f05595a76a3547a2f5eb Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Mon, 09 Feb 2026 11:00:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml | 56 +++++++++++++-------------------------------------------
1 files changed, 13 insertions(+), 43 deletions(-)
diff --git a/drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml b/drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml
index 7887a57..26fc830 100644
--- a/drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml
+++ b/drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml
@@ -25,7 +25,7 @@
select
ba.*,
bd.dept_name,
- ifnull(ba.nick_name,ba.original_name) nickName
+ coalesce(ba.nick_name,ba.original_name) nickName
from
blade_attach ba
left join
@@ -38,6 +38,13 @@
<if test="attach.resultType!=null">
and result_type = #{attach.resultType}
</if>
+ <if test="attach.deptList != null and attach.deptList.size > 0">
+ and ba.create_dept in
+ <foreach collection="attach.deptList" item="deptId" open="(" separator="," close=")">
+ #{deptId}
+ </foreach>
+ </if>
+ and result_type in (1,2,3,4,5)
order by create_time desc,id desc
</select>
<select id="findAiAttachImages" resultType="org.sxkj.resource.vo.AttachVO">
@@ -480,57 +487,20 @@
</select>
<select id="getAttachList" resultType="org.sxkj.resource.vo.AttachVO">
- select attach.name, attach.wayline_job_id, job.name jobName
- from wayline_job job
- left join blade_attach attach on attach.wayline_job_id = job.job_id
- left join manage_device device on attach.device_sn = device.device_sn
- <where>
+ select
+ attach.*
+ from
+ blade_attach attach
+ <where>
<if test="attachIds!=null and attachIds.size()>0">
and attach.id in
<foreach item="item" index="index" collection="attachIds" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
- <if test="wayLineJobIds!=null and wayLineJobIds.size()>0">
- and attach.wayline_job_id in
- <foreach item="item" index="index" collection="wayLineJobIds" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="startTime!=null and startTime !='' and endTime!=null and endTime !='' ">
- and DATE_FORMAT(FROM_UNIXTIME(job.execute_time/1000,'%Y-%m-%d %H:%i:%s'),'%Y-%m-%d %H:%i:%s') between
- #{startTime} and #{endTime}
- </if>
- <if test="dockSn!=null and dockSn!=''">
- and attach.device_sn = #{dockSn}
- </if>
- <if test="jobName!=null and jobName!=''">
- and job.name like concat('%',#{jobName},'%')
- </if>
<if test="fileName!=null and fileName!=''">
and attach.name like concat('%',#{fileName},'%')
</if>
- <if test="fileType!=null and fileType!=''">
- <choose>
- <when test="fileType=='visable'">
- and attach.media_category = 0
- </when>
- <when test="fileType=='ir'">
- and attach.media_category = 1
- </when>
- </choose>
- </if>
- <!-- <if test="resultType!=null and resultType!=''"> -->
- <!-- and attach.result_type = #{resultType} -->
- <!-- </if> -->
- <if test="resultTypes!=null and resultTypes.size()>0">
- and attach.result_type in
- <foreach collection="resultTypes" item="resultType" open="(" close=")" separator=",">
- #{resultType}
- </foreach>
- </if>
- AND attach.wayline_job_id IS NOT NULL
- AND job.NAME IS NOT NULL
AND attach.is_deleted = 0
</where>
</select>
--
Gitblit v1.9.3