187 lines
5.5 KiB
PHP
187 lines
5.5 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\InquiryRequest;
|
|
use App\Services\InquiryService;
|
|
use App\Services\UserDoctorService;
|
|
use Extend\Wechat\WechatPay;
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
use Hyperf\Snowflake\IdGeneratorInterface;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
/**
|
|
* 问诊
|
|
*/
|
|
class InquiryController extends AbstractController
|
|
{
|
|
/**
|
|
* 创建问诊订单
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addInquiryOrder(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(InquiryRequest::class);
|
|
$request->scene('addInquiryOrder')->validateResolved();
|
|
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->addInquiryOrder();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取患者问诊病例
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getPatientInquiryCase(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(InquiryRequest::class);
|
|
$request->scene('getPatientInquiryCase')->validateResolved();
|
|
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getPatientInquiryCase();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 检测快速、购药订单分配医生状态
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryAssign(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryAssign();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 新增问诊评价
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addInquiryEvaluation(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(InquiryRequest::class);
|
|
$request->scene('addInquiryEvaluation')->validateResolved();
|
|
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->addInquiryEvaluation();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取订单问诊评价
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryEvaluation(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryEvaluation();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取问诊最低价格
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryLowestPrice(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryLowestPrice();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取问诊订单消息内页基础数据
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryMessageBasic(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryMessageBasic();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 结束问诊会话列表
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorFinishMessageList(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getDoctorFinishMessageList();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 结束问诊
|
|
* @return ResponseInterface
|
|
*/
|
|
public function putFinishInquiry(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->putFinishInquiry();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取患者最后一条问诊订单id
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getPatientLastInquiryId(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(InquiryRequest::class);
|
|
$request->scene('getPatientLastInquiryId')->validateResolved();
|
|
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getPatientLastInquiryId();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 医生赠送沟通回合数
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addDoctorGiveInquiryOrder(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(InquiryRequest::class);
|
|
$request->scene('addDoctorGiveInquiryOrder')->validateResolved();
|
|
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->addDoctorGiveInquiryOrder();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取视频问诊消息内页基础数据
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryVideoMessageBasic(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryVideoMessageBasic();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取服务包关联问诊订单消息内页基础数据
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getInquiryServiceMessageBasic(): ResponseInterface
|
|
{
|
|
$InquiryService = new InquiryService();
|
|
$data = $InquiryService->getInquiryServiceMessageBasic();
|
|
return $this->response->json($data);
|
|
}
|
|
} |