|
@@ -190,15 +190,23 @@
|
|
|
and task_status = 0 order by task.id desc limit 50
|
|
|
</select>
|
|
|
<select id="selectMilepost" resultType="com.management.platform.entity.Task">
|
|
|
- select * from task where task.project_id in
|
|
|
- <foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- and task.task_type=1 and task.finish_date in
|
|
|
- (select MAX(task.finish_date)from task where task.project_id in
|
|
|
- <foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- and task.task_type=1 group by project_id) group by task.project_id
|
|
|
+ select * from task where
|
|
|
+ task.task_type=1
|
|
|
+ <if test="ids!=null">
|
|
|
+ and task.project_id in
|
|
|
+ <foreach collection="ids" index="index" close=")" open="(" separator="," item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ and task.finish_date in
|
|
|
+ (select MAX(task.finish_date)from task where
|
|
|
+ task.task_type=1
|
|
|
+ <if test="ids!=null">
|
|
|
+ and task.project_id in
|
|
|
+ <foreach collection="ids" index="index" close=")" open="(" separator="," item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ group by project_id) group by task.project_id
|
|
|
</select>
|
|
|
</mapper>
|