| | |
| | | IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, |
| | | IFNULL(ROUND(SUM(IF(on_state = 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 |
| | | <where> |
| | | camera_fun_type like concat('%', #{cameraFunType}, '%') |
| | | </where> |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="recoveryException" resultType="java.util.Map"> |
| | |
| | | #{query.keyword} as keyword |
| | | FROM |
| | | t_monitor tm |
| | | INNER JOIN t_yw_point yp ON yp.serial_number = tm.serial_number |
| | | <where> |
| | | <if test="query.keyword != null and query.keyword != ''"> |
| | | AND tm.name like concat('%', #{query.keyword}, '%') |
| | | </if> |
| | | <if test="query.startTIme != null and query.endTime != null"> |
| | | AND yp.create_time between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |