作者 tangxvhui

排除已删除的task

@@ -319,6 +319,7 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er @@ -319,6 +319,7 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er
319 join t_task_1 on task.id =t_task_1.id 319 join t_task_1 on task.id =t_task_1.id
320 where 1=1 320 where 1=1
321 and task.company_id =? 321 and task.company_id =?
  322 + and task.deleted_at isnull
322 and ( 323 and (
323 cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int)<floor(extract(epoch from now())) 324 cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int)<floor(extract(epoch from now()))
324 or 325 or
@@ -352,6 +353,7 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err @@ -352,6 +353,7 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err
352 left join t_task_ignore on t_task_ignore.task_id=task.id 353 left join t_task_ignore on t_task_ignore.task_id=task.id
353 where 1=1 354 where 1=1
354 and task.company_id =? 355 and task.company_id =?
  356 + and task.deleted_at isnull
355 and t_task_ignore.id isnull 357 and t_task_ignore.id isnull
356 and ( 358 and (
357 cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int)<floor(extract(epoch from now())) 359 cast(COALESCE(task.current_stage ->>'plan_completed_at','0') as int)<floor(extract(epoch from now()))
@@ -657,6 +659,7 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -657,6 +659,7 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error)
657 from task 659 from task
658 left join t_task_ignore on t_task_ignore.task_id=task.id 660 left join t_task_ignore on t_task_ignore.task_id=task.id
659 where 1=1 and t_task_ignore.id isnull and task.company_id=? 661 where 1=1 and t_task_ignore.id isnull and task.company_id=?
  662 + and task.deleted_at isnull
660 %s 663 %s
661 ), 664 ),
662 t_task_1 as ( 665 t_task_1 as (
@@ -727,7 +730,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -727,7 +730,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
727 task.created_at 730 task.created_at
728 from task 731 from task
729 join t_task_1 on t_task_1.id=task.id 732 join t_task_1 on t_task_1.id=task.id
730 - where 1=1 and task.company_id=? 733 + where 1=1 and task.company_id=? and task.deleted_at isnull
731 %s 734 %s
732 ), 735 ),
733 tt_task_1 as ( 736 tt_task_1 as (