| | |
| | | #{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, |
| | | camera_capture_area, |
| | |
| | | left join ( |
| | | WITH cte AS ( |
| | | SELECT *,row_number() OVER(PARTITION BY serial_number ORDER BY create_time DESC) rn FROM t_work_order |
| | | WHERE deleted = 0 AND status = 'AUDITING_SUCCESS' |
| | | WHERE deleted = 0 AND status != 'AUDITING_SUCCESS' |
| | | ) SELECT * FROM cte WHERE rn=1 |
| | | ) w on m.serial_number = w.serial_number and w.deleted = 0 |
| | | left join t_yw_unit u on p.unit_id = u.id and u.deleted = 0 |
| | |
| | | #{cameraCaptureArea} |
| | | </if> |
| | | <if test="time !=null and time !=''">and TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}</if> |
| | | <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> |
| | | <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="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> |
| | | <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="integratedDevice != null ">and integrated_device = #{integratedDevice}</if> |
| | | <if test="cameraBrand != null ">and camera_brand = #{cameraBrand}</if> |
| | |
| | | <if test="cameraFunType != null and cameraFunType != ''">and camera_fun_type like concat('%', |
| | | #{cameraFunType}, '%') |
| | | </if> |
| | | <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> |
| | | <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="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> |
| | | <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> |
| | | </where> |
| | | </select> |
| | |
| | | , monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, |
| | | camera_dept, hybm, lxbm,d.dept_id, d.dept_name, |
| | | CASE |
| | | WHEN p.provnce_tag_video = 1 OR p.provnce_tag_car = 1 OR p.provnce_tag_face = 1 THEN 1 |
| | | WHEN p.province_tag_video = 1 OR p.province_tag_car = 1 OR p.province_tag_face = 1 THEN 1 |
| | | ELSE 0 |
| | | END AS province_tag,p.dept_tag |
| | | from t_monitor m |
| | |
| | | on m.serial_number = p.serial_number |
| | | where (m.camera_fun_type = '2' or m.camera_fun_type = '3') and p.examine_status = 1 |
| | | </select> |
| | | |
| | | <select id="getByIp" resultType="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | select m.ip,m.serial_number as no,p.id as pointId,p.province_tag_video,p.province_tag_car,p.province_tag_face,p.dept_tag,p.important_tag,p.important_command_image_tag |
| | | from t_monitor m |
| | | left join t_yw_point p on m.serial_number = p.serial_number |
| | | where p.examine_status = 1 and m.ip in |
| | | <foreach collection="ipList" item="ip" separator="," close=")" open="("> |
| | | #{ip} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |