|
@@ -41,10 +41,30 @@
|
|
|
order by department
|
|
|
</select>
|
|
|
<select id="getTaskList" resultType="com.tofly.pms.working.entity.TaskW">
|
|
|
- select * from business.tf_pm_task_w
|
|
|
- where deleted = 0
|
|
|
- and head_id = #{userId}
|
|
|
- and plan_end_date like concat(#{month},'%')
|
|
|
+ select a.*,tasktime.compete_time commitDate from business.tf_pm_task_w a
|
|
|
+ left join (
|
|
|
+ SELECT
|
|
|
+ task_id,
|
|
|
+ CASE
|
|
|
+
|
|
|
+ WHEN bh_time > compete_time THEN
|
|
|
+ bh_time ELSE compete_time
|
|
|
+ END
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ task_id,
|
|
|
+ MAX ( CASE WHEN source_status = '2' THEN create_date END ) compete_time,
|
|
|
+ MAX ( CASE WHEN source_status = '4' THEN create_date END ) bh_time
|
|
|
+ FROM
|
|
|
+ TF_PM_TASKLOG_W
|
|
|
+ GROUP BY
|
|
|
+ task_id
|
|
|
+ ) a
|
|
|
+ ) tasktime on a.id =tasktime.task_id
|
|
|
+ where deleted = 0
|
|
|
+ and head_id = #{userId}
|
|
|
+ and plan_end_date like concat(#{month},'%')
|
|
|
</select>
|
|
|
<select id="getRejectCount" resultType="java.lang.Long">
|
|
|
select count(1) from business.tf_pm_tasklog_w
|