From 57816f58b4760fb00da4241d804e34ec28433bbd Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 27 Apr 2023 11:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E6=B5=81=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E4=BF=A1=E6=81=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../getPrescriptionOrderStatusCommand.php | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/Command/getPrescriptionOrderStatusCommand.php b/app/Command/getPrescriptionOrderStatusCommand.php index 1837aa7..a14388e 100644 --- a/app/Command/getPrescriptionOrderStatusCommand.php +++ b/app/Command/getPrescriptionOrderStatusCommand.php @@ -139,26 +139,26 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand // 订阅快递推送 $Kuaidi = new Kuaidi(); $Kuaidi->subscribe($result['deliveryId'],$logistics_company_code,$item['consignee_tel']); + + try { + // 获取患者数据 + $params = array(); + $params['patient_id'] = $order_prescription['patient_id']; + $user_patient = UserPatient::getOne($params); + if (empty($user_patient)){ + $this->line("推送消息错误:用户数据错误"); + } + + // 患者-药品已发货-订阅失败发送短信 + $MessagePush = new MessagePush($user_patient['user_id']); + $MessagePush->productDelivery($item['order_product_id']); + }catch (\Exception $e){ + $this->line("推送消息错误:" . $e->getMessage()); + } } // 修改成功时药品订单数据 $this->savePreSuccessOrderStatus($item,$result['deliveryId'],$logistics_company_code,$result['deliveryTime']); - - try { - // 获取患者数据 - $params = array(); - $params['patient_id'] = $order_prescription['patient_id']; - $user_patient = UserPatient::getOne($params); - if (empty($user_patient)){ - $this->line("推送消息错误:用户数据错误"); - } - - // 患者-药品已发货-订阅失败发送短信 - $MessagePush = new MessagePush($user_patient['user_id']); - $MessagePush->productDelivery($item['order_product_id']); - }catch (\Exception $e){ - $this->line("推送消息错误:" . $e->getMessage()); - } } $this->line("获取处方平台订单数据结束:处理完毕");