['fee_application_id', 'subject_category'], ]; } /** * @notes 获取财务管理--费用申请--申请明细列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/03/27 14:53 */ public function lists(): array { return FinancialFeeApplicationDetail::withoutField('create_time,update_time,delete_time')->where($this->searchWhere) ->field(['id', 'fee_application_id', 'subject_category', 'bill_num', 'amount', 'remark']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($data) { $data['subject_category_text'] = $data->subject_category_text; $data['subject_category'] = (string)$data['subject_category']; }) ->toArray(); } /** * @notes 获取财务管理--费用申请--申请明细数量 * @return int * @author likeadmin * @date 2024/03/27 14:53 */ public function count(): int { return FinancialFeeApplicationDetail::where($this->searchWhere)->count(); } }