Merge remote-tracking branch 'origin/master'

master
ArgonarioD 2022-07-13 10:50:07 +08:00
commit cc39e36c33
1 changed files with 8 additions and 3 deletions

View File

@ -43,14 +43,19 @@
</select>
<select id="selectProjectProcessOfEveryone"
resultType="cn.edu.hfut.rmdjzz.projectmanagement.entity.dto.TaskNumOfEveryoneDTO">
SELECT staff_fullname, completed_num
SELECT staff_fullname, IF(completed_num IS NULL, 0, completed_num) AS completed_num
FROM (SELECT task_holder_id, SUM(IF(task_closed_time IS NULL, 0, 1)) AS completed_num
FROM task
WHERE !is_deleted
AND task_project_id = #{projectId}
AND task_id != 0
GROUP BY task_holder_id) AS T
JOIN staff ON staff_id = T.task_holder_id;
GROUP BY task_holder_id) AS T1
RIGHT JOIN (SELECT staff.staff_id, staff_fullname
FROM project_group
JOIN staff ON staff.staff_id = project_group.staff_id
WHERE project_id = #{projectId}) AS T2
ON T1.task_holder_id = T2.staff_id
</select>
<select id="selectTaskClosedNum" resultType="cn.edu.hfut.rmdjzz.projectmanagement.entity.dto.TaskTrendDTO">
SELECT closed_date AS task_date,