From 00754b2fb8e71be738e6c312e11d62e64a4e82c3 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 10 Dec 2021 17:13:59 +0800
Subject: [PATCH] 1.二维码批量生成修改,新增图片批量下载 2.用户修改 rtime bug 修改

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   62 +++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index 49ce504..2bccbda 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -101,6 +101,10 @@
         blade_dept bd
         on
         bd.id = i.departmentid
+        left join
+        blade_user bu
+        on
+        bu.id = i.create_user_id
         where 1=1
         <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
             and (sj.id=#{information.jurisdiction} or sj.parent_id=#{information.jurisdiction})
@@ -117,6 +121,10 @@
         <if test="information.departmentid!=null and information.departmentid!=''">
             and i.departmentid=#{information.departmentid}
         </if>
+        <if test="information.createDeptId!=null and information.createDeptId!=''">
+            and bu.dept_id =#{information.createDeptId}
+        </if>
+        order by i.id desc
     </select>
 
     <delete id="deleteIn">
@@ -426,7 +434,23 @@
         and role_id = '1412226235153731586'
         and is_deleted = 0
         AND status=1
-        and dept_id = #{dept.id}
+        and dept_id in
+            (
+                SELECT
+                id
+                FROM
+                (
+                SELECT
+                t1.id,t1.parent_id,t1.dept_name,
+                IF
+                ( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild
+                FROM
+                ( SELECT id, parent_id,dept_name FROM blade_dept t ORDER BY parent_id, id ) t1,
+                ( SELECT @pids := #{dept.id} ) t2
+                ) t3
+                WHERE
+                ischild != 0
+            )
     </select>
 
     <!--查询单位的已派遣人数-->
@@ -437,7 +461,23 @@
         and is_deleted = 0
         AND status=1
         AND dispatch=0
-        and dept_id = #{dept.id}
+        and dept_id in
+            (
+                SELECT
+                id
+                FROM
+                (
+                SELECT
+                t1.id,t1.parent_id,t1.dept_name,
+                IF
+                ( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild
+                FROM
+                ( SELECT id, parent_id,dept_name FROM blade_dept t ORDER BY parent_id, id ) t1,
+                ( SELECT @pids := #{dept.id} ) t2
+                ) t3
+                WHERE
+                ischild != 0
+            )
     </select>
 
     <!--查询单位持证的人数-->
@@ -448,7 +488,23 @@
         and is_deleted = 0
         AND status=1
         AND hold=1
-        and dept_id = #{dept.id}
+        and dept_id in
+            (
+                SELECT
+                id
+                FROM
+                (
+                SELECT
+                t1.id,t1.parent_id,t1.dept_name,
+                IF
+                ( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild
+                FROM
+                ( SELECT id, parent_id,dept_name FROM blade_dept t ORDER BY parent_id, id ) t1,
+                ( SELECT @pids := #{dept.id} ) t2
+                ) t3
+                WHERE
+                ischild != 0
+            )
     </select>
 
 </mapper>

--
Gitblit v1.9.3