fuliqi
2024-10-16 44cd2d171062c9b07a0eb047cd0ac80d06188e8c
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}) -->