-- =====================================================
-- 自定义模块菜单配置 SQL
-- 包含：交货管理、IQC检验、建模管理、订单管理、采购管理、异常管理
-- 执行前请确保数据库已连接
-- =====================================================

SET NAMES utf8mb4;

-- =====================================================
-- 清理旧菜单数据（如果存在）
-- 包括6300-6399范围的旧建模管理菜单
-- =====================================================
DELETE FROM `system_role_menu` WHERE menu_id >= 6000 AND menu_id < 6900;
DELETE FROM `system_menu` WHERE id >= 6000 AND id < 6900;

-- =====================================================
-- 1. 交货管理模块 (jiaohuo) - 一级菜单
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6000, '交货管理', '', 1, 100, 0, '/jiaohuo', 'ep:van', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.1 订单管理 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6010, '订单管理', '', 1, 1, 6000, 'order', 'ep:document', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 订单管理子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6011, '订单评审', 'jiaohuo:order-review:list', 2, 1, 6010, 'order-review', 'ep:document-checked', 'jiaohuo/OrderReview', 'JiaohuoOrderReview', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6012, '订单交付', 'jiaohuo:order-delivery:list', 2, 2, 6010, 'order-delivery', 'ep:box', 'jiaohuo/OrderDelivery', 'JiaohuoOrderDelivery', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6013, '出货计划', 'jiaohuo:shipping-plan:list', 2, 3, 6010, 'shipping-plan', 'ep:calendar', 'jiaohuo/ShippingPlan', 'JiaohuoShippingPlan', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6014, '订单发货', 'jiaohuo:order-shipment:list', 2, 4, 6010, 'order-shipment', 'ep:ship', 'jiaohuo/OrderShipment', 'JiaohuoOrderShipment', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.2 工单管理 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6020, '工单管理', '', 1, 2, 6000, 'workorder', 'ep:notebook', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 工单管理子菜单（三级）- 只有工单池下达
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6021, '工单池下达', 'jiaohuo:workorder-pool:list', 2, 1, 6020, 'workorder-pool', 'ep:tickets', 'jiaohuo/WorkOrderPool', 'JiaohuoWorkOrderPool', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.3 工单排产 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6030, '工单排产', '', 1, 3, 6000, 'scheduling', 'ep:data-line', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 工单排产子菜单（三级）- 包含工单工序排产、工单物料明细、工单工序明细
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6031, '工单工序排产', 'jiaohuo:production-schedule:list', 2, 1, 6030, 'production-schedule', 'ep:operation', 'jiaohuo/ProductionSchedule', 'JiaohuoProductionSchedule', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6032, '工单物料明细', 'jiaohuo:workorder-material:list', 2, 2, 6030, 'workorder-material', 'ep:goods', 'jiaohuo/WorkOrderMaterial', 'JiaohuoWorkOrderMaterial', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6033, '工单工序明细', 'jiaohuo:workorder-process:list', 2, 3, 6030, 'workorder-process', 'ep:list', 'jiaohuo/WorkOrderProcess', 'JiaohuoWorkOrderProcess', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.4 生产计划 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6040, '生产计划', '', 1, 4, 6000, 'production', 'ep:calendar', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 生产计划子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6041, '可执行日计划', 'jiaohuo:daily-plan:list', 2, 1, 6040, 'daily-plan', 'ep:date', 'jiaohuo/DailyPlan', 'JiahohuoDailyPlan', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6042, '产线工作日历', 'jiaohuo:work-calendar:list', 2, 2, 6040, 'work-calendar', 'ep:calendar', 'jiaohuo/WorkCalendar', 'JiaohuoWorkCalendar', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6043, '产线休息时间', 'jiaohuo:rest-time:list', 2, 3, 6040, 'rest-time', 'ep:clock', 'jiaohuo/RestTime', 'JiaohuoRestTime', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6044, '产线节假日', 'jiaohuo:holiday:list', 2, 4, 6040, 'holiday', 'ep:sunny', 'jiaohuo/Holiday', 'JiaohuoHoliday', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6045, '产线加班', 'jiaohuo:overtime:list', 2, 5, 6040, 'overtime', 'ep:timer', 'jiaohuo/Overtime', 'JiaohuoOvertime', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.5 物料计划 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6050, '物料计划', '', 1, 5, 6000, 'material', 'ep:document', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 物料计划子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6051, '物料需求计划', 'jiaohuo:material-demand:list', 2, 1, 6050, 'material-demand', 'ep:document', 'jiaohuo/MaterialDemand', 'JiaohuoMaterialDemand', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6052, '物料交货计划', 'jiaohuo:delivery-schedule:list', 2, 2, 6050, 'delivery-schedule', 'ep:timer', 'jiaohuo/DeliverySchedule', 'JiaohuoDeliverySchedule', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 1.6 采购管理 (交货管理的二级菜单)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6060, '采购管理', '', 1, 6, 6000, 'purchase', 'ep:shopping-cart', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 采购管理子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6061, '供应商交货管理', 'jiaohuo:supplier-delivery:list', 2, 1, 6060, 'supplier-delivery', 'ep:user', 'jiaohuo/SupplierDelivery', 'JiaohuoSupplierDelivery', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6062, '供应商发货单', 'jiaohuo:supplier-shipping:list', 2, 2, 6060, 'supplier-shipping-list', 'ep:document-copy', 'jiaohuo/SupplierShippingList', 'JiaohuoSupplierShippingList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6063, '物料交货计划', 'jiaohuo:material-delivery-plan:list', 2, 3, 6060, 'material-delivery-plan', 'ep:calendar', 'caigou/index', 'CaigouDeliveryPlan', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 2. 质量管理系统 (qms) - 包含 IQC/IPQC/FQC/检规管理
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6100, '质量管理系统', '', 1, 110, 0, '/qms', 'ep:monitor', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- IQC 来料检验子菜单
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6110, 'IQC 来料检验', '', 1, 1, 6100, 'iqc', 'ep:box', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6111, '来料检验申请', 'qms:iqc:apply:list', 2, 1, 6110, 'iqc/apply/list', 'ep:document', 'qms/ApplicationList', 'IqcApplicationList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6112, '来料检验任务', 'qms:iqc:task:list', 2, 2, 6110, 'iqc/task/list', 'ep:tickets', 'qms/TaskList', 'IqcTaskList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- IPQC 过程检验子菜单
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6120, 'IPQC 过程检验', '', 1, 2, 6100, 'ipqc', 'ep:trend-charts', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6121, '过程检验申请', 'qms:ipqc:apply:list', 2, 1, 6120, 'ipqc/apply/list', 'ep:document', 'qms/ApplicationList', 'IpqcApplicationList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6122, '过程检验任务', 'qms:ipqc:task:list', 2, 2, 6120, 'ipqc/task/list', 'ep:tickets', 'qms/TaskList', 'IpqcTaskList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- FQC 成品检验子菜单
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6130, 'FQC 成品检验', '', 1, 3, 6100, 'fqc', 'ep:circle-check', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6131, '成品检验申请', 'qms:fqc:apply:list', 2, 1, 6130, 'fqc/apply/list', 'ep:document', 'qms/ApplicationList', 'FqcApplicationList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6132, '成品检验任务', 'qms:fqc:task:list', 2, 2, 6130, 'fqc/task/list', 'ep:tickets', 'qms/TaskList', 'FqcTaskList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- SPEC 检规管理子菜单
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6140, 'SPEC 检规', '', 1, 4, 6100, 'spec', 'ep:setting', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6141, '检规索引', 'qms:spec:index', 2, 1, 6140, 'index', 'ep:list', 'qms/spec/SpecIndex', 'SpecIndex', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6142, '导入检规', 'qms:spec:import', 2, 2, 6140, 'import', 'ep:upload', 'qms/spec/SpecImport', 'SpecImport', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 3. 异常管理模块 (yichang)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6200, '异常管理', '', 1, 120, 0, '/yichang', 'ep:warning', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 异常管理子菜单 - Andon
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6201, 'Andon管理', '', 1, 1, 6200, 'andon', 'ep:bell', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 异常管理子菜单 - 工损管理
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6210, '工损管理', '', 1, 2, 6200, 'loss', 'ep:money', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 异常管理子菜单 - SIM管理
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6220, 'SIM管理', 'yichang:sim:list', 2, 3, 6200, 'sim/list', 'ep:cpu', 'yichang/sim/SimLayout', 'SimManagement', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');


-- =====================================================
-- 4. 建模管理模块 (jianmo) - 一级菜单
-- ID范围: 6400-6899
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6400, '建模管理', '', 1, 140, 0, '/yunying', 'ep:data-analysis', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.1 产销建模 (二级目录) - 直接挂在建模管理下
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6411, '产销建模', '', 1, 1, 6400, 'chanxiao', 'ep:sell', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 产销建模子菜单（四级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6412, '客户管理', 'jianmo:customer:list', 2, 1, 6411, 'customer', 'ep:user', 'jianmo/views/CustomerManagement', 'JianmoCustomerManagement', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6413, '物料管理', 'jianmo:material:list', 2, 2, 6411, 'material', 'ep:goods', 'jianmo/views/MaterialManagement', 'JianmoMaterialManagement', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6414, '订单优先级', 'jianmo:order-priority:list', 2, 3, 6411, 'order-priority', 'ep:sort', 'jianmo/views/OrderPriorityConfig', 'JianmoOrderPriorityConfig', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.2 制造建模 (二级目录) - 直接挂在建模管理下
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6420, '制造建模', '', 1, 2, 6400, 'manufacturing', 'ep:setting', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 制造建模子菜单（四级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6421, '标准BOM', 'jianmo:standard-bom:list', 2, 1, 6420, 'standard-bom', 'ep:document', 'jianmo/views/manufacturing/StandardBomManagement', 'JianmoStandardBomManagement', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6422, '标准工序', 'jianmo:standard-process:list', 2, 2, 6420, 'standard-process', 'ep:list', 'jianmo/views/manufacturing/StandardProcessList', 'JianmoStandardProcessList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6423, '生产线维护', 'jianmo:production-line:list', 2, 3, 6420, 'production-line', 'ep:guide', 'jianmo/views/manufacturing/ProductionLineList', 'JianmoProductionLineList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6424, '工艺流程', 'jianmo:routing:list', 2, 4, 6420, 'routing', 'ep:connection', 'jianmo/views/manufacturing/RoutingList', 'JianmoRoutingList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6425, '物料替代', 'jianmo:material-substitution:list', 2, 5, 6420, 'material-substitution', 'ep:switch', 'jianmo/views/manufacturing/MaterialSubstitutionList', 'JianmoMaterialSubstitutionList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6426, '工单控制参数', 'jianmo:workorder-control:list', 2, 6, 6420, 'workorder-control', 'ep:operation', 'jianmo/views/manufacturing/WorkOrderControlParams', 'JianmoWorkOrderControlParams', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6427, '人员技能', 'jianmo:personnel-skill:list', 2, 7, 6420, 'personnel-skill', 'ep:user-filled', 'jianmo/views/manufacturing/PersonnelSkillList', 'JianmoPersonnelSkillList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6428, '产线岗位', 'jianmo:line-post:list', 2, 8, 6420, 'line-post', 'ep:position', 'jianmo/views/manufacturing/LinePostList', 'JianmoLinePostList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6429, '工作中心', 'jianmo:work-center:list', 2, 9, 6420, 'work-center', 'ep:office-building', 'jianmo/views/manufacturing/WorkCenterList', 'JianmoWorkCenterList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6430, '生产线物料', 'jianmo:line-material:list', 2, 10, 6420, 'line-material', 'ep:goods-filled', 'jianmo/views/manufacturing/LineMaterialList', 'JianmoLineMaterialList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6431, '生产要素参数', 'jianmo:production-element:list', 2, 11, 6420, 'production-element', 'ep:data-board', 'jianmo/views/manufacturing/ProductionElementParamList', 'JianmoProductionElementParamList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6432, '物料工序要素', 'jianmo:material-process-element:list', 2, 12, 6420, 'material-process-element', 'ep:collection', 'jianmo/views/manufacturing/MaterialProcessElementList', 'JianmoMaterialProcessElementList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6433, '前处理要素', 'jianmo:preprocess-element:list', 2, 13, 6420, 'preprocess-element', 'ep:magic-stick', 'jianmo/views/manufacturing/PreprocessElementList', 'JianmoPreprocessElementList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6434, '前处理要素参数', 'jianmo:preprocess-element-param:list', 2, 14, 6420, 'preprocess-element-param', 'ep:set-up', 'jianmo/views/manufacturing/PreprocessElementParamList', 'JianmoPreprocessElementParamList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6435, 'SOP文件类型', 'jianmo:sop-file-type:list', 2, 15, 6420, 'sop-file-type', 'ep:folder', 'jianmo/views/manufacturing/SopFileTypeList', 'JianmoSopFileTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6436, 'SOP维护', 'jianmo:sop-maintenance:list', 2, 16, 6420, 'sop-maintenance', 'ep:document-copy', 'jianmo/views/manufacturing/SopMaintenanceList', 'JianmoSopMaintenanceList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.1.3 仓储建模 (三级目录)
-- =====================================================
-- =====================================================
-- 4.3 仓储建模 (二级目录) - 直接挂在建模管理下
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6440, '仓储建模', '', 1, 3, 6400, 'warehouse', 'ep:house', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 仓储建模子菜单（四级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6441, '库位维护', 'jianmo:location:list', 2, 1, 6440, 'location', 'ep:location', 'jianmo/views/warehouse/LocationMaintenanceList', 'JianmoLocationMaintenanceList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6442, '货架列表', 'jianmo:rack:list', 2, 2, 6440, 'rack', 'ep:grid', 'jianmo/views/warehouse/RackList', 'JianmoRackList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6443, '部门维护', 'jianmo:department:list', 2, 3, 6440, 'department', 'ep:office-building', 'jianmo/views/warehouse/DepartmentMaintenanceList', 'JianmoDepartmentMaintenanceList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6444, '雇员列表', 'jianmo:employee:list', 2, 4, 6440, 'employee', 'ep:avatar', 'jianmo/views/warehouse/EmployeeList', 'JianmoEmployeeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6445, '条码规则', 'jianmo:barcode-rule:list', 2, 5, 6440, 'barcode-rule', 'ep:postcard', 'jianmo/views/warehouse/BarcodeRuleList', 'JianmoBarcodeRuleList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6446, '标签格式', 'jianmo:label-format:list', 2, 6, 6440, 'label-format', 'ep:price-tag', 'jianmo/views/warehouse/LabelFormatList', 'JianmoLabelFormatList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6447, '成本中心', 'jianmo:cost-center:list', 2, 7, 6440, 'cost-center', 'ep:money', 'jianmo/views/warehouse/CostCenterList', 'JianmoCostCenterList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6448, '物料职责', 'jianmo:material-duty:list', 2, 8, 6440, 'material-duty', 'ep:stamp', 'jianmo/views/warehouse/MaterialDutyList', 'JianmoMaterialDutyList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6449, '单号类型', 'jianmo:order-type:list', 2, 9, 6440, 'order-type', 'ep:tickets', 'jianmo/views/warehouse/OrderTypeList', 'JianmoOrderTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6450, '单号规则', 'jianmo:order-rule:list', 2, 10, 6440, 'order-rule', 'ep:document-checked', 'jianmo/views/warehouse/OrderRuleList', 'JianmoOrderRuleList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6451, '包装规格', 'jianmo:packaging-spec:list', 2, 11, 6440, 'packaging-spec', 'ep:box', 'jianmo/views/warehouse/PackagingSpecList', 'JianmoPackagingSpecList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6452, '物料状态任务', 'jianmo:material-status-task:list', 2, 12, 6440, 'material-status-task', 'ep:finished', 'jianmo/views/warehouse/MaterialStatusTaskList', 'JianmoMaterialStatusTaskList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');


-- =====================================================
-- 4.4 质量建模 (二级目录) - 直接挂在建模管理下
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6460, '质量建模', '', 1, 4, 6400, 'quality', 'ep:checked', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 质量建模子菜单（四级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6461, '单据类型', 'jianmo:document-type:list', 2, 1, 6460, 'document-type', 'ep:document', 'jianmo/views/quality/DocumentTypeList', 'JianmoDocumentTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6462, '业务类型', 'jianmo:business-type:list', 2, 2, 6460, 'business-type', 'ep:briefcase', 'jianmo/views/quality/BusinessTypeList', 'JianmoBusinessTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6463, '客诉类别', 'jianmo:complaint-category:list', 2, 3, 6460, 'complaint-category', 'ep:chat-line-square', 'jianmo/views/quality/ComplaintCategoryList', 'JianmoComplaintCategoryList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6464, '检验优先级', 'jianmo:inspection-priority:list', 2, 4, 6460, 'inspection-priority', 'ep:sort', 'jianmo/views/quality/InspectionPriorityList', 'JianmoInspectionPriorityList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6465, '不合格联络单模板', 'jianmo:nonconformance-template:list', 2, 5, 6460, 'nonconformance-template', 'ep:warning', 'jianmo/views/quality/NonconformanceContactTemplateList', 'JianmoNonconformanceContactTemplateList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6466, '8D模板', 'jianmo:eight-d-template:list', 2, 6, 6460, 'eight-d-template', 'ep:document-copy', 'jianmo/views/quality/EightDTemplateList', 'JianmoEightDTemplateList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6467, 'NCR处置类型', 'jianmo:ncr-disposition-type:list', 2, 7, 6460, 'ncr-disposition-type', 'ep:delete', 'jianmo/views/quality/NcrDispositionTypeList', 'JianmoNcrDispositionTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6468, '质量项目', 'jianmo:quality-project:list', 2, 8, 6460, 'quality-project', 'ep:folder-opened', 'jianmo/views/quality/QualityProjectTemplateList', 'JianmoQualityProjectTemplateList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6469, 'CAPA类型', 'jianmo:capa-type:list', 2, 9, 6460, 'capa-type', 'ep:aim', 'jianmo/views/quality/CapaTypeList', 'JianmoCapaTypeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6470, '检验状态', 'jianmo:inspection-status:list', 2, 10, 6460, 'inspection-status', 'ep:circle-check', 'jianmo/views/quality/InspectionStatusList', 'JianmoInspectionStatusList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6471, 'AQL检验水平', 'jianmo:aql-level:list', 2, 11, 6460, 'aql-level', 'ep:data-line', 'jianmo/views/quality/AqlLevelList', 'JianmoAqlLevelList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6472, 'AQL值', 'jianmo:aql-value:list', 2, 12, 6460, 'aql-value', 'ep:histogram', 'jianmo/views/quality/AqlValueList', 'JianmoAqlValueList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6473, '抽样方案', 'jianmo:sampling-plan:list', 2, 13, 6460, 'sampling-plan', 'ep:pie-chart', 'jianmo/views/quality/SamplingPlanList', 'JianmoSamplingPlanList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6474, '检验方法', 'jianmo:inspection-method:list', 2, 14, 6460, 'inspection-method', 'ep:tools', 'jianmo/views/quality/InspectionMethodList', 'JianmoInspectionMethodList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6475, '检验依据', 'jianmo:inspection-basis:list', 2, 15, 6460, 'inspection-basis', 'ep:reading', 'jianmo/views/quality/InspectionBasisList', 'JianmoInspectionBasisList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6476, '检验仪器', 'jianmo:inspection-instrument:list', 2, 16, 6460, 'inspection-instrument', 'ep:odometer', 'jianmo/views/quality/InspectionInstrumentList', 'JianmoInspectionInstrumentList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6477, '检验频率', 'jianmo:inspection-frequency:list', 2, 17, 6460, 'inspection-frequency', 'ep:timer', 'jianmo/views/quality/InspectionFrequencyList', 'JianmoInspectionFrequencyList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6478, '检验项目', 'jianmo:inspection-item:list', 2, 18, 6460, 'inspection-item', 'ep:list', 'jianmo/views/quality/InspectionItemList', 'JianmoInspectionItemList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6479, '检验标准', 'jianmo:inspection-standard:list', 2, 19, 6460, 'inspection-standard', 'ep:document-checked', 'jianmo/views/quality/InspectionStandardList', 'JianmoInspectionStandardList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6480, '检验方案', 'jianmo:inspection-scheme:list', 2, 20, 6460, 'inspection-scheme', 'ep:memo', 'jianmo/views/quality/InspectionSchemeList', 'JianmoInspectionSchemeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6481, '原材料免检', 'jianmo:raw-material-skip:list', 2, 21, 6460, 'raw-material-skip', 'ep:circle-close', 'jianmo/views/quality/RawMaterialSkipList', 'JianmoRawMaterialSkipList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.5 供应建模 (二级目录) - 直接挂在建模管理下
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6490, '供应建模', '', 1, 5, 6400, 'supply', 'ep:van', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 供应建模子菜单（四级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6491, '供应商维护', 'jianmo:supplier:list', 2, 1, 6490, 'supplier', 'ep:user', 'jianmo/views/supply/SupplierList', 'JianmoSupplierList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6492, '货源清单', 'jianmo:sourcing:list', 2, 2, 6490, 'sourcing', 'ep:document', 'jianmo/views/supply/SourcingList', 'JianmoSourcingList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.2 设备管理 (二级目录)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6500, '设备管理', '', 1, 2, 6400, 'device', 'ep:cpu', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 设备管理子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6501, '设备列表', 'jianmo:device:list', 2, 1, 6500, 'device-list', 'ep:monitor', 'jianmo/views/device/DeviceList', 'JianmoDeviceList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6502, '模工具列表', 'jianmo:molding-tool:list', 2, 2, 6500, 'molding-tool', 'ep:tools', 'jianmo/views/device/MoldingToolList', 'JianmoMoldingToolList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.3 仓储管理 (二级目录)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6600, '仓储管理', '', 1, 3, 6400, 'wms', 'ep:house', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 仓储管理子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6601, '委外交料单', 'jianmo:outsource-delivery:list', 2, 1, 6600, 'outsource-delivery', 'ep:document', 'jianmo/views/wms/OutsourcingDeliveryList', 'JianmoOutsourcingDeliveryList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6602, '采购收货单', 'jianmo:purchase-receipt:list', 2, 2, 6600, 'purchase-receipt', 'ep:shopping-cart', 'jianmo/views/wms/PurchaseReceiptList', 'JianmoPurchaseReceiptList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6603, '生产领料单', 'jianmo:production-picking:list', 2, 3, 6600, 'production-picking', 'ep:goods', 'jianmo/views/wms/ProductionPickingList', 'JianmoProductionPickingList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6604, '生产退料单', 'jianmo:production-return:list', 2, 4, 6600, 'production-return', 'ep:refresh-left', 'jianmo/views/wms/ProductionReturnList', 'JianmoProductionReturnList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.4 仓库数据 (二级目录)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6700, '仓库数据', '', 1, 4, 6400, 'inventory', 'ep:data-analysis', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 仓库数据子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6701, '标签查询', 'jianmo:label-query:list', 2, 1, 6700, 'label-query', 'ep:price-tag', 'jianmo/views/inventory/TagQuery', 'JianmoLabelQueryList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6702, '标签历史记录', 'jianmo:label-history:list', 2, 2, 6700, 'label-history', 'ep:clock', 'jianmo/views/inventory/TagHistory', 'JianmoLabelHistoryList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6703, '暂收在检列表', 'jianmo:pending-inspection:list', 2, 3, 6700, 'pending-inspection', 'ep:loading', 'jianmo/views/inventory/PendingInspectionList', 'JianmoPendingInspectionList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6704, '库存查询', 'jianmo:inventory-query:list', 2, 4, 6700, 'inventory-query', 'ep:search', 'jianmo/views/inventory/StockQuery', 'JianmoInventoryQueryList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6705, '进出存查询', 'jianmo:stock-movement:list', 2, 5, 6700, 'stock-movement', 'ep:sort', 'jianmo/views/inventory/StockFlow', 'JianmoStockMovementList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 4.5 成品仓库 (二级目录)
-- =====================================================
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6800, '成品仓库', '', 1, 5, 6400, 's7', 'ep:box', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 成品仓库子菜单（三级）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(6801, '生产入库单列表', 'jianmo:production-inbound:list', 2, 1, 6800, 'production-inbound', 'ep:upload', 'jianmo/views/s7/ProductionInboundList', 'JianmoProductionInboundList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(6802, '销售发货通知', 'jianmo:sales-shipping-notice:list', 2, 2, 6800, 'sales-shipping-notice', 'ep:ship', 'jianmo/views/s7/SalesShipmentNotice', 'JianmoSalesShippingNoticeList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- =====================================================
-- 为超级管理员角色分配新菜单权限
-- 注意：需要根据实际的角色ID调整
-- =====================================================
-- 为角色ID=1（超级管理员）分配新菜单
INSERT INTO `system_role_menu` (`role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) 
SELECT 1, id, 'admin', NOW(), 'admin', NOW(), b'0', 1 
FROM `system_menu` 
WHERE id >= 6000 AND id < 6900 AND deleted = b'0';

-- =====================================================
-- 完成提示
-- =====================================================
-- 执行完成后，请：
-- 1. 重新登录管理后台
-- 2. 在"系统管理" -> "菜单管理"中查看新增的菜单
-- 3. 在"系统管理" -> "角色管理"中为需要的角色分配菜单权限
-- 4. 刷新页面查看左侧菜单栏
