fuliqi
2024-10-15 35d325f87d78d942d78a538dd36d5317f0876313
ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -385,19 +385,20 @@
    </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
        left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0
        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
        <where>
            p.examine_status = 1
<!--             (p.recovery = 1 OR TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}) -->
             <if test="provinceTag!=null">
                and p.province_tag = #{provinceTag}
             </if>
            <if test="deptTag!=null">
                and p.dept_tag = #{deptTag}
            </if>
        ${params.dataScope}
        </where>
    </select>