From 5a094a318e6f4543dee18a12345ca0edb26041ca Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Sat, 28 Aug 2021 17:07:03 +0800
Subject: [PATCH] 1.首页接口调整

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 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 a01bafc..f476ca9 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -463,6 +463,8 @@
         WHERE
         YEAR ( s.update_time ) =#{year}
         AND dispatch = 0
+        AND `status`=1
+        AND is_deleted=0
         AND dept_id IN ( SELECT i.departmentid FROM sys_information i LEFT JOIN sys_jurisdiction j ON j.id =
         i.jurisdiction where 1=1
         <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
@@ -1080,6 +1082,7 @@
         IFNULL( G.yicnum, 0 ) AS yicnum,
         A.dept_id,
         d.enterpriseName AS deptname,
+        d.stats,
         j.dept_name AS jurname
         FROM
         ( SELECT COUNT( * ) AS num, dept_id, jurisdiction FROM blade_user WHERE role_id = '1412226235153731586' and
@@ -1166,6 +1169,9 @@
         </if>
         <if test="deptid!=null and deptid!=''">
             and d.dept_name like concat(concat('%', #{deptid}),'%')
+        </if>
+        <if test="stats!=null and stats!=''">
+            and d.stats =#{stats}
         </if>
     </select>
 
@@ -1377,6 +1383,7 @@
         SELECT
         A.enterpriseName,
         A.departmentid,
+        A.stats,
         A.jurisdiction,
         A.dept_name as jurname,
         IFNULL( B.num, 0 ) AS fwnum,
@@ -1386,6 +1393,7 @@
         SELECT
         i.enterpriseName,
         i.departmentid,
+        i.stats,
         i.jurisdiction,
         j.dept_name
         FROM
@@ -1406,12 +1414,31 @@
         <if test="deptid!=null and deptid!=''">
             and A.enterpriseName like concat('%', #{deptid},'%')
         </if>
+        <if test="stats!=null and stats!=''">
+            and A.stats=#{stats}
+        </if>
     </select>
 
     <!--保安人员详情-->
     <select id="selectUIn" resultType="java.util.HashMap">
-        SELECT real_name,securitynumber,cardid,phone,hold,soil,photo,examination_type,dispatch FROM blade_user WHERE
-        role_id='1412226235153731586' AND is_deleted=0 AND `status`=1
+        SELECT
+        u.real_name,
+        u.securitynumber,
+        u.cardid,
+        u.phone,
+        u.hold,
+        u.soil,
+        u.photo,
+        u.examination_type,
+        u.dispatch,
+        i.enterpriseName
+        FROM
+        blade_user u
+        LEFT JOIN sys_information i ON i.departmentid = u.dept_id
+        WHERE
+        u.role_id = '1412226235153731586'
+        AND u.is_deleted = 0
+        AND u.`status` =1
         <if test="deptid!=null and deptid!=''">
             and dept_id=#{deptid}
         </if>

--
Gitblit v1.9.3