修改首页协程、修改闻着病例

This commit is contained in:
wucongxing 2023-04-19 17:44:52 +08:00
parent 2a6bd8dbae
commit b8a8c5d3ee
2 changed files with 19 additions and 13 deletions

View File

@ -137,6 +137,9 @@ class IndexService extends BaseService
// 获取banner
$banner = [];
co(function () use ($wg, &$banner) {
defer(function() use ($wg) {
$wg->done();
});
$params = array();
$params["app_type"] = 1;
$params["client_type"] = 1;
@ -148,45 +151,47 @@ class IndexService extends BaseService
$item['banner_path'] = addAliyunOssWebsite($item['banner_path']);
}
}
// 计数器减一
$wg->done();
});
// 获取模块
$module = [];
co(function () use ($wg, &$module) {
defer(function() use ($wg) {
$wg->done();
});
$params = array();
$params["app_type"] = 1;
$params["client_type"] = 1;
$params["module_place"] = 1;
$params["module_status"] = 1;
$module = ModuleModel::getList($params);
// 计数器减一
$wg->done();
});
// 我的医生
$my_doctor = [];
co(function () use ($wg, &$my_doctor,$user_info) {
defer(function() use ($wg) {
$wg->done();
});
$PatientDoctorService = new PatientDoctorService();
if (!empty($user_info)) {
$my_doctor = $PatientDoctorService->getIndexPatientDoctorLimit($user_info['client_user_id']);
}
// 计数器减一
$wg->done();
});
// 推荐医生
$recommend_doctor = [];
co(function () use ($wg, &$recommend_doctor) {
defer(function() use ($wg) {
$wg->done();
});
$PatientDoctorService = new PatientDoctorService();
$recommend_doctor = $PatientDoctorService->getIndexRecommendDoctorLimit();
// 计数器减一
$wg->done();
});
$wg->wait();

View File

@ -81,8 +81,8 @@ class InquiryService extends BaseService
return fail(HttpEnumCode::HTTP_ERROR, "请您到线下问诊");
}
// 是否存在禁忌
if (empty($request_params['is_taboo'])) {
// 是否服用过禁忌药物且无相关禁忌0:否 1:是)问诊购药时存在
if ($request_params['is_taboo'] == 0) {
return fail(HttpEnumCode::HTTP_ERROR, "无法为您开具药物");
}
@ -377,7 +377,8 @@ class InquiryService extends BaseService
$params['family_id'] = $order_inquiry_case['family_id'];
$patient_family_health = PatientFamilyHealth::getOne($params);
$order_inquiry_case['diagnosis_hospital'] = $patient_family_health['diagnosis_hospital'] ?? "";
$order_inquiry_case['drugs_name'] = $patient_family_health['drugs_name'] ?? "";
$order_inquiry_case['is_take_medicine'] = $patient_family_health['is_take_medicine'] ?: 0;
$order_inquiry_case['drugs_name'] = $patient_family_health['drugs_name'] ?: "";
// 获取患者家庭成员信息表-个人情况
$params = array();