新增分配药师队列、新增处方开具、修改接口

This commit is contained in:
2023-03-02 09:34:31 +08:00
parent e047f4971c
commit d51d5355a0
15 changed files with 592 additions and 83 deletions
+21
View File
@@ -2,11 +2,16 @@
namespace App\Controller;
use App\Amqp\Producer\PrescriptionDistributePhProducer;
use App\Constants\HttpEnumCode;
use App\Request\DoctorAuthRequest;
use App\Request\UserDoctorRequest;
use App\Services\DoctorAuthService;
use App\Services\DoctorInquiryService;
use App\Services\UserDoctorService;
use Hyperf\Amqp\Producer;
use Hyperf\DbConnection\Db;
use Hyperf\Utils\ApplicationContext;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
@@ -255,4 +260,20 @@ class UserDoctorController extends AbstractController
$data = $UserDoctorService->putPrescription();
return $this->response->json($data);
}
/**
* 新增处方
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function addPrescription(): ResponseInterface
{
$request = $this->container->get(UserDoctorRequest::class);
$request->scene('addPrescription')->validateResolved();
$UserDoctorService = new UserDoctorService();
$data = $UserDoctorService->addPrescription();
return $this->response->json($data);
}
}