修改药师分配人员
This commit is contained in:
parent
bb7ea260f3
commit
b428db8e99
@ -52,7 +52,7 @@ class AssignPharmacistConsumer extends ConsumerMessage
|
||||
|
||||
// 分配药师
|
||||
$params = array();
|
||||
$params['pharmacist_id'] = 3;
|
||||
$params['pharmacist_id'] = "534534546";
|
||||
$user_pharmacist = UserPharmacist::getOne($params);
|
||||
if (empty($user_pharmacist)){
|
||||
Db::rollBack();
|
||||
|
||||
@ -36,25 +36,42 @@ class TestController extends AbstractController
|
||||
// $this->test_6();
|
||||
// $this->test_9();
|
||||
// $this->test_10();
|
||||
$this->test_11();
|
||||
// $this->test_11();
|
||||
// $this->test_5();
|
||||
$this->test_1();
|
||||
}
|
||||
|
||||
// 获取云证书-首次
|
||||
public function test_1(){
|
||||
$ca = new Ca();
|
||||
|
||||
// $data = array();
|
||||
// $data['user_id'] = "491925054435950592";
|
||||
// $data['card_num'] = "410323199603261241";
|
||||
// $result = $ca->getCloudCert($data);
|
||||
//
|
||||
// $data = array();
|
||||
// $data['user_id'] = "491925054435950592";
|
||||
// $data['cert_base64'] = $result['certBase64'];
|
||||
// $data['cert_chain_p7'] = $result['certP7'];
|
||||
// $data['cert_serial_number'] = $result['certSerialnumber'];
|
||||
// $data['ca_pin'] = "491925054435950592";
|
||||
// $doctor_pharmacist_cert = DoctorPharmacistCert::addDoctorPharmacistCert($data);
|
||||
// if (empty($doctor_pharmacist_cert)){
|
||||
// return fail();
|
||||
// }
|
||||
|
||||
$data = array();
|
||||
$data['user_id'] = "491925054435950592";
|
||||
$data['card_num'] = "410323199603261241";
|
||||
$data['user_id'] = "534534546";
|
||||
$data['card_num'] = "410323199603261236";
|
||||
$result = $ca->getCloudCert($data);
|
||||
|
||||
$data = array();
|
||||
$data['user_id'] = "491925054435950592";
|
||||
$data['user_id'] = "534534546";
|
||||
$data['cert_base64'] = $result['certBase64'];
|
||||
$data['cert_chain_p7'] = $result['certP7'];
|
||||
$data['cert_serial_number'] = $result['certSerialnumber'];
|
||||
$data['ca_pin'] = "491925054435950592";
|
||||
$data['ca_pin'] = "534534546";
|
||||
$doctor_pharmacist_cert = DoctorPharmacistCert::addDoctorPharmacistCert($data);
|
||||
if (empty($doctor_pharmacist_cert)){
|
||||
return fail();
|
||||
|
||||
@ -1014,6 +1014,14 @@ class UserDoctorService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "处方已删除,无法更改");
|
||||
}
|
||||
|
||||
// 获取处方订单数据
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)){
|
||||
return fail(HttpEnumCode::SERVER_ERROR,"问诊订单数据为空");
|
||||
}
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
@ -1133,6 +1141,33 @@ class UserDoctorService extends BaseService
|
||||
$params['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
OrderPrescription::edit($params,$data);
|
||||
|
||||
// 发送消息
|
||||
$ImService = new ImService();
|
||||
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_prescription['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'];
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 6;
|
||||
$message_content_data['title'] = "处方已开具";
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = $order_prescription['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' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$ImService->sendMessage($user_doctor['user_id'], $order_inquiry['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
|
||||
// 加入分配药师队列
|
||||
$data = array();
|
||||
$data['order_prescription_id'] = $order_prescription_id;
|
||||
@ -1328,6 +1363,33 @@ class UserDoctorService extends BaseService
|
||||
$params['order_prescription_id'] = $order_prescription->order_prescription_id;
|
||||
OrderPrescription::edit($params,$data);
|
||||
|
||||
// 发送消息
|
||||
$ImService = new ImService();
|
||||
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_prescription['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'];
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 6;
|
||||
$message_content_data['title'] = "处方已开具";
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = $order_prescription['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' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$ImService->sendMessage($user_doctor['user_id'], $order_inquiry['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
|
||||
// 加入分配药师队列
|
||||
$data = array();
|
||||
$data['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
|
||||
@ -209,7 +209,13 @@ class UserPharmacistService extends BaseService
|
||||
|
||||
OrderPrescription::edit($params,$data);
|
||||
|
||||
|
||||
// 药师ca签章
|
||||
$OrderPrescriptionService = new OrderPrescriptionService();
|
||||
$prescription_open_result = $OrderPrescriptionService->openPrescription($order_prescription['order_prescription_id'],$user_info['user_id']);
|
||||
if (empty($prescription_open_result['prescription_img_url']) || empty($prescription_open_result['prescription_pdf_url'])){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR, "处方审核失败");
|
||||
}
|
||||
|
||||
|
||||
// 发送消息
|
||||
@ -227,8 +233,8 @@ class UserPharmacistService extends BaseService
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 6;
|
||||
$message_content_data['title'] = "处方审核通过";
|
||||
$message_content_data['message_type'] = 7;
|
||||
$message_content_data['title'] = "处方已开具";
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user