|
@@ -733,7 +733,7 @@
|
|
|
SELECT user.`id` as user_id, user.`name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,task_executor.id as exe_id,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task_executor.plan_hours as duration, task.task_level as level ,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId,
|
|
|
- task.task_status as taskStatus,task.id as taskId
|
|
|
+ task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan
|
|
|
FROM user
|
|
|
LEFT JOIN task_executor ON user.id = task_executor.`executor_id`
|
|
|
left join task on task.id = task_executor.task_id
|
|
@@ -743,7 +743,7 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
and ((IFNULL(task.start_date , task.end_date) between #{startDate} and #{endDate}) or (task.end_date between #{startDate} and #{endDate}))
|
|
|
- and task.end_date is not null
|
|
|
+ and task.end_date is not null and task.task_plan =0
|
|
|
AND project.`status` = 1
|
|
|
ORDER BY user.id, task.start_date
|
|
|
</select>
|
|
@@ -751,9 +751,12 @@
|
|
|
<select id="getTaskPlanByProject" resultType="java.util.Map">
|
|
|
SELECT task.executor_id as user_id, task.executor_name as `name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId
|
|
|
- ,task.task_status as taskStatus,task.id as taskId,
|
|
|
+ ,task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task.plan_hours as duration FROM project
|
|
|
LEFT JOIN task ON task.project_id = project.id
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ LEFT JOIN task_group tg ON tg.project_id = project.id
|
|
|
+ </if>
|
|
|
WHERE project.company_id = #{companyId}
|
|
|
<if test="projectIds != null">
|
|
|
and project.`id` IN
|
|
@@ -761,8 +764,14 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ and tg.name = #{groupName} and task.group_id=tg.id
|
|
|
+ </if>
|
|
|
+ <if test="taskType !=null ">
|
|
|
+ and task.task_type = #{taskType}
|
|
|
+ </if>
|
|
|
and ((IFNULL(task.start_date , task.end_date) between #{startDate} and #{endDate}) or (task.end_date between #{startDate} and #{endDate}))
|
|
|
- and task.end_date is not null
|
|
|
+ and task.end_date is not null and task.task_plan =0
|
|
|
AND project.`status` = 1
|
|
|
ORDER BY project.id, task.start_date
|
|
|
</select>
|
|
@@ -2716,7 +2725,7 @@
|
|
|
SELECT user.`id` as user_id, user.`name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,task_executor.id as exe_id,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task_executor.plan_hours as duration, task.task_level as level ,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId,
|
|
|
- task.task_status as taskStatus,task.id as taskId
|
|
|
+ task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan
|
|
|
FROM user
|
|
|
LEFT JOIN task_executor ON user.id = task_executor.`executor_id`
|
|
|
left join task on task.id = task_executor.task_id
|
|
@@ -2737,7 +2746,7 @@
|
|
|
SELECT user.`id` as user_id, user.`name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,task_executor.id as exe_id,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task_executor.plan_hours as duration, task.task_level as level ,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId,
|
|
|
- task.task_status as taskStatus,task.id as taskId
|
|
|
+ task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan
|
|
|
FROM user
|
|
|
LEFT JOIN task_executor ON user.id = task_executor.`executor_id`
|
|
|
left join task on task.id = task_executor.task_id
|
|
@@ -2758,7 +2767,7 @@
|
|
|
SELECT user.`id` as user_id, user.`name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,task_executor.id as exe_id,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task_executor.plan_hours as duration, task.task_level as level ,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId,
|
|
|
- task.task_status as taskStatus,task.id as taskId
|
|
|
+ task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan
|
|
|
FROM user
|
|
|
LEFT JOIN task_executor ON user.id = task_executor.`executor_id`
|
|
|
left join task on task.id = task_executor.task_id
|
|
@@ -2778,9 +2787,12 @@
|
|
|
<select id="getTaskPlanByProjectGeneralMemb" resultType="java.util.Map">
|
|
|
SELECT task.executor_id as user_id, task.executor_name as `name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId
|
|
|
- ,task.task_status as taskStatus,task.id as taskId,
|
|
|
+ ,task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task.plan_hours as duration FROM project
|
|
|
LEFT JOIN task ON task.project_id = project.id
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ LEFT JOIN task_group tg ON tg.project_id = project.id
|
|
|
+ </if>
|
|
|
WHERE project.company_id = #{companyId}
|
|
|
<if test="projectIds != null">
|
|
|
and project.`id` IN
|
|
@@ -2788,6 +2800,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ and tg.name = #{groupName} and task.group_id=tg.id
|
|
|
+ </if>
|
|
|
+ <if test="taskType !=null ">
|
|
|
+ and task.task_type = #{taskType}
|
|
|
+ </if>
|
|
|
and ((IFNULL(task.start_date , task.end_date) between #{startDate} and #{endDate}) or (task.end_date between #{startDate} and #{endDate}))
|
|
|
and task.end_date is not null
|
|
|
AND project.`status` = 1
|
|
@@ -2796,9 +2814,12 @@
|
|
|
<select id="getTaskPlanByProjectManager" resultType="java.util.Map">
|
|
|
SELECT task.executor_id as user_id, task.executor_name as `name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId
|
|
|
- ,task.task_status as taskStatus,task.id as taskId,
|
|
|
+ ,task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task.plan_hours as duration FROM project
|
|
|
LEFT JOIN task ON task.project_id = project.id
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ LEFT JOIN task_group tg ON tg.project_id = project.id
|
|
|
+ </if>
|
|
|
WHERE project.company_id = #{companyId}
|
|
|
<if test="projectIds != null">
|
|
|
and project.`id` IN
|
|
@@ -2806,6 +2827,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ and tg.name = #{groupName} and task.group_id=tg.id
|
|
|
+ </if>
|
|
|
+ <if test="taskType !=null ">
|
|
|
+ and task.task_type = #{taskType}
|
|
|
+ </if>
|
|
|
and ((IFNULL(task.start_date , task.end_date) between #{startDate} and #{endDate}) or (task.end_date between #{startDate} and #{endDate}))
|
|
|
and task.end_date is not null and task.is_task_plan=1 and task.task_status=3 and task.check_first_id=#{managerId}
|
|
|
AND project.`status` = 1
|
|
@@ -2814,9 +2841,12 @@
|
|
|
<select id="getTaskPlanByProjectAreaManager" resultType="java.util.Map">
|
|
|
SELECT task.executor_id as user_id, task.executor_name as `name`,project.id, project.`project_name`,task.id as task_id, task.name as task_name,
|
|
|
task.task_plan_type as taskPlanType,task.is_task_plan as isTaskPlan,task.check_first_id as checkFirstId,task.check_second_id as checkSecondId
|
|
|
- ,task.task_status as taskStatus,task.id as taskId,
|
|
|
+ ,task.task_status as taskStatus,task.id as taskId,task.task_plan taskPlan,
|
|
|
IFNULL(task.`start_date`, task.end_date) as start_date, task.`end_date`, task.plan_hours as duration FROM project
|
|
|
LEFT JOIN task ON task.project_id = project.id
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ LEFT JOIN task_group tg ON tg.project_id = project.id
|
|
|
+ </if>
|
|
|
WHERE project.company_id = #{companyId}
|
|
|
<if test="projectIds != null">
|
|
|
and project.`id` IN
|
|
@@ -2824,6 +2854,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="groupName !=null and groupName !='' ">
|
|
|
+ and tg.name = #{groupName} and task.group_id=tg.id
|
|
|
+ </if>
|
|
|
+ <if test="taskType !=null ">
|
|
|
+ and task.task_type = #{taskType}
|
|
|
+ </if>
|
|
|
and ((IFNULL(task.start_date , task.end_date) between #{startDate} and #{endDate}) or (task.end_date between #{startDate} and #{endDate}))
|
|
|
and task.end_date is not null and task.is_task_plan=1 and task.task_status=4 and task.check_second_id=#{managerId}
|
|
|
AND project.`status` = 1
|