...
|
...
|
@@ -228,8 +228,6 @@ func (d *TaskDao) TaskStageAnomalyByLeader(leaderId []string) ([]TaskData3, erro |
|
|
from task where 1=1
|
|
|
and task.deleted_at isnull
|
|
|
and (
|
|
|
task.last_stage ->>'planCompletedAt'< task.last_stage ->>'realCompletedAt'
|
|
|
or
|
|
|
cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int) between 1 and floor(extract(epoch from now()))
|
|
|
)
|
|
|
and task.leader ->>'id' in(?) `
|
...
|
...
|
@@ -251,8 +249,6 @@ func (d *TaskDao) TaskStageAnomalyByRelatedUser(relatedUserId int) ([]TaskData3, |
|
|
from task where 1=1
|
|
|
and task.deleted_at isnull
|
|
|
and (
|
|
|
task.last_stage ->>'planCompletedAt'< task.last_stage ->>'realCompletedAt'
|
|
|
or
|
|
|
cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int) between 1 and floor(extract(epoch from now()))
|
|
|
)
|
|
|
and task.related_user @>? `
|
...
|
...
|
@@ -405,8 +401,6 @@ func (d TaskDao) TaskStageAnomalyAll() ([]TaskData4, error) { |
|
|
from task where 1=1
|
|
|
and task.deleted_at isnull
|
|
|
and (
|
|
|
task.last_stage ->>'planCompletedAt'< task.last_stage ->>'realCompletedAt'
|
|
|
or
|
|
|
cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int) between 1 and floor(extract(epoch from now()))
|
|
|
) `
|
|
|
result := []TaskData4{}
|
...
|
...
|
|