['new_start_project_id'], ]; } /** * @notes 获取项目咨询--项目组工作开展情况列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/03/11 10:27 */ public function lists(): array { return ConsultProjectEvolve::where($this->searchWhere) ->field(['id', 'new_start_project_id', 'name', 'progress_status', 'resp_user']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($data) { $admin = Admin::field('name')->where('id', $data['resp_user'])->findOrEmpty(); $data['resp_user_name'] = $admin?->name; }) ->toArray(); } /** * @notes 获取项目咨询--项目组工作开展情况数量 * @return int * @author likeadmin * @date 2024/03/11 10:27 */ public function count(): int { return ConsultProjectEvolve::where($this->searchWhere)->count(); } }