Files
dsserver/plugin/admin/app/service/HospitalService.php
T
zimoyin 13fd9c5f0a init
2026-04-06 20:48:32 +08:00

29 lines
648 B
PHP

<?php
namespace plugin\admin\app\service;
use plugin\admin\app\repository\HospitalRepository;
class HospitalService extends BaseService
{
private HospitalRepository $repository;
public function __construct()
{
$this->repository = HospitalRepository::new();
}
/**
* 获取医院下拉选项(用于其他模块选择医院)
*/
public function getHospitalOptions(): array
{
return $this->repository->getListWithPermission()
->map(fn($item) => [
'value' => $item->id,
'name' => $item->organ_name,
])
->toArray();
}
}