From da426ecaf4fd047c6cb43cd9a0c1288e39c4e91d Mon Sep 17 00:00:00 2001
From: lohir <3399054449@qq.com>
Date: 星期三, 23 十月 2024 11:24:57 +0800
Subject: [PATCH] 完成运维考核-工单白名单-新增、删除

---
 ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
index 85f8c3d..2597489 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -369,7 +369,8 @@
         IFNULL(SUM(IF(p.online = 1, 1, 0)), 0) AS totalMembers,
         IFNULL(SUM(IF(p.online = -1, 1, 0)), 0) AS postsPercentage,
         IFNULL(SUM(IF(p.online = 0, 1, 0)), 0) AS unknownNumbers,
-        IFNULL(ROUND(SUM(IF(p.online = 1 , 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage FROM t_monitor m
+        IFNULL(ROUND(SUM(IF(p.online = 1 , 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage
+        FROM t_monitor m
         left join t_yw_point p on m.serial_number = p.serial_number
         left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0
         <where>
@@ -385,12 +386,13 @@
     </select>
 
     <select id="recoveryException" resultType="java.util.Map">
-        SELECT count(*)                                                          AS totalPosts,
-               IFNULL(SUM(IF(p.online = 1, 1, 0)), 0)                            AS totalMembers,
-               IFNULL(SUM(IF(p.online = 0, 1, 0)), 0)                            AS postsPercentage,
-               IFNULL(ROUND(SUM(IF(p.online = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage
-        FROM t_monitor t
-        LEFT JOIN t_yw_point p ON t.serial_number = p.serial_number
+        SELECT count(*) AS totalPosts,
+        IFNULL(SUM(IF(p.online = 1, 1, 0)), 0) AS totalMembers,
+        IFNULL(SUM(IF(p.online = -1, 1, 0)), 0) AS postsPercentage,
+        IFNULL(SUM(IF(p.online = 0, 1, 0)), 0) AS unknownNumbers,
+        IFNULL(ROUND(SUM(IF(p.online = 1 , 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage
+        FROM t_monitor m
+        left join t_yw_point p on m.serial_number = p.serial_number
         left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0
         <where>
             p.examine_status = 1
@@ -398,6 +400,9 @@
              <if test="provinceTag!=null">
                 and p.province_tag = #{provinceTag}
              </if>
+            <if test="deptTag!=null">
+                and p.dept_tag = #{deptTag}
+            </if>
         ${params.dataScope}
         </where>
     </select>

--
Gitblit v1.8.0