['patient_name'], '=' => ['patient_id', 'gender', 'diagnosis_type', 'syndrome_type', 'assistant_id', 'status'], 'between_time' => ['diagnosis_date'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function lists(): array { $lists = Diagnosis::where($this->searchWhere) ->field(['id', 'patient_id', 'patient_name', 'id_card', 'phone', 'gender', 'age', 'diagnosis_date', 'diagnosis_type', 'syndrome_type', 'assistant_id', 'status', 'create_time', 'update_time']) ->append(['gender_desc', 'status_desc', 'diagnosis_date_text']) ->order(['id' => 'desc']) ->limit($this->limitOffset, $this->limitLength) ->select() ->toArray(); return $lists; } /** * @notes 获取数量 * @return int */ public function count(): int { return Diagnosis::where($this->searchWhere)->count(); } }