| | |
| | | <where> |
| | | <if test="taskName != null and taskName != ''"> and task_name like '%'||#{taskName}||'%'</if> |
| | | <if test="inspectMode != null and inspectMode != ''"> and inspect_mode = #{inspectMode}</if> |
| | | <if test="menualSwitch != null and inspectMode != ''">and menual_switch= #{menualSwitch}</if> |
| | | <if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if> |
| | | <if test="channel != null "> and channel = #{channel}</if> |
| | | </where> |
| | | order by start_time |
| | | </select> |
| | | |
| | | <select id="selectArdVideoInspectTaskById" parameterType="String" resultMap="ArdVideoInspectTaskArdVideoInspectTaskStepResult"> |
| | |
| | | <if test="channel != null">channel = #{channel},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <!-- <if test="currentStepId != null">current_step_id = #{currentStepId},</if>--> |
| | | <!-- <if test="currentStepStartTime != null">current_step_start_time = #{currentStepStartTime},</if>--> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <update id="updateArdVideoInspectTaskWithCurrentSetpInfo" parameterType="ArdVideoInspectTask"> |
| | | update ard_video_inspect_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskName != null">task_name = #{taskName},</if> |
| | | <if test="startTime != null">start_time = #{startTime},</if> |
| | | <if test="endTime != null">end_time = #{endTime},</if> |
| | | <if test="repeatPeriod != null">repeat_period = #{repeatPeriod},</if> |
| | | <if test="inspectMode != null">inspect_mode = #{inspectMode},</if> |
| | | <if test="menualSwitch != null">menual_switch = #{menualSwitch},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="cameraId != null">camera_id = #{cameraId},</if> |
| | | <if test="channel != null">channel = #{channel},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="currentStepId != null">current_step_id = #{currentStepId},</if> |
| | | <if test="currentStepStartTime != null">current_step_start_time = #{currentStepStartTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdVideoInspectTaskById" parameterType="String"> |
| | | delete from ard_video_inspect_task where id = #{id} |
| | | </delete> |
| | |
| | | </delete> |
| | | |
| | | <insert id="batchArdVideoInspectTaskStep"> |
| | | insert into ard_video_inspect_task_step( task_id, dept_id, user_id, id, order_number, recording_time, well_id) values |
| | | insert into ard_video_inspect_task_step( task_id, dept_id, user_id, order_number, recording_time, well_id) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.taskId}, #{item.deptId}, #{item.userId}, #{item.id}, #{item.orderNumber}, #{item.recordingTime}, #{item.wellId}) |
| | | ( #{item.taskId}, #{item.deptId}, #{item.userId}, #{item.orderNumber}, #{item.recordingTime}, #{item.wellId}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!--查询任务中相机已使用时段--> |
| | | <select id="getTaskUsedCameraPeriods" parameterType="String" resultType="java.util.HashMap"> |
| | | select t.start_time,t.end_time from ard_video_inspect_task t |
| | | where t.camera_id=#{cameraId} |
| | | ORDER BY t.start_time |
| | | </select> |
| | | </mapper> |