diff --git a/app/Services/DoctorAccountService.php b/app/Services/DoctorAccountService.php index f7f4075..414dc87 100644 --- a/app/Services/DoctorAccountService.php +++ b/app/Services/DoctorAccountService.php @@ -665,7 +665,7 @@ class DoctorAccountService extends BaseService } // 验证订单状态 - if ($order_service_package['order_service_status'] != 4 || $order_service_package['order_service_status'] != 5) { + if ($order_service_package['order_service_status'] != 4 && $order_service_package['order_service_status'] != 5) { return fail(HttpEnumCode::HTTP_ERROR, "提现失败"); } @@ -695,19 +695,35 @@ class DoctorAccountService extends BaseService } // 计算本次问诊服务包问诊金额 - $amount_total = bcadd( - (string)$amount_total, - bcsub( - bcmul( - (string)$order_service_package_detail['service_count'], - (string)$order_service_package_detail['single_inquiry_price'], + if ($order['order_type'] == 4){ + // 随访包 + $amount_total = bcadd( + (string)$amount_total, + bcsub( + (string)$order_service_package_detail['service_price'], + $refund_total, 3 ), - $refund_total, 3 - ), - 3 - ); + ); + } + + if ($order['order_type'] == 5){ + // 健康包 + $amount_total = bcadd( + (string)$amount_total, + bcsub( + bcmul( + (string)$order_service_package_detail['service_count'], + (string)$order_service_package_detail['single_inquiry_price'], + 3 + ), + $refund_total, + 3 + ), + 3 + ); + } } }