|  |  |  | 
|---|
|  |  |  | <result property="loginId" column="login_id"/> | 
|---|
|  |  |  | <result property="operatorId" column="operator_id"/> | 
|---|
|  |  |  | <result property="operatorExpired" column="operator_expired"/> | 
|---|
|  |  |  | <result property="camMaxVisibleDistance" column="cam_max_visible_distance"/> | 
|---|
|  |  |  | <result property="camAlarmGuideEnable" column="cam_alarm_guide_enable"/> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <sql id="selectArdCamerasVo"> | 
|---|
|  |  |  | 
|---|
|  |  |  | c.cam_depth, | 
|---|
|  |  |  | c.cam_fov, | 
|---|
|  |  |  | c.operator_id, | 
|---|
|  |  |  | c.operator_expired | 
|---|
|  |  |  | c.operator_expired, | 
|---|
|  |  |  | c.cam_max_visible_distance, | 
|---|
|  |  |  | c.cam_alarm_guide_enable | 
|---|
|  |  |  | from ard_cameras c | 
|---|
|  |  |  | left join sys_dept d on d.dept_id = c.dept_id | 
|---|
|  |  |  | left join sys_user u on u.user_id = c.user_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="longitude != null ">and c.longitude = #{longitude}</if> | 
|---|
|  |  |  | <if test="latitude != null ">and c.latitude = #{latitude}</if> | 
|---|
|  |  |  | <if test="altitude != null ">and c.altitude = #{altitude}</if> | 
|---|
|  |  |  | <if test="userId != null  and userId != ''">and c.user_id = #{userId}</if> | 
|---|
|  |  |  | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t | 
|---|
|  |  |  | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="camHeading != null ">and c.cam_heading = #{camHeading}</if> | 
|---|
|  |  |  | <if test="camPitch != null ">and c.cam_pitch = #{camPitch}</if> | 
|---|
|  |  |  | <if test="camRoll != null ">and c.cam_roll = #{camRoll}</if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="camAspectratio != null ">and c.cam_aspectratio = #{camAspectratio}</if> | 
|---|
|  |  |  | <if test="camDepth != null ">and c.cam_depth = #{camDepth}</if> | 
|---|
|  |  |  | <if test="camFov != null ">and c.cam_fov = #{camFov}</if> | 
|---|
|  |  |  | <if test="camMaxVisibleDistance != null ">and c.cam_max_visible_distance = #{camMaxVisibleDistance}</if> | 
|---|
|  |  |  | <if test="camAlarmGuideEnable != null ">and c.cam_alarm_guide_enable = #{camAlarmGuideEnable}</if> | 
|---|
|  |  |  | <if test="loginId != null ">and c.login_id = #{loginId}</if> | 
|---|
|  |  |  | <if test="deptId != null ">and (d.dept_id = #{deptId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t | 
|---|
|  |  |  | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <!-- 数据范围过滤 --> | 
|---|
|  |  |  | ${params.dataScope} | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="camAspectratio != null ">and c.cam_aspectratio = #{camAspectratio}</if> | 
|---|
|  |  |  | <if test="camDepth != null ">and c.cam_depth = #{camDepth}</if> | 
|---|
|  |  |  | <if test="camFov != null ">and c.cam_fov = #{camFov}</if> | 
|---|
|  |  |  | <if test="camMaxVisibleDistance != null ">and c.cam_max_visible_distance = #{camMaxVisibleDistance}</if> | 
|---|
|  |  |  | <if test="camAlarmGuideEnable != null ">and c.cam_alarm_guide_enable = #{camAlarmGuideEnable}</if> | 
|---|
|  |  |  | <if test="loginId != null ">and c.login_id = #{loginId}</if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="camAspectratio != null">cam_aspectratio,</if> | 
|---|
|  |  |  | <if test="camDepth != null">cam_depth,</if> | 
|---|
|  |  |  | <if test="camFov != null">cam_fov,</if> | 
|---|
|  |  |  | <if test="camMaxVisibleDistance != null ">cam_max_visible_distance,</if> | 
|---|
|  |  |  | <if test="camAlarmGuideEnable != null">cam_alarm_guide_enable,</if> | 
|---|
|  |  |  | <if test="loginId != null">login_id,</if> | 
|---|
|  |  |  | <if test="deptId != null">dept_id,</if> | 
|---|
|  |  |  | <if test="userId != null">user_id,</if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="camAspectratio != null">#{camAspectratio},</if> | 
|---|
|  |  |  | <if test="camDepth != null">#{camDepth},</if> | 
|---|
|  |  |  | <if test="camFov != null">#{camFov},</if> | 
|---|
|  |  |  | <if test="camMaxVisibleDistance != null ">#{camMaxVisibleDistance},</if> | 
|---|
|  |  |  | <if test="camAlarmGuideEnable != null">#{camAlarmGuideEnable},</if> | 
|---|
|  |  |  | <if test="loginId != null">#{loginId},</if> | 
|---|
|  |  |  | <if test="deptId != null">#{deptId},</if> | 
|---|
|  |  |  | <if test="userId != null">#{userId},</if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="camAspectratio != null">cam_aspectratio = #{camAspectratio},</if> | 
|---|
|  |  |  | <if test="camDepth != null">cam_depth = #{camDepth},</if> | 
|---|
|  |  |  | <if test="camFov != null">cam_fov = #{camFov},</if> | 
|---|
|  |  |  | <if test="camMaxVisibleDistance != null ">cam_max_visible_distance = #{camMaxVisibleDistance},</if> | 
|---|
|  |  |  | <if test="camAlarmGuideEnable != null">cam_alarm_guide_enable = #{camAlarmGuideEnable},</if> | 
|---|
|  |  |  | <if test="loginId != null">login_id = #{loginId},</if> | 
|---|
|  |  |  | <if test="deptId != null">dept_id = #{deptId},</if> | 
|---|
|  |  |  | <if test="userId != null">user_id = #{userId},</if> | 
|---|
|  |  |  | 
|---|
|  |  |  | </foreach> | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="findOptions" parameterType="String" resultMap="ArdCamerasResult"> | 
|---|
|  |  |  | <include refid="selectArdCamerasVo"/> | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="name != null  and name != ''">and c.name like '%'||#{name}||'%'</if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | <select id="selectArdCamerasByDeptId" parameterType="Long" resultMap="ArdCamerasResult"> | 
|---|
|  |  |  | select * | 
|---|
|  |  |  | from ard_cameras | 
|---|
|  |  |  | where dept_id = #{deptId} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|