|
@@ -1417,33 +1417,34 @@
|
|
|
SELECT *
|
|
|
FROM wm_task t
|
|
|
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=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="userIds != null and userIds.size > 0">
|
|
|
- AND t.task_user_id IN
|
|
|
- <foreach collection="userIds" item="id" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="taskId != '' and taskId != null">
|
|
|
- and t.id = #{taskId}
|
|
|
- </if>
|
|
|
- <if test="taskTypeId != '' and taskTypeId != null">
|
|
|
- and t.task_type_id = #{taskTypeId}
|
|
|
- </if>
|
|
|
- <if test="taskNumber != '' and taskNumber != null">
|
|
|
- and t.task_number LIKE CONCAT('%',#{taskNumber},'%')
|
|
|
- </if>
|
|
|
- <if test="ignoreIds != null and ignoreIds.size > 0">
|
|
|
- AND t.id NOT IN
|
|
|
- <foreach collection="ignoreIds" item="id" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ <if test="pkgIds != null and pkgIds.size > 0">
|
|
|
+ AND t.score_package_id IN
|
|
|
+ <foreach collection="pkgIds" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="userIds != null and userIds.size > 0">
|
|
|
+ AND t.task_user_id IN
|
|
|
+ <foreach collection="userIds" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="taskId != '' and taskId != null">
|
|
|
+ and t.id = #{taskId}
|
|
|
+ </if>
|
|
|
+ <if test="taskTypeId != '' and taskTypeId != null">
|
|
|
+ and t.task_type_id = #{taskTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="taskNumber != '' and taskNumber != null">
|
|
|
+ and t.task_number LIKE CONCAT('%',#{taskNumber},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ignoreIds != null and ignoreIds.size > 0">
|
|
|
+ AND t.id NOT IN
|
|
|
+ <foreach collection="ignoreIds" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
</mapper>
|