|
@@ -1416,9 +1416,8 @@
|
|
|
<select id="listAvailableTaskForSupervision2" resultMap="wmTaskMap">
|
|
|
SELECT *
|
|
|
FROM wm_task t
|
|
|
- LEFT JOIN sys_chain_node_check_his c ON c.target_id = t.id
|
|
|
- WHERE c.node_id = 6
|
|
|
- AND c.check_result = 1
|
|
|
+ LEFT JOIN (SELECT * FROM sys_chain_node_check_his c WHERE c.node_id = 6 AND c.check_result = 1 GROUP BY c.target_id) ON c.target_id = t.id
|
|
|
+ WHERE
|
|
|
<if test="pkgIds != null and pkgIds.size > 0">
|
|
|
AND t.score_package_id IN
|
|
|
<foreach collection="pkgIds" item="id" open="(" separator="," close=")">
|
|
@@ -1432,7 +1431,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="taskId != '' and taskId != null">
|
|
|
- and t.id LIKE CONCAT('%',#{taskId},'%')
|
|
|
+ and t.id = #{taskId}
|
|
|
</if>
|
|
|
<if test="taskTypeId != '' and taskTypeId != null">
|
|
|
and t.task_type_id = #{taskTypeId}
|