From 44cd2d171062c9b07a0eb047cd0ac80d06188e8c Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 16 十月 2024 11:58:18 +0800
Subject: [PATCH] 工单bug,数据中心在线率增加存ping状态

---
 ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
index 9f45051..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>
@@ -389,7 +390,10 @@
         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>
             p.examine_status = 1
 <!--             (p.recovery = 1 OR TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}) -->

--
Gitblit v1.8.0