156 lines
4.8 KiB
PHP
156 lines
4.8 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\DoctorAuthRequest;
|
|
use App\Request\UserDoctorRequest;
|
|
use App\Services\DoctorAuthService;
|
|
use App\Services\DoctorInquiryService;
|
|
use App\Services\UserDoctorService;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
class UserDoctorController extends AbstractController
|
|
{
|
|
/**
|
|
* 获取医生专长列表
|
|
* 身份认证
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getAuthDoctorExpertise(): ResponseInterface
|
|
{
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->getAuthDoctorExpertise();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取医生问诊配置
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getInquiryConfig(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('getInquiryConfig')->validateResolved();
|
|
|
|
$DoctorInquiryService = new DoctorInquiryService();
|
|
$data = $DoctorInquiryService->getInquiryConfig();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 医生问诊开关
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function putInquiryOpen(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('putInquiryOpen')->validateResolved();
|
|
|
|
$DoctorInquiryService = new DoctorInquiryService();
|
|
$data = $DoctorInquiryService->putInquiryOpen();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 修改医生问诊配置
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function putInquiryConfig(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('putInquiryConfig')->validateResolved();
|
|
|
|
$DoctorInquiryService = new DoctorInquiryService();
|
|
$data = $DoctorInquiryService->putInquiryConfig();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取医生银行卡
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorBankCard(): ResponseInterface
|
|
{
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->getDoctorBankCard();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取医生银行卡详情信息
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorBankCardInfo(): ResponseInterface
|
|
{
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->getDoctorBankCardInfo();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 新增绑定医生银行卡
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addDoctorBankCard(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('addDoctorBankCard')->validateResolved();
|
|
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->addDoctorBankCard();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 更换医生银行卡
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function putDoctorBankCard(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('putDoctorBankCard')->validateResolved();
|
|
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->putDoctorBankCard();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取处方列表
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getPrescriptionList(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(UserDoctorRequest::class);
|
|
$request->scene('getPrescriptionList')->validateResolved();
|
|
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->getPrescriptionList();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取医生个人中心数据
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorCenter(): ResponseInterface
|
|
{
|
|
$UserDoctorService = new UserDoctorService();
|
|
$data = $UserDoctorService->getDoctorCenter();
|
|
return $this->response->json($data);
|
|
}
|
|
} |