From 56e484ae2301fa8eb97ad38984b0bf34b64d61a1 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Wed, 26 Jun 2024 09:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8F=90=E7=8E=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20=E5=A2=9E=E5=8A=A0=E5=8F=AF=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=B72?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/DoctorAccountService.php | 38 +++++++++++++++++++-------- 1 file changed, 27 insertions(+), 11 deletions(-) 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 + ); + } } }