@ -22,12 +22,14 @@
<result property= "checkPerson" column= "check_person" />
<result property= "checkTime" column= "check_time" />
<result property= "taskPatrolledId" column= "task_patrolled_id" />
<result property= "unifiedTaskPatrolledId" column= "unified_task_patrolled_id" />
</resultMap>
<sql id= "selectPatrolTaskResultMainVo" >
select line_id,
task_id,
task_patrolled_id,
unified_task_patrolled_id,
task_name,
task_code,
create_time,
@ -114,6 +116,10 @@
ORDER BY a.line_id desc
</select>
<select id= "selectUnifiedTaskPatrolledId" parameterType= "PatrolTaskResultMain" resultType= "java.lang.String" >
select unified_task_patrolled_id from patrol_task_result_main where task_id = #{taskId} and file_status = 0 and (now() - create_time) < = 120 ORDER BY line_id desc limit 1
</select>
<select id= "selectPatrolTaskResultMainByLineId" parameterType= "Long" resultMap= "PatrolTaskResultMainResult" >
<include refid= "selectPatrolTaskResultMainVo" />
where line_id = #{lineId}
@ -151,6 +157,7 @@
<if test= "checkPerson != null" > check_person,</if>
<if test= "checkTime != null" > check_time,</if>
<if test= "taskPatrolledId != null" > task_patrolled_id,</if>
<if test= "unifiedTaskPatrolledId != null" > unified_task_patrolled_id,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "taskId != null" > #{taskId},</if>
@ -169,6 +176,7 @@
<if test= "checkPerson != null" > #{checkPerson},</if>
<if test= "checkTime != null" > #{checkTime},</if>
<if test= "taskPatrolledId != null" > #{taskPatrolledId},</if>
<if test= "unifiedTaskPatrolledId != null" > #{unifiedTaskPatrolledId},</if>
</trim>
</insert>
@ -191,6 +199,7 @@
<if test= "checkPerson != null" > check_person = #{checkPerson},</if>
<if test= "checkTime != null" > check_time = #{checkTime},</if>
<if test= "taskPatrolledId != null" > task_patrolled_id = #{taskPatrolledId},</if>
<if test= "unifiedTaskPatrolledId != null" > unified_task_patrolled_id = #{unifiedTaskPatrolledId},</if>
</trim>
where line_id = #{lineId}
</update>