| | |
| | | #{number} |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | | <!-- TODO:异常恢复监控和是否产生工单字段--> |
| | | <select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> |
| | | select m.id, m.serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, |
| | |
| | | |
| | | |
| | | </select> |
| | | <!-- TODO --> |
| | | <select id="exportTMonitorList" resultType="com.ycl.platform.domain.excel.TMonitorExp"> |
| | | select m.id, m.serial_number, name, ip, camera_fun_type, |
| | | CASE |
| | |
| | | <if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if> |
| | | <if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if> |
| | | <if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if> |
| | | <if test="address != null and address !=''">and d.dept_id = #{address}</if> |
| | | </where> |
| | | </select> |
| | | <select id="selectMonitorVOList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> |
| | |
| | | COUNT(p2.id) AS errorNum, |
| | | COUNT(p3.id) AS normalNum |
| | | FROM t_monitor |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1<if test="dataScope == 1"> AND p1.province_tag_video = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_video = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 |
| | | <if test="dataScope == 1"> AND p1.province_tag_video = 1 </if> |
| | | <if test="dataScope == 3"> AND p1.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id |
| | | <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if> |
| | | <if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id |
| | | <if test="dataScope == 1"> AND p3.province_tag_video = 1 </if> |
| | | <if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | WHERE INSTR(camera_fun_type, 1) |
| | | UNION ALL |
| | | SELECT |
| | |
| | | COUNT(p2.id) AS errorNum, |
| | | COUNT(p3.id) AS normalNum |
| | | FROM t_monitor |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag_face = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id<if test="dataScope == 1"> AND p2.province_tag_face = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_face = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 |
| | | <if test="dataScope == 1"> AND p1.province_tag_face = 1 </if> |
| | | <if test="dataScope == 3"> AND p1.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id |
| | | <if test="dataScope == 1"> AND p2.province_tag_face = 1 </if> |
| | | <if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id |
| | | <if test="dataScope == 1"> AND p3.province_tag_face = 1 </if> |
| | | <if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | WHERE INSTR(camera_fun_type, 3) |
| | | </select> |
| | | <select id="monitorRate" resultType="com.ycl.platform.domain.vo.screen.MonitorRateVO"> |
| | |
| | | AND t_monitor.serial_number = t_yw_point.serial_number ) |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="batchUpdatePingOnline"> |
| | | <foreach collection="ipList" item="ip" separator=";"> |
| | | UPDATE |
| | | t_yw_point |
| | | SET |
| | | online = #{online}, |
| | | update_time = #{date} |
| | | WHERE |
| | | EXISTS (SELECT 1 FROM t_monitor |
| | | WHERE ip = #{ip} |
| | | AND t_monitor.serial_number = t_yw_point.serial_number ) |
| | | </foreach> |
| | | </update> |
| | | <update id="updateOnlineFromHk"> |
| | | <foreach collection="onlineList" item="online" separator=";"> |
| | | UPDATE |