...
|
...
|
@@ -132,9 +132,12 @@ func (d *TaskAnomalyDao) List1(userId int, companyId int, taskName string, categ |
|
|
// userId 谁要查看数据
|
|
|
// companyId 公司id
|
|
|
// dayTime 搜索条件日期 ,例:"2006-01-02"
|
|
|
// taskName 任务名称
|
|
|
// category 异常分类
|
|
|
// pageSize 分页大小
|
|
|
// pageNumber 分页页码
|
|
|
func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, category int, leaderId string, dayTime string, limit int, offset int) (int, []ListTaskAnomaly, error) {
|
|
|
// subLevel 我的下级的层级
|
|
|
func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, category int, leaderId string, dayTime string, subLevel int, limit int, offset int) (int, []ListTaskAnomaly, error) {
|
|
|
sqlStr1 := `with
|
|
|
-- 人员自身以及全下级
|
|
|
recursive t_user as (
|
...
|
...
|
@@ -172,7 +175,7 @@ func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, categ |
|
|
and t_task_ignore.id isnull
|
|
|
and task.deleted_at isnull
|
|
|
and task.leader ->>'id' in (
|
|
|
select t_user.id::text from t_user where t_user."level">0
|
|
|
select t_user.id::text from t_user where t_user."level"=?
|
|
|
)
|
|
|
)
|
|
|
select
|
...
|
...
|
@@ -232,7 +235,7 @@ func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, categ |
|
|
and t_task_ignore.id isnull
|
|
|
and task.deleted_at isnull
|
|
|
and task.leader ->>'id' in (
|
|
|
select t_user.id::text from t_user where t_user."level">0
|
|
|
select t_user.id::text from t_user where t_user."level"=?
|
|
|
)
|
|
|
)
|
|
|
select count(*) as cnt
|
...
|
...
|
|