['except' => []] ]; //获取部门 public function get_department() { $department = get_department(); return to_assign(0, '', $department); } //获取部门树形节点列表 public function get_department_tree() { $department = get_department(); $list = get_tree($department, 0, 2); $data['trees'] = $list; $this->apiSuccess('获取成功', $data); } //获取子部门所有员工 public function get_employee($did = 0) { $did = get_params('did'); if($did == 1){ $department = $did; } else{ $department = get_department_son($did); } $employee = Db::name('admin') ->field('a.id,a.did,a.position_id,a.mobile,a.name,a.nickname,a.sex,a.status,a.thumb,a.username,d.title as department') ->alias('a') ->join('Department d', 'a.did = d.id') ->where(['a.status' => 1]) ->where('a.id', ">", 1) ->where('a.did', "in", $department) ->select(); $this->apiSuccess('获取成功', $employee); } //获取报销类型 public function get_expense_cate() { $expense_cate = Db::name('ExpenseCate')->where(['status' => 1])->field(['id', 'title'])->select()->toArray(); $this->apiSuccess('获取成功', $expense_cate); } }