['uid', 'from_did', 'to_did', 'status', 'move_time'], ]; } /** * @notes 获取人事调动列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/05/22 17:55 */ public function lists(): array { return OaDepartmentChange::where($this->searchWhere) ->field(['id', 'uid', 'from_did', 'to_did', 'remark', 'admin_id', 'status', 'move_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ $data['user_name'] = $data->user_name; $data['from_dept'] = $data->from_dept; $data['to_dept'] = $data->to_dept; $data['status_text'] = $data->status_text; }) ->toArray(); } /** * @notes 获取人事调动数量 * @return int * @author likeadmin * @date 2024/05/22 17:55 */ public function count(): int { return OaDepartmentChange::where($this->searchWhere)->count(); } }