update
This commit is contained in:
parent
69ad910a1a
commit
4cebdc52cd
@ -498,14 +498,20 @@
|
||||
}
|
||||
return $item;
|
||||
})->toArray();
|
||||
$count = Db::name('oa_approve')->where($map)->count();
|
||||
$count = Db::name('oa_approve')
|
||||
->field('f.*,a.name,d.name as department_name,t.title as flow_type')
|
||||
->alias('f')
|
||||
->join('admin a', 'a.id = f.admin_id', 'left')
|
||||
->join('dept d', 'd.id = a.dept_id', 'left')
|
||||
->join('oa_flow_type t', 't.id = f.type', 'left')
|
||||
->where($map)->count();
|
||||
return $this->success('成功', compact('count', 'list', 'page_no', 'page_size'));
|
||||
}
|
||||
|
||||
public function lst(){
|
||||
$params = $this->request->get();
|
||||
$user_id = $this->adminId;
|
||||
$status = $params['status'] ?? 0;
|
||||
$status = !empty($params['status']) ? $params['status'] : 0;
|
||||
//查询条件
|
||||
$map1 = [];
|
||||
$map2 = [];
|
||||
@ -536,7 +542,13 @@
|
||||
}
|
||||
return $item;
|
||||
})->toArray();
|
||||
$count = Db::name('oa_approve')->whereOr([$map1,$map2])->count();
|
||||
$count = Db::name('oa_approve')
|
||||
->field('f.*,a.name,d.name as department_name,t.title as flow_type')
|
||||
->alias('f')
|
||||
->join('admin a', 'a.id = f.admin_id', 'left')
|
||||
->join('dept d', 'd.id = a.dept_id', 'left')
|
||||
->join('oa_flow_type t', 't.id = f.type', 'left')
|
||||
->whereOr([$map1,$map2])->count();
|
||||
}
|
||||
|
||||
if($status == 1){
|
||||
@ -559,7 +571,13 @@
|
||||
}
|
||||
return $item;
|
||||
})->toArray();
|
||||
$count = Db::name('oa_approve')->where($map1)->count();
|
||||
$count = Db::name('oa_approve')
|
||||
->field('f.*,a.name,d.name as department_name,t.title as flow_type')
|
||||
->alias('f')
|
||||
->join('admin a', 'a.id = f.admin_id', 'left')
|
||||
->join('dept d', 'd.id = a.dept_id', 'left')
|
||||
->join('oa_flow_type t', 't.id = f.type', 'left')
|
||||
->where($map1)->count();
|
||||
}
|
||||
if($status == 2){
|
||||
$list = Db::name('oa_approve')
|
||||
@ -581,7 +599,13 @@
|
||||
}
|
||||
return $item;
|
||||
})->toArray();
|
||||
$count = Db::name('oa_approve')->where($map2)->count();
|
||||
$count = Db::name('oa_approve')
|
||||
->field('f.*,a.name,d.name as department_name,t.title as flow_type')
|
||||
->alias('f')
|
||||
->join('admin a', 'a.id = f.admin_id', 'left')
|
||||
->join('dept d', 'd.id = a.dept_id', 'left')
|
||||
->join('oa_flow_type t', 't.id = f.type', 'left')
|
||||
->where($map2)->count();
|
||||
}
|
||||
return $this->success('成功', compact('count', 'list', 'page_no', 'page_size'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user