From 2ca9993b57bdd090c4345ea6767687e2fbb83014 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 27 Jun 2023 11:00:09 +0800
Subject: [PATCH] 新增任务导出接口

---
 src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml b/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
index b41053f..03b10fa 100644
--- a/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
+++ b/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
@@ -209,4 +209,37 @@
         FROM sys_taskqd
         WHERE id = #{hdid}
     </select>
+
+    <!--自定义分页查询-->
+    <select id="selectTaskQdPage" resultType="org.springblade.modules.taskqd.vo.TaskqdVO">
+        select * from sys_taskqd where 1=1
+    </select>
+
+    <!--导出任务数据-->
+    <select id="selectTaskList" resultType="org.springblade.modules.taskqd.excel.TaskExcel">
+        select
+        st.id,st.rname,st.time,st.endtime,st.content,st.gathername,st.fname,st.integral,
+		sr.role_name as trainName,
+        case when rtype='0' then '正在进行'
+         when rtype='1' then '已结束'
+         when rtype='2' then '任务未开始'
+        end as rtypeName,
+        sj.dept_name as jurisdictionName
+        from sys_taskqd st
+        left join sys_jurisdiction sj on sj.id = st.jurisdiction
+        left join blade_role sr on sr.id = st.train
+        where 1=1
+        <if test="task.tasktype!=null and task.tasktype!=''">
+            and st.tasktype = #{task.tasktype}
+        </if>
+        <if test="task.rtype!=null and task.rtype!=''">
+            and st.rtype = #{task.rtype}
+        </if>
+        <if test="task.rname!=null and task.rname!=''">
+            and st.rname like concat('%',#{task.rname},'%')
+        </if>
+        <if test="task.jurisdiction!=null and task.jurisdiction!=''">
+            and st.jurisdiction = #{task.jurisdiction}
+        </if>
+    </select>
 </mapper>

--
Gitblit v1.9.3