From 46f138bdcc98a81994776a0c22e06e955020c2fa Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Fri, 19 May 2023 14:13:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8D=AF=E5=93=81?= =?UTF-8?q?=E8=BF=90=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientOrderService.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index a7b0e51..3d16e6d 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1008,19 +1008,24 @@ class PatientOrderService extends BaseService return fail(HttpEnumCode::HTTP_ERROR, "存在库存不足商品", $not_enough_product_ids); } - // 获取运费金额 - $Prescription = new Prescription(); + $app_env = config('app_env','prod'); + if ($app_env != "dev"){ + // 获取运费金额 + $Prescription = new Prescription(); - $result = $Prescription->getLogisticsFee(); - if ($amount_total >= $result['drugCost']){ - $logistics_fee = 0; - }else{ - $logistics_fee = $result['freight']; + $result = $Prescription->getLogisticsFee(); + if ($amount_total >= $result['drugCost']){ + $logistics_fee = 0; + }else{ + $logistics_fee = $result['freight']; + } + + // 实际支付金额 + $payment_amount_total = $amount_total + $logistics_fee; } - // 实际支付金额 - $payment_amount_total = $amount_total + $logistics_fee; - if (env("APP_ENV") == "dev"){ + if ($app_env == "dev"){ + $logistics_fee = 0; $payment_amount_total = 0.01; } From 593ca490ec4574f0d156074d0201a1822e1906ae Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Fri, 19 May 2023 14:15:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=91=E7=AE=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/ReportPreProductOrderCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Command/ReportPreProductOrderCommand.php b/app/Command/ReportPreProductOrderCommand.php index 0efc510..dcd829f 100644 --- a/app/Command/ReportPreProductOrderCommand.php +++ b/app/Command/ReportPreProductOrderCommand.php @@ -70,7 +70,7 @@ class ReportPreProductOrderCommand extends HyperfCommand $this->saveOrderProductPeportPreStatus($item['order_product_id'],2,"超出最大上报次数"); // 修改失败时药品订单数据 - $this->savePreFailedOrderStatus($item['order_product_id'],"复核失败"); + $this->savePreFailedOrderStatus($item['order_product_id'],"药房处方复核失败,平台会在24小时内进行退款处理"); // 退款 $OrderProductService = new OrderProductService();