| | |
| | | <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, p.online as onState, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag, |
| | | IF(COUNT(w.id) OVER() > 0, '是', '否') AS error, u.unit_name,p.recovery_time,p.reason,p.start_time,p.end_time,w.work_order_no from t_monitor m |
| | | IF(COUNT(w.id) OVER() > 0, '是', '否') AS error, u.unit_name,p.recovery_time,p.reason,p.start_time,p.end_time,w.work_order_no |
| | | from t_monitor m |
| | | left join t_yw_point p on m.serial_number = p.serial_number and p.deleted = 0 |
| | | left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0 |
| | | left join ( |
| | |
| | | <if test="serialNumber != null and serialNumber != ''">and m.serial_number = #{serialNumber}</if> |
| | | <if test="name != null and name != ''"> |
| | | and (name like concat('%', #{name}, '%') |
| | | or m.ip like concat('%', #{name}, '%') |
| | | or m.serial_number like concat('%', #{name}, '%') |
| | | or u.unit_name like concat('%', #{name}, '%')) |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectMonitorResult" resultType="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | select m.id, m.serial_number as no,d.dept_id,p.province_tag,p.important_tag,p.important_command_image_tag,p.dept_tag,p.online |
| | | select m.id, m.serial_number as no,m.name,m.camera_fun_type as monitorType,d.dept_id,p.province_tag,p.important_tag,p.important_command_image_tag,p.dept_tag,p.online |
| | | 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> |
| | | <if test="cameraFunType!=null"> |
| | | m.camera_fun_type like concat('%',#{cameraFunType},'%') |
| | | and m.camera_fun_type like concat('%',#{cameraFunType},'%') |
| | | </if> |
| | | <if test="deptIds!=null and deptIds.size>0"> |
| | | and p.dept_id in |
| | | <foreach collection="deptIds" item="deptId" open="(" close=")" separator=","> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |