|  |  |  | 
|---|
|  |  |  | <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> | 
|---|