orderId,'处方审核被拒绝通知医生短信息发送队列start'); try { $this->setRequest(); $prescription = Prescription::find()->where([ 'id' => $this->orderId, 'status' => PrescriptionEnum::UNPASSED ])->with('doctorInfo')->one(); if (!$prescription) { throw new Exception('处方不存在'); } $serviceUser = ServiceUser::find()->where([ 'role' => 2, //药师 'status' => 2, //已审核 'is_delete' => 0 ])->asArray()->all(); if(!$serviceUser || count($serviceUser)==0){ throw new Exception('获取药师数据错误'); } (new SmsService())->sendPrescriptionRefuse($prescription->doctorInfo->mobile, [ 'prescription_no' => $prescription->prescription_no, 'reason' => $prescription->reject_reason ]); PrescriptionLog::saveLog($this->orderId,'处方审核被拒绝通知医生短信息发送队列end'); } catch (\Exception $exception) { PrescriptionLog::saveLog($this->orderId,'处方审核被拒绝通知医生短信息发送队列异常:'.$exception->getMessage()); return; } } }