['cost_project_id'], '%like%' => ['superior_sort', 'name'], ]; } /** * @notes 获取造价项目台账列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/02/21 09:23 */ public function lists(): array { return CostProject::where($this->searchWhere) ->field(['id', 'project_num', 'project_name', 'contract_id', 'types', 'industry', 'province', 'city', 'address', 'starting', 'endtime', 'jhgq', 'depar', 'principal', 'person', 'invest', 'budget', 'cost', 'approval', 'aunit', 'Acontact', 'acontactnum', 'date', 'generalize', 'note', 'remark', 'annex']) ->limit($this->limitOffset, $this->limitLength) ->with(['contract']) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取造价项目台账数量 * @return int * @author likeadmin * @date 2024/02/21 09:23 */ public function count(): int { return CostProject::where($this->searchWhere)->count(); } }