fix(web-admin): 移除多余一级菜单实验室样本处理数据

软删除 menu:lab-sample-processing 及子菜单/按钮与角色授权,并去掉静态路由;保留质检下 lab-sample-process 台账。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-11-12 14:01:46 +08:00
1 parent b3c191ee99
commit 4fd6ef4be5
2 files changed
+50 -53

No files matched your search

@@ -0,0 +1,50 @@
-- Issue #100:移除多余一级菜单「实验室样本处理数据」及其子菜单/按钮
-- 软删除 sys_menu 与对应 sys_role_menu;不影响质检管理下 lab-sample-process 台账
-- MySQL 5.7,可重复执行
-- 1) 角色菜单授权
UPDATE sys_role_menu rm
JOIN sys_menu m ON m.id = rm.menu_id
SET rm.del_flag = 1,
rm.update_by = 'migration',
rm.update_time = NOW()
WHERE rm.del_flag = 0
AND (
m.perms IN (
'menu:lab-sample-processing',
'lab:sample-processing:list',
'lab:sample-processing:market:edit',
'lab:sample-processing:production:edit',
'lab:sample-processing:qc:edit',
'lab:sample-processing:manager'
)
OR m.path IN (
'/lab-sample-processing',
'lab-sample-processing/hsc',
'lab-sample-processing/ubmc',
'lab-sample-processing/msc'
)
);
-- 2) 按钮 / 子菜单 / 一级菜单(先叶子后父级,同批软删即可)
UPDATE sys_menu
SET del_flag = 1,
update_by = 'migration',
update_time = NOW()
WHERE del_flag = 0
AND (
perms IN (
'menu:lab-sample-processing',
'lab:sample-processing:list',
'lab:sample-processing:market:edit',
'lab:sample-processing:production:edit',
'lab:sample-processing:qc:edit',
'lab:sample-processing:manager'
)
OR path IN (
'/lab-sample-processing',
'lab-sample-processing/hsc',
'lab-sample-processing/ubmc',
'lab-sample-processing/msc'
)
);