From 2cdfc2901063cf4e7133091e2f82a89d41f3f50d Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Tue, 09 Nov 2021 19:21:23 +0800
Subject: [PATCH] 1.统计

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   19 ++++++++++++++++---
 1 files changed, 16 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 ee3d86d..ee0dc67 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1220,7 +1220,7 @@
         IFNULL( J.num, 0 ) AS num
         FROM
         ( SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction ) H
-        LEFT JOIN (
+        INNER JOIN (
         SELECT
         COUNT( * ) AS num,
         dept_id
@@ -1428,7 +1428,7 @@
         A.stats,
         j.dept_name AS jurname
         FROM
-        ( SELECT jurisdiction, departmentid,enterpriseName,stats FROM sys_information ) A
+        ( SELECT jurisdiction, departmentid,enterpriseName,stats,create_time FROM sys_information ) A
         LEFT JOIN (
         SELECT
         COUNT( * ) AS num,
@@ -1550,6 +1550,12 @@
         </if>
         <if test="stats!=null and stats!=''">
             and A.stats =#{stats}
+        </if>
+        <if test="startTime!=null and startTime!=''">
+            and A.create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime!=null and endTime!=''">
+            and A.create_time &lt;= #{endTime}
         </if>
     </select>
 
@@ -1776,7 +1782,8 @@
         i.departmentid,
         i.stats,
         i.jurisdiction,
-        j.dept_name
+        j.dept_name,
+        i.create_time
         FROM
         sys_information i
         LEFT JOIN sys_jurisdiction j ON i.jurisdiction = j.id
@@ -1834,6 +1841,12 @@
         <if test="stats!=null and stats!=''">
             and A.stats=#{stats}
         </if>
+        <if test="startTime!=null and startTime!=''">
+            and A.create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime!=null and endTime!=''">
+            and A.create_time &lt;= #{endTime}
+        </if>
     </select>
 
     <!--保安人员详情-->

--
Gitblit v1.9.3