24 lines
508 B
PHP
24 lines
508 B
PHP
<?php
|
|
|
|
namespace plugin\admin\app\service;
|
|
|
|
use plugin\admin\app\repository\DepartmentRepository;
|
|
|
|
class DepartmentService extends BaseService
|
|
{
|
|
private DepartmentRepository $repository;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->repository = DepartmentRepository::new();
|
|
}
|
|
|
|
/**
|
|
* 获取指定医院下的科室选项
|
|
*/
|
|
public function getDepartmentOptions(int $hospitalId): array
|
|
{
|
|
return $this->repository->getDepartmentsByHospital($hospitalId);
|
|
}
|
|
}
|