From 30b3905e88495611704e356a1d3ced094e2a503d Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 25 Oct 2021 16:56:16 +0800
Subject: [PATCH] 1.登录返回数据修改 2.现场检查接口修改

---
 src/main/java/org/springblade/modules/coinspect/mapper/CoinspectMapper.xml |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/coinspect/mapper/CoinspectMapper.xml b/src/main/java/org/springblade/modules/coinspect/mapper/CoinspectMapper.xml
index 9081ab9..a8bed84 100644
--- a/src/main/java/org/springblade/modules/coinspect/mapper/CoinspectMapper.xml
+++ b/src/main/java/org/springblade/modules/coinspect/mapper/CoinspectMapper.xml
@@ -14,7 +14,7 @@
         <result column="url" property="url"/>
     </resultMap>
 
-
+    <!--自定义分页数据-->
     <select id="selectCoinspectPage" resultType="org.springblade.modules.coinspect.vo.CoinspectVO">
         select
         sc.*,
@@ -35,6 +35,64 @@
         blade_dept bd1
         on
         bd1.id = sc.reviewed_dept_id
+        left join
+        sys_information si
+        on
+        si.departmentid = bu.dept_id
+        left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction
+        where 1 = 1
+        <if test="coinspect.jurisdiction!=null and coinspect.jurisdiction!='' and coinspect.jurisdiction!='1372091709474910209'">
+            and (sj.id = #{coinspect.jurisdiction} or sj.parent_id = #{coinspect.jurisdiction})
+        </if>
+        <if test="coinspect.realName!=null and coinspect.realName!=''">
+            bu.real_name like concat('%',#{coinspect.realName},'%')
+        </if>
+        <if test="coinspect.examinerDeptName!=null and coinspect.examinerDeptName!=''">
+            bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%')
+        </if>
+        <if test="coinspect.reviewedDeptName!=null and coinspect.reviewedDeptName!=''">
+            bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%')
+        </if>
+        <if test="coinspect.results!=null and coinspect.results!=''">
+            sc.results like concat('%',#{coinspect.results},'%')
+        </if>
+        <if test="coinspect.startTime!=null and coinspect.startTime!=''">
+            and sc.reviewTime &gt;= #{coinspect.startTime}
+        </if>
+        <if test="coinspect.endTime!=null and coinspect.endTime!=''">
+            and sc.reviewTime &lt;= #{coinspect.endTime}
+        </if>
+        <if test="coinspect.endTime!=null and coinspect.endTime!=''">
+            and sc.reviewTime &lt;= #{coinspect.endTime}
+        </if>
+    </select>
+
+    <!--导出单位检查信息-->
+    <select id="exportCoinspect" resultType="org.springblade.modules.coinspect.excel.CoinspectExcel">
+        select
+        bu.real_name realName,
+        bd1.dept_name reviewedDeptName,
+        bd.dept_name examinerDeptName,
+        sc.reviewTime reviewtime,
+        sc.content,
+        sc.result
+        from
+        sys_coinspect sc
+        left join
+        blade_user bu
+        on
+        bu.id = sc.examiner_id
+        left join
+        blade_dept bd
+        on
+        bd.id = sc.examiner_dept_id
+        left join
+        blade_dept bd1
+        on
+        bd1.id = sc.reviewed_dept_id
         where 1 = 1
         <if test="coinspect.realName!=null and coinspect.realName!=''">
             bu.real_name like concat('%',#{coinspect.realName},'%')

--
Gitblit v1.9.3