From 870510b1a1de5f55f9e5e61be65fe4761e431883 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 20 Feb 2024 10:27:26 +0800
Subject: [PATCH] 二手交易新增导出
---
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 118 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
index d3ae7a4..b18aad5 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
@@ -138,6 +138,7 @@
</otherwise>
</choose>
</if>
+ order by jtlre.create_time desc,jtlre.id desc
</select>
@@ -252,5 +253,122 @@
</where>
</select>
+ <!--二手交易自定义分页查询-->
+ <select id="exportTaskLabelReportingEventList" resultType="org.springblade.modules.task.excel.TaskLabelReportingEventExcel">
+ select
+ jtlre.id,
+ jtlre.transaction_object,
+ jtlre.transaction_object_tel,
+ jtlre.id_card,
+ jtlre.goods_nums,
+ jtlre.transaction_money,
+ jtlre.transaction_process,
+ case when jtlre.confirm_flag=1 then '待审核'
+ when jtlre.confirm_flag=2 then '审核通过'
+ when jtlre.confirm_flag=3 then '审核不通过'
+ else '待完成' end as confirm_flag,
+ jtlre.confirm_notion,
+ jtlre.create_time,
+ jp.place_name,
+ jp.principal,
+ jp.principal_phone,
+ jp.nine_type ,
+ jp.front_type ,
+ jp.location,
+ br.town_name streetName,
+ br.village_name communityName
+ from
+ jczz_task_label_reporting_event jtlre
+ LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
+ LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
+ LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
+ LEFT JOIN blade_region br on br.code = jpag.community_code
+ where jtlre.is_deleted = 0
+ <if test="taskLabelReportingEvent.userId != null and taskLabelReportingEvent.userId != ''">
+ AND jtlre.user_id = #{taskLabelReportingEvent.userId}
+ </if>
+ <if test="taskLabelReportingEvent.eventType != null and taskLabelReportingEvent.eventType != ''">
+ AND jtlre.event_type = #{taskLabelReportingEvent.eventType}
+ </if>
+ <if test="taskLabelReportingEvent.transactionObject != null and taskLabelReportingEvent.transactionObject != ''">
+ AND jtlre.transaction_object like concat('%',#{taskLabelReportingEvent.transactionObject},'%')
+ </if>
+ <if test="taskLabelReportingEvent.transactionObjectTel != null and taskLabelReportingEvent.transactionObjectTel != ''">
+ AND jtlre.transaction_object_tel like concat('%',#{taskLabelReportingEvent.transactionObjectTel},'%')
+ </if>
+ <if test="taskLabelReportingEvent.idCard != null and taskLabelReportingEvent.idCard != ''">
+ AND jtlre.id_card like concat('%',#{taskLabelReportingEvent.idCard},'%')
+ </if>
+ <if test="taskLabelReportingEvent.frontType != null ">
+ AND jp.front_type = #{taskLabelReportingEvent.frontType}
+ </if>
+ <if test="taskLabelReportingEvent.placeName != null and taskLabelReportingEvent.placeName != ''">
+ AND jp.place_name like concat('%',#{taskLabelReportingEvent.placeName},'%')
+ </if>
+ <if test="taskLabelReportingEvent.principal != null and taskLabelReportingEvent.principal != ''">
+ AND jp.principal like concat('%',#{taskLabelReportingEvent.principal},'%')
+ </if>
+ <if test="taskLabelReportingEvent.principalPhone != null and taskLabelReportingEvent.principalPhone != ''">
+ AND jp.principal_phone like concat('%',#{taskLabelReportingEvent.principalPhone},'%')
+ </if>
+ <if test="taskLabelReportingEvent.roleName != null and taskLabelReportingEvent.roleName != ''">
+ <if test="taskLabelReportingEvent.roleName=='wgy'">
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jp.grid_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jp.grid_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ </if>
+ <if test="taskLabelReportingEvent.roleName=='mj'">
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jpag.community_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jpag.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ </if>
+ </if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and
+ (
+ jg.grid_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ or
+ br.village_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ )
+ </when>
+ <otherwise>
+ and
+ (
+ jg.grid_code in ('') or br.village_code in ('')
+ )
+ </otherwise>
+ </choose>
+ </if>
+ order by jtlre.create_time desc,jtlre.id desc
+ </select>
+
</mapper>
--
Gitblit v1.9.3