|
|
@ -543,6 +543,9 @@ |
|
|
|
<if test="queryType == 1"> |
|
|
|
AND plan_start_time >= #{timeNode} |
|
|
|
</if> |
|
|
|
<if test="taskId != null"> |
|
|
|
and ts.id != #{taskId} |
|
|
|
</if> |
|
|
|
) AS alltask |
|
|
|
LEFT JOIN t_label_business AS llbb ON alltask.detailId = llbb.business_id |
|
|
|
LEFT JOIN t_label AS ll ON llbb.label_id = ll.id |
|
|
@ -646,4 +649,77 @@ |
|
|
|
LEFT JOIN t_pro_task_plugin tp on tp.task_detail_id = task.detailId and tp.rec_status = 0 |
|
|
|
GROUP BY task.subId |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getAllTaskByRoleList" resultType="com.ccsensptos.tallsdk.bean.vo.TallTaskVo$QueryTask"> |
|
|
|
SELECT |
|
|
|
alltask.* |
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
ts.id, |
|
|
|
td.id AS detailId, |
|
|
|
td.`name`, |
|
|
|
td.description, |
|
|
|
ts.plan_start_time AS planStart, |
|
|
|
ts.plan_duration, |
|
|
|
ts.plan_end_time, |
|
|
|
ts.real_end_time, |
|
|
|
ts.real_start_time AS realStart, |
|
|
|
ts.real_duration, |
|
|
|
ts.task_status AS process, |
|
|
|
|
|
|
|
r.project_id as projectId, |
|
|
|
rt.role_id as executorRoleId |
|
|
|
FROM |
|
|
|
t_pro_task_detail AS td |
|
|
|
LEFT JOIN t_pro_task_sub AS ts ON ts.task_detail_id = td.id |
|
|
|
LEFT JOIN t_pro_role_task AS rt ON rt.task_id = td.id |
|
|
|
LEFT JOIN t_pro_role as r on rt.role_id = r.id |
|
|
|
LEFT JOIN t_label_business AS lb ON td.id = lb.business_id |
|
|
|
LEFT JOIN t_label AS l ON l.id = lb.label_id |
|
|
|
LEFT JOIN t_label_type AS lt ON lt.id = l.label_type_id |
|
|
|
WHERE |
|
|
|
td.rec_status = 0 |
|
|
|
AND ts.rec_status = 0 |
|
|
|
AND lb.rec_status = 0 |
|
|
|
AND l.rec_status = 0 |
|
|
|
AND lt.rec_status = 0 |
|
|
|
AND rt.rec_status = 0 |
|
|
|
AND r.rec_status = 0 |
|
|
|
AND lb.business_type = 0 |
|
|
|
AND l.`level` = 3 |
|
|
|
AND lt.label_type = 1 |
|
|
|
AND ts.plan_start_time != 0 |
|
|
|
AND ts.plan_duration != 0 |
|
|
|
AND rt.role_id in |
|
|
|
<foreach collection="roleList" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
<if test="queryType == 0"> |
|
|
|
AND plan_start_time < #{timeNode} |
|
|
|
</if> |
|
|
|
<if test="queryType == 1"> |
|
|
|
AND plan_start_time >= #{timeNode} |
|
|
|
</if> |
|
|
|
<if test="taskId != null"> |
|
|
|
and ts.id != #{taskId} |
|
|
|
</if> |
|
|
|
) AS alltask |
|
|
|
LEFT JOIN t_label_business AS llbb ON alltask.detailId = llbb.business_id |
|
|
|
LEFT JOIN t_label AS ll ON llbb.label_id = ll.id |
|
|
|
LEFT JOIN t_label_type AS lltt ON ll.label_type_id = lltt.id |
|
|
|
WHERE |
|
|
|
llbb.rec_status = 0 |
|
|
|
AND ll.rec_status = 0 |
|
|
|
AND lltt.rec_status = 0 |
|
|
|
AND lltt.label_type = 0 |
|
|
|
AND llbb.business_type = 0 |
|
|
|
AND ll.`level` >= #{timeUnit} |
|
|
|
<if test="queryType == 0"> |
|
|
|
ORDER BY alltask.planStart DESC,id DESC |
|
|
|
</if> |
|
|
|
<if test="queryType == 1"> |
|
|
|
ORDER BY alltask.planStart,id |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
</mapper> |