-- 已部署环境追加：PLM 接收留痕「同步到BOM明细」按钮权限
-- 若 menu_id 21212 已存在请改用其它 ID

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 21212, '同步到BOM明细', 21210, 2, '#', '', 1, 0, 'F', '0', '0', 'system:plmReceiveLog:syncBomDetails', '#', 'admin', sysdate(), '', NULL, '将production_order总装行手动写入bom_details'
FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE menu_id = 21212 OR perms = 'system:plmReceiveLog:syncBomDetails');
