新增 获取检测机构合作医生列表 接口
This commit is contained in:
parent
548e0cb980
commit
33c7cb98c5
@ -77,8 +77,12 @@ class DetectionService extends BaseService
|
||||
*/
|
||||
public function getDetectionDoctorList(): array
|
||||
{
|
||||
$company_id = $this->request->input("company_id",1);
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
$company_id = $this->request->input("company_id",1);
|
||||
$province_id = $this->request->input("province_id");
|
||||
$city_id = $this->request->input("city_id");
|
||||
$county_id = $this->request->input("county_id");
|
||||
|
||||
|
||||
// 获取合作公司数据
|
||||
$params = array();
|
||||
@ -104,6 +108,7 @@ class DetectionService extends BaseService
|
||||
// 搜索数据
|
||||
$hospital_params = array();
|
||||
|
||||
if (empty($province_id) && empty($city_id) && empty($county_id)){
|
||||
// 获取用户定位地址数据
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
@ -154,6 +159,51 @@ class DetectionService extends BaseService
|
||||
}
|
||||
}
|
||||
}
|
||||
} else{
|
||||
if (!empty($province_id)){
|
||||
$params = array();
|
||||
$params['area_id'] = $province_id;
|
||||
$params['area_type'] = 2;
|
||||
$area_province = Area::getOne($params);
|
||||
if (!empty($area_province)){
|
||||
$response_data['area']['province_id'] = $area_province['area_id'];
|
||||
$response_data['area']['province'] = $area_province['area_name'];
|
||||
|
||||
// 搜索条件
|
||||
$hospital_params['province_id'] = $area_province['area_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($response_data['area']['province_id']) && !empty($city_id)){
|
||||
$params = array();
|
||||
$params['area_id'] = $city_id;
|
||||
$params['parent_id'] = $response_data['area']['province_id'];
|
||||
$params['area_type'] = 3;
|
||||
$area_city = Area::getOne($params);
|
||||
if (!empty($area_city)){
|
||||
$response_data['area']['city_id'] = $area_city['area_id'];
|
||||
$response_data['area']['city'] = $area_city['area_name'];
|
||||
|
||||
// 搜索条件
|
||||
$hospital_params['city_id'] = $area_city['area_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($response_data['area']['city_id']) && !empty($county_id)){
|
||||
$params = array();
|
||||
$params['area_id'] = $county_id;
|
||||
$params['parent_id'] = $response_data['area']['city_id'];
|
||||
$params['area_type'] = 4;
|
||||
$area_county = Area::getOne($params);
|
||||
if (!empty($area_county)){
|
||||
$response_data['area']['county_id'] = $area_county['area_id'];
|
||||
$response_data['area']['county'] = $area_county['area_name'];
|
||||
|
||||
// 搜索条件
|
||||
$hospital_params['county_id'] = $area_county['area_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取医生
|
||||
$params = array();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user