*/ public function toArray(Request $request = null): array { if (empty($this->resource)) { return []; } return [ // 总金额 'total_amt' => (float) $this->resource['TotalAmount'], // 减免金额 'medical_amt' => (float) $this->resource['MedicareAmount'], // 现金金额 'pay_amt' => (float) $this->resource['PayAmount'], // 个人账户支付金额 'account_amt' => (float) $this->resource['AccountAmount'], // 其他优惠金额 'other_amt' => 0, // 加收费费用描述 'extra_fee_desc' => $this->resource['ExtraFeeDesc'] ?? '' ]; } }