...
|
...
|
@@ -795,8 +795,17 @@ select |
|
|
from task where 1=1
|
|
|
and task.deleted_at isnull
|
|
|
and task.company_id=?
|
|
|
and (task.assist_flag+task.warn_flag +task.anomaly)>0
|
|
|
and (task.leader ->>'id' in(?) or task.related_user @>?)
|
|
|
and (
|
|
|
(task.warn_flag +task.anomaly)>0
|
|
|
or
|
|
|
task.assist_flag>task.assist_flag_max
|
|
|
)
|
|
|
and not (
|
|
|
task.current_stage ->>'id'='0'
|
|
|
and
|
|
|
task.last_stage ->>'id'<>'0'
|
|
|
)
|
|
|
`
|
|
|
|
|
|
relatedUser := fmt.Sprintf("[%d]", relatedUserId)
|
...
|
...
|
|