hospital-applets-api/app/Controller/SystemController.php

48 lines
1.4 KiB
PHP

<?php
namespace App\Controller;
use App\Request\SystemRequest;
use App\Services\SystemService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
/**
* 系统配置
*/
class SystemController extends AbstractController
{
/**
* 获取系统问诊时间
* 快速问诊-问诊购药
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getSystemInquiryTime(): ResponseInterface
{
$request = $this->container->get(SystemRequest::class);
$request->scene('getSystemInquiryTime')->validateResolved();
$SystemService = new SystemService();
$data = $SystemService->getSystemInquiryTime();
return $this->response->json($data);
}
/**
* 获取系统问诊配置
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getSystemInquiryConfig(): ResponseInterface
{
$request = $this->container->get(SystemRequest::class);
$request->scene('getSystemInquiryConfig')->validateResolved();
$SystemService = new SystemService();
$data = $SystemService->getSystemInquiryConfig();
return $this->response->json($data);
}
}