| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- -- 气密检测记录拆分为「白件气密」「总成气密」两个菜单
- -- 原菜单 href 含 mesProductQm 时更新为白件气密;并新增总成气密菜单(同父级)
- UPDATE `js_sys_menu`
- SET `menu_name` = '白件气密',
- `menu_href` = '/mes/mesProductQm/listWhitePart',
- `tree_names` = REPLACE(`tree_names`, '气密检测记录', '白件气密'),
- `update_date` = NOW()
- WHERE (`menu_href` LIKE '%mesProductQm/list%'
- OR `menu_href` LIKE '%mesProductQm/listWhitePart%')
- AND `menu_name` IN ('气密检测记录', '白件气密');
- INSERT INTO `js_sys_menu` (
- `menu_code`, `parent_code`, `parent_codes`, `tree_sort`, `tree_sorts`, `tree_leaf`, `tree_level`,
- `tree_names`, `menu_name`, `menu_type`, `menu_href`, `menu_target`, `menu_icon`, `menu_color`,
- `menu_title`, `permission`, `weight`, `is_show`, `sys_code`, `module_codes`, `component`, `params`,
- `status`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`
- )
- SELECT
- 'mesProductQmAssembly',
- m.`parent_code`,
- m.`parent_codes`,
- IFNULL(m.`tree_sort`, 0) + 1,
- m.`tree_sorts`,
- '1',
- m.`tree_level`,
- REPLACE(m.`tree_names`, '白件气密', '总成气密'),
- '总成气密',
- '1',
- '/mes/mesProductQm/listAssembly',
- '',
- IFNULL(m.`menu_icon`, 'icon-notebook'),
- '',
- '',
- m.`permission`,
- IFNULL(m.`weight`, 40),
- '1',
- IFNULL(m.`sys_code`, 'default'),
- IFNULL(m.`module_codes`, 'core'),
- NULL,
- NULL,
- '0',
- 'system',
- NOW(),
- 'system',
- NOW(),
- ''
- FROM `js_sys_menu` m
- WHERE m.`menu_href` = '/mes/mesProductQm/listWhitePart'
- AND NOT EXISTS (
- SELECT 1 FROM `js_sys_menu` x WHERE x.`menu_code` = 'mesProductQmAssembly'
- )
- LIMIT 1;
|