| | |
| | | <result property="lxbm" column="lxbm"/> |
| | | <result property="deviceType" column="device_type"/> |
| | | </resultMap> |
| | | |
| | | <!-- TODO --> |
| | | <resultMap id="monitorMap" type="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | <result column="m.id" property="id"/> |
| | | <result column="no" property="no"/> |
| | |
| | | #{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, p.online as onState, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag,p.dept_tag, |
| | | camera_capture_area, p.online as onState, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag_video,p.province_tag_car,p.province_tag_face,p.dept_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 |
| | | left join t_yw_point p on m.serial_number = p.serial_number and p.deleted = 0 |
| | |
| | | or m.serial_number like concat('%', #{name}, '%') |
| | | or u.unit_name like concat('%', #{name}, '%')) |
| | | </if> |
| | | <if test="provinceTag != null ">and p.province_tag = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 1">and p.province_tag_video = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 2">and p.province_tag_car = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 3">and p.province_tag_face = #{provinceTag}</if> |
| | | <if test="provinceTag != null and recovery == 1">and (p.province_tag_face = #{provinceTag} or p.province_tag_video = #{provinceTag} or p.province_tag_car = #{provinceTag})</if> |
| | | <if test="deptTag != null ">and p.dept_tag = #{deptTag}</if> |
| | | <if test="siteType != null ">and site_type = #{siteType}</if> |
| | | <if test="macAddr != null and macAddr != ''">and mac_addr = #{macAddr}</if> |
| | |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="exportTMonitorList" resultType="com.ycl.platform.domain.excel.TMonitorExp"> |
| | | select m.id, m.serial_number, name, ip, camera_fun_type,p.online as onState, |
| | | d.dept_name, p.id as pointId,p.province_tag,p.dept_tag,p.important_tag,p.important_command_image_tag,u.unit_name as managementUnit |
| | |
| | | <if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectMonitorVOList" 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, on_state, civil_code, integrated_device, camera_brand, address, net_working, |
| | |
| | | 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 |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectMonitorResult" resultType = "com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | 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,p.id as pointId |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getVideoCount" resultType="java.util.Map"> |
| | | SELECT count(*) AS totalPosts, |
| | | IFNULL(SUM(IF(p.online = 1, 1, 0)), 0) AS totalMembers, |
| | |
| | | left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0 |
| | | <where> |
| | | camera_fun_type like concat('%', #{cameraFunType}, '%') and p.examine_status = 1 |
| | | <if test="provinceTag!=null"> |
| | | and p.province_tag = #{provinceTag} |
| | | <if test="provinceTag!=null and cameraFunType==1"> |
| | | and p.province_tag_video = #{provinceTag} |
| | | </if> |
| | | <if test="provinceTag!=null and cameraFunType==2"> |
| | | and p.province_tag_car = #{provinceTag} |
| | | </if> |
| | | <if test="provinceTag!=null and cameraFunType==3"> |
| | | and p.province_tag_face = #{provinceTag} |
| | | </if> |
| | | <if test="deptTag!=null"> |
| | | and p.dept_tag = #{deptTag} |
| | |
| | | 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} |
| | | and (p.province_tag_video = #{provinceTag} or p.province_tag_car = #{provinceTag} or p.province_tag_face = #{provinceTag}) |
| | | </if> |
| | | <if test="deptTag!=null"> |
| | | and p.dept_tag = #{deptTag} |
| | |
| | | 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 = 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 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 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 p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag = 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 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 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 = 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 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 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 p1.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 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_car = 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 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_car = 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 p1.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_car = 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, 2) |
| | | 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 = 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 AND p1.id = p2.id<if test="dataScope == 1"> AND p2.province_tag = 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 p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag = 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 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 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> |
| | | <!-- TODO --> |
| | | <select id="monitorRate" resultType="com.ycl.platform.domain.vo.screen.MonitorRateVO"> |
| | | SELECT |
| | | * |
| | |
| | | COUNT(m2.id) AS faceErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.online = -1 AND p2.examine_status = 1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.online = 1 AND p3.examine_status = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_face = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.online = -1 AND p2.examine_status = 1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_face = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.online = 1 AND p3.examine_status = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_face = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 3) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 3) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 3) |
| | |
| | | COUNT(m2.id) AS carErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_car = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_car = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_car = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 2) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 2) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 2) |
| | |
| | | COUNT(m2.id) AS videoErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_video = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_video = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 1) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 1) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 1) |
| | |
| | | WHERE |
| | | serial_number in <foreach collection="gbList" open="(" separator="," close=")" item="no">#{no}</foreach> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="getDistinctIP" resultType="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | select DISTINCT m.id, m.ip,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 |
| | | select DISTINCT m.id, m.ip,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 |