新增获取医生评价
This commit is contained in:
parent
6d2c0374a3
commit
6926137b5e
@ -84,4 +84,15 @@ class PatientDoctorController extends AbstractController
|
||||
$data = $PatientDoctorService->getDoctorList();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生评价
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getDoctorEvaluationList(): ResponseInterface
|
||||
{
|
||||
$PatientDoctorService = new PatientDoctorService();
|
||||
$data = $PatientDoctorService->getDoctorEvaluationList();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
@ -183,6 +183,7 @@ class PatientDoctorService extends BaseService
|
||||
"is_img_welfare_reception",
|
||||
"is_platform_deep_cooperation",
|
||||
"be_good_at",
|
||||
"brief_introduction",
|
||||
];
|
||||
|
||||
$params = array();
|
||||
@ -249,6 +250,26 @@ class PatientDoctorService extends BaseService
|
||||
$params[] = ['inquiry_status', '=', 3];
|
||||
$params[] = ['inquiry_refund_status', '=', 0];
|
||||
$value['order_inquiry_count'] = OrderInquiry::getCount($params);
|
||||
|
||||
// 获取系统问诊配置
|
||||
$fields = [
|
||||
'system_inquiry_config_id',
|
||||
'times_number',
|
||||
'duration',
|
||||
];
|
||||
|
||||
$params = array();
|
||||
$params['inquiry_type'] = $value['inquiry_type'];
|
||||
$params['inquiry_mode'] = $value['inquiry_mode'];
|
||||
$system_inquiry_config = SystemInquiryConfig::getOne($params,$fields);
|
||||
if (empty($system_inquiry_config)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
$value['times_number'] = $system_inquiry_config['times_number'];
|
||||
$value['duration'] = $system_inquiry_config['duration'];
|
||||
|
||||
unset($system_inquiry_config);
|
||||
}
|
||||
$result['doctor_inquiry_config'] = $doctor_inquiry_config;
|
||||
}
|
||||
@ -527,6 +548,33 @@ class PatientDoctorService extends BaseService
|
||||
return success($results);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生评价
|
||||
* @return array
|
||||
*/
|
||||
public function getDoctorEvaluationList(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$doctor_id = $this->request->route('doctor_id');
|
||||
$page = $this->request->input('page', 1);
|
||||
$per_page = $this->request->input('per_page', 10);
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $doctor_id;
|
||||
|
||||
$order_evaluation = OrderEvaluation::getPage($params, ['*'],$page,$per_page);
|
||||
if (!empty($order_evaluation['data'])) {
|
||||
foreach ($order_evaluation['data'] as &$item) {
|
||||
$item['reply_quality'] = floor($item['reply_quality'] * 0.05);
|
||||
$item['service_attitude'] = floor($item['service_attitude'] * 0.05);
|
||||
$item['reply_progress'] = floor($item['reply_progress'] * 0.05);
|
||||
$item['avg_score'] = floor($item['avg_score'] * 0.05);
|
||||
}
|
||||
}
|
||||
return success($order_evaluation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页服务过患者的医生
|
||||
* 限制条数
|
||||
|
||||
@ -770,7 +770,6 @@ class PatientOrderService extends BaseService
|
||||
|
||||
/**
|
||||
* 获取处方订单支付页详情
|
||||
* 我这边一直到6-7月份才能走得开。目前这几个月项目都正在开发中,没办法离开,也不好。
|
||||
* @return array
|
||||
*/
|
||||
public function getPatientPrescriptionOrderPayInfo(): array
|
||||
|
||||
@ -217,7 +217,7 @@ Router::addGroup('/patient', function () {
|
||||
// 获取医生详情-问诊
|
||||
Router::get('/{doctor_id:\d+}', [PatientDoctorController::class, 'getInquiryDoctorInfo']);
|
||||
|
||||
// 医生详情简介-详情中的简介
|
||||
// 医生详情简介-详情中的简介-废弃
|
||||
Router::get('/profile/{doctor_id:\d+}', [PatientDoctorController::class, 'getDoctorProfile']);
|
||||
|
||||
// 删除服务过患者的医生
|
||||
@ -225,6 +225,9 @@ Router::addGroup('/patient', function () {
|
||||
|
||||
// 获取我的问诊、关注医生列表
|
||||
Router::get('/my', [PatientDoctorController::class, 'getDoctorList']);
|
||||
|
||||
// 获取医生评价
|
||||
Router::get('/evaluation/{doctor_id:\d+}', [PatientDoctorController::class, 'getDoctorEvaluationList']);
|
||||
});
|
||||
|
||||
// 家庭成员
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user