['industry', 'nature', 'project_level', 'engineering_status'], '%like%' => ['project_name', 'project_code', 'build_unit'], ]; } /** * @notes 获取工程监理--监理项目信息列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/02/23 09:52 */ public function lists(): array { return SupervisionProject::withoutField('create_user,create_time,update_time,delete_time')->where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ $data['industry_text'] = $data->industry_text; $data['nature_text'] = $data->nature_text; $data['build_area_text'] = $data->build_area_text; $data['project_level_text'] = $data->project_level_text; $data['engineering_status_text'] = $data->industry_text; }) ->toArray(); } /** * @notes 获取工程监理--监理项目信息数量 * @return int * @author likeadmin * @date 2024/02/23 09:52 */ public function count(): int { return SupervisionProject::where($this->searchWhere)->count(); } }