增加站内、短信订阅消息推送,修改所有消息推送入参
This commit is contained in:
@@ -73,6 +73,16 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
return Result::ACK;// 销毁
|
||||
}
|
||||
|
||||
// 获取问诊订单数据
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)) {
|
||||
Db::rollBack();
|
||||
Log::getInstance()->error("分配药师队列执行结束:缺少问诊订单数据");
|
||||
return Result::ACK;// 销毁
|
||||
}
|
||||
|
||||
Db::beginTransaction();
|
||||
try {
|
||||
// 分配药师
|
||||
@@ -84,7 +94,7 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
Log::getInstance()->error("分配药师队列执行失败:药师数据错误");
|
||||
|
||||
// 分配失败,按照驳回处理
|
||||
$this->reject($data['order_prescription_id'], $user_doctor['user_id'], $user_patient['user_id'], $order_prescription['order_inquiry_id']);
|
||||
$this->reject($data['order_prescription_id'], $user_doctor['user_id'], $user_patient['user_id'], $order_inquiry['inquiry_no']);
|
||||
|
||||
return Result::DROP;// 销毁
|
||||
}
|
||||
@@ -103,7 +113,7 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
Log::getInstance()->error("分配药师队列执行失败原因:" . $e->getMessage());
|
||||
|
||||
// 分配失败,按照驳回处理
|
||||
$this->reject($data['order_prescription_id'], $user_doctor['user_id'],$user_patient['user_id'], $order_prescription['order_inquiry_id']);
|
||||
$this->reject($data['order_prescription_id'], $user_doctor['user_id'],$user_patient['user_id'], $order_inquiry['inquiry_no']);
|
||||
|
||||
return Result::DROP; // 重回队列
|
||||
}
|
||||
@@ -118,12 +128,10 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
* @param string $order_prescription_id
|
||||
* @param string $doctor_user_id
|
||||
* @param string $patient_user_id
|
||||
* @param string $order_inquiry_id
|
||||
* @param string $inquiry_no
|
||||
* @return void
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function reject(string $order_prescription_id, string $doctor_user_id, string $patient_user_id, string $order_inquiry_id): void
|
||||
public function reject(string $order_prescription_id, string $doctor_user_id, string $patient_user_id, string $inquiry_no): void
|
||||
{
|
||||
try {
|
||||
$params = array();
|
||||
@@ -137,11 +145,11 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
OrderPrescription::edit($params, $data);
|
||||
|
||||
// 医生-开具的处方审核未通过
|
||||
$MessagePush = new MessagePush($doctor_user_id, $order_inquiry_id);
|
||||
$MessagePush = new MessagePush($doctor_user_id, $inquiry_no);
|
||||
$MessagePush->prescriptionVerifyFail($order_prescription_id);
|
||||
|
||||
// 患者-处方审核未通过
|
||||
$MessagePush = new MessagePush($patient_user_id, $order_inquiry_id);
|
||||
$MessagePush = new MessagePush($patient_user_id, $inquiry_no);
|
||||
$MessagePush->patientPrescriptionVerifyFail();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user