This commit is contained in:
Your Name
2026-03-27 18:06:12 +08:00
parent 9160c36735
commit 099bc1dd22
645 changed files with 276473 additions and 957 deletions
@@ -42,7 +42,8 @@ class PrescriptionLibraryController extends BaseAdminController
public function edit()
{
$params = (new PrescriptionLibraryValidate())->post()->goCheck('edit');
$result = PrescriptionLibraryLogic::edit($params, $this->adminId);
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
$result = PrescriptionLibraryLogic::edit($params, $this->adminId, $canAll);
if (!$result) {
return $this->fail(PrescriptionLibraryLogic::getError());
}
@@ -55,7 +56,8 @@ class PrescriptionLibraryController extends BaseAdminController
public function delete()
{
$params = (new PrescriptionLibraryValidate())->post()->goCheck('delete');
$result = PrescriptionLibraryLogic::delete($params['id'], $this->adminId);
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
$result = PrescriptionLibraryLogic::delete((int) $params['id'], $this->adminId, $canAll);
if (!$result) {
return $this->fail(PrescriptionLibraryLogic::getError());
}
@@ -68,7 +70,8 @@ class PrescriptionLibraryController extends BaseAdminController
public function detail()
{
$params = (new PrescriptionLibraryValidate())->get()->goCheck('detail');
$detail = PrescriptionLibraryLogic::detail((int)$params['id'], $this->adminId);
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
$detail = PrescriptionLibraryLogic::detail((int) $params['id'], $this->adminId, $canAll);
if (!$detail) {
return $this->fail('处方不存在或无权限查看');
}