evoToK3Cloud/script/sql/update/route-approve-permission.sql
2026-08-11 14:29:31 +08:00

23 lines
1.1 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 工艺路线「审核通过」独立按钮权限(仅分配给工艺部门)
-- 权限标识system:route:approveRoute
-- 可重复执行(幂等)
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
SELECT (SELECT IFNULL(MAX(menu_id), 0) + 1 FROM sys_menu),
'工艺审核通过',
COALESCE(
(SELECT parent_id FROM sys_menu WHERE perms = 'system:route:pushRouteBom' LIMIT 1),
(SELECT menu_id FROM sys_menu WHERE perms = 'system:route:list' AND menu_type = 'C' LIMIT 1),
(SELECT menu_id FROM sys_menu WHERE path = 'route' AND menu_type = 'C' LIMIT 1)
),
6,
'#',
'',
1, 0, 'F', '0', '0',
'system:route:approveRoute',
'#',
'admin', sysdate(), '', NULL,
'工艺部门审核通过:更新状态并发送钉钉通知,不推送金蝶、不发送工艺计划表'
FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE perms = 'system:route:approveRoute');