2-- =============================================
-- 菜单初始化脚本：台账管理 + 配分管理
-- menu_id 从 2300 开始（原库 MAX=2209，安全偏移）
-- =============================================

-- ============================================================
-- 一、台账管理（父目录 menu_id=2300）
-- ============================================================
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2300,'台账管理',0,6,'ledger',NULL,'',1,0,'M','0','0','','form','admin',NOW(),'',NULL,'台账管理目录');

-- 1. 台账一键导入
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2301,'台账一键导入',2300,1,'import','ledger/import/index','',1,0,'C','0','0','','upload','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2302,'导入-监察问题',2301,1,'','','',1,0,'F','0','0','ledger:import:supervisionProblem','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2303,'导入-巡查记录',2301,2,'','','',1,0,'F','0','0','ledger:import:patrolInspection','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2304,'导入-实时拦截',2301,3,'','','',1,0,'F','0','0','ledger:import:realtimeInterception','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2305,'导入-服务巡查',2301,4,'','','',1,0,'F','0','0','ledger:import:servicePatrol','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2306,'导入-投诉情况',2301,5,'','','',1,0,'F','0','0','ledger:import:complaint','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2307,'导入-安保测试',2301,6,'','','',1,0,'F','0','0','ledger:import:securityTest','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2308,'导入-通道过检率',2301,7,'','','',1,0,'F','0','0','ledger:import:channelPassRate','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2309,'导入-不安全事件',2301,8,'','','',1,0,'F','0','0','ledger:import:unsafeEvent','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2310,'导入-查获统计',2301,9,'','','',1,0,'F','0','0','ledger:import:seizureStats','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2311,'导入-航站楼加分',2301,10,'','','',1,0,'F','0','0','ledger:import:terminalBonus','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2312,'导入-成绩收集',2301,11,'','','',1,0,'F','0','0','ledger:import:examScore','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2313,'导入-奖励审批单',2301,12,'','','',1,0,'F','0','0','ledger:import:rewardApproval','','admin',NOW(),'',NULL,'');

-- 2. 监察问题记录
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2320,'监察问题记录',2300,2,'supervisionProblem','ledger/supervisionProblem/index','',1,0,'C','0','0','ledger:supervisionProblem:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2321,'导出',2320,1,'','','',1,0,'F','0','0','ledger:supervisionProblem:export','','admin',NOW(),'',NULL,'');

-- 3. 三级质控巡查
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2322,'三级质控巡查',2300,3,'patrolInspection','ledger/patrolInspection/index','',1,0,'C','0','0','ledger:patrolInspection:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2323,'导出',2322,1,'','','',1,0,'F','0','0','ledger:patrolInspection:export','','admin',NOW(),'',NULL,'');

-- 4. 实时质控拦截
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2324,'实时质控拦截',2300,4,'realtimeInterception','ledger/realtimeInterception/index','',1,0,'C','0','0','ledger:realtimeInterception:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2325,'导出',2324,1,'','','',1,0,'F','0','0','ledger:realtimeInterception:export','','admin',NOW(),'',NULL,'');

-- 5. 服务巡查
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2326,'服务巡查',2300,5,'servicePatrol','ledger/servicePatrol/index','',1,0,'C','0','0','ledger:servicePatrol:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2327,'导出',2326,1,'','','',1,0,'F','0','0','ledger:servicePatrol:export','','admin',NOW(),'',NULL,'');

-- 6. 投诉情况
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2328,'投诉情况',2300,6,'complaint','ledger/complaint/index','',1,0,'C','0','0','ledger:complaint:list','warning','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2329,'导出',2328,1,'','','',1,0,'F','0','0','ledger:complaint:export','','admin',NOW(),'',NULL,'');

-- 7. 安保测试记录
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2330,'安保测试记录',2300,7,'securityTest','ledger/securityTest/index','',1,0,'C','0','0','ledger:securityTest:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2331,'导出',2330,1,'','','',1,0,'F','0','0','ledger:securityTest:export','','admin',NOW(),'',NULL,'');

-- 8. 通道过检率
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2332,'通道过检率',2300,8,'channelPassRate','ledger/channelPassRate/index','',1,0,'C','0','0','ledger:channelPassRate:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2333,'导出',2332,1,'','','',1,0,'F','0','0','ledger:channelPassRate:export','','admin',NOW(),'',NULL,'');

-- 9. 不安全事件
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2334,'不安全事件',2300,9,'unsafeEvent','ledger/unsafeEvent/index','',1,0,'C','0','0','ledger:unsafeEvent:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2335,'导出',2334,1,'','','',1,0,'F','0','0','ledger:unsafeEvent:export','','admin',NOW(),'',NULL,'');

-- 10. 查获违规品统计
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2336,'查获违规品统计',2300,10,'seizureStats','ledger/seizureStats/index','',1,0,'C','0','0','ledger:seizureStats:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2337,'导出',2336,1,'','','',1,0,'F','0','0','ledger:seizureStats:export','','admin',NOW(),'',NULL,'');

-- 11. 航站楼加分
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2338,'航站楼加分',2300,11,'terminalBonus','ledger/terminalBonus/index','',1,0,'C','0','0','ledger:terminalBonus:list','star','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2339,'导出',2338,1,'','','',1,0,'F','0','0','ledger:terminalBonus:export','','admin',NOW(),'',NULL,'');

-- 12. 成绩收集
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2340,'成绩收集',2300,12,'examScore','ledger/examScore/index','',1,0,'C','0','0','ledger:examScore:list','edit','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2341,'导出',2340,1,'','','',1,0,'F','0','0','ledger:examScore:export','','admin',NOW(),'',NULL,'');

-- 13. 小额奖励审批单
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2342,'小额奖励审批单',2300,13,'rewardApproval','ledger/rewardApproval/index','',1,0,'C','0','0','ledger:rewardApproval:list','gold-medal','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2343,'导出',2342,1,'','','',1,0,'F','0','0','ledger:rewardApproval:export','','admin',NOW(),'',NULL,'');

-- 14. 部门奖惩记录（CRUD）
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2344,'部门奖惩记录',2300,14,'rewardPenalty','ledger/rewardPenalty/index','',1,0,'C','0','0','ledger:rewardPenalty:list','list','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2345,'新增',2344,1,'','','',1,0,'F','0','0','ledger:rewardPenalty:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2346,'修改',2344,2,'','','',1,0,'F','0','0','ledger:rewardPenalty:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2347,'删除',2344,3,'','','',1,0,'F','0','0','ledger:rewardPenalty:remove','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2348,'导出',2344,4,'','','',1,0,'F','0','0','ledger:rewardPenalty:export','','admin',NOW(),'',NULL,'');

-- 15. 请休假记录（CRUD）
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2350,'请休假记录',2300,15,'leaveSpecial','ledger/leaveSpecial/index','',1,0,'C','0','0','ledger:leaveSpecial:list','time','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2351,'新增',2350,1,'','','',1,0,'F','0','0','ledger:leaveSpecial:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2352,'修改',2350,2,'','','',1,0,'F','0','0','ledger:leaveSpecial:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2353,'删除',2350,3,'','','',1,0,'F','0','0','ledger:leaveSpecial:remove','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2354,'导出',2350,4,'','','',1,0,'F','0','0','ledger:leaveSpecial:export','','admin',NOW(),'',NULL,'');

-- 16. 锦旗及感谢信（CRUD）
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2356,'锦旗及感谢信',2300,16,'bannerLetter','ledger/bannerLetter/index','',1,0,'C','0','0','ledger:bannerLetter:list','flag','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2357,'新增',2356,1,'','','',1,0,'F','0','0','ledger:bannerLetter:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2358,'修改',2356,2,'','','',1,0,'F','0','0','ledger:bannerLetter:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2359,'删除',2356,3,'','','',1,0,'F','0','0','ledger:bannerLetter:remove','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2360,'导出',2356,4,'','','',1,0,'F','0','0','ledger:bannerLetter:export','','admin',NOW(),'',NULL,'');


-- ============================================================
-- 二、配分管理（父目录 menu_id=2400）
-- ============================================================
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2400,'配分管理',0,7,'score',NULL,'',1,0,'M','0','0','','monitor','admin',NOW(),'',NULL,'配分体系管理目录');

-- 1. 配分表体系维护（维度+指标）
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2401,'配分表体系维护',2400,1,'dimension','score/dimension/index','',1,0,'C','0','0','score:dimension:list','tree','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2402,'新增维度',2401,1,'','','',1,0,'F','0','0','score:dimension:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2403,'修改维度',2401,2,'','','',1,0,'F','0','0','score:dimension:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2404,'删除维度',2401,3,'','','',1,0,'F','0','0','score:dimension:remove','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2405,'新增指标',2401,4,'','','',1,0,'F','0','0','score:indicator:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2406,'修改指标',2401,5,'','','',1,0,'F','0','0','score:indicator:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2407,'删除指标',2401,6,'','','',1,0,'F','0','0','score:indicator:remove','','admin',NOW(),'',NULL,'');

-- 2. 配分事项录入
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2410,'配分事项录入',2400,2,'event','score/event/index','',1,0,'C','0','0','score:event:list','edit','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2411,'新增',2410,1,'','','',1,0,'F','0','0','score:event:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2412,'修改',2410,2,'','','',1,0,'F','0','0','score:event:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2413,'删除',2410,3,'','','',1,0,'F','0','0','score:event:remove','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2414,'导出',2410,4,'','','',1,0,'F','0','0','score:event:export','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2415,'导入',2410,5,'','','',1,0,'F','0','0','score:event:import','','admin',NOW(),'',NULL,'');

-- 3. 推送配置
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2420,'推送配置',2400,3,'pushConfig','score/pushConfig/index','',1,0,'C','0','0','score:pushConfig:list','bell','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2421,'新增',2420,1,'','','',1,0,'F','0','0','score:pushConfig:add','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2422,'修改',2420,2,'','','',1,0,'F','0','0','score:pushConfig:edit','','admin',NOW(),'',NULL,'');
INSERT INTO `sys_menu`(`menu_id`,`menu_name`,`parent_id`,`order_num`,`path`,`component`,`query`,`is_frame`,`is_cache`,`menu_type`,`visible`,`status`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES(2423,'删除',2420,3,'','','',1,0,'F','0','0','score:pushConfig:remove','','admin',NOW(),'',NULL,'');


-- ============================================================
-- 三、给角色分配权限（role_id=1 和 role_id=100）
-- ============================================================

-- role_id = 1
INSERT INTO `sys_role_menu`(`role_id`, `menu_id`)
SELECT 1, m.menu_id FROM `sys_menu` m
WHERE m.menu_id BETWEEN 2300 AND 2500
  AND NOT EXISTS (
    SELECT 1 FROM `sys_role_menu` rm
    WHERE rm.role_id = 1 AND rm.menu_id = m.menu_id
  );

-- role_id = 100
INSERT INTO `sys_role_menu`(`role_id`, `menu_id`)
SELECT 100, m.menu_id FROM `sys_menu` m
WHERE m.menu_id BETWEEN 2300 AND 2500
  AND NOT EXISTS (
    SELECT 1 FROM `sys_role_menu` rm
    WHERE rm.role_id = 100 AND rm.menu_id = m.menu_id
  );


-- ============================================================
-- 四、验证
-- ============================================================
-- SELECT menu_id, menu_name, parent_id, menu_type, perms
-- FROM sys_menu WHERE menu_id BETWEEN 2300 AND 2500 ORDER BY menu_id;

-- SELECT COUNT(*) FROM sys_role_menu WHERE role_id=2 AND menu_id BETWEEN 2300 AND 2500;
