From bf0ba48d2531d6550d0ededb9ef1b3c0d31b535f Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 17 Sep 2021 09:35:33 +0800
Subject: [PATCH] 1.首页统计

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   12 ++++++------
 1 files changed, 6 insertions(+), 6 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 f35fe24..7967fe8 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1856,9 +1856,9 @@
         on
         si.jurisdiction = sj.id
         where 1=1
-        and (stats = 2 or stats = 4)
+        and (stats = 0 or stats = 1 or stats = 2 or stats = 4)
         <if test="information.jurisdiction!=null and information.jurisdiction!=''">
-            and sj.id = #{information.jurisdiction}
+            and (sj.id = #{information.jurisdiction} or sj.parent_id =  #{information.jurisdiction})
         </if>
     </select>
 
@@ -1912,7 +1912,7 @@
         where 1=1
         and (si.stats = 2 or si.stats = 4)
         <if test="information.jurisdiction!=null and information.jurisdiction!=''">
-            and sj.id = #{information.jurisdiction}
+            and (sj.id = #{information.jurisdiction} or sj.parent_id =  #{information.jurisdiction})
         </if>
     </select>
 
@@ -1960,7 +1960,7 @@
         and (c.stats = 2 or c.stats = 4)
         and pnum &lt; #{information.proportion}
         <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
-            and sj.id = #{information.jurisdiction}
+            and (sj.id = #{information.jurisdiction} or sj.parent_id =  #{information.jurisdiction})
         </if>
         <if test="information.departmentid!=null and information.departmentid!=''">
             and c.departmentid = #{information.departmentid}
@@ -2056,7 +2056,7 @@
         and (d.stats = 2 or d.stats = 4)
         and pnum &lt; #{information.proportion}
         <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
-            and sj.id = #{information.jurisdiction}
+            and (sj.id = #{information.jurisdiction} or sj.parent_id =  #{information.jurisdiction})
         </if>
     </select>
 
@@ -2191,7 +2191,7 @@
             a.dept_id = si.departmentid
             where 1=1
             <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
-                and sj.id = #{information.jurisdiction}
+                and (sj.id = #{information.jurisdiction} or sj.parent_id =  #{information.jurisdiction})
             </if>
         ) b
         where b.znum &lt; 2

--
Gitblit v1.9.3