147 lines
4.3 KiB
PHP
147 lines
4.3 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\DoctorAuthRequest;
|
|
use App\Request\PatientFamilyRequest;
|
|
use App\Services\DoctorAuthService;
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
/**
|
|
* 医生身份认证
|
|
*/
|
|
class DoctorAuthController extends AbstractController
|
|
{
|
|
/**
|
|
* 获取实名认证信息
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getAuthReal(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getAuthReal();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 新增实名认证
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface|GuzzleException
|
|
*/
|
|
public function addAuthReal(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAuthRequest::class);
|
|
$request->scene('addAuthReal')->validateResolved();
|
|
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->addAuthReal();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取身份认证信息
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getAuthIden(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getAuthIden();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 新增身份认证信息
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface|GuzzleException
|
|
*/
|
|
public function addAuthIden(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAuthRequest::class);
|
|
$request->scene('addAuthIden')->validateResolved();
|
|
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->addAuthIden();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取多点执业认证信息
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getAuthMulti(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getAuthMulti();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 新增多点执业认证信息
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface|GuzzleException
|
|
*/
|
|
public function addAuthMulti(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAuthRequest::class);
|
|
$request->scene('addAuthMulti')->validateResolved();
|
|
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->addAuthMulti();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取身份认证审核失败原因
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getIdenAuthFailReason(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getIdenAuthFailReason();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取个人简介审核失败原因
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorIntroductionFailReason(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getDoctorIntroductionFailReason();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取个人简介
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorIntroduction(): ResponseInterface
|
|
{
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->getDoctorIntroduction();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 修改个人简介
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function putDoctorIntroduction(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAuthRequest::class);
|
|
$request->scene('putDoctorIntroduction')->validateResolved();
|
|
|
|
$DoctorAuthService = new DoctorAuthService();
|
|
$data = $DoctorAuthService->putDoctorIntroduction();
|
|
return $this->response->json($data);
|
|
}
|
|
} |