| | |
| | | <if test="cameraDept != null and cameraDept != ''">and camera_dept = #{cameraDept}</if> |
| | | <if test="hybm != null and hybm != ''">and hybm = #{hybm}</if> |
| | | <if test="lxbm != null ">and lxbm = #{lxbm}</if> |
| | | <!-- <if test="recovery != null ">and p.recovery = #{recovery}</if>--> |
| | | <if test="constructionType != null and constructionType != ''"> |
| | | <choose> |
| | | <when test="constructionType == 'PHASE_ONE_TWO'"> |
| | | and m.name LIKE 'DX_%' |
| | | </when> |
| | | <when test="constructionType == 'PHASE_THREE'"> |
| | | and m.name LIKE 'LT_%' |
| | | </when> |
| | | |
| | | <when test="constructionType == 'PHASE_FOURTH'"> |
| | | and ( |
| | | m.name LIKE 'DX_R%' |
| | | OR |
| | | m.name LIKE 'DX_RS%' |
| | | ) |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | |
| | | <if test="deptTag!=null"> |
| | | and p.dept_tag = #{deptTag} |
| | | </if> |
| | | <if test="address != null"> |
| | | and p.dept_id = #{address} |
| | | </if> |
| | | <if test="constructionType != null and constructionType != ''"> |
| | | <choose> |
| | | <when test="constructionType == 'PHASE_ONE_TWO'"> |
| | | and m.name LIKE 'DX_%' |
| | | </when> |
| | | <when test="constructionType == 'PHASE_THREE'"> |
| | | and m.name LIKE 'LT_%' |
| | | </when> |
| | | <when test="constructionType == 'PHASE_FOURTH'"> |
| | | and ( |
| | | m.name LIKE 'DX_R%' |
| | | OR |
| | | m.name LIKE 'DX_RS%' |
| | | ) |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | <select id="getAllVideo" resultType="java.lang.Long"> |
| | | SELECT |
| | | IFNULL(SUM(IF((m.camera_fun_type like '%1%'), 1, 0)), 0) AS video |
| | | FROM t_monitor m |
| | | left join t_yw_point p on m.serial_number = p.serial_number |
| | | </select> |
| | | |
| | | <select id="getIdListVideo" resultType="java.lang.String"> |
| | | select m.serial_number |
| | | FROM t_monitor m where m.camera_fun_type like '%1%' |
| | | </select> |
| | | |
| | | <select id="assetManagementCount" resultType="java.util.Map"> |
| | | SELECT count(*) AS total, |
| | | IFNULL(SUM(IF((m.camera_fun_type like '%1%'), 1, 0)), 0) AS video, |
| | |
| | | u.unit_name AS name, |
| | | CONCAT(MONTH(w.create_time), '月') AS months |
| | | from |
| | | (select count(m.id) as num from t_monitor m where m.serial_number IN (SELECT p.serial_number from t_yw_unit u,t_yw_point p where p.unit_id = u.id and u.id = 21 AND p.examine_status = 1) |
| | | (select count(m.id) as num from t_monitor m where m.serial_number IN (SELECT p.serial_number from t_yw_unit u,t_yw_point p where p.unit_id = u.id and u.id = #{unitId} AND p.examine_status = 1) |
| | | ) as a |
| | | join |
| | | t_work_order w |
| | |
| | | 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 p.online != 0 and p.examine_status = 1 |
| | | where p.examine_status = 1 |
| | | </select> |
| | | |
| | | <!--上方修改了 p.online != 0 and--> |
| | | <update id="updateOnlineFromUyOrHk"> |
| | | <foreach collection="onlineList" item="online" separator=";"> |
| | | UPDATE |