From 8f86f155dc68fe67931c82427a69bcdd52723798 Mon Sep 17 00:00:00 2001 From: yanzai Date: Sun, 17 Aug 2025 16:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E8=AE=A2=E5=8D=95=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Services/OrderService.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Laravel/app/Services/OrderService.php b/Laravel/app/Services/OrderService.php index 56ae303..2d6b899 100644 --- a/Laravel/app/Services/OrderService.php +++ b/Laravel/app/Services/OrderService.php @@ -170,14 +170,7 @@ class OrderService //调用接口恢复积分和预存款 $env=config('app.globals.Env'); - if($orderInfo->appointment_number<>null and $orderInfo->appointment_number<>'' and strpos($orderInfo->source, '线下体检预约') !== false){ - $ap = new OrderController(); - $cancel = $ap->cancel_appointment($orderInfo->hospital_id, [ - 'type' => $orderInfo->type, - '预约Id' => $orderInfo->appointment_number - ]); - if ($cancel['code'] != 0) return ['status'=>false,'msg'=>"取消预约失败," . $cancel['message']]; - } + $AspNet=new AspNetZhuanController(); $jifen_huifu_status=true; @@ -248,6 +241,18 @@ class OrderService $up_plan = DB::table('plans')->where(['id' => $orderInfo->plan_id, 'status' => 2])->update([ 'status' => 1 ]); + if($orderInfo->appointment_number<>null and $orderInfo->appointment_number<>'' and strpos($orderInfo->source, '线下体检预约') !== false){ + $ap = new OrderController(); + $cancel = $ap->cancel_appointment($orderInfo->hospital_id, [ + 'type' => $orderInfo->type, + '预约Id' => $orderInfo->appointment_number + ]); + $orderJson = json_encode($orderInfo, JSON_UNESCAPED_UNICODE); + $insert=DB::table('orders_delete')->insert(['order_info' =>$orderJson]); + if($insert){ + DB::table('orders')->where(['id' => $orderInfo->id])->delete(); + } + } return true; } public function Refund($id,$yuanyin='')