|
@@ -71,6 +71,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
and date_format(task_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
</if>
|
|
|
+ <if test="params.userId != null and params.userId != ''"><!-- 派发用户自己的或自己填报的或自己处理的 -->
|
|
|
+ <![CDATA[
|
|
|
+ and ( task_reporter = #{params.userId}
|
|
|
+ OR (task_id in (select c.task_id from (SELECT * FROM tbl_task_log where id in (SELECT MAX(id) AS id FROM tbl_task_log where task_status=-1 GROUP BY task_id )) c where c.log_des->'$.zyfzr'= CAST(#{params.userId} AS SIGNED)))
|
|
|
+ OR (task_id IN (SELECT c.task_id FROM (SELECT * FROM tbl_task_log where id in (SELECT MAX(id) AS id FROM tbl_task_log where task_status=2 GROUP BY task_id )) c WHERE json_contains(c.log_des-> '$.fzr',#{params.userId}))))
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by create_time desc
|
|
|
</select>
|