@@ -252,8 +252,7 @@ class BasicDataService extends BaseService
|
||||
if (isset($pharmacy_id) && $pharmacy_id !== '') {
|
||||
$pharmacy = Pharmacy::getValidPharmacy($pharmacy_id);
|
||||
} else {
|
||||
$defaultPharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($doctor_id);
|
||||
$pharmacy = ($defaultPharmacy && $defaultPharmacy->Pharmacy && $defaultPharmacy->Pharmacy->status == 1) ? $defaultPharmacy->Pharmacy : null;
|
||||
$pharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($doctor_id);
|
||||
}
|
||||
|
||||
if (empty($pharmacy) || empty($pharmacy->pharmacy_code)) {
|
||||
@@ -477,8 +476,7 @@ class BasicDataService extends BaseService
|
||||
if (isset($pharmacy_id) && $pharmacy_id !== '') {
|
||||
$pharmacy = Pharmacy::getValidPharmacy($pharmacy_id);
|
||||
} else {
|
||||
$defaultPharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($doctor_id);
|
||||
$pharmacy = ($defaultPharmacy && $defaultPharmacy->Pharmacy && $defaultPharmacy->Pharmacy->status == 1) ? $defaultPharmacy->Pharmacy : null;
|
||||
$pharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($doctor_id);
|
||||
}
|
||||
|
||||
if (empty($pharmacy) || empty($pharmacy->pharmacy_code)) {
|
||||
|
||||
@@ -1204,16 +1204,16 @@ class UserDoctorService extends BaseService
|
||||
// 校验医生是否已配置有效的默认药房
|
||||
$doctor_id = $user_info['client_user_id'] ?? 0;
|
||||
$default_pharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($doctor_id);
|
||||
if (empty($default_pharmacy) || empty($default_pharmacy->Pharmacy) || $default_pharmacy->Pharmacy->status != 1 || empty($default_pharmacy->Pharmacy->pharmacy_code)) {
|
||||
if (empty($default_pharmacy)) {
|
||||
$result['status'] = 2;
|
||||
$result['message'] = "您尚未配置默认药房或药房已停用,请前往【我的-药房设置】完成绑定后再开具处方";
|
||||
$result['message'] = "您尚未配置默认药房或药房已停用,请联系客服人员完成绑定后再开具处方";
|
||||
return success($result);
|
||||
}
|
||||
|
||||
$result['data']['default_pharmacy'] = [
|
||||
'pharmacy_id' => (string)$default_pharmacy->Pharmacy->pharmacy_id,
|
||||
'pharmacy_code' => $default_pharmacy->Pharmacy->pharmacy_code,
|
||||
'pharmacy_name' => $default_pharmacy->Pharmacy->pharmacy_name,
|
||||
'pharmacy_id' => (string)$default_pharmacy->pharmacy_id,
|
||||
'pharmacy_code' => $default_pharmacy->pharmacy_code,
|
||||
'pharmacy_name' => $default_pharmacy->pharmacy_name,
|
||||
];
|
||||
|
||||
$params = array();
|
||||
@@ -1486,10 +1486,7 @@ class UserDoctorService extends BaseService
|
||||
if (isset($input_pharmacy_id) && $input_pharmacy_id !== '') {
|
||||
$pharmacy = Pharmacy::getValidPharmacy($input_pharmacy_id);
|
||||
} else {
|
||||
$doctor_default = DoctorPharmacy::getDoctorDefaultPharmacy($user_info['client_user_id'] ?? 0);
|
||||
if ($doctor_default && $doctor_default->Pharmacy && $doctor_default->Pharmacy->status == 1) {
|
||||
$pharmacy = $doctor_default->Pharmacy;
|
||||
}
|
||||
$pharmacy = DoctorPharmacy::getDoctorDefaultPharmacy($user_info['client_user_id'] ?? 0);
|
||||
}
|
||||
|
||||
if (empty($pharmacy) || empty($pharmacy['pharmacy_code'])) {
|
||||
|
||||
Reference in New Issue
Block a user