|
|
|
@ -18,8 +18,7 @@
|
|
|
|
|
left join enterprise_inspections ei on t.id = ei.task_id |
|
|
|
|
left join inspections_log il on ei.id = il.inspections_id |
|
|
|
|
left join enterprises e on e.id = ei.enterprise_id |
|
|
|
|
left join task_tag tt on t.id = tt.task_id |
|
|
|
|
left join tag_library tl on tl.id = tt.tag_id |
|
|
|
|
left join tag_library tl on tl.id = t.task_type |
|
|
|
|
WHERE |
|
|
|
|
t.deleted = 0 and ei.deleted = 0 and ei.status = 2 |
|
|
|
|
<if test="params.userId != null and params.userId != ''"> |
|
|
|
@ -38,10 +37,7 @@
|
|
|
|
|
AND t.end_date between #{params.startTime} and #{params.endTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="params.tagList != null and params. tagList != ''"> |
|
|
|
|
AND tl.id in |
|
|
|
|
<foreach collection="params.tagList" item="tagId" open="(" separator="," close=")"> |
|
|
|
|
#{tagId} |
|
|
|
|
</foreach> |
|
|
|
|
AND t.task_type = #{params.tagList} |
|
|
|
|
</if> |
|
|
|
|
GROUP BY t.id ORDER BY t.create_time DESC |
|
|
|
|
</select> |
|
|
|
|