From ebeb43ea497fafc448c827d1de6796bcaa4e0b52 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Tue, 23 Jun 2026 13:59:46 +0800
Subject: [PATCH] add : 吉安支持查询待验收的接口
---
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 114 insertions(+), 0 deletions(-)
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
index 4134281..35431da 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
@@ -13,6 +13,7 @@
<result column="latitude" property="latitude"/>
<result column="event_status" property="eventStatus"/>
<result column="area_code" property="areaCode"/>
+ <result column="event_num" property="eventNum"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>
@@ -21,6 +22,55 @@
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
</resultMap>
+
+ <resultMap id="gdClueEventVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventVO">
+ <result column="id" property="id"/>
+ <result column="result_id" property="resultId"/>
+ <result column="work_order_id" property="workOrderId"/>
+ <result column="dispose_user" property="disposeUser"/>
+ <result column="dispose_dept" property="disposeDept"/>
+ <result column="dispose_user_name" property="disposeUserName"/>
+ <result column="dispose_dept_name" property="disposeDeptName"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
+ <result column="event_status" property="eventStatus"/>
+ <result column="area_code" property="areaCode"/>
+ <result column="event_num" property="eventNum"/>
+ <result column="event_location" property="eventLocation"/>
+ <result column="shoot_time" property="shootTime"/>
+ <result column="event_image_url" property="eventImageUrl"/>
+ <result column="distribute_user_name" property="distributeUserName"/>
+ <result column="distribute_dept_name" property="distributeDeptName"/>
+ <result column="distribute_time" property="distributeTime"/>
+ <result column="create_user" property="createUser"/>
+ <result column="create_dept" property="createDept"/>
+ <result column="create_time" property="createTime"/>
+ <result column="update_user" property="updateUser"/>
+ <result column="update_time" property="updateTime"/>
+ <result column="status" property="status"/>
+ <result column="is_deleted" property="isDeleted"/>
+ <result column="geojson" property="geojson"/>
+ <result column="attachment_type" property="attachmentType"/>
+ </resultMap>
+
+ <resultMap id="gdClueEventListVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventListVO">
+ <result column="id" property="id"/>
+ <result column="event_image_url" property="eventImageUrl"/>
+ <result column="create_time" property="createTime"/>
+ <result column="geojson" property="geojson"/>
+ <result column="attachment_type" property="attachmentType"/>
+ <result column="event_name" property="eventName"/>
+ </resultMap>
+
+ <resultMap id="gdClueEventCountVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventCountVO">
+ <result column="total_count" property="totalCount"/>
+ <result column="my_count" property="myCount"/>
+ </resultMap>
+
+ <sql id="gdClueEventDeptWhere">
+ where ce.is_deleted = 0
+ and ce.dispose_dept = #{deptId}
+ </sql>
<resultMap id="gdClueEventExcelResultMap" type="org.sxkj.gd.workorder.excel.GdClueEventExcel">
<result column="result_id" property="resultId"/>
@@ -31,6 +81,7 @@
<result column="latitude" property="latitude"/>
<result column="event_status" property="eventStatus"/>
<result column="area_code" property="areaCode"/>
+ <result column="event_num" property="eventNum"/>
<result column="is_deleted" property="isDeleted"/>
</resultMap>
@@ -38,6 +89,69 @@
select * from ja_gd_clue_event where is_deleted = 0
</select>
+ <select id="selectGdClueEventList" resultMap="gdClueEventVoResultMap">
+ select ce.*,
+ COALESCE(bu.real_name, bu.name) as dispose_user_name,
+ bd.dept_name as dispose_dept_name
+ from (select * from ja_gd_clue_event ${ew.customSqlSegment}) ce
+ left join blade_user bu on bu.id::VARCHAR = ce.dispose_user::VARCHAR and bu.is_deleted = 0
+ left join blade_dept bd on bd.id::VARCHAR = ce.dispose_dept::VARCHAR and bd.is_deleted = 0
+ </select>
+
+ <select id="selectGdClueEventSimpleList" resultMap="gdClueEventListVoResultMap">
+ select
+ ce.id as id,
+ ce.event_name,
+ COALESCE(tr.result_url, ce.attach_url) as event_image_url,
+ COALESCE(tr.geojson, ce.geojson) as geojson,
+ COALESCE(tr.attachment_type, ce.attachment_type) as attachment_type,
+ ce.create_time as create_time
+ from ja_gd_clue_event ce
+ left join ja_gd_task_result tr on tr.id::VARCHAR = ce.result_id::VARCHAR and tr.is_deleted = 0
+ <include refid="gdClueEventDeptWhere"/>
+ and ce.event_status in (1, 3)
+ <if test="keyword != null and keyword != ''">
+ and ce.event_num::VARCHAR like concat('%', #{keyword}, '%')
+ </if>
+ <if test="onlyMine != null and onlyMine == 1">
+ and ce.dispose_user = #{userId}
+ </if>
+ </select>
+
+ <select id="selectGdClueEventDetailById" resultMap="gdClueEventVoResultMap">
+ select ce.*,
+ COALESCE(bu.real_name, bu.name) as dispose_user_name,
+ bd.dept_name as dispose_dept_name,
+ COALESCE(cu.real_name, cu.name) as distribute_user_name,
+ cd.dept_name as distribute_dept_name,
+ ce.create_time as distribute_time,
+ concat(ce.longitude, ',', ce.latitude) as event_location,
+ ce.event_num as event_num,
+ tr.shoot_time as shoot_time,
+ tr.result_url as event_image_url,
+ tr.geojson as geojson,
+ tr.attachment_type
+ from ja_gd_clue_event ce
+ left join blade_user bu on bu.id::VARCHAR = ce.dispose_user::VARCHAR and bu.is_deleted = 0
+ left join blade_dept bd on bd.id::VARCHAR = ce.dispose_dept::VARCHAR and bd.is_deleted = 0
+ left join blade_user cu on cu.id::VARCHAR = ce.create_user::VARCHAR and cu.is_deleted = 0
+ left join blade_dept cd on cd.id::VARCHAR = ce.create_dept::VARCHAR and cd.is_deleted = 0
+ left join ja_gd_task_result tr on tr.id::VARCHAR = ce.result_id::VARCHAR and tr.is_deleted = 0
+ <include refid="gdClueEventDeptWhere"/>
+ and ce.id = #{id}
+ </select>
+
+ <select id="selectGdClueEventCount" resultMap="gdClueEventCountVoResultMap">
+ select count(1) as total_count,
+ COALESCE(sum(case when ce.dispose_user = #{userId} then 1 else 0 end), 0) as my_count
+ from ja_gd_clue_event ce
+ <include refid="gdClueEventDeptWhere"/>
+ and ce.event_status in (1, 3)
+ <if test="keyword != null and keyword != ''">
+ and ce.event_num like concat('%', #{keyword}, '%')
+ </if>
+ </select>
+
<select id="exportGdClueEvent" resultMap="gdClueEventExcelResultMap">
SELECT * FROM ja_gd_clue_event ${ew.customSqlSegment}
--
Gitblit v1.9.3