新增订阅消息推送-医生-医生有新问诊,医生超时未接诊
This commit is contained in:
@@ -552,7 +552,7 @@ class ImService extends BaseService
|
||||
* @param string $patient_user_id
|
||||
* @return void
|
||||
*/
|
||||
public function pharmacistVerify(array|object $order_inquiry, string $order_prescription_id,string $product_name,string $doctor_user_id, string $patient_user_id): void
|
||||
public function pharmacistVerify(array|object $order_inquiry, string $order_prescription_id, string $product_name, string $doctor_user_id, string $patient_user_id): void
|
||||
{
|
||||
try {
|
||||
// 发送消息
|
||||
@@ -573,7 +573,7 @@ class ImService extends BaseService
|
||||
$message_content_data['data']['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = $order_prescription_id;
|
||||
$message_content_data['data']['product_name'] = $product_name ?: "药品";
|
||||
$message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s',time());;
|
||||
$message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s', time());;
|
||||
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE),
|
||||
@@ -619,4 +619,46 @@ class ImService extends BaseService
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 横幅通知-医生有新问诊
|
||||
* @param array|object $order_inquiry
|
||||
* @param string $doctor_user_id 用户id
|
||||
* @return void
|
||||
*/
|
||||
public function bannerNoticeNewInquiry(array|object $order_inquiry, string $doctor_user_id): void
|
||||
{
|
||||
try {
|
||||
// 发送消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$cloud_custom_data['message_rounds'] = 0;
|
||||
$cloud_custom_data['patient_family_data']['patient_name'] = $order_inquiry['patient_name'];
|
||||
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_inquiry['patient_sex'];
|
||||
$cloud_custom_data['patient_family_data']['patient_age'] = $order_inquiry['patient_age'];
|
||||
|
||||
if ($order_inquiry['inquiry_type'] == 1 || $order_inquiry['inquiry_type'] == 3) {
|
||||
// 专家、公益
|
||||
$desc = "24小时内未接诊,平台将自动取消问诊";
|
||||
}else{
|
||||
// 快速、购药
|
||||
$desc = "5分钟内未接诊,平台将自动取消问诊";
|
||||
}
|
||||
|
||||
// 消息内容 医生-患者
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 1;
|
||||
$message_content_data['title'] = "您有一个新的问诊服务等待接诊";
|
||||
$message_content_data['desc'] = $desc;
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$this->sendMessage("", $doctor_user_id, $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
} catch (\Exception $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user