|
|
@ -65,61 +65,49 @@ |
|
|
|
s.end_time as taskEndTime, |
|
|
|
if(a.rId is not null or r.`name` = '全体成员',1,0) as mine |
|
|
|
FROM |
|
|
|
t_pro_task_detail d LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id |
|
|
|
t_pro_task_detail d |
|
|
|
LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id |
|
|
|
LEFT JOIN t_pro_role r on r.id = d.executor_role |
|
|
|
LEFT JOIN |
|
|
|
( |
|
|
|
SELECT |
|
|
|
count(m.id) as mid, |
|
|
|
s.id as sId |
|
|
|
FROM |
|
|
|
t_pro_sub_time_member m LEFT JOIN t_pro_task_sub_time s on m.task_sub_time_id = s.id |
|
|
|
WHERE |
|
|
|
m.member_id = #{memberId} |
|
|
|
and |
|
|
|
m.rec_status = 0 |
|
|
|
)t on t.sId = s.id |
|
|
|
( |
|
|
|
SELECT |
|
|
|
count(m.id) as mid, |
|
|
|
s.id as sId |
|
|
|
FROM |
|
|
|
t_pro_sub_time_member m LEFT JOIN t_pro_task_sub_time s on m.task_sub_time_id = s.id |
|
|
|
WHERE |
|
|
|
m.member_id = #{memberId} |
|
|
|
and |
|
|
|
m.rec_status = 0 |
|
|
|
)t on t.sId = s.id |
|
|
|
LEFT JOIN |
|
|
|
( |
|
|
|
SELECT |
|
|
|
r.id as rId |
|
|
|
FROM |
|
|
|
t_pro_role r Left join t_pro_member_role mr on r.id = mr.role_id |
|
|
|
LEFT JOIN t_pro_member m on mr.member_id = m.id |
|
|
|
WHERE |
|
|
|
m.user_id = #{userId} |
|
|
|
and m.rec_status = 0 |
|
|
|
and r.rec_status = 0 |
|
|
|
) a on a.rId = r.id |
|
|
|
|
|
|
|
( |
|
|
|
SELECT |
|
|
|
r.id as rId |
|
|
|
FROM |
|
|
|
t_pro_role r Left join t_pro_member_role mr on r.id = mr.role_id |
|
|
|
LEFT JOIN t_pro_member m on mr.member_id = m.id |
|
|
|
WHERE |
|
|
|
m.user_id = #{userId} |
|
|
|
and m.rec_status = 0 |
|
|
|
and r.rec_status = 0 |
|
|
|
) a on a.rId = r.id |
|
|
|
WHERE |
|
|
|
d.project_id = #{projectId} |
|
|
|
and |
|
|
|
d.rec_status = 0 |
|
|
|
and |
|
|
|
d.level != 0 |
|
|
|
and |
|
|
|
d.level != 1 |
|
|
|
and d.rec_status = 0 |
|
|
|
and d.level != 0 |
|
|
|
and d.level != 1 |
|
|
|
<if test="roleId != null"> |
|
|
|
and |
|
|
|
r.id = #{roleId} |
|
|
|
and r.id = #{roleId} |
|
|
|
</if> |
|
|
|
and s.complated_status = #{type} |
|
|
|
and FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d %H:%m:%s') < NOW() |
|
|
|
and |
|
|
|
s.complated_status = #{type} |
|
|
|
and |
|
|
|
FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d %H:%m:%s') < NOW() |
|
|
|
and |
|
|
|
( |
|
|
|
( |
|
|
|
d.finish_need_all = 0 |
|
|
|
) |
|
|
|
or |
|
|
|
( |
|
|
|
d.finish_need_all = 1 |
|
|
|
and |
|
|
|
t.mid > 0 |
|
|
|
) |
|
|
|
) |
|
|
|
( |
|
|
|
( d.finish_need_all = 0 ) |
|
|
|
or |
|
|
|
( d.finish_need_all = 1 and t.mid > 0 ) |
|
|
|
) |
|
|
|
ORDER BY |
|
|
|
<if test="orderType == 0"> |
|
|
|
s.begin_time DESC |
|
|
@ -128,7 +116,6 @@ |
|
|
|
d.priority DESC |
|
|
|
,s.begin_time DESC |
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getKanbanTakeByType" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.TaskVo$KanBanTask"> |
|
|
|