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/system/mapper/UserMapper.xml |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index bb58ace..96ae4de 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -200,12 +200,27 @@
         blade_dept bd
         on
         bu.dept_id = bd.id
+        left join
+        blade_role br
+        on
+        br.id = bu.role_id
+        left join
+        sys_information si
+        on
+        si.departmentid = bd.id
+        left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction
         where
         bu.is_deleted = 0
         and
-        bd.dept_category = 1
+        br.role_alias = "安保人员"
         and
         bu.status = 1
+        and bd.parent_id!=1425365577303621633
+        and bd.id != 1425365577303621633
+        and bd.id != 1432625856013971457
         <if test="user.cardid!=null and user.cardid != ''">
             and bu.cardid like concat(concat('%', #{user.cardid}),'%')
         </if>
@@ -227,8 +242,8 @@
         <if test="user.hold!=null and user.hold != ''">
             and bu.hold = #{user.hold}
         </if>
-        <if test="user.jurisdiction!=null and user.jurisdiction != ''">
-            and bu.jurisdiction = #{user.jurisdiction}
+        <if test="user.jurisdiction!=null and user.jurisdiction != '' and user.jurisdiction != '1372091709474910209'">
+            and (sj.id = #{user.jurisdiction} or sj.parent_id = #{user.jurisdiction})
         </if>
         <if test="user.securitynumber!=null and user.securitynumber != ''">
             and bu.securitynumber like concat('%', #{user.securitynumber},'%')
@@ -236,6 +251,12 @@
         <if test="user.deptId!=null and user.deptId!=''">
             and bu.dept_id =#{user.deptId}
         </if>
+        <if test="user.startTime!=null and user.startTime!=''">
+            and bu.paper_time &gt;= #{user.startTime}
+        </if>
+        <if test="user.endTime!=null and user.endTime!=''">
+            and bu.paper_time &lt;= #{user.endTime}
+        </if>
         <if test="user.useName==null or user.useName==''">
             order by bu.id
         </if>

--
Gitblit v1.9.3