...
|
...
|
@@ -608,6 +608,7 @@ func (d TaskDao) TaskStageAnomalyAll(companyId int) ([]TaskData4, error) { |
|
|
}
|
|
|
|
|
|
type ListTask struct {
|
|
|
SortBy1 int `pg:"sort_by_1"`
|
|
|
CPlanCompletedAt int `pg:"c_plan_completed_at"`
|
|
|
LastStageDiff int `pg:"last_stage_diff"`
|
|
|
TaskId int `pg:"task_id"`
|
...
|
...
|
@@ -636,6 +637,7 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int) as c_plan_completed_at,
|
|
|
cast(COALESCE(task.last_stage ->>'plan_completed_at','0') as int) as l_plan_completed_at,
|
|
|
cast(COALESCE(task.last_stage ->>'real_completed_at','0') as int) as l_real_completed_at,
|
|
|
floor(extract(epoch from now())) as now_time,
|
|
|
task.id ,
|
|
|
task.alias ,
|
|
|
task.leader ->>'name' as leader_name,
|
...
|
...
|
@@ -647,7 +649,7 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
task.created_at
|
|
|
from task
|
|
|
left join t_task_ignore on t_task_ignore.task_id=task.id
|
|
|
where 1=1 and t_task_ignore.id isnull
|
|
|
where 1=1 and t_task_ignore.id isnull and task.company_id=?
|
|
|
%s
|
|
|
),
|
|
|
t_task_1 as (
|
...
|
...
|
@@ -659,7 +661,7 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
end) as sort_by_1,
|
|
|
t_task.c_plan_completed_at ,
|
|
|
t_task.l_plan_completed_at-t_task.l_real_completed_at as last_stage_diff,
|
|
|
t_task.id ,
|
|
|
t_task.id as task_id,
|
|
|
t_task.alias ,
|
|
|
t_task.leader_name,
|
|
|
t_task."level",
|
...
|
...
|
@@ -702,6 +704,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int) as c_plan_completed_at,
|
|
|
cast(COALESCE(task.last_stage ->>'plan_completed_at','0') as int) as l_plan_completed_at,
|
|
|
cast(COALESCE(task.last_stage ->>'real_completed_at','0') as int) as l_real_completed_at,
|
|
|
floor(extract(epoch from now())) as now_time,
|
|
|
task.id ,
|
|
|
task.alias ,
|
|
|
task.leader ->>'name' as leader_name,
|
...
|
...
|
@@ -713,7 +716,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
task.created_at
|
|
|
from task
|
|
|
join t_task_1 on t_task_1.id=task.id
|
|
|
where 1=1
|
|
|
where 1=1 and task.company_id=?
|
|
|
%s
|
|
|
),
|
|
|
t_task_1 as (
|
...
|
...
|
@@ -725,7 +728,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) |
|
|
end) as sort_by_1,
|
|
|
t_task.c_plan_completed_at ,
|
|
|
t_task.l_plan_completed_at-t_task.l_real_completed_at as last_stage_diff,
|
|
|
t_task.id ,
|
|
|
t_task.id as task_id,
|
|
|
t_task.alias ,
|
|
|
t_task.leader_name,
|
|
|
t_task."level",
|
...
|
...
|
|