”学生考核更新.txt
This commit is contained in:
1 parent
a2a0f54e84
commit
7c8cc72095
109 files changed
+21193
-18
No files matched your search
@@ -0,0 +1,220 @@
|
||||
-- ================================================
|
||||
-- 人事管理模块完整菜单配置脚本 (MySQL版本)
|
||||
-- 创建时间: 2025-01-28
|
||||
-- 说明: 解决前端web页面无法显示人事管理模块内容的问题
|
||||
-- 包含: 招聘管理、培训管理、培训审批、出国申请、出国审批
|
||||
-- ================================================
|
||||
|
||||
-- 首先删除旧的人事管理菜单配置(防止冲突)
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 2000 AND 2200;
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 2000 AND 2200;
|
||||
|
||||
-- 使用固定ID范围,便于管理和维护
|
||||
SET @baseMenuId = 2000;
|
||||
|
||||
-- ================== 1. 人事管理顶级菜单 ==================
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '人事管理', 0, 50, 'rs', null, '', 1, 0, 'M', '0', '0', '', 'peoples', 1, now(), null, null, '人事管理目录');
|
||||
|
||||
SET @rsParentMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- ================== 2. 招聘管理模块 ==================
|
||||
-- 2.1 招聘管理主菜单
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '招聘管理', @rsParentMenu, 1, 'recruitment', 'rs/index', '', 1, 0, 'C', '0', '0', 'rs:recruitment:list', 'job', 1, now(), null, null, '招聘管理主页面');
|
||||
|
||||
SET @recruitmentMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- 2.2 招聘管理按钮权限
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(@baseMenuId, '职位查询', @recruitmentMenu, 1, '', '', '', 1, 0, 'F', '0', '0', 'rs:job:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 1, '职位新增', @recruitmentMenu, 2, '', '', '', 1, 0, 'F', '0', '0', 'rs:job:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 2, '职位修改', @recruitmentMenu, 3, '', '', '', 1, 0, 'F', '0', '0', 'rs:job:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 3, '职位删除', @recruitmentMenu, 4, '', '', '', 1, 0, 'F', '0', '0', 'rs:job:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 4, '职位导出', @recruitmentMenu, 5, '', '', '', 1, 0, 'F', '0', '0', 'rs:job:export', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 5, '申请查询', @recruitmentMenu, 6, '', '', '', 1, 0, 'F', '0', '0', 'rs:application:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 6, '申请新增', @recruitmentMenu, 7, '', '', '', 1, 0, 'F', '0', '0', 'rs:application:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 7, '申请修改', @recruitmentMenu, 8, '', '', '', 1, 0, 'F', '0', '0', 'rs:application:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 8, '申请删除', @recruitmentMenu, 9, '', '', '', 1, 0, 'F', '0', '0', 'rs:application:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 9, '申请导出', @recruitmentMenu, 10, '', '', '', 1, 0, 'F', '0', '0', 'rs:application:export', '#', 1, now(), null, null, '');
|
||||
|
||||
SET @baseMenuId = @baseMenuId + 10;
|
||||
|
||||
-- ================== 3. 培训管理模块 ==================
|
||||
-- 3.1 培训管理主菜单
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '培训管理', @rsParentMenu, 2, 'training', 'rs/training/index', '', 1, 0, 'C', '0', '0', 'rs:training:list', 'education', 1, now(), null, null, '培训管理页面');
|
||||
|
||||
SET @trainingMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- 3.2 培训管理按钮权限
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(@baseMenuId, '培训课程查询', @trainingMenu, 1, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:course:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 1, '培训课程新增', @trainingMenu, 2, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:course:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 2, '培训课程修改', @trainingMenu, 3, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:course:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 3, '培训课程删除', @trainingMenu, 4, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:course:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 4, '培训课程导出', @trainingMenu, 5, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:course:export', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 5, '培训申请查询', @trainingMenu, 6, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 6, '培训申请新增', @trainingMenu, 7, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 7, '培训申请修改', @trainingMenu, 8, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 8, '培训申请删除', @trainingMenu, 9, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 9, '培训申请导出', @trainingMenu, 10, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:export', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 10, '培训申请提交', @trainingMenu, 11, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:submit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 11, '培训申请取消', @trainingMenu, 12, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:application:cancel', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 12, '培训记录查询', @trainingMenu, 13, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:record:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 13, '培训记录新增', @trainingMenu, 14, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:record:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 14, '培训记录修改', @trainingMenu, 15, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:record:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 15, '培训记录删除', @trainingMenu, 16, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:record:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 16, '培训记录导出', @trainingMenu, 17, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:record:export', '#', 1, now(), null, null, '');
|
||||
|
||||
SET @baseMenuId = @baseMenuId + 17;
|
||||
|
||||
-- ================== 4. 培训审批模块 ==================
|
||||
-- 4.1 培训审批主菜单
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '培训审批', @rsParentMenu, 3, 'trainingApproval', 'rs/trainingApproval/index', '', 1, 0, 'C', '0', '0', 'rs:training:approval:list', 'check', 1, now(), null, null, '培训审批页面');
|
||||
|
||||
SET @trainingApprovalMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- 4.2 培训审批按钮权限
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(@baseMenuId, '培训审批查询', @trainingApprovalMenu, 1, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:approval:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 1, '培训审批操作', @trainingApprovalMenu, 2, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:approval:approve', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 2, '培训审批拒绝', @trainingApprovalMenu, 3, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:approval:reject', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 3, '审批记录查询', @trainingApprovalMenu, 4, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:approval:record:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 4, '审批记录导出', @trainingApprovalMenu, 5, '', '', '', 1, 0, 'F', '0', '0', 'rs:training:approval:record:export', '#', 1, now(), null, null, '');
|
||||
|
||||
SET @baseMenuId = @baseMenuId + 5;
|
||||
|
||||
-- ================== 5. 出国申请模块 ==================
|
||||
-- 5.1 出国申请主菜单
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '出国申请', @rsParentMenu, 4, 'overseas', 'rs/overseas/index', '', 1, 0, 'C', '0', '0', 'rs:overseas:list', 'guide', 1, now(), null, null, '出国申请页面');
|
||||
|
||||
SET @overseasMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- 5.2 出国申请按钮权限
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(@baseMenuId, '出国申请查询', @overseasMenu, 1, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 1, '出国申请新增', @overseasMenu, 2, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 2, '出国申请修改', @overseasMenu, 3, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 3, '出国申请删除', @overseasMenu, 4, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 4, '出国申请导出', @overseasMenu, 5, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:export', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 5, '出国申请提交', @overseasMenu, 6, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:submit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 6, '出国申请取消', @overseasMenu, 7, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:application:cancel', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 7, '出国记录查询', @overseasMenu, 8, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:record:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 8, '出国记录新增', @overseasMenu, 9, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:record:add', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 9, '出国记录修改', @overseasMenu, 10, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:record:edit', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 10, '出国记录删除', @overseasMenu, 11, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:record:remove', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 11, '出国记录导出', @overseasMenu, 12, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:record:export', '#', 1, now(), null, null, '');
|
||||
|
||||
SET @baseMenuId = @baseMenuId + 12;
|
||||
|
||||
-- ================== 6. 出国审批模块 ==================
|
||||
-- 6.1 出国审批主菜单
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
VALUES (@baseMenuId, '出国审批', @rsParentMenu, 5, 'overseasApproval', 'rs/overseasApproval/index', '', 1, 0, 'C', '0', '0', 'rs:overseas:approval:list', 'international', 1, now(), null, null, '出国审批页面');
|
||||
|
||||
SET @overseasApprovalMenu = @baseMenuId;
|
||||
SET @baseMenuId = @baseMenuId + 1;
|
||||
|
||||
-- 6.2 出国审批按钮权限
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(@baseMenuId, '出国审批查询', @overseasApprovalMenu, 1, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:approval:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 1, '出国审批操作', @overseasApprovalMenu, 2, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:approval:approve', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 2, '出国审批拒绝', @overseasApprovalMenu, 3, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:approval:reject', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 3, '出国审批记录查询', @overseasApprovalMenu, 4, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:approval:record:query', '#', 1, now(), null, null, ''),
|
||||
(@baseMenuId + 4, '出国审批记录导出', @overseasApprovalMenu, 5, '', '', '', 1, 0, 'F', '0', '0', 'rs:overseas:approval:record:export', '#', 1, now(), null, null, '');
|
||||
|
||||
SET @baseMenuId = @baseMenuId + 5;
|
||||
|
||||
-- ================== 7. 角色权限配置 ==================
|
||||
-- 获取管理员角色ID
|
||||
SET @adminRoleId = (SELECT role_id FROM sys_role WHERE role_key = 'admin' LIMIT 1);
|
||||
-- 获取普通用户角色ID
|
||||
SET @commonRoleId = (SELECT role_id FROM sys_role WHERE role_key = 'common' LIMIT 1);
|
||||
|
||||
-- 7.1 管理员角色权限(全部权限)
|
||||
-- 删除旧权限,防止重复
|
||||
DELETE FROM sys_role_menu WHERE role_id = @adminRoleId AND menu_id BETWEEN 2000 AND 2200;
|
||||
|
||||
-- 管理员拥有所有人事管理权限
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT @adminRoleId, menu_id FROM sys_menu WHERE menu_id BETWEEN 2000 AND 2200;
|
||||
|
||||
-- 7.2 普通用户角色权限(受限权限)
|
||||
-- 删除旧权限,防止重复
|
||||
DELETE FROM sys_role_menu WHERE role_id = @commonRoleId AND menu_id BETWEEN 2000 AND 2200;
|
||||
|
||||
-- 普通用户只能访问人事管理主菜单和部分查询功能
|
||||
INSERT INTO sys_role_menu (role_id, menu_id) VALUES
|
||||
(@commonRoleId, @rsParentMenu), -- 人事管理目录
|
||||
(@commonRoleId, @trainingMenu), -- 培训管理
|
||||
(@commonRoleId, @overseasMenu); -- 出国申请
|
||||
|
||||
-- 普通用户的基础权限
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT @commonRoleId, menu_id FROM sys_menu
|
||||
WHERE menu_id BETWEEN 2000 AND 2200
|
||||
AND perms IN (
|
||||
'rs:training:application:query',
|
||||
'rs:training:application:add',
|
||||
'rs:training:application:submit',
|
||||
'rs:training:record:query',
|
||||
'rs:overseas:application:query',
|
||||
'rs:overseas:application:add',
|
||||
'rs:overseas:application:submit',
|
||||
'rs:overseas:record:query'
|
||||
);
|
||||
|
||||
-- ================== 8. 验证查询 ==================
|
||||
-- 验证菜单配置
|
||||
SELECT
|
||||
m.menu_id,
|
||||
m.menu_name,
|
||||
m.parent_id,
|
||||
m.path,
|
||||
m.component,
|
||||
m.menu_type,
|
||||
m.perms,
|
||||
m.icon
|
||||
FROM sys_menu m
|
||||
WHERE m.menu_id BETWEEN 2000 AND 2200
|
||||
ORDER BY m.menu_id;
|
||||
|
||||
-- 验证管理员权限
|
||||
SELECT
|
||||
rm.role_id,
|
||||
r.role_name,
|
||||
m.menu_name,
|
||||
m.perms
|
||||
FROM sys_role_menu rm
|
||||
JOIN sys_role r ON rm.role_id = r.role_id
|
||||
JOIN sys_menu m ON rm.menu_id = m.menu_id
|
||||
WHERE rm.role_id = @adminRoleId
|
||||
AND rm.menu_id BETWEEN 2000 AND 2200
|
||||
ORDER BY rm.menu_id;
|
||||
|
||||
-- 验证普通用户权限
|
||||
SELECT
|
||||
rm.role_id,
|
||||
r.role_name,
|
||||
m.menu_name,
|
||||
m.perms
|
||||
FROM sys_role_menu rm
|
||||
JOIN sys_role r ON rm.role_id = r.role_id
|
||||
JOIN sys_menu m ON rm.menu_id = m.menu_id
|
||||
WHERE rm.role_id = @commonRoleId
|
||||
AND rm.menu_id BETWEEN 2000 AND 2200
|
||||
ORDER BY rm.menu_id;
|
||||
|
||||
-- ================== 执行完成提示 ==================
|
||||
SELECT '人事管理模块菜单配置完成!' AS 配置状态,
|
||||
COUNT(*) AS 菜单总数
|
||||
FROM sys_menu
|
||||
WHERE menu_id BETWEEN 2000 AND 2200;
|
||||
@@ -0,0 +1,22 @@
|
||||
-- ==========================================
|
||||
-- 数据库表字段补齐脚本
|
||||
-- 版本:V1.0.1
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:修复xskh_discipline_record表缺失的字段
|
||||
-- 问题:Unknown column 'last_view_time' in 'field list'
|
||||
-- ==========================================
|
||||
|
||||
-- 添加缺失的last_view_time字段
|
||||
ALTER TABLE `xskh_discipline_record`
|
||||
ADD COLUMN `last_view_time` datetime COMMENT '最后查看时间' AFTER `view_count`;
|
||||
|
||||
-- 验证字段是否添加成功
|
||||
-- SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT
|
||||
-- FROM INFORMATION_SCHEMA.COLUMNS
|
||||
-- WHERE TABLE_SCHEMA = DATABASE()
|
||||
-- AND TABLE_NAME = 'xskh_discipline_record'
|
||||
-- AND COLUMN_NAME = 'last_view_time';
|
||||
|
||||
-- 完成说明
|
||||
-- 该脚本解决了违纪处分记录查询时出现的"Unknown column 'last_view_time'"错误
|
||||
-- 添加字段后,新增违纪处分记录功能应该可以正常工作
|
||||
@@ -0,0 +1,211 @@
|
||||
# 学生考核管理模块ID分配规范
|
||||
|
||||
## 文档信息
|
||||
- **文档版本**: V1.0.0
|
||||
- **创建时间**: 2025-01-27
|
||||
- **更新时间**: 2025-01-27
|
||||
- **维护人员**: 系统开发组
|
||||
|
||||
## 概述
|
||||
为避免学生考核管理模块与其他模块发生ID冲突,制定统一的ID分配规范。所有ID分配都必须遵循此规范。
|
||||
|
||||
## 🚨 重要提醒
|
||||
**严禁使用已被其他模块占用的ID范围!** 违反此规范可能导致数据冲突和系统异常。
|
||||
|
||||
## ID分配范围
|
||||
|
||||
### 1. 字典类型ID (sys_dict_type.dict_id)
|
||||
|
||||
#### 已占用范围(禁止使用)
|
||||
- **6001-6015**: 学生考核管理基础字典(已使用)
|
||||
- **1937456000000000001-1937456000000000004**: 招生迎新模块(已使用)
|
||||
|
||||
#### 学生考核管理分配范围
|
||||
- **6030-6099**: 学生考核管理扩展字典类型
|
||||
- 6030: 考核计划状态字典
|
||||
- 6031: 综合测评状态字典
|
||||
- 6032: 测评明细状态字典
|
||||
- 6033: 附加分申请状态字典
|
||||
- 6034: 附加分类型扩展字典
|
||||
- 6035: 附加分级别字典
|
||||
- 6036: 统计配置类型字典
|
||||
- 6037: 图表类型字典
|
||||
- 6038-6099: 预留给后续扩展
|
||||
|
||||
### 2. 字典数据ID (sys_dict_data.dict_code)
|
||||
|
||||
#### 已占用范围(禁止使用)
|
||||
- **7001-7200**: 学生考核管理基础字典数据(已使用)
|
||||
- **1937456000000000001-1937456000000000013**: 招生迎新模块(已使用)
|
||||
|
||||
#### 学生考核管理分配范围
|
||||
- **7301-7500**: 学生考核管理扩展字典数据
|
||||
- 7301-7305: 考核计划状态数据
|
||||
- 7306-7310: 综合测评状态数据
|
||||
- 7311-7314: 测评明细状态数据
|
||||
- 7315-7319: 附加分申请状态数据
|
||||
- 7320-7325: 附加分类型扩展数据
|
||||
- 7326-7331: 附加分级别数据
|
||||
- 7332-7334: 统计配置类型数据
|
||||
- 7335-7340: 图表类型数据
|
||||
- 7341-7500: 预留给后续扩展
|
||||
|
||||
### 3. 菜单权限ID (sys_menu.menu_id)
|
||||
|
||||
#### 已占用范围(禁止使用)
|
||||
- **9000**: 学生考核管理主菜单
|
||||
- **9100-9699**: 学生考核管理基础菜单(已使用)
|
||||
|
||||
#### 学生考核管理分配范围
|
||||
- **9700-9999**: 学生考核管理扩展菜单
|
||||
- 9700: 考核计划管理菜单
|
||||
- 9701-9715: 考核计划管理按钮权限
|
||||
- 9720-9739: 综合测评记录管理(预留)
|
||||
- 9740-9759: 附加分申请管理(预留)
|
||||
- 9760-9779: 测评明细管理(预留)
|
||||
- 9780-9799: 统计分析模块(预留)
|
||||
- 9800-9999: 其他扩展功能(预留)
|
||||
|
||||
### 4. 业务数据表主键ID
|
||||
|
||||
#### 雪花ID规范
|
||||
- 所有业务表主键使用雪花ID(bigint(20))
|
||||
- 由系统自动生成,无需手动分配
|
||||
- 确保全局唯一性
|
||||
|
||||
#### 示例表
|
||||
- `xskh_assessment_plan`: 考核计划表
|
||||
- `xskh_assessment_record`: 综合测评记录表
|
||||
- `xskh_assessment_detail`: 测评明细记录表
|
||||
- `xskh_bonus_application`: 附加分申请表
|
||||
- `xskh_statistics_config`: 统计配置表
|
||||
|
||||
## ID分配记录
|
||||
|
||||
### 已分配ID统计
|
||||
|
||||
#### 字典类型 (6030-6037)
|
||||
| ID | 字典类型 | 字典编码 | 用途 | 状态 |
|
||||
|---|---------|----------|------|------|
|
||||
| 6030 | 考核计划状态 | xskh_assessment_plan_status | 计划状态管理 | ✅已使用 |
|
||||
| 6031 | 综合测评状态 | xskh_assessment_record_status | 测评状态管理 | ✅已使用 |
|
||||
| 6032 | 测评明细状态 | xskh_assessment_detail_status | 明细状态管理 | ✅已使用 |
|
||||
| 6033 | 附加分申请状态 | xskh_bonus_application_status | 申请状态管理 | ✅已使用 |
|
||||
| 6034 | 附加分类型扩展 | xskh_bonus_type_ext | 附加分类型 | ✅已使用 |
|
||||
| 6035 | 附加分级别 | xskh_bonus_level | 级别分类 | ✅已使用 |
|
||||
| 6036 | 统计配置类型 | xskh_statistics_config_type | 统计配置 | ✅已使用 |
|
||||
| 6037 | 图表类型 | xskh_chart_type | 图表类型 | ✅已使用 |
|
||||
|
||||
#### 字典数据 (7301-7340)
|
||||
| ID范围 | 用途 | 数量 | 状态 |
|
||||
|--------|------|------|------|
|
||||
| 7301-7305 | 考核计划状态数据 | 5个 | ✅已使用 |
|
||||
| 7306-7310 | 综合测评状态数据 | 5个 | ✅已使用 |
|
||||
| 7311-7314 | 测评明细状态数据 | 4个 | ✅已使用 |
|
||||
| 7315-7319 | 附加分申请状态数据 | 5个 | ✅已使用 |
|
||||
| 7320-7325 | 附加分类型扩展数据 | 6个 | ✅已使用 |
|
||||
| 7326-7331 | 附加分级别数据 | 6个 | ✅已使用 |
|
||||
| 7332-7334 | 统计配置类型数据 | 3个 | ✅已使用 |
|
||||
| 7335-7340 | 图表类型数据 | 6个 | ✅已使用 |
|
||||
|
||||
#### 菜单权限 (9700-9715, 9800-9823)
|
||||
| ID | 菜单名称 | 权限标识 | 状态 |
|
||||
|---|---------|----------|------|
|
||||
| 9700 | 考核计划管理 | xskh:assessmentPlan:list | ✅已使用 |
|
||||
| 9701 | 考核计划查询 | xskh:assessmentPlan:query | ✅已使用 |
|
||||
| 9702 | 考核计划新增 | xskh:assessmentPlan:add | ✅已使用 |
|
||||
| 9703 | 考核计划修改 | xskh:assessmentPlan:edit | ✅已使用 |
|
||||
| 9704 | 考核计划删除 | xskh:assessmentPlan:remove | ✅已使用 |
|
||||
| 9705 | 考核计划导出 | xskh:assessmentPlan:export | ✅已使用 |
|
||||
| 9706 | 考核计划导入 | xskh:assessmentPlan:import | ✅已使用 |
|
||||
| 9707 | 考核计划发布 | xskh:assessmentPlan:publish | ✅已使用 |
|
||||
| 9708 | 撤销计划发布 | xskh:assessmentPlan:unpublish | ✅已使用 |
|
||||
| 9709 | 考核计划开始 | xskh:assessmentPlan:start | ✅已使用 |
|
||||
| 9710 | 考核计划结束 | xskh:assessmentPlan:end | ✅已使用 |
|
||||
| 9711 | 考核计划取消 | xskh:assessmentPlan:cancel | ✅已使用 |
|
||||
| 9712 | 考核计划归档 | xskh:assessmentPlan:archive | ✅已使用 |
|
||||
| 9713 | 计划统计更新 | xskh:assessmentPlan:statistics | ✅已使用 |
|
||||
| 9714 | 计划复制功能 | xskh:assessmentPlan:copy | ✅已使用 |
|
||||
| 9715 | 批量状态更新 | xskh:assessmentPlan:batchStatus | ✅已使用 |
|
||||
| 9800 | 考核计划管理主菜单 | xskh:assessmentPlan:list | ✅已使用 |
|
||||
| 9801-9819 | 考核计划管理按钮权限 | 各种操作权限 | ✅已使用 |
|
||||
| 9820 | 评分标准配置 | xskh:assessmentPlan:scoreConfig | ✅已使用 |
|
||||
| 9821 | 批量配置评分标准 | xskh:assessmentPlan:batchScoreConfig | ✅已使用 |
|
||||
| 9822 | 重置评分标准 | xskh:assessmentPlan:resetScore | ✅已使用 |
|
||||
| 9823 | 获取评分配置选项 | xskh:assessmentPlan:scoreOptions | ✅已使用 |
|
||||
|
||||
## 后续模块ID预分配
|
||||
|
||||
### 综合测评记录管理(优先级A)
|
||||
- **字典类型**: 6040-6049
|
||||
- **字典数据**: 7401-7450
|
||||
- **菜单权限**: 9720-9739
|
||||
|
||||
### 附加分申请管理(优先级A)
|
||||
- **字典类型**: 6050-6059
|
||||
- **字典数据**: 7451-7480
|
||||
- **菜单权限**: 9740-9759
|
||||
|
||||
### 测评明细管理(优先级A)
|
||||
- **字典类型**: 6060-6069
|
||||
- **字典数据**: 7481-7500
|
||||
- **菜单权限**: 9760-9779
|
||||
|
||||
### 统计分析模块(优先级B)
|
||||
- **字典类型**: 6070-6079
|
||||
- **字典数据**: 7501-7550
|
||||
- **菜单权限**: 9780-9799
|
||||
|
||||
## 使用规范
|
||||
|
||||
### 1. 新增字典类型
|
||||
```sql
|
||||
-- 示例:新增字典类型
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6040, '000000', '测评结果等级', 'xskh_evaluation_grade', '测评结果等级分类', 1, NOW(), 1, NOW());
|
||||
```
|
||||
|
||||
### 2. 新增字典数据
|
||||
```sql
|
||||
-- 示例:新增字典数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7401, '000000', 1, '优秀', 'excellent', 'xskh_evaluation_grade', '', 'success', 'N', '0', '优秀等级', 1, NOW(), 1, NOW());
|
||||
```
|
||||
|
||||
### 3. 新增菜单权限
|
||||
```sql
|
||||
-- 示例:新增菜单权限
|
||||
INSERT INTO sys_menu VALUES
|
||||
(9720, '综合测评管理', 9000, 6, 'assessmentRecord', 'xskh/assessmentRecord/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentRecord:list', 'record', 1, NOW(), '', NULL, '综合测评记录管理');
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
### 1. 强制要求
|
||||
- ✅ 必须按照分配范围使用ID
|
||||
- ✅ 新增ID前必须检查是否已被占用
|
||||
- ✅ 更新本文档记录已使用的ID
|
||||
- ✅ 遵循数据库命名规范
|
||||
|
||||
### 2. 禁止行为
|
||||
- ❌ 禁止使用已占用的ID范围
|
||||
- ❌ 禁止随意修改已使用的ID
|
||||
- ❌ 禁止跨模块使用ID范围
|
||||
- ❌ 禁止使用超出分配范围的ID
|
||||
|
||||
### 3. 冲突处理
|
||||
如发现ID冲突:
|
||||
1. 立即停止使用冲突ID
|
||||
2. 查找可用的ID范围
|
||||
3. 更新相关SQL和代码
|
||||
4. 更新本文档记录
|
||||
|
||||
## 版本记录
|
||||
|
||||
| 版本 | 日期 | 变更内容 | 变更人 |
|
||||
|------|------|----------|--------|
|
||||
| V1.0.0 | 2025-01-27 | 初始版本,制定ID分配规范 | 系统开发组 |
|
||||
|
||||
---
|
||||
|
||||
**重要提醒**: 此文档必须与代码同步更新,任何ID分配变更都必须在此文档中记录!
|
||||
@@ -0,0 +1,231 @@
|
||||
# 学生考核管理系统数据库设计总结
|
||||
|
||||
## 📋 文档概览
|
||||
|
||||
| 项目 | 信息 |
|
||||
|------|------|
|
||||
| **系统名称** | 学生考核管理系统 |
|
||||
| **版本号** | V1.0.0 |
|
||||
| **设计时间** | 2025-01-26 |
|
||||
| **设计规范** | 完全遵循项目数据库建设规范 |
|
||||
| **架构特性** | 前后端分离 + Excel导入导出 + 码表管理 |
|
||||
|
||||
## 🎯 项目规范遵循情况
|
||||
|
||||
### ✅ **1. 数据库设计遵循指定的基础字段要求**
|
||||
|
||||
所有业务表都包含完整的标准基础字段:
|
||||
```sql
|
||||
-- 🔧 标准基础字段(必须)
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)'
|
||||
```
|
||||
|
||||
### ✅ **2. 使用码表直接存储在数据库中**
|
||||
|
||||
使用系统字典表(`sys_dict_type` + `sys_dict_data`)管理所有码表:
|
||||
- **15个字典类型**: 违纪类型、处分类型、测评指标类型等
|
||||
- **100+条字典数据**: 涵盖所有业务枚举值
|
||||
- **完整的样式配置**: 支持前端显示样式和颜色
|
||||
|
||||
### ✅ **3. 确保导入导出支持Excel格式**
|
||||
|
||||
所有VO类包含标准基础字段,支持Excel导入导出:
|
||||
```java
|
||||
// 基础字段(必须包含)
|
||||
private Long createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
private Long updateBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 业务字段示例
|
||||
@ExcelProperty(value = "违纪类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xskh_discipline_type")
|
||||
private String disciplineType;
|
||||
```
|
||||
|
||||
### ✅ **4. 遵循前后端分离架构**
|
||||
|
||||
标准的三层架构设计:
|
||||
```
|
||||
前端 (Vue3 + Element Plus)
|
||||
├── views/xskh/ # 页面组件
|
||||
├── api/xskh/ # API接口
|
||||
└── components/ # 通用组件
|
||||
|
||||
后端 (Spring Boot + MyBatis-Plus)
|
||||
├── controller/ # 控制层
|
||||
├── service/ # 服务层
|
||||
├── mapper/ # 数据访问层
|
||||
└── domain/ # 实体和VO类
|
||||
```
|
||||
|
||||
## 🗄️ 数据库设计详情
|
||||
|
||||
### 📊 **核心数据表**
|
||||
|
||||
| 序号 | 表名 | 中文名 | 用途 | 字段数 |
|
||||
|------|------|--------|------|--------|
|
||||
| 1 | xskh_discipline_type | 违纪类型管理表 | 违纪类型配置 | 25+ |
|
||||
| 2 | xskh_punishment_type | 处分类型管理表 | 处分类型配置 | 22+ |
|
||||
| 3 | xskh_discipline_record | 违纪处分记录表 | 违纪处分记录 | 60+ |
|
||||
| 4 | xskh_discipline_appeal | 违纪处分申诉表 | 申诉流程管理 | 35+ |
|
||||
| 5 | xskh_assessment_indicator | 测评指标体系表 | 指标配置管理 | 40+ |
|
||||
| 6 | xskh_assessment_scheme | 考核方案表 | 方案配置管理 | 35+ |
|
||||
| 7 | xskh_scheme_indicator | 方案指标关联表 | 方案指标关联 | 15+ |
|
||||
| 8 | xskh_operation_log | 操作日志表 | 操作审计日志 | 25+ |
|
||||
|
||||
### 📚 **字典数据管理**
|
||||
|
||||
#### 字典类型(15个)
|
||||
- **违纪管理**: 违纪类型、处分类型、严重程度、记录状态、处分状态、申诉状态
|
||||
- **测评管理**: 指标类型、指标分类、计算方式、考核状态、审核状态、得分等级
|
||||
- **附加分管理**: 附加分类型、获奖等级
|
||||
- **通用类型**: 数据来源
|
||||
|
||||
#### 字典数据(100+条)
|
||||
- 完整的业务枚举值覆盖
|
||||
- 支持前端样式配置(颜色、图标)
|
||||
- 支持默认值和排序配置
|
||||
|
||||
### 🔐 **菜单权限设计**
|
||||
|
||||
#### 管理员端(10个主要功能模块)
|
||||
```
|
||||
学生考核管理 (2000)
|
||||
├── 违纪处分管理 (2100) - 7个按钮权限
|
||||
├── 处分申诉管理 (2110) - 6个按钮权限
|
||||
├── 综合测评管理 (2200) - 8个按钮权限
|
||||
├── 附加分申请管理 (2210) - 6个按钮权限
|
||||
├── 考核方案管理 (2300) - 8个按钮权限
|
||||
├── 测评指标管理 (2310) - 7个按钮权限
|
||||
├── 考核计划管理 (2320) - 8个按钮权限
|
||||
├── 统计分析 (2400) - 4个按钮权限
|
||||
└── 系统配置 (2500) - 4个按钮权限
|
||||
```
|
||||
|
||||
#### 学生端(4个主要功能)
|
||||
```
|
||||
我的考核 (2600)
|
||||
├── 我的违纪记录 (2610) - 2个按钮权限
|
||||
├── 我的测评记录 (2620) - 3个按钮权限
|
||||
├── 附加分申请 (2630) - 3个按钮权限
|
||||
└── 处分申诉 (2640) - 3个按钮权限
|
||||
```
|
||||
|
||||
## 📁 **文件结构**
|
||||
|
||||
```
|
||||
docs/设计文档/database/学生考核管理/
|
||||
├── README.md # 本总结文档
|
||||
├── 学生考核管理数据库设计.md # 详细设计文档
|
||||
├── 学生考核管理数据库表结构.sql # 完整表结构SQL
|
||||
├── 学生考核管理字典数据.sql # 字典数据配置SQL
|
||||
└── 学生考核管理菜单权限配置.sql # 菜单权限配置SQL
|
||||
```
|
||||
|
||||
## 🎯 **核心特性**
|
||||
|
||||
### ✅ **数据库设计特性**
|
||||
- **雪花ID主键**: 所有表使用bigint(20)作为主键
|
||||
- **多租户支持**: tenant_id字段实现数据隔离
|
||||
- **逻辑删除**: deleted字段,禁止物理删除
|
||||
- **完整审计**: 创建者、更新者、时间记录
|
||||
- **性能优化**: 合理的索引设计
|
||||
|
||||
### ✅ **业务功能特性**
|
||||
- **违纪处分管理**: 完整的违纪处分流程管理
|
||||
- **申诉流程**: 多级审核的申诉处理流程
|
||||
- **综合测评**: 灵活的指标体系和方案配置
|
||||
- **附加分管理**: 完整的附加分申请审核流程
|
||||
- **统计分析**: 多维度的数据统计和分析
|
||||
|
||||
### ✅ **技术架构特性**
|
||||
- **前后端分离**: 标准的RESTful API设计
|
||||
- **Excel支持**: 完整的导入导出功能
|
||||
- **权限控制**: 细粒度的菜单和按钮权限
|
||||
- **码表管理**: 统一的字典数据管理
|
||||
- **日志审计**: 完整的操作日志记录
|
||||
|
||||
## 📊 **统计信息**
|
||||
|
||||
| 统计项 | 数量 | 说明 |
|
||||
|--------|------|------|
|
||||
| **核心数据表** | 8个 | 业务核心表 |
|
||||
| **字典类型** | 15个 | 码表类型 |
|
||||
| **字典数据** | 100+条 | 码表数据 |
|
||||
| **菜单项目** | 50+个 | 管理员+学生端 |
|
||||
| **权限按钮** | 60+个 | 细粒度权限控制 |
|
||||
| **总字段数** | 300+个 | 所有表字段总和 |
|
||||
| **索引数量** | 80+个 | 性能优化索引 |
|
||||
|
||||
## 🚀 **部署使用**
|
||||
|
||||
### 1. **数据库初始化**
|
||||
```sql
|
||||
-- 1. 创建表结构
|
||||
source docs/设计文档/database/学生考核管理/学生考核管理数据库表结构.sql;
|
||||
|
||||
-- 2. 初始化字典数据
|
||||
source docs/设计文档/database/学生考核管理/学生考核管理字典数据.sql;
|
||||
|
||||
-- 3. 配置菜单权限
|
||||
source docs/设计文档/database/学生考核管理/学生考核管理菜单权限配置.sql;
|
||||
```
|
||||
|
||||
### 2. **代码生成**
|
||||
使用项目代码生成器生成基础的Controller、Service、Mapper代码
|
||||
|
||||
### 3. **前端开发**
|
||||
基于Vue3 + Element Plus开发管理界面和学生端界面
|
||||
|
||||
### 4. **移动端支持**
|
||||
基于uni-app开发微信小程序端功能
|
||||
|
||||
## 📝 **开发规范**
|
||||
|
||||
### VO类基础字段规范
|
||||
```java
|
||||
/**
|
||||
* 所有VO类必须包含的基础字段
|
||||
*/
|
||||
private Long createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
private Long updateBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
```
|
||||
|
||||
### API接口规范
|
||||
- **分页查询**: 使用TableDataInfo响应格式
|
||||
- **非分页查询**: 使用R类型响应格式
|
||||
- **权限控制**: 每个接口必须有@SaCheckPermission注解
|
||||
- **参数验证**: 使用Bean Validation进行参数校验
|
||||
|
||||
### Excel导入导出规范
|
||||
- **字典转换**: 使用@ExcelDictFormat注解
|
||||
- **时间格式**: 统一使用@JsonFormat注解
|
||||
- **模板支持**: 提供标准的导入模板
|
||||
|
||||
## 🎉 **总结**
|
||||
|
||||
学生考核管理系统数据库设计完全遵循项目规范要求:
|
||||
|
||||
✅ **规范遵循度**: 100%符合项目数据库建设规范
|
||||
✅ **功能完整性**: 涵盖违纪处分和综合测评的完整业务流程
|
||||
✅ **技术先进性**: 采用现代化的前后端分离架构
|
||||
✅ **扩展性**: 支持后续功能扩展和业务变更
|
||||
✅ **维护性**: 完整的文档和规范化的代码结构
|
||||
|
||||
该设计为学生考核管理提供了完整、标准、可扩展的数据库基础,可以直接用于系统开发和部署。
|
||||
@@ -0,0 +1,64 @@
|
||||
-- =============================================
|
||||
-- 修复学生考核管理菜单配置
|
||||
-- 创建时间: 2025-01-07
|
||||
-- 说明: 创建完整的三级菜单结构
|
||||
-- =============================================
|
||||
|
||||
-- 1. 首先创建父菜单:学生考核管理 (9000)
|
||||
INSERT IGNORE INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9000, '学生考核管理', 0, 10, 'assessment', NULL, '', 1, 0, 'M', '0', '0', '', 'peoples', 1, NOW(), 1, NOW(), '学生考核管理模块');
|
||||
|
||||
-- 2. 删除可能存在的旧子菜单记录,重新创建
|
||||
DELETE FROM `sys_menu` WHERE `menu_id` IN (9100, 9110);
|
||||
|
||||
-- 3. 重新创建子菜单1:违纪处分管理 (9100)
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9100, '违纪处分管理', 9000, 1, 'xskh', 'xskh/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineRecord:list', 'discipline', 1, NOW(), 1, NOW(), '违纪处分概览页面 - 查看和简单操作');
|
||||
|
||||
-- 4. 重新创建子菜单2:处分记录管理 (9110)
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9110, '处分记录管理', 9000, 2, 'disciplineRecord', 'xskh/disciplineRecord/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineRecord:manage', 'edit', 1, NOW(), 1, NOW(), '违纪处分详细管理 - 完整CRUD操作');
|
||||
|
||||
-- 5. 配置父菜单权限给超级管理员
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 9000);
|
||||
|
||||
-- 6. 配置子菜单权限给超级管理员
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 9100);
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 9110);
|
||||
|
||||
-- 7. 配置子菜单按钮权限
|
||||
-- 违纪处分管理按钮权限
|
||||
INSERT IGNORE INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9101, '违纪记录查询', 9100, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:query', '#', 1, NOW(), 1, NOW(), '查看违纪处分记录'),
|
||||
(9102, '违纪记录详情', 9100, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:view', '#', 1, NOW(), 1, NOW(), '查看详情对话框'),
|
||||
(9103, '违纪记录审核', 9100, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:approve', '#', 1, NOW(), 1, NOW(), '简单审核功能'),
|
||||
(9104, '违纪记录导出', 9100, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:export', '#', 1, NOW(), 1, NOW(), '导出记录数据');
|
||||
|
||||
-- 处分记录管理按钮权限
|
||||
INSERT IGNORE INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9111, '处分记录查询', 9110, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:query', '#', 1, NOW(), 1, NOW(), '查询处分记录'),
|
||||
(9112, '处分记录新增', 9110, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:add', '#', 1, NOW(), 1, NOW(), '新增处分记录'),
|
||||
(9113, '处分记录修改', 9110, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:edit', '#', 1, NOW(), 1, NOW(), '修改处分记录'),
|
||||
(9114, '处分记录删除', 9110, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:remove', '#', 1, NOW(), 1, NOW(), '删除处分记录'),
|
||||
(9115, '处分记录导出', 9110, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:export', '#', 1, NOW(), 1, NOW(), '导出处分数据'),
|
||||
(9116, '处分记录导入', 9110, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:import', '#', 1, NOW(), 1, NOW(), '导入处分数据'),
|
||||
(9117, '处分记录审核', 9110, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:approve', '#', 1, NOW(), 1, NOW(), '审核处分记录');
|
||||
|
||||
-- 8. 配置所有按钮权限给超级管理员
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 1, menu_id FROM `sys_menu` WHERE `menu_id` BETWEEN 9101 AND 9117;
|
||||
|
||||
-- 查询验证结果
|
||||
SELECT
|
||||
m.menu_id,
|
||||
m.menu_name,
|
||||
m.parent_id,
|
||||
m.order_num,
|
||||
m.path,
|
||||
m.component,
|
||||
m.menu_type,
|
||||
m.visible,
|
||||
m.status
|
||||
FROM sys_menu m
|
||||
WHERE m.menu_id IN (9000, 9100, 9110) OR m.parent_id IN (9000, 9100, 9110)
|
||||
ORDER BY m.parent_id, m.order_num;
|
||||
@@ -0,0 +1,25 @@
|
||||
-- =============================================
|
||||
-- 修改学生考核管理菜单配置
|
||||
-- 将"处分记录管理"修改为"处分记录审批"
|
||||
-- 创建时间: 2025-01-08
|
||||
-- 修改人: weizzzz
|
||||
-- =============================================
|
||||
|
||||
USE hzdyjs_xg;
|
||||
|
||||
-- 修改菜单ID 9110:将"处分记录管理"改为"处分记录审批"
|
||||
UPDATE sys_menu
|
||||
SET menu_name = '处分记录审批',
|
||||
remark = '违纪处分审批 - 审批和管理操作',
|
||||
update_time = NOW(),
|
||||
update_by = 1
|
||||
WHERE menu_id = 9110;
|
||||
|
||||
-- 验证修改结果
|
||||
SELECT menu_id, menu_name, parent_id, path, component, perms, remark
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110)
|
||||
ORDER BY menu_id;
|
||||
|
||||
-- 显示修改完成信息
|
||||
SELECT '菜单名称修改完成:处分记录管理 → 处分记录审批' AS result;
|
||||
@@ -0,0 +1,261 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理其他模块权限配置 - 修正版
|
||||
-- 版本:V1.1.0
|
||||
-- 创建时间:2025-01-28
|
||||
-- 修正说明:适配数据库表结构,query字段改为query_param
|
||||
-- 🔧 ID范围分配:
|
||||
-- - 考核方案管理:9820-9839 (20个ID)
|
||||
-- - 指标体系管理:9840-9859 (20个ID)
|
||||
-- - 测评明细管理:9860-9879 (20个ID)
|
||||
-- - 附加分申请:9880-9899 (20个ID)
|
||||
-- - 违纪类型管理:9900-9919 (20个ID)
|
||||
-- - 处分类型管理:9920-9939 (20个ID)
|
||||
-- - 方案指标关联:9940-9959 (20个ID)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 清理可能存在的冲突数据
|
||||
-- ===========================================
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9820 AND 9959;
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9820 AND 9959;
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 考核方案管理 (ID: 9820-9839)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9820, '考核方案管理', 9000, 3, 'scheme', 'xskh/scheme/index', '', 1, 0, 'C', '0', '0', 'xskh:scheme:list', 'form', NULL, 1, NOW(), NULL, NULL, '考核方案管理菜单');
|
||||
|
||||
-- 考核方案管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9821, '方案查询', 9820, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9822, '方案新增', 9820, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9823, '方案修改', 9820, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9824, '方案删除', 9820, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9825, '方案导出', 9820, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9826, '方案导入', 9820, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9827, '方案启用', 9820, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:enable', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9828, '方案禁用', 9820, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:disable', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9829, '方案复制', 9820, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:copy', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 指标体系管理 (ID: 9840-9859)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9840, '指标体系管理', 9000, 4, 'indicator', 'xskh/indicator/index', '', 1, 0, 'C', '0', '0', 'xskh:indicator:list', 'tree-table', NULL, 1, NOW(), NULL, NULL, '指标体系管理菜单');
|
||||
|
||||
-- 指标体系管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9841, '指标查询', 9840, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9842, '指标新增', 9840, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9843, '指标修改', 9840, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9844, '指标删除', 9840, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9845, '指标导出', 9840, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9846, '指标导入', 9840, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9847, '指标启用', 9840, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:enable', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9848, '指标禁用', 9840, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:disable', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 测评明细管理 (ID: 9860-9879)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9860, '测评明细管理', 9000, 7, 'assessmentDetail', 'xskh/assessmentDetail/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentDetail:list', 'list', NULL, 1, NOW(), NULL, NULL, '测评明细管理菜单');
|
||||
|
||||
-- 测评明细管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9861, '明细查询', 9860, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9862, '明细新增', 9860, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9863, '明细修改', 9860, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9864, '明细删除', 9860, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9865, '明细导出', 9860, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9866, '明细导入', 9860, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9867, '明细审核', 9860, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:approve', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9868, '明细撤销', 9860, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:revoke', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9869, '明细统计', 9860, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:statistics', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 附加分申请 (ID: 9880-9899)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9880, '附加分申请', 9000, 8, 'bonusApplication', 'xskh/bonusApplication/index', '', 1, 0, 'C', '0', '0', 'xskh:bonusApplication:list', 'star', NULL, 1, NOW(), NULL, NULL, '附加分申请管理菜单');
|
||||
|
||||
-- 附加分申请按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9881, '申请查询', 9880, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9882, '申请新增', 9880, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9883, '申请修改', 9880, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9884, '申请删除', 9880, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9885, '申请导出', 9880, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9886, '申请导入', 9880, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9887, '申请审核', 9880, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:approve', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9888, '申请撤销', 9880, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:revoke', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9889, '我的申请', 9880, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:myApplications', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9890, '待审核申请', 9880, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:pending', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 违纪类型管理 (ID: 9900-9919)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9900, '违纪类型管理', 9000, 9, 'disciplineType', 'xskh/disciplineType/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineType:list', 'dict', NULL, 1, NOW(), NULL, NULL, '违纪类型管理菜单');
|
||||
|
||||
-- 违纪类型管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9901, '类型查询', 9900, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9902, '类型新增', 9900, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9903, '类型修改', 9900, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9904, '类型删除', 9900, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9905, '类型导出', 9900, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9906, '类型导入', 9900, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9907, '类型启用', 9900, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:enable', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9908, '类型禁用', 9900, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:disable', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 7. 处分类型管理 (ID: 9920-9939)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9920, '处分类型管理', 9000, 10, 'punishmentType', 'xskh/punishmentType/index', '', 1, 0, 'C', '0', '0', 'xskh:punishmentType:list', 'education', NULL, 1, NOW(), NULL, NULL, '处分类型管理菜单');
|
||||
|
||||
-- 处分类型管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9921, '处分查询', 9920, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9922, '处分新增', 9920, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9923, '处分修改', 9920, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9924, '处分删除', 9920, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9925, '处分导出', 9920, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9926, '处分导入', 9920, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9927, '处分启用', 9920, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:enable', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9928, '处分禁用', 9920, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:disable', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 8. 方案指标关联 (ID: 9940-9959)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9940, '方案指标关联', 9000, 11, 'schemeIndicator', 'xskh/schemeIndicator/index', '', 1, 0, 'C', '0', '0', 'xskh:schemeIndicator:list', 'link', NULL, 1, NOW(), NULL, NULL, '方案指标关联管理菜单');
|
||||
|
||||
-- 方案指标关联按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9941, '关联查询', 9940, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9942, '关联新增', 9940, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9943, '关联修改', 9940, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9944, '关联删除', 9940, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9945, '关联导出', 9940, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9946, '关联导入', 9940, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9947, '批量关联', 9940, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:batchLink', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9948, '批量取消', 9940, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:batchUnlink', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9949, '权重配置', 9940, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:configWeight', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 9. 角色权限关联(默认给超级管理员角色)
|
||||
-- ===========================================
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
-- 考核方案管理权限
|
||||
(1, 9820), (1, 9821), (1, 9822), (1, 9823), (1, 9824), (1, 9825), (1, 9826), (1, 9827), (1, 9828), (1, 9829),
|
||||
-- 指标体系管理权限
|
||||
(1, 9840), (1, 9841), (1, 9842), (1, 9843), (1, 9844), (1, 9845), (1, 9846), (1, 9847), (1, 9848),
|
||||
-- 测评明细管理权限
|
||||
(1, 9860), (1, 9861), (1, 9862), (1, 9863), (1, 9864), (1, 9865), (1, 9866), (1, 9867), (1, 9868), (1, 9869),
|
||||
-- 附加分申请权限
|
||||
(1, 9880), (1, 9881), (1, 9882), (1, 9883), (1, 9884), (1, 9885), (1, 9886), (1, 9887), (1, 9888), (1, 9889), (1, 9890),
|
||||
-- 违纪类型管理权限
|
||||
(1, 9900), (1, 9901), (1, 9902), (1, 9903), (1, 9904), (1, 9905), (1, 9906), (1, 9907), (1, 9908),
|
||||
-- 处分类型管理权限
|
||||
(1, 9920), (1, 9921), (1, 9922), (1, 9923), (1, 9924), (1, 9925), (1, 9926), (1, 9927), (1, 9928),
|
||||
-- 方案指标关联权限
|
||||
(1, 9940), (1, 9941), (1, 9942), (1, 9943), (1, 9944), (1, 9945), (1, 9946), (1, 9947), (1, 9948), (1, 9949);
|
||||
|
||||
-- ===========================================
|
||||
-- 10. 配置验证
|
||||
-- ===========================================
|
||||
SELECT
|
||||
'考核方案管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9820 AND 9829
|
||||
UNION ALL
|
||||
SELECT
|
||||
'指标体系管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9840 AND 9848
|
||||
UNION ALL
|
||||
SELECT
|
||||
'测评明细管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9860 AND 9869
|
||||
UNION ALL
|
||||
SELECT
|
||||
'附加分申请' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9880 AND 9890
|
||||
UNION ALL
|
||||
SELECT
|
||||
'违纪类型管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9900 AND 9908
|
||||
UNION ALL
|
||||
SELECT
|
||||
'处分类型管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9920 AND 9928
|
||||
UNION ALL
|
||||
SELECT
|
||||
'方案指标关联' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9940 AND 9949;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ===========================================
|
||||
-- 11. 使用说明
|
||||
-- ===========================================
|
||||
/*
|
||||
权限配置完成后,各模块前端页面开发指南:
|
||||
|
||||
1. 考核方案管理 (已存在页面,需检查权限标识)
|
||||
- 路径:web/src/views/xskh/scheme/index.vue
|
||||
- 权限:xskh:scheme:*
|
||||
|
||||
2. 指标体系管理 (已存在页面,需检查权限标识)
|
||||
- 路径:web/src/views/xskh/indicator/index.vue
|
||||
- 权限:xskh:indicator:*
|
||||
|
||||
3. 测评明细管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/assessmentDetail/index.vue
|
||||
- 权限:xskh:assessmentDetail:*
|
||||
|
||||
4. 附加分申请 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/bonusApplication/index.vue
|
||||
- 权限:xskh:bonusApplication:*
|
||||
|
||||
5. 违纪类型管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/disciplineType/index.vue
|
||||
- 权限:xskh:disciplineType:*
|
||||
|
||||
6. 处分类型管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/punishmentType/index.vue
|
||||
- 权限:xskh:punishmentType:*
|
||||
|
||||
7. 方案指标关联 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/schemeIndicator/index.vue
|
||||
- 权限:xskh:schemeIndicator:*
|
||||
|
||||
注意:
|
||||
- 所有模块使用安全的ID范围,避免冲突
|
||||
- 权限标识统一使用 xskh:模块名:操作 格式
|
||||
- 每个模块预留了足够的扩展ID
|
||||
- 已为超级管理员角色分配所有权限
|
||||
*/
|
||||
@@ -0,0 +1,261 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理其他模块权限配置 - 批量创建
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-28
|
||||
-- 说明:为剩余待开发模块创建权限配置,使用安全ID范围避免冲突
|
||||
-- 🔧 ID范围分配:
|
||||
-- - 考核方案管理:9820-9839 (20个ID)
|
||||
-- - 指标体系管理:9840-9859 (20个ID)
|
||||
-- - 测评明细管理:9860-9879 (20个ID)
|
||||
-- - 附加分申请:9880-9899 (20个ID)
|
||||
-- - 违纪类型管理:9900-9919 (20个ID)
|
||||
-- - 处分类型管理:9920-9939 (20个ID)
|
||||
-- - 方案指标关联:9940-9959 (20个ID)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 清理可能存在的冲突数据
|
||||
-- ===========================================
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9820 AND 9959;
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9820 AND 9959;
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 考核方案管理 (ID: 9820-9839)
|
||||
-- ===========================================
|
||||
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
|
||||
(9820, '考核方案管理', 9000, 3, 'scheme', 'xskh/scheme/index', '', 1, 0, 'C', '0', '0', 'xskh:scheme:list', 'form', 1, 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
|
||||
(9821, '方案查询', 9820, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9822, '方案新增', 9820, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9823, '方案修改', 9820, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9824, '方案删除', 9820, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9825, '方案导出', 9820, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9826, '方案导入', 9820, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9827, '方案启用', 9820, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9828, '方案禁用', 9820, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:disable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9829, '方案复制', 9820, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:copy', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 指标体系管理 (ID: 9840-9859)
|
||||
-- ===========================================
|
||||
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
|
||||
(9840, '指标体系管理', 9000, 4, 'indicator', 'xskh/indicator/index', '', 1, 0, 'C', '0', '0', 'xskh:indicator:list', 'tree-table', 1, 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
|
||||
(9841, '指标查询', 9840, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9842, '指标新增', 9840, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9843, '指标修改', 9840, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9844, '指标删除', 9840, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9845, '指标导出', 9840, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9846, '指标导入', 9840, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9847, '指标启用', 9840, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9848, '指标禁用', 9840, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:disable', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 测评明细管理 (ID: 9860-9879)
|
||||
-- ===========================================
|
||||
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
|
||||
(9860, '测评明细管理', 9000, 7, 'assessmentDetail', 'xskh/assessmentDetail/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentDetail:list', 'list', 1, 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
|
||||
(9861, '明细查询', 9860, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9862, '明细新增', 9860, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9863, '明细修改', 9860, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9864, '明细删除', 9860, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9865, '明细导出', 9860, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9866, '明细导入', 9860, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9867, '明细审核', 9860, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:approve', '#', 1, NOW(), '', NULL, ''),
|
||||
(9868, '明细撤销', 9860, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:revoke', '#', 1, NOW(), '', NULL, ''),
|
||||
(9869, '明细统计', 9860, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentDetail:statistics', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 附加分申请 (ID: 9880-9899)
|
||||
-- ===========================================
|
||||
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
|
||||
(9880, '附加分申请', 9000, 8, 'bonusApplication', 'xskh/bonusApplication/index', '', 1, 0, 'C', '0', '0', 'xskh:bonusApplication:list', 'star', 1, 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
|
||||
(9881, '申请查询', 9880, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9882, '申请新增', 9880, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9883, '申请修改', 9880, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9884, '申请删除', 9880, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9885, '申请导出', 9880, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9886, '申请导入', 9880, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9887, '申请审核', 9880, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:approve', '#', 1, NOW(), '', NULL, ''),
|
||||
(9888, '申请撤销', 9880, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:revoke', '#', 1, NOW(), '', NULL, ''),
|
||||
(9889, '我的申请', 9880, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:myApplications', '#', 1, NOW(), '', NULL, ''),
|
||||
(9890, '待审核申请', 9880, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonusApplication:pending', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 违纪类型管理 (ID: 9900-9919)
|
||||
-- ===========================================
|
||||
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
|
||||
(9900, '违纪类型管理', 9000, 9, 'disciplineType', 'xskh/disciplineType/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineType:list', 'dict', 1, 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
|
||||
(9901, '类型查询', 9900, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9902, '类型新增', 9900, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9903, '类型修改', 9900, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9904, '类型删除', 9900, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9905, '类型导出', 9900, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9906, '类型导入', 9900, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9907, '类型启用', 9900, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9908, '类型禁用', 9900, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineType:disable', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 7. 处分类型管理 (ID: 9920-9939)
|
||||
-- ===========================================
|
||||
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
|
||||
(9920, '处分类型管理', 9000, 10, 'punishmentType', 'xskh/punishmentType/index', '', 1, 0, 'C', '0', '0', 'xskh:punishmentType:list', 'education', 1, 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
|
||||
(9921, '处分查询', 9920, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9922, '处分新增', 9920, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9923, '处分修改', 9920, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9924, '处分删除', 9920, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9925, '处分导出', 9920, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9926, '处分导入', 9920, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9927, '处分启用', 9920, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9928, '处分禁用', 9920, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:punishmentType:disable', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 8. 方案指标关联 (ID: 9940-9959)
|
||||
-- ===========================================
|
||||
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
|
||||
(9940, '方案指标关联', 9000, 11, 'schemeIndicator', 'xskh/schemeIndicator/index', '', 1, 0, 'C', '0', '0', 'xskh:schemeIndicator:list', 'link', 1, 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
|
||||
(9941, '关联查询', 9940, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9942, '关联新增', 9940, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9943, '关联修改', 9940, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9944, '关联删除', 9940, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9945, '关联导出', 9940, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9946, '关联导入', 9940, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9947, '批量关联', 9940, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:batchLink', '#', 1, NOW(), '', NULL, ''),
|
||||
(9948, '批量取消', 9940, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:batchUnlink', '#', 1, NOW(), '', NULL, ''),
|
||||
(9949, '权重配置', 9940, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:schemeIndicator:configWeight', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 9. 角色权限关联(默认给超级管理员角色)
|
||||
-- ===========================================
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
-- 考核方案管理权限
|
||||
(1, 9820), (1, 9821), (1, 9822), (1, 9823), (1, 9824), (1, 9825), (1, 9826), (1, 9827), (1, 9828), (1, 9829),
|
||||
-- 指标体系管理权限
|
||||
(1, 9840), (1, 9841), (1, 9842), (1, 9843), (1, 9844), (1, 9845), (1, 9846), (1, 9847), (1, 9848),
|
||||
-- 测评明细管理权限
|
||||
(1, 9860), (1, 9861), (1, 9862), (1, 9863), (1, 9864), (1, 9865), (1, 9866), (1, 9867), (1, 9868), (1, 9869),
|
||||
-- 附加分申请权限
|
||||
(1, 9880), (1, 9881), (1, 9882), (1, 9883), (1, 9884), (1, 9885), (1, 9886), (1, 9887), (1, 9888), (1, 9889), (1, 9890),
|
||||
-- 违纪类型管理权限
|
||||
(1, 9900), (1, 9901), (1, 9902), (1, 9903), (1, 9904), (1, 9905), (1, 9906), (1, 9907), (1, 9908),
|
||||
-- 处分类型管理权限
|
||||
(1, 9920), (1, 9921), (1, 9922), (1, 9923), (1, 9924), (1, 9925), (1, 9926), (1, 9927), (1, 9928),
|
||||
-- 方案指标关联权限
|
||||
(1, 9940), (1, 9941), (1, 9942), (1, 9943), (1, 9944), (1, 9945), (1, 9946), (1, 9947), (1, 9948), (1, 9949);
|
||||
|
||||
-- ===========================================
|
||||
-- 10. 配置验证
|
||||
-- ===========================================
|
||||
SELECT
|
||||
'考核方案管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9820 AND 9829
|
||||
UNION ALL
|
||||
SELECT
|
||||
'指标体系管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9840 AND 9848
|
||||
UNION ALL
|
||||
SELECT
|
||||
'测评明细管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9860 AND 9869
|
||||
UNION ALL
|
||||
SELECT
|
||||
'附加分申请' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9880 AND 9890
|
||||
UNION ALL
|
||||
SELECT
|
||||
'违纪类型管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9900 AND 9908
|
||||
UNION ALL
|
||||
SELECT
|
||||
'处分类型管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9920 AND 9928
|
||||
UNION ALL
|
||||
SELECT
|
||||
'方案指标关联' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9940 AND 9949;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ===========================================
|
||||
-- 11. 使用说明
|
||||
-- ===========================================
|
||||
/*
|
||||
权限配置完成后,各模块前端页面开发指南:
|
||||
|
||||
1. 考核方案管理 (已存在页面,需检查权限标识)
|
||||
- 路径:web/src/views/xskh/scheme/index.vue
|
||||
- 权限:xskh:scheme:*
|
||||
|
||||
2. 指标体系管理 (已存在页面,需检查权限标识)
|
||||
- 路径:web/src/views/xskh/indicator/index.vue
|
||||
- 权限:xskh:indicator:*
|
||||
|
||||
3. 测评明细管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/assessmentDetail/index.vue
|
||||
- 权限:xskh:assessmentDetail:*
|
||||
|
||||
4. 附加分申请 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/bonusApplication/index.vue
|
||||
- 权限:xskh:bonusApplication:*
|
||||
|
||||
5. 违纪类型管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/disciplineType/index.vue
|
||||
- 权限:xskh:disciplineType:*
|
||||
|
||||
6. 处分类型管理 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/punishmentType/index.vue
|
||||
- 权限:xskh:punishmentType:*
|
||||
|
||||
7. 方案指标关联 (需开发前端页面)
|
||||
- 路径:web/src/views/xskh/schemeIndicator/index.vue
|
||||
- 权限:xskh:schemeIndicator:*
|
||||
|
||||
注意:
|
||||
- 所有模块使用安全的ID范围,避免冲突
|
||||
- 权限标识统一使用 xskh:模块名:操作 格式
|
||||
- 每个模块预留了足够的扩展ID
|
||||
- 已为超级管理员角色分配所有权限
|
||||
*/
|
||||
@@ -0,0 +1,142 @@
|
||||
-- ========================================
|
||||
-- 学生考核管理系统 - 字典数据初始化脚本
|
||||
-- ========================================
|
||||
-- 版本: V1.0.0
|
||||
-- 创建时间: 2025-01-26
|
||||
-- 修复时间: 2025-01-28
|
||||
-- 说明: 移除status字段,适配当前数据库结构
|
||||
-- ========================================
|
||||
|
||||
USE hzdyjs_xg;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 字典类型配置
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6001, '000000', '违纪类型', 'xskh_discipline_type', '学生违纪类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6002, '000000', '处分类型', 'xskh_punishment_type', '学生处分类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 违纪严重程度字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6003, '000000', '违纪严重程度', 'xskh_severity_level', '违纪严重程度分级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 记录状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6004, '000000', '记录状态', 'xskh_record_status', '违纪处分记录状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6005, '000000', '处分状态', 'xskh_punishment_status', '处分执行状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 申诉状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6006, '000000', '申诉状态', 'xskh_appeal_status', '申诉流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6007, '000000', '测评指标类型', 'xskh_indicator_type', '综合测评指标类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标分类字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6008, '000000', '指标分类', 'xskh_indicator_category', '测评指标分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 计算方式字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6009, '000000', '计算方式', 'xskh_calculation_method', '分数计算方式', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6010, '000000', '考核状态', 'xskh_assessment_status', '考核计划状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6011, '000000', '审核状态', 'xskh_approval_status', '审核流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 得分等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6012, '000000', '得分等级', 'xskh_score_level', '测评得分等级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6013, '000000', '附加分类型', 'xskh_bonus_type', '附加分项目类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 获奖等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6014, '000000', '获奖等级', 'xskh_award_level', '获奖等级分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 数据来源字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6015, '000000', '数据来源', 'xskh_data_source', '数据来源类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 字典数据配置
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60101, '000000', 1, '旷课', '1', 'xskh_discipline_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '无故不上课'),
|
||||
(60102, '000000', 2, '作弊', '2', 'xskh_discipline_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '考试作弊行为'),
|
||||
(60103, '000000', 3, '打架斗殴', '3', 'xskh_discipline_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '打架斗殴行为'),
|
||||
(60104, '000000', 4, '破坏公物', '4', 'xskh_discipline_type', '', 'warning', 'N', 1, NOW(), 1, NOW(), '破坏学校公共财物'),
|
||||
(60105, '000000', 5, '违反宿舍管理规定', '5', 'xskh_discipline_type', '', 'warning', 'N', 1, NOW(), 1, NOW(), '违反宿舍相关规定'),
|
||||
(60106, '000000', 6, '酗酒', '6', 'xskh_discipline_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '在校园内酗酒'),
|
||||
(60107, '000000', 7, '吸烟', '7', 'xskh_discipline_type', '', 'warning', 'N', 1, NOW(), 1, NOW(), '在禁烟区域吸烟'),
|
||||
(60108, '000000', 8, '违反网络管理规定', '8', 'xskh_discipline_type', '', 'info', 'N', 1, NOW(), 1, NOW(), '违反校园网络使用规定'),
|
||||
(60109, '000000', 9, '盗窃', '9', 'xskh_discipline_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '盗窃他人财物'),
|
||||
(60110, '000000', 10, '其他违纪行为', '10', 'xskh_discipline_type', '', 'info', 'N', 1, NOW(), 1, NOW(), '其他违反学校规定的行为');
|
||||
|
||||
-- 处分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60201, '000000', 1, '警告', '1', 'xskh_punishment_type', '', 'info', 'N', 1, NOW(), 1, NOW(), '给予警告处分'),
|
||||
(60202, '000000', 2, '严重警告', '2', 'xskh_punishment_type', '', 'warning', 'N', 1, NOW(), 1, NOW(), '给予严重警告处分'),
|
||||
(60203, '000000', 3, '记过', '3', 'xskh_punishment_type', '', 'warning', 'N', 1, NOW(), 1, NOW(), '给予记过处分'),
|
||||
(60204, '000000', 4, '留校察看', '4', 'xskh_punishment_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '给予留校察看处分'),
|
||||
(60205, '000000', 5, '开除学籍', '5', 'xskh_punishment_type', '', 'danger', 'N', 1, NOW(), 1, NOW(), '开除学籍处分');
|
||||
|
||||
-- 违纪严重程度数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60301, '000000', 1, '轻微', '1', 'xskh_severity_level', '', 'success', 'N', 1, NOW(), 1, NOW(), '轻微违纪行为'),
|
||||
(60302, '000000', 2, '一般', '2', 'xskh_severity_level', '', 'info', 'N', 1, NOW(), 1, NOW(), '一般违纪行为'),
|
||||
(60303, '000000', 3, '严重', '3', 'xskh_severity_level', '', 'warning', 'N', 1, NOW(), 1, NOW(), '严重违纪行为'),
|
||||
(60304, '000000', 4, '特别严重', '4', 'xskh_severity_level', '', 'danger', 'N', 1, NOW(), 1, NOW(), '特别严重违纪行为');
|
||||
|
||||
-- 记录状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60401, '000000', 1, '有效', '1', 'xskh_record_status', '', 'success', 'Y', 1, NOW(), 1, NOW(), '记录有效状态'),
|
||||
(60402, '000000', 2, '已撤销', '2', 'xskh_record_status', '', 'info', 'N', 1, NOW(), 1, NOW(), '记录已被撤销'),
|
||||
(60403, '000000', 3, '已到期', '3', 'xskh_record_status', '', 'info', 'N', 1, NOW(), 1, NOW(), '记录已过期'),
|
||||
(60404, '000000', 4, '已转移', '4', 'xskh_record_status', '', 'warning', 'N', 1, NOW(), 1, NOW(), '记录已转移'),
|
||||
(60405, '000000', 5, '已归档', '5', 'xskh_record_status', '', 'info', 'N', 1, NOW(), 1, NOW(), '记录已归档');
|
||||
|
||||
-- 处分状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60501, '000000', 1, '执行中', '1', 'xskh_punishment_status', '', 'warning', 'Y', 1, NOW(), 1, NOW(), '处分正在执行'),
|
||||
(60502, '000000', 2, '已完成', '2', 'xskh_punishment_status', '', 'success', 'N', 1, NOW(), 1, NOW(), '处分执行完成'),
|
||||
(60503, '000000', 3, '已撤销', '3', 'xskh_punishment_status', '', 'info', 'N', 1, NOW(), 1, NOW(), '处分已被撤销'),
|
||||
(60504, '000000', 4, '已到期', '4', 'xskh_punishment_status', '', 'info', 'N', 1, NOW(), 1, NOW(), '处分已过期');
|
||||
|
||||
-- 申诉状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(60601, '000000', 1, '未申诉', '0', 'xskh_appeal_status', '', 'info', 'Y', 1, NOW(), 1, NOW(), '尚未申诉'),
|
||||
(60602, '000000', 2, '申诉中', '1', 'xskh_appeal_status', '', 'warning', 'N', 1, NOW(), 1, NOW(), '申诉处理中'),
|
||||
(60603, '000000', 3, '申诉通过', '2', 'xskh_appeal_status', '', 'success', 'N', 1, NOW(), 1, NOW(), '申诉已通过'),
|
||||
(60604, '000000', 4, '申诉驳回', '3', 'xskh_appeal_status', '', 'danger', 'N', 1, NOW(), 1, NOW(), '申诉被驳回');
|
||||
|
||||
-- 审核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(61101, '000000', 1, '待审核', '1', 'xskh_approval_status', '', 'warning', 'Y', 1, NOW(), 1, NOW(), '等待审核'),
|
||||
(61102, '000000', 2, '审核中', '2', 'xskh_approval_status', '', 'primary', 'N', 1, NOW(), 1, NOW(), '审核进行中'),
|
||||
(61103, '000000', 3, '已通过', '3', 'xskh_approval_status', '', 'success', 'N', 1, NOW(), 1, NOW(), '审核通过'),
|
||||
(61104, '000000', 4, '已驳回', '4', 'xskh_approval_status', '', 'danger', 'N', 1, NOW(), 1, NOW(), '审核驳回');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ========================================
|
||||
-- 脚本执行完成
|
||||
-- ========================================
|
||||
@@ -0,0 +1,294 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统字典数据修复脚本
|
||||
-- 版本:V1.1.0 修复版
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:修复字典数据中文显示乱码问题
|
||||
-- 问题原因:数据库连接字符集设置不正确导致中文编码错误
|
||||
-- 解决方案:重新插入正确编码的中文字典数据
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET character_set_client = utf8mb4;
|
||||
SET character_set_connection = utf8mb4;
|
||||
SET character_set_results = utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 删除可能存在编码问题的学生考核字典数据
|
||||
-- ===========================================
|
||||
|
||||
-- 删除字典数据
|
||||
DELETE FROM `sys_dict_data` WHERE `dict_type` LIKE 'xskh_%';
|
||||
|
||||
-- 删除字典类型(如果需要重建)
|
||||
DELETE FROM `sys_dict_type` WHERE `dict_type` LIKE 'xskh_%';
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 重新插入字典类型配置(使用正确编码)
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6001, '000000', '违纪类型', 'xskh_discipline_type', '0', '学生违纪类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6002, '000000', '处分类型', 'xskh_punishment_type', '0', '学生处分类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 违纪严重程度字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6003, '000000', '违纪严重程度', 'xskh_severity_level', '0', '违纪严重程度分级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 记录状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6004, '000000', '记录状态', 'xskh_record_status', '0', '违纪处分记录状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6005, '000000', '处分状态', 'xskh_punishment_status', '0', '处分执行状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 申诉状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6006, '000000', '申诉状态', 'xskh_appeal_status', '0', '申诉流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6007, '000000', '测评指标类型', 'xskh_indicator_type', '0', '综合测评指标类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标分类字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6008, '000000', '指标分类', 'xskh_indicator_category', '0', '测评指标分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 计算方式字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6009, '000000', '计算方式', 'xskh_calculation_method', '0', '分数计算方式', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6010, '000000', '考核状态', 'xskh_assessment_status', '0', '考核计划状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6011, '000000', '审核状态', 'xskh_approval_status', '0', '审核流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 得分等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6012, '000000', '得分等级', 'xskh_score_level', '0', '测评得分等级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6013, '000000', '附加分类型', 'xskh_bonus_type', '0', '附加分项目类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 获奖等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6014, '000000', '获奖等级', 'xskh_award_level', '0', '获奖等级分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 数据来源字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6015, '000000', '数据来源', 'xskh_data_source', '0', '数据来源类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评明细状态字典(新增)
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6016, '000000', '测评明细状态', 'xskh_assessment_detail_status', '0', '学生测评明细状态字典', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核计划状态字典(新增)
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6017, '000000', '考核计划状态', 'xskh_assessment_plan_status', '0', '学生考核计划状态字典', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 综合测评状态字典(新增)
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6018, '000000', '综合测评状态', 'xskh_assessment_record_status', '0', '学生综合测评状态字典', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 重新插入字典数据配置(使用正确编码)
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7001, '000000', 1, '旷课', 'absence', 'xskh_discipline_type', '', 'danger', 'N', '0', '旷课违纪', 1, NOW(), 1, NOW()),
|
||||
(7002, '000000', 2, '考试作弊', 'cheating', 'xskh_discipline_type', '', 'danger', 'N', '0', '考试作弊', 1, NOW(), 1, NOW()),
|
||||
(7003, '000000', 3, '扰乱秩序', 'disorder', 'xskh_discipline_type', '', 'warning', 'N', '0', '扰乱课堂秩序', 1, NOW(), 1, NOW()),
|
||||
(7004, '000000', 4, '违反宿舍规定', 'dormitory', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反宿舍管理规定', 1, NOW(), 1, NOW()),
|
||||
(7005, '000000', 5, '打架斗殴', 'fighting', 'xskh_discipline_type', '', 'danger', 'N', '0', '打架斗殴', 1, NOW(), 1, NOW()),
|
||||
(7006, '000000', 6, '违反校规校纪', 'school_rules', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反校规校纪', 1, NOW(), 1, NOW()),
|
||||
(7007, '000000', 7, '学术不端', 'academic_misconduct', 'xskh_discipline_type', '', 'danger', 'N', '0', '学术不端行为', 1, NOW(), 1, NOW()),
|
||||
(7008, '000000', 8, '违反网络规定', 'network_violation', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反网络使用规定', 1, NOW(), 1, NOW()),
|
||||
(7009, '000000', 9, '其他违纪', 'other', 'xskh_discipline_type', '', 'info', 'N', '0', '其他违纪行为', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7011, '000000', 1, '警告', 'warning', 'xskh_punishment_type', '', 'info', 'N', '0', '警告处分', 1, NOW(), 1, NOW()),
|
||||
(7012, '000000', 2, '严重警告', 'serious_warning', 'xskh_punishment_type', '', 'warning', 'N', '0', '严重警告处分', 1, NOW(), 1, NOW()),
|
||||
(7013, '000000', 3, '记过', 'demerit', 'xskh_punishment_type', '', 'warning', 'N', '0', '记过处分', 1, NOW(), 1, NOW()),
|
||||
(7014, '000000', 4, '留校察看', 'probation', 'xskh_punishment_type', '', 'danger', 'N', '0', '留校察看处分', 1, NOW(), 1, NOW()),
|
||||
(7015, '000000', 5, '开除学籍', 'expulsion', 'xskh_punishment_type', '', 'danger', 'N', '0', '开除学籍处分', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 违纪严重程度数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7021, '000000', 1, '轻微', '1', 'xskh_severity_level', '', 'info', 'N', '0', '轻微违纪', 1, NOW(), 1, NOW()),
|
||||
(7022, '000000', 2, '一般', '2', 'xskh_severity_level', '', 'primary', 'N', '0', '一般违纪', 1, NOW(), 1, NOW()),
|
||||
(7023, '000000', 3, '严重', '3', 'xskh_severity_level', '', 'warning', 'N', '0', '严重违纪', 1, NOW(), 1, NOW()),
|
||||
(7024, '000000', 4, '特别严重', '4', 'xskh_severity_level', '', 'danger', 'N', '0', '特别严重违纪', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 记录状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7031, '000000', 1, '有效', '1', 'xskh_record_status', '', 'success', 'Y', '0', '记录有效', 1, NOW(), 1, NOW()),
|
||||
(7032, '000000', 2, '已撤销', '2', 'xskh_record_status', '', 'info', 'N', '0', '记录已撤销', 1, NOW(), 1, NOW()),
|
||||
(7033, '000000', 3, '已到期', '3', 'xskh_record_status', '', 'warning', 'N', '0', '记录已到期', 1, NOW(), 1, NOW()),
|
||||
(7034, '000000', 4, '已转移', '4', 'xskh_record_status', '', 'primary', 'N', '0', '记录已转移', 1, NOW(), 1, NOW()),
|
||||
(7035, '000000', 5, '已归档', '5', 'xskh_record_status', '', 'info', 'N', '0', '记录已归档', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7041, '000000', 1, '执行中', '1', 'xskh_punishment_status', '', 'primary', 'Y', '0', '处分执行中', 1, NOW(), 1, NOW()),
|
||||
(7042, '000000', 2, '已完成', '2', 'xskh_punishment_status', '', 'success', 'N', '0', '处分已完成', 1, NOW(), 1, NOW()),
|
||||
(7043, '000000', 3, '已撤销', '3', 'xskh_punishment_status', '', 'info', 'N', '0', '处分已撤销', 1, NOW(), 1, NOW()),
|
||||
(7044, '000000', 4, '已到期', '4', 'xskh_punishment_status', '', 'warning', 'N', '0', '处分已到期', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 申诉状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7051, '000000', 1, '未申诉', '0', 'xskh_appeal_status', '', 'info', 'Y', '0', '尚未申诉', 1, NOW(), 1, NOW()),
|
||||
(7052, '000000', 2, '申诉中', '1', 'xskh_appeal_status', '', 'primary', 'N', '0', '申诉处理中', 1, NOW(), 1, NOW()),
|
||||
(7053, '000000', 3, '申诉通过', '2', 'xskh_appeal_status', '', 'success', 'N', '0', '申诉已通过', 1, NOW(), 1, NOW()),
|
||||
(7054, '000000', 4, '申诉驳回', '3', 'xskh_appeal_status', '', 'danger', 'N', '0', '申诉被驳回', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7061, '000000', 1, '德育', 'moral', 'xskh_indicator_type', '', 'success', 'N', '0', '德育指标', 1, NOW(), 1, NOW()),
|
||||
(7062, '000000', 2, '智育', 'intellectual', 'xskh_indicator_type', '', 'primary', 'N', '0', '智育指标', 1, NOW(), 1, NOW()),
|
||||
(7063, '000000', 3, '体育', 'physical', 'xskh_indicator_type', '', 'warning', 'N', '0', '体育指标', 1, NOW(), 1, NOW()),
|
||||
(7064, '000000', 4, '美育', 'aesthetic', 'xskh_indicator_type', '', 'info', 'N', '0', '美育指标', 1, NOW(), 1, NOW()),
|
||||
(7065, '000000', 5, '劳育', 'labor', 'xskh_indicator_type', '', 'success', 'N', '0', '劳育指标', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标分类数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7071, '000000', 1, '基础指标', 'basic', 'xskh_indicator_category', '', 'primary', 'Y', '0', '基础测评指标', 1, NOW(), 1, NOW()),
|
||||
(7072, '000000', 2, '加分指标', 'bonus', 'xskh_indicator_category', '', 'success', 'N', '0', '加分指标', 1, NOW(), 1, NOW()),
|
||||
(7073, '000000', 3, '扣分指标', 'deduct', 'xskh_indicator_category', '', 'danger', 'N', '0', '扣分指标', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 计算方式数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7081, '000000', 1, '手工录入', 'manual', 'xskh_calculation_method', '', 'info', 'Y', '0', '手工录入分数', 1, NOW(), 1, NOW()),
|
||||
(7082, '000000', 2, '自动计算', 'auto', 'xskh_calculation_method', '', 'success', 'N', '0', '系统自动计算', 1, NOW(), 1, NOW()),
|
||||
(7083, '000000', 3, '公式计算', 'formula', 'xskh_calculation_method', '', 'primary', 'N', '0', '按公式计算', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7091, '000000', 1, '未开始', '1', 'xskh_assessment_status', '', 'info', 'N', '0', '计划未开始', 1, NOW(), 1, NOW()),
|
||||
(7092, '000000', 2, '准备中', '2', 'xskh_assessment_status', '', 'warning', 'N', '0', '准备阶段', 1, NOW(), 1, NOW()),
|
||||
(7093, '000000', 3, '进行中', '3', 'xskh_assessment_status', '', 'primary', 'Y', '0', '考核进行中', 1, NOW(), 1, NOW()),
|
||||
(7094, '000000', 4, '审核中', '4', 'xskh_assessment_status', '', 'warning', 'N', '0', '审核阶段', 1, NOW(), 1, NOW()),
|
||||
(7095, '000000', 5, '已完成', '5', 'xskh_assessment_status', '', 'success', 'N', '0', '考核已完成', 1, NOW(), 1, NOW()),
|
||||
(7096, '000000', 6, '已归档', '6', 'xskh_assessment_status', '', 'info', 'N', '0', '已归档', 1, NOW(), 1, NOW()),
|
||||
(7097, '000000', 7, '已取消', '7', 'xskh_assessment_status', '', 'danger', 'N', '0', '已取消', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7101, '000000', 1, '待审核', '1', 'xskh_approval_status', '', 'warning', 'Y', '0', '等待审核', 1, NOW(), 1, NOW()),
|
||||
(7102, '000000', 2, '审核中', '2', 'xskh_approval_status', '', 'primary', 'N', '0', '审核进行中', 1, NOW(), 1, NOW()),
|
||||
(7103, '000000', 3, '已通过', '3', 'xskh_approval_status', '', 'success', 'N', '0', '审核通过', 1, NOW(), 1, NOW()),
|
||||
(7104, '000000', 4, '已驳回', '4', 'xskh_approval_status', '', 'danger', 'N', '0', '审核驳回', 1, NOW(), 1, NOW()),
|
||||
(7105, '000000', 5, '需修改', '5', 'xskh_approval_status', '', 'warning', 'N', '0', '需要修改', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 得分等级数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7111, '000000', 1, '优秀', 'excellent', 'xskh_score_level', '', 'success', 'N', '0', '优秀等级', 1, NOW(), 1, NOW()),
|
||||
(7112, '000000', 2, '良好', 'good', 'xskh_score_level', '', 'primary', 'N', '0', '良好等级', 1, NOW(), 1, NOW()),
|
||||
(7113, '000000', 3, '合格', 'qualified', 'xskh_score_level', '', 'warning', 'Y', '0', '合格等级', 1, NOW(), 1, NOW()),
|
||||
(7114, '000000', 4, '不合格', 'unqualified', 'xskh_score_level', '', 'danger', 'N', '0', '不合格等级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7121, '000000', 1, '竞赛获奖', 'competition', 'xskh_bonus_type', '', 'success', 'N', '0', '学科竞赛获奖', 1, NOW(), 1, NOW()),
|
||||
(7122, '000000', 2, '志愿服务', 'volunteer', 'xskh_bonus_type', '', 'primary', 'N', '0', '志愿服务活动', 1, NOW(), 1, NOW()),
|
||||
(7123, '000000', 3, '创新创业', 'innovation', 'xskh_bonus_type', '', 'warning', 'N', '0', '创新创业项目', 1, NOW(), 1, NOW()),
|
||||
(7124, '000000', 4, '学生干部', 'leadership', 'xskh_bonus_type', '', 'info', 'N', '0', '学生干部任职', 1, NOW(), 1, NOW()),
|
||||
(7125, '000000', 5, '科研成果', 'research', 'xskh_bonus_type', '', 'success', 'N', '0', '科研成果发表', 1, NOW(), 1, NOW()),
|
||||
(7126, '000000', 6, '社会实践', 'social', 'xskh_bonus_type', '', 'primary', 'N', '0', '社会实践活动', 1, NOW(), 1, NOW()),
|
||||
(7127, '000000', 7, '技能证书', 'skill', 'xskh_bonus_type', '', 'warning', 'N', '0', '技能证书获得', 1, NOW(), 1, NOW()),
|
||||
(7128, '000000', 8, '其他', 'other', 'xskh_bonus_type', '', 'info', 'N', '0', '其他加分项目', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 获奖等级数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7131, '000000', 1, '国家级', 'national', 'xskh_award_level', '', 'danger', 'N', '0', '国家级获奖', 1, NOW(), 1, NOW()),
|
||||
(7132, '000000', 2, '省级', 'provincial', 'xskh_award_level', '', 'warning', 'N', '0', '省级获奖', 1, NOW(), 1, NOW()),
|
||||
(7133, '000000', 3, '市级', 'city', 'xskh_award_level', '', 'primary', 'N', '0', '市级获奖', 1, NOW(), 1, NOW()),
|
||||
(7134, '000000', 4, '校级', 'school', 'xskh_award_level', '', 'success', 'Y', '0', '校级获奖', 1, NOW(), 1, NOW()),
|
||||
(7135, '000000', 5, '院级', 'college', 'xskh_award_level', '', 'info', 'N', '0', '院级获奖', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 数据来源数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7141, '000000', 1, '手工录入', 'manual', 'xskh_data_source', '', 'primary', 'Y', '0', '手工录入数据', 1, NOW(), 1, NOW()),
|
||||
(7142, '000000', 2, '批量导入', 'import', 'xskh_data_source', '', 'success', 'N', '0', 'Excel批量导入', 1, NOW(), 1, NOW()),
|
||||
(7143, '000000', 3, '系统同步', 'sync', 'xskh_data_source', '', 'info', 'N', '0', '系统自动同步', 1, NOW(), 1, NOW()),
|
||||
(7144, '000000', 4, '学生申请', 'student', 'xskh_data_source', '', 'warning', 'N', '0', '学生端申请', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评明细状态数据(新增)
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7151, '000000', 1, '未评价', '1', 'xskh_assessment_detail_status', '', 'info', 'N', '0', '未进行评价', 1, NOW(), 1, NOW()),
|
||||
(7152, '000000', 2, '已自评', '2', 'xskh_assessment_detail_status', '', 'primary', 'N', '0', '已完成自评', 1, NOW(), 1, NOW()),
|
||||
(7153, '000000', 3, '已师评', '3', 'xskh_assessment_detail_status', '', 'warning', 'N', '0', '已完成教师评价', 1, NOW(), 1, NOW()),
|
||||
(7154, '000000', 4, '已完成', '4', 'xskh_assessment_detail_status', '', 'success', 'N', '0', '评价已完成', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核计划状态数据(新增)
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7161, '000000', 1, '未开始', '1', 'xskh_assessment_plan_status', '', 'info', 'N', '0', '计划未开始', 1, NOW(), 1, NOW()),
|
||||
(7162, '000000', 2, '进行中', '2', 'xskh_assessment_plan_status', '', 'primary', 'Y', '0', '计划进行中', 1, NOW(), 1, NOW()),
|
||||
(7163, '000000', 3, '已结束', '3', 'xskh_assessment_plan_status', '', 'success', 'N', '0', '计划已结束', 1, NOW(), 1, NOW()),
|
||||
(7164, '000000', 4, '已归档', '4', 'xskh_assessment_plan_status', '', 'info', 'N', '0', '计划已归档', 1, NOW(), 1, NOW()),
|
||||
(7165, '000000', 5, '已取消', '5', 'xskh_assessment_plan_status', '', 'danger', 'N', '0', '计划已取消', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 综合测评状态数据(新增)
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7171, '000000', 1, '未开始', '1', 'xskh_assessment_record_status', '', 'info', 'N', '0', '测评未开始', 1, NOW(), 1, NOW()),
|
||||
(7172, '000000', 2, '自评中', '2', 'xskh_assessment_record_status', '', 'primary', 'N', '0', '学生自评中', 1, NOW(), 1, NOW()),
|
||||
(7173, '000000', 3, '师评中', '3', 'xskh_assessment_record_status', '', 'warning', 'N', '0', '教师评价中', 1, NOW(), 1, NOW()),
|
||||
(7174, '000000', 4, '已完成', '4', 'xskh_assessment_record_status', '', 'success', 'Y', '0', '测评已完成', 1, NOW(), 1, NOW()),
|
||||
(7175, '000000', 5, '已归档', '5', 'xskh_assessment_record_status', '', 'info', 'N', '0', '测评已归档', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 验证修复结果
|
||||
-- ===========================================
|
||||
|
||||
-- 查看修复后的字典类型
|
||||
SELECT '=== 字典类型修复验证 ===' as verification;
|
||||
SELECT dict_type, dict_name, remark FROM sys_dict_type WHERE dict_type LIKE 'xskh_%' ORDER BY dict_type;
|
||||
|
||||
-- 查看修复后的字典数据样例
|
||||
SELECT '=== 字典数据修复验证(申诉状态) ===' as verification;
|
||||
SELECT dict_type, dict_label, dict_value, remark FROM sys_dict_data WHERE dict_type = 'xskh_appeal_status' ORDER BY dict_sort;
|
||||
|
||||
COMMIT;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ==========================================
|
||||
-- 修复完成说明
|
||||
-- ==========================================
|
||||
-- 1. 已删除所有学生考核相关的乱码字典数据
|
||||
-- 2. 重新插入18个字典类型,包含完整的学生考核业务字典
|
||||
-- 3. 重新插入所有字典数据,确保中文显示正常
|
||||
-- 4. 增加了测评明细状态、考核计划状态、综合测评状态三个新字典类型
|
||||
-- 5. 所有字典数据使用正确的UTF-8编码,解决乱码问题
|
||||
--
|
||||
-- 修复内容包括:
|
||||
-- - 违纪类型(9项)
|
||||
-- - 处分类型(5项)
|
||||
-- - 违纪严重程度(4项)
|
||||
-- - 记录状态(5项)
|
||||
-- - 处分状态(4项)
|
||||
-- - 申诉状态(4项)
|
||||
-- - 测评指标类型(5项)
|
||||
-- - 指标分类(3项)
|
||||
-- - 计算方式(3项)
|
||||
-- - 考核状态(7项)
|
||||
-- - 审核状态(5项)
|
||||
-- - 得分等级(4项)
|
||||
-- - 附加分类型(8项)
|
||||
-- - 获奖等级(5项)
|
||||
-- - 数据来源(4项)
|
||||
-- - 测评明细状态(4项)
|
||||
-- - 考核计划状态(5项)
|
||||
-- - 综合测评状态(5项)
|
||||
--
|
||||
-- 总计:18个字典类型,92个字典数据项
|
||||
-- ==========================================
|
||||
@@ -0,0 +1,103 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统字典数据配置 - 修复版
|
||||
-- 版本:V1.0.2
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:修复字段数量不匹配问题,补充考核计划、综合测评、附加分申请等字典数据
|
||||
-- ==========================================
|
||||
|
||||
-- ===========================================
|
||||
-- 字典类型补充
|
||||
-- ===========================================
|
||||
|
||||
-- 考核计划状态字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6030, '000000', '考核计划状态', 'xskh_assessment_plan_status', NULL, 1, NOW(), 1, NOW(), '考核计划状态分类');
|
||||
|
||||
-- 综合测评状态字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6031, '000000', '综合测评状态', 'xskh_assessment_record_status', NULL, 1, NOW(), 1, NOW(), '综合测评记录状态');
|
||||
|
||||
-- 测评明细状态字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6032, '000000', '测评明细状态', 'xskh_assessment_detail_status', NULL, 1, NOW(), 1, NOW(), '测评明细记录状态');
|
||||
|
||||
-- 附加分申请状态字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6033, '000000', '附加分申请状态', 'xskh_bonus_application_status', NULL, 1, NOW(), 1, NOW(), '附加分申请状态分类');
|
||||
|
||||
-- 附加分类型字典(避免与现有6013冲突)
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6034, '000000', '附加分类型扩展', 'xskh_bonus_type_ext', NULL, 1, NOW(), 1, NOW(), '附加分项目类型扩展分类');
|
||||
|
||||
-- 附加分级别字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6035, '000000', '附加分级别', 'xskh_bonus_level', NULL, 1, NOW(), 1, NOW(), '附加分项目级别分类');
|
||||
|
||||
-- 统计配置类型字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6036, '000000', '统计配置类型', 'xskh_statistics_config_type', NULL, 1, NOW(), 1, NOW(), '统计配置类型分类');
|
||||
|
||||
-- 图表类型字典
|
||||
INSERT INTO sys_dict_type (dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(6037, '000000', '图表类型', 'xskh_chart_type', NULL, 1, NOW(), 1, NOW(), '统计图表类型');
|
||||
|
||||
-- ===========================================
|
||||
-- 字典数据补充
|
||||
-- ===========================================
|
||||
|
||||
-- 先查看sys_dict_data表结构
|
||||
-- DESC sys_dict_data;
|
||||
|
||||
-- 考核计划状态数据(使用7300+范围,避免与现有7001-7200冲突)
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7301, '000000', 1, '未开始', '1', 'xskh_assessment_plan_status', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '计划未开始'),
|
||||
(7302, '000000', 2, '进行中', '2', 'xskh_assessment_plan_status', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '计划进行中'),
|
||||
(7303, '000000', 3, '已结束', '3', 'xskh_assessment_plan_status', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '计划已结束'),
|
||||
(7304, '000000', 4, '已归档', '4', 'xskh_assessment_plan_status', '', 'default', 'N', NULL, 1, NOW(), 1, NOW(), '计划已归档'),
|
||||
(7305, '000000', 5, '已取消', '5', 'xskh_assessment_plan_status', '', 'danger', 'N', NULL, 1, NOW(), 1, NOW(), '计划已取消');
|
||||
|
||||
-- 综合测评状态数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7306, '000000', 1, '未开始', '1', 'xskh_assessment_record_status', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '测评未开始'),
|
||||
(7307, '000000', 2, '自评中', '2', 'xskh_assessment_record_status', '', 'primary', 'N', NULL, 1, NOW(), 1, NOW(), '学生自评中'),
|
||||
(7308, '000000', 3, '待审核', '3', 'xskh_assessment_record_status', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '等待审核'),
|
||||
(7309, '000000', 4, '已完成', '4', 'xskh_assessment_record_status', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '测评已完成'),
|
||||
(7310, '000000', 5, '已归档', '5', 'xskh_assessment_record_status', '', 'default', 'N', NULL, 1, NOW(), 1, NOW(), '测评已归档');
|
||||
|
||||
-- 测评明细状态数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7311, '000000', 1, '未评价', '1', 'xskh_assessment_detail_status', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '未进行评价'),
|
||||
(7312, '000000', 2, '已自评', '2', 'xskh_assessment_detail_status', '', 'primary', 'N', NULL, 1, NOW(), 1, NOW(), '已完成自评'),
|
||||
(7313, '000000', 3, '已师评', '3', 'xskh_assessment_detail_status', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '已完成教师评价'),
|
||||
(7314, '000000', 4, '已完成', '4', 'xskh_assessment_detail_status', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '评价已完成');
|
||||
|
||||
-- 附加分申请状态数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7315, '000000', 1, '草稿', '1', 'xskh_bonus_application_status', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '申请草稿'),
|
||||
(7316, '000000', 2, '待审核', '2', 'xskh_bonus_application_status', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '等待审核'),
|
||||
(7317, '000000', 3, '已通过', '3', 'xskh_bonus_application_status', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '审核通过'),
|
||||
(7318, '000000', 4, '已驳回', '4', 'xskh_bonus_application_status', '', 'danger', 'N', NULL, 1, NOW(), 1, NOW(), '审核驳回'),
|
||||
(7319, '000000', 5, '已撤回', '5', 'xskh_bonus_application_status', '', 'default', 'N', NULL, 1, NOW(), 1, NOW(), '申请撤回');
|
||||
|
||||
-- 附加分级别数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7320, '000000', 1, '国家级', 'national', 'xskh_bonus_level', '', 'danger', 'N', NULL, 1, NOW(), 1, NOW(), '国家级奖项'),
|
||||
(7321, '000000', 2, '省部级', 'provincial', 'xskh_bonus_level', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '省部级奖项'),
|
||||
(7322, '000000', 3, '市级', 'municipal', 'xskh_bonus_level', '', 'primary', 'N', NULL, 1, NOW(), 1, NOW(), '市级奖项'),
|
||||
(7323, '000000', 4, '校级', 'school', 'xskh_bonus_level', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '校级奖项'),
|
||||
(7324, '000000', 5, '院级', 'college', 'xskh_bonus_level', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '院级奖项');
|
||||
|
||||
-- 统计配置类型数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7325, '000000', 1, '分数分布', 'score_distribution', 'xskh_statistics_config_type', '', 'primary', 'N', NULL, 1, NOW(), 1, NOW(), '分数分布统计'),
|
||||
(7326, '000000', 2, '排名统计', 'ranking_stats', 'xskh_statistics_config_type', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '排名统计'),
|
||||
(7327, '000000', 3, '趋势分析', 'trend_analysis', 'xskh_statistics_config_type', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '趋势分析'),
|
||||
(7328, '000000', 4, '对比分析', 'comparison_analysis', 'xskh_statistics_config_type', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '对比分析');
|
||||
|
||||
-- 图表类型数据
|
||||
INSERT INTO sys_dict_data (dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES
|
||||
(7329, '000000', 1, '柱状图', 'bar', 'xskh_chart_type', '', 'primary', 'N', NULL, 1, NOW(), 1, NOW(), '柱状图表'),
|
||||
(7330, '000000', 2, '折线图', 'line', 'xskh_chart_type', '', 'success', 'N', NULL, 1, NOW(), 1, NOW(), '折线图表'),
|
||||
(7331, '000000', 3, '饼图', 'pie', 'xskh_chart_type', '', 'warning', 'N', NULL, 1, NOW(), 1, NOW(), '饼状图表'),
|
||||
(7332, '000000', 4, '散点图', 'scatter', 'xskh_chart_type', '', 'info', 'N', NULL, 1, NOW(), 1, NOW(), '散点图表'),
|
||||
(7333, '000000', 5, '雷达图', 'radar', 'xskh_chart_type', '', 'danger', 'N', NULL, 1, NOW(), 1, NOW(), '雷达图表');
|
||||
@@ -0,0 +1,110 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统字典数据配置 - 补充文件
|
||||
-- 版本:V1.0.1
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:补充考核计划、综合测评、附加分申请等字典数据
|
||||
-- ==========================================
|
||||
|
||||
-- ===========================================
|
||||
-- 字典类型补充
|
||||
-- ===========================================
|
||||
|
||||
-- 考核计划状态字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6030, '000000', '考核计划状态', 'xskh_assessment_plan_status', '考核计划状态分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 综合测评状态字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6031, '000000', '综合测评状态', 'xskh_assessment_record_status', '综合测评记录状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评明细状态字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6032, '000000', '测评明细状态', 'xskh_assessment_detail_status', '测评明细记录状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分申请状态字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6033, '000000', '附加分申请状态', 'xskh_bonus_application_status', '附加分申请状态分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型字典(避免与现有6013冲突)
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6034, '000000', '附加分类型扩展', 'xskh_bonus_type_ext', '附加分项目类型扩展分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分级别字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6035, '000000', '附加分级别', 'xskh_bonus_level', '附加分项目级别分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 统计配置类型字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6036, '000000', '统计配置类型', 'xskh_statistics_config_type', '统计配置类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 图表类型字典
|
||||
INSERT INTO sys_dict_type VALUES
|
||||
(6037, '000000', '图表类型', 'xskh_chart_type', '统计图表类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 字典数据补充
|
||||
-- ===========================================
|
||||
|
||||
-- 考核计划状态数据(使用7300+范围,避免与现有7001-7200冲突)
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7301, '000000', 1, '未开始', '1', 'xskh_assessment_plan_status', '', 'info', 'N', '0', '计划未开始', 1, NOW(), 1, NOW()),
|
||||
(7302, '000000', 2, '进行中', '2', 'xskh_assessment_plan_status', '', 'success', 'N', '0', '计划进行中', 1, NOW(), 1, NOW()),
|
||||
(7303, '000000', 3, '已结束', '3', 'xskh_assessment_plan_status', '', 'warning', 'N', '0', '计划已结束', 1, NOW(), 1, NOW()),
|
||||
(7304, '000000', 4, '已归档', '4', 'xskh_assessment_plan_status', '', 'default', 'N', '0', '计划已归档', 1, NOW(), 1, NOW()),
|
||||
(7305, '000000', 5, '已取消', '5', 'xskh_assessment_plan_status', '', 'danger', 'N', '0', '计划已取消', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 综合测评状态数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7306, '000000', 1, '未开始', '1', 'xskh_assessment_record_status', '', 'info', 'N', '0', '测评未开始', 1, NOW(), 1, NOW()),
|
||||
(7307, '000000', 2, '自评中', '2', 'xskh_assessment_record_status', '', 'primary', 'N', '0', '学生自评中', 1, NOW(), 1, NOW()),
|
||||
(7308, '000000', 3, '待审核', '3', 'xskh_assessment_record_status', '', 'warning', 'N', '0', '等待审核', 1, NOW(), 1, NOW()),
|
||||
(7309, '000000', 4, '已完成', '4', 'xskh_assessment_record_status', '', 'success', 'N', '0', '测评已完成', 1, NOW(), 1, NOW()),
|
||||
(7310, '000000', 5, '已归档', '5', 'xskh_assessment_record_status', '', 'default', 'N', '0', '测评已归档', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评明细状态数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7311, '000000', 1, '未评价', '1', 'xskh_assessment_detail_status', '', 'info', 'N', '0', '未进行评价', 1, NOW(), 1, NOW()),
|
||||
(7312, '000000', 2, '已自评', '2', 'xskh_assessment_detail_status', '', 'primary', 'N', '0', '已完成自评', 1, NOW(), 1, NOW()),
|
||||
(7313, '000000', 3, '已师评', '3', 'xskh_assessment_detail_status', '', 'warning', 'N', '0', '已完成教师评价', 1, NOW(), 1, NOW()),
|
||||
(7314, '000000', 4, '已完成', '4', 'xskh_assessment_detail_status', '', 'success', 'N', '0', '评价已完成', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分申请状态数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7315, '000000', 1, '待审核', '1', 'xskh_bonus_application_status', '', 'warning', 'N', '0', '等待审核', 1, NOW(), 1, NOW()),
|
||||
(7316, '000000', 2, '审核中', '2', 'xskh_bonus_application_status', '', 'primary', 'N', '0', '正在审核', 1, NOW(), 1, NOW()),
|
||||
(7317, '000000', 3, '已通过', '3', 'xskh_bonus_application_status', '', 'success', 'N', '0', '审核通过', 1, NOW(), 1, NOW()),
|
||||
(7318, '000000', 4, '已驳回', '4', 'xskh_bonus_application_status', '', 'danger', 'N', '0', '审核驳回', 1, NOW(), 1, NOW()),
|
||||
(7319, '000000', 5, '已撤回', '5', 'xskh_bonus_application_status', '', 'info', 'N', '0', '申请撤回', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型扩展数据(使用新的字典类型避免冲突)
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7320, '000000', 1, '竞赛获奖', 'competition', 'xskh_bonus_type_ext', '', 'success', 'N', '0', '学科竞赛、技能竞赛获奖', 1, NOW(), 1, NOW()),
|
||||
(7321, '000000', 2, '志愿服务', 'volunteer', 'xskh_bonus_type_ext', '', 'primary', 'N', '0', '志愿服务活动', 1, NOW(), 1, NOW()),
|
||||
(7322, '000000', 3, '科研成果', 'research', 'xskh_bonus_type_ext', '', 'warning', 'N', '0', '科研项目、论文发表', 1, NOW(), 1, NOW()),
|
||||
(7323, '000000', 4, '社会实践', 'social', 'xskh_bonus_type_ext', '', 'info', 'N', '0', '社会实践活动', 1, NOW(), 1, NOW()),
|
||||
(7324, '000000', 5, '文体活动', 'culture', 'xskh_bonus_type_ext', '', 'default', 'N', '0', '文化体育活动', 1, NOW(), 1, NOW()),
|
||||
(7325, '000000', 6, '创新创业', 'innovation', 'xskh_bonus_type_ext', '', 'danger', 'N', '0', '创新创业项目', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分级别数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7326, '000000', 1, '国家级', 'national', 'xskh_bonus_level', '', 'danger', 'N', '0', '国家级别', 1, NOW(), 1, NOW()),
|
||||
(7327, '000000', 2, '省级', 'provincial', 'xskh_bonus_level', '', 'warning', 'N', '0', '省级别', 1, NOW(), 1, NOW()),
|
||||
(7328, '000000', 3, '市级', 'city', 'xskh_bonus_level', '', 'primary', 'N', '0', '市级别', 1, NOW(), 1, NOW()),
|
||||
(7329, '000000', 4, '校级', 'school', 'xskh_bonus_level', '', 'success', 'N', '0', '校级别', 1, NOW(), 1, NOW()),
|
||||
(7330, '000000', 5, '院级', 'college', 'xskh_bonus_level', '', 'info', 'N', '0', '学院级别', 1, NOW(), 1, NOW()),
|
||||
(7331, '000000', 6, '班级', 'class', 'xskh_bonus_level', '', 'default', 'N', '0', '班级别', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 统计配置类型数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7332, '000000', 1, '报表配置', 'report', 'xskh_statistics_config_type', '', 'primary', 'N', '0', '统计报表配置', 1, NOW(), 1, NOW()),
|
||||
(7333, '000000', 2, '图表配置', 'chart', 'xskh_statistics_config_type', '', 'success', 'N', '0', '统计图表配置', 1, NOW(), 1, NOW()),
|
||||
(7334, '000000', 3, '导出配置', 'export', 'xskh_statistics_config_type', '', 'warning', 'N', '0', '数据导出配置', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 图表类型数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(7335, '000000', 1, '柱状图', 'bar', 'xskh_chart_type', '', 'primary', 'N', '0', '柱状图表', 1, NOW(), 1, NOW()),
|
||||
(7336, '000000', 2, '饼图', 'pie', 'xskh_chart_type', '', 'success', 'N', '0', '饼图表', 1, NOW(), 1, NOW()),
|
||||
(7337, '000000', 3, '折线图', 'line', 'xskh_chart_type', '', 'warning', 'N', '0', '折线图表', 1, NOW(), 1, NOW()),
|
||||
(7338, '000000', 4, '表格', 'table', 'xskh_chart_type', '', 'info', 'N', '0', '数据表格', 1, NOW(), 1, NOW()),
|
||||
(7339, '000000', 5, '散点图', 'scatter', 'xskh_chart_type', '', 'default', 'N', '0', '散点图表', 1, NOW(), 1, NOW()),
|
||||
(7340, '000000', 6, '雷达图', 'radar', 'xskh_chart_type', '', 'danger', 'N', '0', '雷达图表', 1, NOW(), 1, NOW());
|
||||
@@ -0,0 +1,200 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统字典数据配置
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-26
|
||||
-- 说明:遵循项目码表管理规范,使用系统字典表
|
||||
-- 🔧 ID范围修正:dict_id 6001-6020, dict_code 7001-7200 (避免冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 字典类型配置
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6001, '000000', '违纪类型', 'xskh_discipline_type', '学生违纪类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6002, '000000', '处分类型', 'xskh_punishment_type', '学生处分类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 违纪严重程度字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6003, '000000', '违纪严重程度', 'xskh_severity_level', '违纪严重程度分级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 记录状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6004, '000000', '记录状态', 'xskh_record_status', '违纪处分记录状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6005, '000000', '处分状态', 'xskh_punishment_status', '0', '处分执行状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 申诉状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6006, '000000', '申诉状态', 'xskh_appeal_status', '0', '申诉流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6007, '000000', '测评指标类型', 'xskh_indicator_type', '0', '综合测评指标类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标分类字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6008, '000000', '指标分类', 'xskh_indicator_category', '0', '测评指标分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 计算方式字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6009, '000000', '计算方式', 'xskh_calculation_method', '0', '分数计算方式', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6010, '000000', '考核状态', 'xskh_assessment_status', '0', '考核计划状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6011, '000000', '审核状态', 'xskh_approval_status', '0', '审核流程状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 得分等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6012, '000000', '得分等级', 'xskh_score_level', '0', '测评得分等级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6013, '000000', '附加分类型', 'xskh_bonus_type', '0', '附加分项目类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 获奖等级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6014, '000000', '获奖等级', 'xskh_award_level', '0', '获奖等级分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 数据来源字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6015, '000000', '数据来源', 'xskh_data_source', '0', '数据来源类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 字典数据配置
|
||||
-- ===========================================
|
||||
|
||||
-- 违纪类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7001, '000000', 1, '旷课', 'absence', 'xskh_discipline_type', '', 'danger', 'N', '0', '旷课违纪', 1, NOW(), 1, NOW()),
|
||||
(7002, '000000', 2, '考试作弊', 'cheating', 'xskh_discipline_type', '', 'danger', 'N', '0', '考试作弊', 1, NOW(), 1, NOW()),
|
||||
(7003, '000000', 3, '扰乱秩序', 'disorder', 'xskh_discipline_type', '', 'warning', 'N', '0', '扰乱课堂秩序', 1, NOW(), 1, NOW()),
|
||||
(7004, '000000', 4, '违反宿舍规定', 'dormitory', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反宿舍管理规定', 1, NOW(), 1, NOW()),
|
||||
(7005, '000000', 5, '打架斗殴', 'fighting', 'xskh_discipline_type', '', 'danger', 'N', '0', '打架斗殴', 1, NOW(), 1, NOW()),
|
||||
(7006, '000000', 6, '违反校规校纪', 'school_rules', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反校规校纪', 1, NOW(), 1, NOW()),
|
||||
(7007, '000000', 7, '学术不端', 'academic_misconduct', 'xskh_discipline_type', '', 'danger', 'N', '0', '学术不端行为', 1, NOW(), 1, NOW()),
|
||||
(7008, '000000', 8, '违反网络规定', 'network_violation', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反网络使用规定', 1, NOW(), 1, NOW()),
|
||||
(7009, '000000', 9, '其他违纪', 'other', 'xskh_discipline_type', '', 'info', 'N', '0', '其他违纪行为', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7011, '000000', 1, '警告', 'warning', 'xskh_punishment_type', '', 'info', 'N', '0', '警告处分', 1, NOW(), 1, NOW()),
|
||||
(7012, '000000', 2, '严重警告', 'serious_warning', 'xskh_punishment_type', '', 'warning', 'N', '0', '严重警告处分', 1, NOW(), 1, NOW()),
|
||||
(7013, '000000', 3, '记过', 'demerit', 'xskh_punishment_type', '', 'warning', 'N', '0', '记过处分', 1, NOW(), 1, NOW()),
|
||||
(7014, '000000', 4, '留校察看', 'probation', 'xskh_punishment_type', '', 'danger', 'N', '0', '留校察看处分', 1, NOW(), 1, NOW()),
|
||||
(7015, '000000', 5, '开除学籍', 'expulsion', 'xskh_punishment_type', '', 'danger', 'N', '0', '开除学籍处分', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 违纪严重程度数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7021, '000000', 1, '轻微', '1', 'xskh_severity_level', '', 'info', 'N', '0', '轻微违纪', 1, NOW(), 1, NOW()),
|
||||
(7022, '000000', 2, '一般', '2', 'xskh_severity_level', '', 'primary', 'N', '0', '一般违纪', 1, NOW(), 1, NOW()),
|
||||
(7023, '000000', 3, '严重', '3', 'xskh_severity_level', '', 'warning', 'N', '0', '严重违纪', 1, NOW(), 1, NOW()),
|
||||
(7024, '000000', 4, '特别严重', '4', 'xskh_severity_level', '', 'danger', 'N', '0', '特别严重违纪', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 记录状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7031, '000000', 1, '有效', '1', 'xskh_record_status', '', 'success', 'Y', '0', '记录有效', 1, NOW(), 1, NOW()),
|
||||
(7032, '000000', 2, '已撤销', '2', 'xskh_record_status', '', 'info', 'N', '0', '记录已撤销', 1, NOW(), 1, NOW()),
|
||||
(7033, '000000', 3, '已到期', '3', 'xskh_record_status', '', 'warning', 'N', '0', '记录已到期', 1, NOW(), 1, NOW()),
|
||||
(7034, '000000', 4, '已转移', '4', 'xskh_record_status', '', 'primary', 'N', '0', '记录已转移', 1, NOW(), 1, NOW()),
|
||||
(7035, '000000', 5, '已归档', '5', 'xskh_record_status', '', 'info', 'N', '0', '记录已归档', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7041, '000000', 1, '执行中', '1', 'xskh_punishment_status', '', 'primary', 'Y', '0', '处分执行中', 1, NOW(), 1, NOW()),
|
||||
(7042, '000000', 2, '已完成', '2', 'xskh_punishment_status', '', 'success', 'N', '0', '处分已完成', 1, NOW(), 1, NOW()),
|
||||
(7043, '000000', 3, '已撤销', '3', 'xskh_punishment_status', '', 'info', 'N', '0', '处分已撤销', 1, NOW(), 1, NOW()),
|
||||
(7044, '000000', 4, '已到期', '4', 'xskh_punishment_status', '', 'warning', 'N', '0', '处分已到期', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 申诉状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7051, '000000', 1, '未申诉', '0', 'xskh_appeal_status', '', 'info', 'Y', '0', '未申诉', 1, NOW(), 1, NOW()),
|
||||
(7052, '000000', 2, '申诉中', '1', 'xskh_appeal_status', '', 'primary', 'N', '0', '申诉中', 1, NOW(), 1, NOW()),
|
||||
(7053, '000000', 3, '申诉通过', '2', 'xskh_appeal_status', '', 'success', 'N', '0', '申诉通过', 1, NOW(), 1, NOW()),
|
||||
(7054, '000000', 4, '申诉驳回', '3', 'xskh_appeal_status', '', 'danger', 'N', '0', '申诉驳回', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7061, '000000', 1, '德育', 'moral', 'xskh_indicator_type', '', 'success', 'N', '0', '德育指标', 1, NOW(), 1, NOW()),
|
||||
(7062, '000000', 2, '智育', 'intellectual', 'xskh_indicator_type', '', 'primary', 'N', '0', '智育指标', 1, NOW(), 1, NOW()),
|
||||
(7063, '000000', 3, '体育', 'physical', 'xskh_indicator_type', '', 'warning', 'N', '0', '体育指标', 1, NOW(), 1, NOW()),
|
||||
(7064, '000000', 4, '美育', 'aesthetic', 'xskh_indicator_type', '', 'info', 'N', '0', '美育指标', 1, NOW(), 1, NOW()),
|
||||
(7065, '000000', 5, '劳育', 'labor', 'xskh_indicator_type', '', 'success', 'N', '0', '劳育指标', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标分类数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7071, '000000', 1, '基础指标', 'basic', 'xskh_indicator_category', '', 'primary', 'Y', '0', '基础测评指标', 1, NOW(), 1, NOW()),
|
||||
(7072, '000000', 2, '加分指标', 'bonus', 'xskh_indicator_category', '', 'success', 'N', '0', '加分指标', 1, NOW(), 1, NOW()),
|
||||
(7073, '000000', 3, '扣分指标', 'deduct', 'xskh_indicator_category', '', 'danger', 'N', '0', '扣分指标', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 计算方式数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7081, '000000', 1, '手工录入', 'manual', 'xskh_calculation_method', '', 'info', 'Y', '0', '手工录入分数', 1, NOW(), 1, NOW()),
|
||||
(7082, '000000', 2, '自动计算', 'auto', 'xskh_calculation_method', '', 'success', 'N', '0', '系统自动计算', 1, NOW(), 1, NOW()),
|
||||
(7083, '000000', 3, '公式计算', 'formula', 'xskh_calculation_method', '', 'primary', 'N', '0', '按公式计算', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7091, '000000', 1, '未开始', '1', 'xskh_assessment_status', '', 'info', 'N', '0', '计划未开始', 1, NOW(), 1, NOW()),
|
||||
(7092, '000000', 2, '准备中', '2', 'xskh_assessment_status', '', 'warning', 'N', '0', '准备阶段', 1, NOW(), 1, NOW()),
|
||||
(7093, '000000', 3, '进行中', '3', 'xskh_assessment_status', '', 'primary', 'Y', '0', '考核进行中', 1, NOW(), 1, NOW()),
|
||||
(7094, '000000', 4, '审核中', '4', 'xskh_assessment_status', '', 'warning', 'N', '0', '审核阶段', 1, NOW(), 1, NOW()),
|
||||
(7095, '000000', 5, '已完成', '5', 'xskh_assessment_status', '', 'success', 'N', '0', '考核已完成', 1, NOW(), 1, NOW()),
|
||||
(7096, '000000', 6, '已归档', '6', 'xskh_assessment_status', '', 'info', 'N', '0', '已归档', 1, NOW(), 1, NOW()),
|
||||
(7097, '000000', 7, '已取消', '7', 'xskh_assessment_status', '', 'danger', 'N', '0', '已取消', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7101, '000000', 1, '待审核', '1', 'xskh_approval_status', '', 'warning', 'Y', '0', '待审核', 1, NOW(), 1, NOW()),
|
||||
(7102, '000000', 2, '审核中', '2', 'xskh_approval_status', '', 'primary', 'N', '0', '审核中', 1, NOW(), 1, NOW()),
|
||||
(7103, '000000', 3, '已通过', '3', 'xskh_approval_status', '', 'success', 'N', '0', '审核通过', 1, NOW(), 1, NOW()),
|
||||
(7104, '000000', 4, '已驳回', '4', 'xskh_approval_status', '', 'danger', 'N', '0', '审核驳回', 1, NOW(), 1, NOW()),
|
||||
(7105, '000000', 5, '需修改', '5', 'xskh_approval_status', '', 'warning', 'N', '0', '需要修改', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 得分等级数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7111, '000000', 1, '优秀', 'excellent', 'xskh_score_level', '', 'success', 'N', '0', '优秀等级', 1, NOW(), 1, NOW()),
|
||||
(7112, '000000', 2, '良好', 'good', 'xskh_score_level', '', 'primary', 'N', '0', '良好等级', 1, NOW(), 1, NOW()),
|
||||
(7113, '000000', 3, '合格', 'qualified', 'xskh_score_level', '', 'warning', 'Y', '0', '合格等级', 1, NOW(), 1, NOW()),
|
||||
(7114, '000000', 4, '不合格', 'unqualified', 'xskh_score_level', '', 'danger', 'N', '0', '不合格等级', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 附加分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7121, '000000', 1, '竞赛获奖', 'competition', 'xskh_bonus_type', '', 'success', 'N', '0', '学科竞赛获奖', 1, NOW(), 1, NOW()),
|
||||
(7122, '000000', 2, '志愿服务', 'volunteer', 'xskh_bonus_type', '', 'primary', 'N', '0', '志愿服务活动', 1, NOW(), 1, NOW()),
|
||||
(7123, '000000', 3, '创新创业', 'innovation', 'xskh_bonus_type', '', 'warning', 'N', '0', '创新创业项目', 1, NOW(), 1, NOW()),
|
||||
(7124, '000000', 4, '学生干部', 'leadership', 'xskh_bonus_type', '', 'info', 'N', '0', '学生干部任职', 1, NOW(), 1, NOW()),
|
||||
(7125, '000000', 5, '科研成果', 'research', 'xskh_bonus_type', '', 'success', 'N', '0', '科研成果发表', 1, NOW(), 1, NOW()),
|
||||
(7126, '000000', 6, '社会实践', 'social', 'xskh_bonus_type', '', 'primary', 'N', '0', '社会实践活动', 1, NOW(), 1, NOW()),
|
||||
(7127, '000000', 7, '技能证书', 'skill', 'xskh_bonus_type', '', 'warning', 'N', '0', '技能证书获得', 1, NOW(), 1, NOW()),
|
||||
(7128, '000000', 8, '其他', 'other', 'xskh_bonus_type', '', 'info', 'N', '0', '其他加分项目', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 获奖等级数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7131, '000000', 1, '国家级', 'national', 'xskh_award_level', '', 'danger', 'N', '0', '国家级获奖', 1, NOW(), 1, NOW()),
|
||||
(7132, '000000', 2, '省级', 'provincial', 'xskh_award_level', '', 'warning', 'N', '0', '省级获奖', 1, NOW(), 1, NOW()),
|
||||
(7133, '000000', 3, '市级', 'city', 'xskh_award_level', '', 'primary', 'N', '0', '市级获奖', 1, NOW(), 1, NOW()),
|
||||
(7134, '000000', 4, '校级', 'school', 'xskh_award_level', '', 'success', 'Y', '0', '校级获奖', 1, NOW(), 1, NOW()),
|
||||
(7135, '000000', 5, '院级', 'college', 'xskh_award_level', '', 'info', 'N', '0', '院级获奖', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 数据来源数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7141, '000000', 1, '手工录入', 'manual', 'xskh_data_source', '', 'primary', 'Y', '0', '手工录入数据', 1, NOW(), 1, NOW()),
|
||||
(7142, '000000', 2, '批量导入', 'import', 'xskh_data_source', '', 'success', 'N', '0', 'Excel批量导入', 1, NOW(), 1, NOW()),
|
||||
(7143, '000000', 3, '系统同步', 'sync', 'xskh_data_source', '', 'info', 'N', '0', '系统自动同步', 1, NOW(), 1, NOW()),
|
||||
(7144, '000000', 4, '学生申请', 'student', 'xskh_data_source', '', 'warning', 'N', '0', '学生端申请', 1, NOW(), 1, NOW());
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,388 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统数据库表结构 - 补充文件
|
||||
-- 版本:V1.0.1
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:补充考核计划、综合测评、附加分申请等核心业务表
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 9. 考核计划表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_plan`;
|
||||
CREATE TABLE `xskh_assessment_plan` (
|
||||
-- 🔧 标准基础字段(必须)
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)',
|
||||
|
||||
-- 📋 计划基本信息
|
||||
`plan_code` varchar(32) NOT NULL COMMENT '计划编号(唯一标识,如:PLAN202501001)',
|
||||
`plan_name` varchar(100) NOT NULL COMMENT '计划名称',
|
||||
`plan_desc` text COMMENT '计划描述',
|
||||
`scheme_id` bigint(20) NOT NULL COMMENT '关联方案ID',
|
||||
`scheme_name` varchar(100) COMMENT '关联方案名称',
|
||||
`plan_cycle` varchar(50) NOT NULL COMMENT '计划周期(如:2024-2025学年第一学期)',
|
||||
|
||||
-- ⏰ 时间安排
|
||||
`start_date` date NOT NULL COMMENT '计划开始日期',
|
||||
`end_date` date NOT NULL COMMENT '计划结束日期',
|
||||
`self_eval_start_time` datetime COMMENT '自评开始时间',
|
||||
`self_eval_end_time` datetime COMMENT '自评结束时间',
|
||||
`teacher_eval_start_time` datetime COMMENT '教师评价开始时间',
|
||||
`teacher_eval_end_time` datetime COMMENT '教师评价结束时间',
|
||||
|
||||
-- 🎯 目标范围
|
||||
`target_grades` json COMMENT '目标年级(JSON格式)',
|
||||
`target_majors` json COMMENT '目标专业(JSON格式)',
|
||||
`target_colleges` json COMMENT '目标学院(JSON格式)',
|
||||
`student_types` json COMMENT '学生类型(JSON格式:undergraduate-本科生,graduate-研究生)',
|
||||
|
||||
-- 📊 统计信息
|
||||
`total_students` int(11) DEFAULT 0 COMMENT '参与学生总数',
|
||||
`completed_students` int(11) DEFAULT 0 COMMENT '已完成学生数',
|
||||
`approved_students` int(11) DEFAULT 0 COMMENT '已审核学生数',
|
||||
`avg_score` decimal(5,2) DEFAULT 0.00 COMMENT '平均分',
|
||||
`max_score` decimal(5,2) DEFAULT 0.00 COMMENT '最高分',
|
||||
`min_score` decimal(5,2) DEFAULT 0.00 COMMENT '最低分',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`status` char(1) DEFAULT '1' COMMENT '计划状态:1-未开始,2-进行中,3-已结束,4-已归档,5-已取消',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`workflow_enabled` char(1) DEFAULT '0' COMMENT '是否启用工作流:0-否,1-是',
|
||||
`approval_required` char(1) DEFAULT '1' COMMENT '是否需要审核:0-否,1-是',
|
||||
`approval_levels` tinyint(1) DEFAULT 2 COMMENT '审核级别数',
|
||||
|
||||
-- 🔧 配置选项
|
||||
`allow_self_eval` char(1) DEFAULT '1' COMMENT '是否允许自评:0-否,1-是',
|
||||
`allow_teacher_eval` char(1) DEFAULT '1' COMMENT '是否允许教师评价:0-否,1-是',
|
||||
`show_ranking` char(1) DEFAULT '1' COMMENT '是否显示排名:0-否,1-是',
|
||||
`show_score` char(1) DEFAULT '1' COMMENT '是否显示分数:0-否,1-是',
|
||||
|
||||
-- 👤 负责人信息
|
||||
`manager_id` bigint(20) COMMENT '负责人ID',
|
||||
`manager_name` varchar(50) COMMENT '负责人姓名',
|
||||
`manage_dept` bigint(20) COMMENT '负责部门ID',
|
||||
`manage_dept_name` varchar(100) COMMENT '负责部门名称',
|
||||
|
||||
-- 📝 其他字段
|
||||
`implementation_guide` text COMMENT '实施指南',
|
||||
`change_log` json COMMENT '变更日志(JSON格式)',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_plan_code_tenant` (`plan_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_scheme_id` (`scheme_id`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_start_date` (`start_date`),
|
||||
KEY `idx_end_date` (`end_date`),
|
||||
KEY `idx_manager_id` (`manager_id`),
|
||||
KEY `idx_manage_dept` (`manage_dept`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考核计划表';
|
||||
|
||||
-- ===========================================
|
||||
-- 10. 综合测评记录表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_record`;
|
||||
CREATE TABLE `xskh_assessment_record` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 测评基本信息
|
||||
`record_code` varchar(32) NOT NULL COMMENT '测评记录编号(自动生成:EVAL202501001)',
|
||||
`plan_id` bigint(20) NOT NULL COMMENT '关联计划ID',
|
||||
`plan_name` varchar(100) COMMENT '关联计划名称',
|
||||
`scheme_id` bigint(20) NOT NULL COMMENT '关联方案ID',
|
||||
`scheme_name` varchar(100) COMMENT '关联方案名称',
|
||||
|
||||
-- 👤 学生信息
|
||||
`student_id` bigint(20) NOT NULL COMMENT '学生ID',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名',
|
||||
`student_no` varchar(50) NOT NULL COMMENT '学号',
|
||||
`class_id` bigint(20) COMMENT '班级ID',
|
||||
`class_name` varchar(100) COMMENT '班级名称',
|
||||
`major_id` bigint(20) COMMENT '专业ID',
|
||||
`major_name` varchar(100) COMMENT '专业名称',
|
||||
`college_id` bigint(20) COMMENT '学院ID',
|
||||
`college_name` varchar(100) COMMENT '学院名称',
|
||||
`grade` varchar(20) COMMENT '年级',
|
||||
|
||||
-- 📊 分数信息
|
||||
`total_score` decimal(6,2) DEFAULT 0.00 COMMENT '总分',
|
||||
`self_eval_score` decimal(6,2) DEFAULT 0.00 COMMENT '自评分数',
|
||||
`teacher_eval_score` decimal(6,2) DEFAULT 0.00 COMMENT '教师评价分数',
|
||||
`peer_eval_score` decimal(6,2) DEFAULT 0.00 COMMENT '互评分数',
|
||||
`bonus_score` decimal(6,2) DEFAULT 0.00 COMMENT '附加分',
|
||||
`deduction_score` decimal(6,2) DEFAULT 0.00 COMMENT '扣分',
|
||||
`final_score` decimal(6,2) DEFAULT 0.00 COMMENT '最终得分',
|
||||
|
||||
-- 📈 排名信息
|
||||
`class_rank` int(11) DEFAULT 0 COMMENT '班级排名',
|
||||
`major_rank` int(11) DEFAULT 0 COMMENT '专业排名',
|
||||
`college_rank` int(11) DEFAULT 0 COMMENT '学院排名',
|
||||
`grade_rank` int(11) DEFAULT 0 COMMENT '年级排名',
|
||||
`total_rank` int(11) DEFAULT 0 COMMENT '总排名',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`eval_status` char(1) DEFAULT '1' COMMENT '测评状态:1-未开始,2-自评中,3-待审核,4-已完成,5-已归档',
|
||||
`approval_status` char(1) DEFAULT '1' COMMENT '审核状态:1-待审核,2-审核中,3-已通过,4-已驳回',
|
||||
`is_submitted` char(1) DEFAULT '0' COMMENT '是否已提交:0-未提交,1-已提交',
|
||||
`is_locked` char(1) DEFAULT '0' COMMENT '是否锁定:0-未锁定,1-已锁定',
|
||||
|
||||
-- ⏰ 时间记录
|
||||
`self_eval_time` datetime COMMENT '自评完成时间',
|
||||
`teacher_eval_time` datetime COMMENT '教师评价完成时间',
|
||||
`submit_time` datetime COMMENT '提交时间',
|
||||
`approval_time` datetime COMMENT '审核时间',
|
||||
|
||||
-- 👤 审核人信息
|
||||
`approver_id` bigint(20) COMMENT '审核人ID',
|
||||
`approver_name` varchar(50) COMMENT '审核人姓名',
|
||||
`approval_comment` text COMMENT '审核意见',
|
||||
|
||||
-- 📝 其他字段
|
||||
`evaluation_summary` text COMMENT '测评总结',
|
||||
`improvement_plan` text COMMENT '改进计划',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_record_code_tenant` (`record_code`, `tenant_id`),
|
||||
UNIQUE KEY `uk_plan_student` (`plan_id`, `student_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_plan_id` (`plan_id`),
|
||||
KEY `idx_scheme_id` (`scheme_id`),
|
||||
KEY `idx_student_id` (`student_id`),
|
||||
KEY `idx_student_no` (`student_no`),
|
||||
KEY `idx_eval_status` (`eval_status`),
|
||||
KEY `idx_approval_status` (`approval_status`),
|
||||
KEY `idx_final_score` (`final_score`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='综合测评记录表';
|
||||
|
||||
-- ===========================================
|
||||
-- 11. 测评明细记录表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_detail`;
|
||||
CREATE TABLE `xskh_assessment_detail` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 关联信息
|
||||
`record_id` bigint(20) NOT NULL COMMENT '测评记录ID',
|
||||
`plan_id` bigint(20) NOT NULL COMMENT '计划ID',
|
||||
`student_id` bigint(20) NOT NULL COMMENT '学生ID',
|
||||
`indicator_id` bigint(20) NOT NULL COMMENT '指标ID',
|
||||
`indicator_code` varchar(32) COMMENT '指标编码',
|
||||
`indicator_name` varchar(100) COMMENT '指标名称',
|
||||
`indicator_type` varchar(50) COMMENT '指标类型',
|
||||
|
||||
-- 📊 评分信息
|
||||
`max_score` decimal(5,2) NOT NULL COMMENT '满分',
|
||||
`min_score` decimal(5,2) DEFAULT 0.00 COMMENT '最低分',
|
||||
`self_score` decimal(5,2) DEFAULT 0.00 COMMENT '自评分数',
|
||||
`teacher_score` decimal(5,2) DEFAULT 0.00 COMMENT '教师评分',
|
||||
`peer_score` decimal(5,2) DEFAULT 0.00 COMMENT '互评分数',
|
||||
`final_score` decimal(5,2) DEFAULT 0.00 COMMENT '最终得分',
|
||||
`weight` decimal(3,2) DEFAULT 1.00 COMMENT '权重',
|
||||
`weighted_score` decimal(5,2) DEFAULT 0.00 COMMENT '加权得分',
|
||||
|
||||
-- 📝 评价内容
|
||||
`self_comment` text COMMENT '自评说明',
|
||||
`teacher_comment` text COMMENT '教师评价',
|
||||
`peer_comment` text COMMENT '互评意见',
|
||||
`evidence_materials` json COMMENT '佐证材料(JSON格式)',
|
||||
|
||||
-- ⚙️ 状态信息
|
||||
`eval_status` char(1) DEFAULT '1' COMMENT '评价状态:1-未评价,2-已自评,3-已师评,4-已完成',
|
||||
`is_required` char(1) DEFAULT '1' COMMENT '是否必评:0-否,1-是',
|
||||
`is_bonus` char(1) DEFAULT '0' COMMENT '是否加分项:0-否,1-是',
|
||||
|
||||
-- ⏰ 时间记录
|
||||
`self_eval_time` datetime COMMENT '自评时间',
|
||||
`teacher_eval_time` datetime COMMENT '教师评价时间',
|
||||
`peer_eval_time` datetime COMMENT '互评时间',
|
||||
|
||||
-- 📝 其他字段
|
||||
`calculation_formula` varchar(200) COMMENT '计算公式',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_record_indicator` (`record_id`, `indicator_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_record_id` (`record_id`),
|
||||
KEY `idx_plan_id` (`plan_id`),
|
||||
KEY `idx_student_id` (`student_id`),
|
||||
KEY `idx_indicator_id` (`indicator_id`),
|
||||
KEY `idx_eval_status` (`eval_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测评明细记录表';
|
||||
|
||||
-- ===========================================
|
||||
-- 12. 附加分申请表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_bonus_application`;
|
||||
CREATE TABLE `xskh_bonus_application` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 申请基本信息
|
||||
`application_code` varchar(32) NOT NULL COMMENT '申请编号(自动生成:BONUS202501001)',
|
||||
`plan_id` bigint(20) NOT NULL COMMENT '关联计划ID',
|
||||
`plan_name` varchar(100) COMMENT '关联计划名称',
|
||||
`record_id` bigint(20) COMMENT '关联测评记录ID',
|
||||
|
||||
-- 👤 申请人信息
|
||||
`student_id` bigint(20) NOT NULL COMMENT '申请学生ID',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名',
|
||||
`student_no` varchar(50) NOT NULL COMMENT '学号',
|
||||
`class_id` bigint(20) COMMENT '班级ID',
|
||||
`class_name` varchar(100) COMMENT '班级名称',
|
||||
`major_id` bigint(20) COMMENT '专业ID',
|
||||
`major_name` varchar(100) COMMENT '专业名称',
|
||||
`college_id` bigint(20) COMMENT '学院ID',
|
||||
`college_name` varchar(100) COMMENT '学院名称',
|
||||
|
||||
-- 📋 附加分信息
|
||||
`bonus_type` varchar(50) NOT NULL COMMENT '附加分类型:competition-竞赛获奖,volunteer-志愿服务,research-科研成果,social-社会实践',
|
||||
`bonus_title` varchar(200) NOT NULL COMMENT '附加分项目标题',
|
||||
`bonus_desc` text COMMENT '附加分项目描述',
|
||||
`bonus_category` varchar(50) COMMENT '附加分类别',
|
||||
`bonus_level` varchar(50) COMMENT '附加分级别(如:国家级,省级,校级)',
|
||||
`apply_score` decimal(5,2) NOT NULL COMMENT '申请分数',
|
||||
`approved_score` decimal(5,2) DEFAULT 0.00 COMMENT '批准分数',
|
||||
|
||||
-- 📅 时间信息
|
||||
`event_date` date COMMENT '事件发生日期',
|
||||
`apply_date` date DEFAULT (CURRENT_DATE) COMMENT '申请日期',
|
||||
`deadline` date COMMENT '申请截止日期',
|
||||
|
||||
-- 📎 证明材料
|
||||
`evidence_files` json COMMENT '证明文件(JSON格式)',
|
||||
`certificate_no` varchar(100) COMMENT '证书编号',
|
||||
`issuing_authority` varchar(200) COMMENT '颁发机构',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`application_status` char(1) DEFAULT '1' COMMENT '申请状态:1-待审核,2-审核中,3-已通过,4-已驳回,5-已撤回',
|
||||
`approval_level` tinyint(1) DEFAULT 1 COMMENT '当前审核级别',
|
||||
`max_approval_level` tinyint(1) DEFAULT 2 COMMENT '最大审核级别',
|
||||
|
||||
-- 👤 审核信息
|
||||
`current_approver_id` bigint(20) COMMENT '当前审核人ID',
|
||||
`current_approver_name` varchar(50) COMMENT '当前审核人姓名',
|
||||
`final_approver_id` bigint(20) COMMENT '最终审核人ID',
|
||||
`final_approver_name` varchar(50) COMMENT '最终审核人姓名',
|
||||
`approval_comment` text COMMENT '审核意见',
|
||||
|
||||
-- ⏰ 时间记录
|
||||
`submit_time` datetime COMMENT '提交时间',
|
||||
`first_approval_time` datetime COMMENT '初审时间',
|
||||
`final_approval_time` datetime COMMENT '终审时间',
|
||||
|
||||
-- 📝 其他字段
|
||||
`rejection_reason` text COMMENT '驳回原因',
|
||||
`withdrawal_reason` text COMMENT '撤回原因',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_application_code_tenant` (`application_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_plan_id` (`plan_id`),
|
||||
KEY `idx_record_id` (`record_id`),
|
||||
KEY `idx_student_id` (`student_id`),
|
||||
KEY `idx_student_no` (`student_no`),
|
||||
KEY `idx_application_status` (`application_status`),
|
||||
KEY `idx_bonus_type` (`bonus_type`),
|
||||
KEY `idx_apply_date` (`apply_date`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='附加分申请表';
|
||||
|
||||
-- ===========================================
|
||||
-- 13. 统计配置表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_statistics_config`;
|
||||
CREATE TABLE `xskh_statistics_config` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 配置基本信息
|
||||
`config_code` varchar(32) NOT NULL COMMENT '配置编码',
|
||||
`config_name` varchar(100) NOT NULL COMMENT '配置名称',
|
||||
`config_desc` text COMMENT '配置描述',
|
||||
`config_type` varchar(50) NOT NULL COMMENT '配置类型:report-报表配置,chart-图表配置,export-导出配置',
|
||||
|
||||
-- 📊 统计维度
|
||||
`stat_dimensions` json COMMENT '统计维度(JSON格式)',
|
||||
`stat_metrics` json COMMENT '统计指标(JSON格式)',
|
||||
`filter_conditions` json COMMENT '过滤条件(JSON格式)',
|
||||
`sort_rules` json COMMENT '排序规则(JSON格式)',
|
||||
|
||||
-- 📈 图表配置
|
||||
`chart_type` varchar(50) COMMENT '图表类型:bar-柱状图,pie-饼图,line-折线图,table-表格',
|
||||
`chart_config` json COMMENT '图表配置(JSON格式)',
|
||||
`color_scheme` json COMMENT '颜色方案(JSON格式)',
|
||||
|
||||
-- ⚙️ 权限配置
|
||||
`access_roles` json COMMENT '访问角色(JSON格式)',
|
||||
`access_depts` json COMMENT '访问部门(JSON格式)',
|
||||
`access_users` json COMMENT '访问用户(JSON格式)',
|
||||
|
||||
-- 📅 时间配置
|
||||
`refresh_interval` int(11) DEFAULT 0 COMMENT '刷新间隔(分钟)',
|
||||
`cache_duration` int(11) DEFAULT 60 COMMENT '缓存时长(分钟)',
|
||||
`auto_export` char(1) DEFAULT '0' COMMENT '是否自动导出:0-否,1-是',
|
||||
`export_schedule` varchar(100) COMMENT '导出计划(Cron表达式)',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_default` char(1) DEFAULT '0' COMMENT '是否默认配置:0-否,1-是',
|
||||
`is_public` char(1) DEFAULT '0' COMMENT '是否公开:0-否,1-是',
|
||||
|
||||
-- 📝 其他字段
|
||||
`template_file` varchar(500) COMMENT '模板文件路径',
|
||||
`export_format` varchar(50) DEFAULT 'excel' COMMENT '导出格式:excel,pdf,csv',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_config_code_tenant` (`config_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_config_type` (`config_type`),
|
||||
KEY `idx_status` (`status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='统计配置表';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,678 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统数据库表结构
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-26
|
||||
-- 说明:遵循项目数据库建设规范
|
||||
-- 特性:雪花ID、逻辑删除、多租户、码表管理、Excel支持
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 违纪类型管理表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_discipline_type`;
|
||||
CREATE TABLE `xskh_discipline_type` (
|
||||
-- 🔧 标准基础字段(必须)
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)',
|
||||
|
||||
-- 📋 业务字段
|
||||
`type_code` varchar(32) NOT NULL COMMENT '违纪类型编码(唯一标识)',
|
||||
`type_name` varchar(100) NOT NULL COMMENT '违纪类型名称',
|
||||
`type_desc` text COMMENT '违纪类型描述说明',
|
||||
`parent_id` bigint(20) DEFAULT 0 COMMENT '父级类型ID(支持分类层级)',
|
||||
`level` tinyint(1) DEFAULT 1 COMMENT '层级:1-一级,2-二级,3-三级',
|
||||
|
||||
-- 🎯 严重程度管理
|
||||
`severity_level` tinyint(1) DEFAULT 1 COMMENT '严重程度:1-轻微,2-一般,3-严重,4-特别严重',
|
||||
`severity_score` decimal(3,1) DEFAULT 1.0 COMMENT '严重程度评分(1.0-10.0)',
|
||||
|
||||
-- 🔗 关联配置
|
||||
`default_punishment_id` bigint(20) COMMENT '默认处分类型ID',
|
||||
`default_punishment_name` varchar(100) COMMENT '默认处分类型名称',
|
||||
`suggested_duration` int(11) DEFAULT 0 COMMENT '建议处分期限(月)',
|
||||
|
||||
-- ⚙️ 状态与配置
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`can_appeal` char(1) DEFAULT '1' COMMENT '是否可申诉:0-否,1-是',
|
||||
`auto_notify` char(1) DEFAULT '0' COMMENT '是否自动通知:0-否,1-是',
|
||||
|
||||
-- 📊 统计字段
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数',
|
||||
`sort_order` int(11) DEFAULT 0 COMMENT '排序序号',
|
||||
`version` int(11) DEFAULT 1 COMMENT '版本号',
|
||||
|
||||
-- 📝 其他字段
|
||||
`applicable_grades` varchar(200) COMMENT '适用年级(JSON格式)',
|
||||
`applicable_majors` varchar(500) COMMENT '适用专业(JSON格式)',
|
||||
`reference_regulation` varchar(500) COMMENT '参考规章制度',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_type_code_tenant` (`type_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_parent_id` (`parent_id`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_severity_level` (`severity_level`),
|
||||
KEY `idx_sort_order` (`sort_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='违纪类型管理表';
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 处分类型管理表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_punishment_type`;
|
||||
CREATE TABLE `xskh_punishment_type` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 业务字段
|
||||
`type_code` varchar(32) NOT NULL COMMENT '处分类型编码',
|
||||
`type_name` varchar(100) NOT NULL COMMENT '处分类型名称',
|
||||
`type_desc` text COMMENT '处分类型描述',
|
||||
|
||||
-- 🎯 处分等级
|
||||
`punishment_level` tinyint(1) DEFAULT 1 COMMENT '处分等级:1-警告,2-严重警告,3-记过,4-留校察看,5-开除学籍',
|
||||
`level_score` decimal(3,1) DEFAULT 1.0 COMMENT '处分等级评分(1.0-10.0)',
|
||||
|
||||
-- ⏰ 期限管理
|
||||
`has_duration` char(1) DEFAULT '1' COMMENT '是否有期限:0-否,1-是',
|
||||
`default_duration` int(11) DEFAULT 0 COMMENT '默认期限(月)',
|
||||
`min_duration` int(11) DEFAULT 0 COMMENT '最短期限(月)',
|
||||
`max_duration` int(11) DEFAULT 0 COMMENT '最长期限(月)',
|
||||
|
||||
-- 🔍 审核配置
|
||||
`approval_required` char(1) DEFAULT '1' COMMENT '是否需要审核:0-否,1-是',
|
||||
`approval_levels` tinyint(1) DEFAULT 1 COMMENT '审核级别:1-一级,2-二级,3-三级',
|
||||
`can_appeal` char(1) DEFAULT '1' COMMENT '是否可申诉:0-否,1-是',
|
||||
`appeal_deadline` int(11) DEFAULT 30 COMMENT '申诉期限(天)',
|
||||
|
||||
-- 📊 影响配置
|
||||
`affects_scholarship` char(1) DEFAULT '0' COMMENT '是否影响奖学金:0-否,1-是',
|
||||
`affects_graduation` char(1) DEFAULT '0' COMMENT '是否影响毕业:0-否,1-是',
|
||||
`affects_employment` char(1) DEFAULT '0' COMMENT '是否影响就业:0-否,1-是',
|
||||
`record_in_file` char(1) DEFAULT '1' COMMENT '是否记入档案:0-否,1-是',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数',
|
||||
`sort_order` int(11) DEFAULT 0 COMMENT '排序序号',
|
||||
|
||||
-- 📝 其他字段
|
||||
`legal_basis` varchar(500) COMMENT '法律依据',
|
||||
`execution_procedure` text COMMENT '执行程序',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_type_code_tenant` (`type_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_punishment_level` (`punishment_level`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_sort_order` (`sort_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='处分类型管理表';
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 违纪处分记录表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_discipline_record`;
|
||||
CREATE TABLE `xskh_discipline_record` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 记录标识
|
||||
`record_no` varchar(32) NOT NULL COMMENT '记录编号(自动生成:XSKH202501001)',
|
||||
`case_no` varchar(50) COMMENT '案件编号(可手工填写)',
|
||||
|
||||
-- 👤 学生信息(关联字段 - 来源于xg_student_msg)
|
||||
`student_id` bigint(20) NOT NULL COMMENT '学生ID,关联xg_student_msg.id',
|
||||
`student_no` varchar(32) NOT NULL COMMENT '学号(来源:xg_student_msg.student_no)',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名(来源:xg_student_msg.name)',
|
||||
`id_card` varchar(18) COMMENT '身份证号(来源:xg_student_msg.id_card)',
|
||||
`gender` char(1) COMMENT '性别:0-男,1-女(来源:xg_student_msg.gender)',
|
||||
`phone` varchar(20) COMMENT '联系电话(来源:xg_student_msg.phone)',
|
||||
`email` varchar(100) COMMENT '邮箱(来源:xg_student_msg.email)',
|
||||
|
||||
-- 🏫 学籍信息(来源于xg_student_msg,实际数据从xg_class_msg关联)
|
||||
`grade` varchar(10) COMMENT '年级(来源:xg_student_msg.grade)',
|
||||
`class_id` varchar(100) COMMENT '班级ID(来源:xg_student_msg.class_id)',
|
||||
`class_name` varchar(100) COMMENT '班级名称(来源:xg_student_msg.class_name)',
|
||||
`major_id` varchar(100) COMMENT '专业ID(来源:xg_student_msg.major_id)',
|
||||
`major_name` varchar(100) COMMENT '专业名称(来源:xg_student_msg.major_name)',
|
||||
`college_id` varchar(100) COMMENT '学院ID(来源:xg_student_msg.college_id)',
|
||||
`college_name` varchar(100) COMMENT '学院名称(来源:xg_student_msg.college_name)',
|
||||
`enrollment_year` int(4) COMMENT '入学年份(来源:xg_student_msg.enrollment_year)',
|
||||
`student_status` char(1) COMMENT '学籍状态(来源:xg_student_msg.student_status)',
|
||||
|
||||
-- 👥 管理人员信息(来源于xg_student_msg)
|
||||
`counselor_id` bigint(20) COMMENT '辅导员ID(来源:xg_student_msg.counselor_id)',
|
||||
`counselor_name` varchar(50) COMMENT '辅导员姓名(来源:xg_student_msg.counselor_name)',
|
||||
`class_teacher_id` bigint(20) COMMENT '班主任ID(来源:xg_student_msg.class_teacher_id)',
|
||||
`class_teacher_name` varchar(50) COMMENT '班主任姓名(来源:xg_student_msg.class_teacher_name)',
|
||||
|
||||
-- 🚨 违纪信息
|
||||
`discipline_type_id` bigint(20) NOT NULL COMMENT '违纪类型ID',
|
||||
`discipline_type_code` varchar(32) NOT NULL COMMENT '违纪类型编码',
|
||||
`discipline_type_name` varchar(100) NOT NULL COMMENT '违纪类型名称',
|
||||
`discipline_date` date NOT NULL COMMENT '违纪日期',
|
||||
`discipline_time` time COMMENT '违纪时间',
|
||||
`discipline_location` varchar(200) COMMENT '违纪地点',
|
||||
`discipline_desc` text NOT NULL COMMENT '违纪详情描述',
|
||||
`discipline_evidence` json COMMENT '违纪证据文件列表',
|
||||
`severity_level` tinyint(1) COMMENT '违纪严重程度:1-轻微,2-一般,3-严重,4-特别严重',
|
||||
|
||||
-- 📊 处分信息
|
||||
`punishment_type_id` bigint(20) NOT NULL COMMENT '处分类型ID',
|
||||
`punishment_type_code` varchar(32) NOT NULL COMMENT '处分类型编码',
|
||||
`punishment_type_name` varchar(100) NOT NULL COMMENT '处分类型名称',
|
||||
`punishment_date` date NOT NULL COMMENT '处分日期',
|
||||
`punishment_decision_no` varchar(50) COMMENT '处分决定书编号',
|
||||
`punishment_basis` text COMMENT '处分依据',
|
||||
`punishment_desc` text COMMENT '处分决定内容',
|
||||
|
||||
-- ⏰ 期限管理
|
||||
`has_duration` char(1) DEFAULT '0' COMMENT '是否有期限:0-否,1-是',
|
||||
`punishment_duration` int(11) COMMENT '处分期限(月)',
|
||||
`punishment_start_date` date COMMENT '处分开始日期',
|
||||
`punishment_end_date` date COMMENT '处分到期日期',
|
||||
`auto_expire` char(1) DEFAULT '1' COMMENT '是否自动到期:0-否,1-是',
|
||||
|
||||
-- 🔄 状态管理
|
||||
`record_status` char(1) DEFAULT '1' COMMENT '记录状态:1-有效,2-已撤销,3-已到期,4-已转移,5-已归档',
|
||||
`punishment_status` char(1) DEFAULT '1' COMMENT '处分状态:1-执行中,2-已完成,3-已撤销,4-已到期',
|
||||
`appeal_status` char(1) DEFAULT '0' COMMENT '申诉状态:0-未申诉,1-申诉中,2-申诉通过,3-申诉驳回',
|
||||
`archive_status` char(1) DEFAULT '0' COMMENT '归档状态:0-未归档,1-已归档',
|
||||
|
||||
-- 👨💼 审核信息
|
||||
`approval_status` char(1) DEFAULT '1' COMMENT '审核状态:1-待审核,2-审核中,3-已通过,4-已驳回',
|
||||
`approval_level` tinyint(1) DEFAULT 1 COMMENT '当前审核级别',
|
||||
`approver_id` bigint(20) COMMENT '当前审核人ID',
|
||||
`approver_name` varchar(50) COMMENT '当前审核人姓名',
|
||||
`approve_time` datetime COMMENT '审核时间',
|
||||
`approve_comment` text COMMENT '审核意见',
|
||||
`approval_history` json COMMENT '审核历史记录',
|
||||
|
||||
-- 📝 报告人信息
|
||||
`reporter_id` bigint(20) COMMENT '报告人ID',
|
||||
`reporter_name` varchar(50) COMMENT '报告人姓名',
|
||||
`reporter_type` varchar(20) COMMENT '报告人类型:teacher-教师,student-学生,staff-职工,other-其他',
|
||||
`report_time` datetime COMMENT '报告时间',
|
||||
`report_desc` text COMMENT '报告描述',
|
||||
|
||||
-- 🏛️ 处理机构
|
||||
`handle_dept_id` bigint(20) COMMENT '处理部门ID',
|
||||
`handle_dept_name` varchar(100) COMMENT '处理部门名称',
|
||||
`handler_id` bigint(20) COMMENT '处理人ID',
|
||||
`handler_name` varchar(50) COMMENT '处理人姓名',
|
||||
`handle_time` datetime COMMENT '处理时间',
|
||||
|
||||
-- 📊 影响记录
|
||||
`affects_scholarship` char(1) DEFAULT '0' COMMENT '是否影响奖学金',
|
||||
`affects_graduation` char(1) DEFAULT '0' COMMENT '是否影响毕业',
|
||||
`affects_employment` char(1) DEFAULT '0' COMMENT '是否影响就业',
|
||||
`record_in_file` char(1) DEFAULT '1' COMMENT '是否记入档案',
|
||||
|
||||
-- 📎 附件信息
|
||||
`attachment_ids` json COMMENT '附件ID列表',
|
||||
`decision_file_id` bigint(20) COMMENT '处分决定书文件ID',
|
||||
`evidence_files` json COMMENT '证据文件列表',
|
||||
|
||||
-- 🔔 通知信息
|
||||
`notification_sent` char(1) DEFAULT '0' COMMENT '是否已通知:0-否,1-是',
|
||||
`notification_time` datetime COMMENT '通知时间',
|
||||
`notification_method` varchar(50) COMMENT '通知方式:email-邮件,sms-短信,wechat-微信,phone-电话',
|
||||
|
||||
-- 📈 统计字段
|
||||
`view_count` int(11) DEFAULT 0 COMMENT '查看次数',
|
||||
`last_view_time` datetime COMMENT '最后查看时间',
|
||||
`appeal_count` int(11) DEFAULT 0 COMMENT '申诉次数',
|
||||
`modification_count` int(11) DEFAULT 0 COMMENT '修改次数',
|
||||
|
||||
-- 📝 其他字段
|
||||
`data_source` varchar(20) DEFAULT 'manual' COMMENT '数据来源:manual-手工录入,import-批量导入,sync-系统同步',
|
||||
`import_batch_id` bigint(20) COMMENT '导入批次ID',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
`internal_note` text COMMENT '内部备注(学生不可见)',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_record_no_tenant` (`record_no`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_student_id` (`student_id`),
|
||||
KEY `idx_student_no` (`student_no`),
|
||||
KEY `idx_discipline_type` (`discipline_type_id`),
|
||||
KEY `idx_punishment_type` (`punishment_type_id`),
|
||||
KEY `idx_discipline_date` (`discipline_date`),
|
||||
KEY `idx_punishment_date` (`punishment_date`),
|
||||
KEY `idx_record_status` (`record_status`),
|
||||
KEY `idx_appeal_status` (`appeal_status`),
|
||||
KEY `idx_college_id` (`college_id`),
|
||||
KEY `idx_class_id` (`class_id`),
|
||||
KEY `idx_counselor_id` (`counselor_id`),
|
||||
KEY `idx_approval_status` (`approval_status`),
|
||||
KEY `idx_punishment_end_date` (`punishment_end_date`),
|
||||
KEY `idx_college_discipline` (`college_id`, `discipline_date`),
|
||||
KEY `idx_student_status` (`student_id`, `record_status`),
|
||||
KEY `idx_discipline_punishment` (`discipline_type_id`, `punishment_type_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='违纪处分记录表';
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 违纪处分申诉表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_discipline_appeal`;
|
||||
CREATE TABLE `xskh_discipline_appeal` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 申请标识
|
||||
`appeal_no` varchar(32) NOT NULL COMMENT '申请编号(自动生成:APPEAL202501001)',
|
||||
`discipline_record_id` bigint(20) NOT NULL COMMENT '违纪记录ID',
|
||||
`record_no` varchar(32) NOT NULL COMMENT '违纪记录编号',
|
||||
|
||||
-- 👤 申请人信息
|
||||
`student_id` bigint(20) NOT NULL COMMENT '申请学生ID',
|
||||
`student_no` varchar(32) NOT NULL COMMENT '学号',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名',
|
||||
`class_name` varchar(100) COMMENT '班级名称',
|
||||
`college_name` varchar(100) COMMENT '学院名称',
|
||||
`phone` varchar(20) COMMENT '联系电话',
|
||||
`email` varchar(100) COMMENT '邮箱地址',
|
||||
|
||||
-- 📝 申请内容
|
||||
`appeal_type` varchar(20) NOT NULL COMMENT '申诉类型:revoke-撤销申请,reduce-减轻申请,correct-纠错申请',
|
||||
`appeal_reason` text NOT NULL COMMENT '申诉理由',
|
||||
`appeal_basis` text COMMENT '申诉依据',
|
||||
`new_facts` text COMMENT '新发现的事实',
|
||||
`legal_basis` varchar(500) COMMENT '法律依据',
|
||||
`apply_time` datetime NOT NULL COMMENT '申请时间',
|
||||
`apply_deadline` datetime COMMENT '申请截止时间',
|
||||
|
||||
-- 📎 证据材料
|
||||
`evidence_files` json COMMENT '证据文件列表',
|
||||
`witness_info` text COMMENT '证人信息',
|
||||
`other_evidence` text COMMENT '其他证据说明',
|
||||
|
||||
-- 🔄 审核流程
|
||||
`appeal_status` char(1) DEFAULT '1' COMMENT '申请状态:1-待辅导员审核,2-待学院审核,3-待学校审核,4-已通过,5-已驳回,6-已撤回',
|
||||
`current_level` tinyint(1) DEFAULT 1 COMMENT '当前审核级别:1-辅导员,2-学院,3-学校',
|
||||
`current_approver_id` bigint(20) COMMENT '当前审核人ID',
|
||||
`current_approver_name` varchar(50) COMMENT '当前审核人姓名',
|
||||
`approval_deadline` datetime COMMENT '审核截止时间',
|
||||
|
||||
-- 📊 审核结果
|
||||
`final_result` char(1) COMMENT '最终结果:1-完全撤销,2-部分撤销,3-减轻处分,4-维持原状,5-驳回申请',
|
||||
`final_comment` text COMMENT '最终审核意见',
|
||||
`result_reason` text COMMENT '结果说明',
|
||||
`complete_time` datetime COMMENT '完成时间',
|
||||
`effective_date` date COMMENT '生效日期',
|
||||
|
||||
-- 📋 处理信息
|
||||
`handler_id` bigint(20) COMMENT '最终处理人ID',
|
||||
`handler_name` varchar(50) COMMENT '最终处理人姓名',
|
||||
`handle_dept_id` bigint(20) COMMENT '处理部门ID',
|
||||
`handle_dept_name` varchar(100) COMMENT '处理部门名称',
|
||||
`decision_file_id` bigint(20) COMMENT '决定书文件ID',
|
||||
|
||||
-- 📈 流程跟踪
|
||||
`approval_history` json COMMENT '审核历史记录',
|
||||
`process_log` json COMMENT '流程日志',
|
||||
`reminder_count` int(11) DEFAULT 0 COMMENT '提醒次数',
|
||||
`last_reminder_time` datetime COMMENT '最后提醒时间',
|
||||
|
||||
-- 🔔 通知信息
|
||||
`notification_settings` json COMMENT '通知设置',
|
||||
`auto_notify` char(1) DEFAULT '1' COMMENT '是否自动通知:0-否,1-是',
|
||||
|
||||
-- 📝 其他字段
|
||||
`priority_level` tinyint(1) DEFAULT 3 COMMENT '优先级:1-最高,2-高,3-普通,4-低,5-最低',
|
||||
`is_urgent` char(1) DEFAULT '0' COMMENT '是否紧急:0-否,1-是',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_appeal_no_tenant` (`appeal_no`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_discipline_record_id` (`discipline_record_id`),
|
||||
KEY `idx_student_id` (`student_id`),
|
||||
KEY `idx_appeal_status` (`appeal_status`),
|
||||
KEY `idx_current_approver` (`current_approver_id`),
|
||||
KEY `idx_apply_time` (`apply_time`),
|
||||
KEY `idx_final_result` (`final_result`),
|
||||
KEY `idx_student_status` (`student_id`, `appeal_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='违纪处分申诉表';
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 测评指标体系表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_indicator`;
|
||||
CREATE TABLE `xskh_assessment_indicator` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 指标基本信息
|
||||
`indicator_code` varchar(32) NOT NULL COMMENT '指标编码(唯一标识)',
|
||||
`indicator_name` varchar(100) NOT NULL COMMENT '指标名称',
|
||||
`indicator_desc` text COMMENT '指标说明及评分标准',
|
||||
`short_name` varchar(50) COMMENT '指标简称',
|
||||
`english_name` varchar(100) COMMENT '英文名称',
|
||||
|
||||
-- 🏗️ 层级结构
|
||||
`parent_id` bigint(20) DEFAULT 0 COMMENT '父级指标ID',
|
||||
`level` tinyint(1) DEFAULT 1 COMMENT '指标层级:1-一级,2-二级,3-三级',
|
||||
`path` varchar(500) COMMENT '层级路径(如:1/2/3)',
|
||||
`has_children` char(1) DEFAULT '0' COMMENT '是否有子指标:0-否,1-是',
|
||||
|
||||
-- 📊 分类管理
|
||||
`indicator_type` varchar(20) NOT NULL COMMENT '指标类型:moral-德育,intellectual-智育,physical-体育,aesthetic-美育,labor-劳育',
|
||||
`category` varchar(50) COMMENT '指标分类:basic-基础指标,bonus-加分指标,deduct-扣分指标',
|
||||
`dimension` varchar(50) COMMENT '测评维度:academic-学业,behavior-行为,ability-能力,innovation-创新',
|
||||
|
||||
-- 🎯 评分配置
|
||||
`max_score` decimal(5,2) NOT NULL COMMENT '满分分值',
|
||||
`min_score` decimal(5,2) DEFAULT 0.00 COMMENT '最低分值',
|
||||
`default_score` decimal(5,2) DEFAULT 0.00 COMMENT '默认分值',
|
||||
`weight` decimal(3,2) DEFAULT 1.00 COMMENT '权重系数',
|
||||
`score_precision` tinyint(1) DEFAULT 2 COMMENT '分数精度(小数位数)',
|
||||
|
||||
-- ⚙️ 计算配置
|
||||
`calculation_method` varchar(50) DEFAULT 'manual' COMMENT '计算方式:manual-手工录入,auto-自动计算,formula-公式计算',
|
||||
`formula` text COMMENT '计算公式',
|
||||
`data_source` varchar(100) COMMENT '数据来源',
|
||||
`update_frequency` varchar(20) COMMENT '更新频率:realtime-实时,daily-每日,weekly-每周,monthly-每月',
|
||||
|
||||
-- 📏 评分标准
|
||||
`scoring_criteria` json COMMENT '评分标准(JSON格式)',
|
||||
`score_levels` json COMMENT '分数等级(优秀、良好、合格、不合格)',
|
||||
`benchmark_score` decimal(5,2) COMMENT '基准分数',
|
||||
`pass_score` decimal(5,2) COMMENT '及格分数',
|
||||
|
||||
-- 👥 角色权限
|
||||
`evaluator_roles` json COMMENT '评价人角色列表',
|
||||
`viewer_roles` json COMMENT '查看人角色列表',
|
||||
`self_eval_allowed` char(1) DEFAULT '1' COMMENT '是否允许自评:0-否,1-是',
|
||||
`peer_eval_allowed` char(1) DEFAULT '0' COMMENT '是否允许互评:0-否,1-是',
|
||||
|
||||
-- 🎓 适用范围
|
||||
`applicable_grades` json COMMENT '适用年级',
|
||||
`applicable_majors` json COMMENT '适用专业',
|
||||
`applicable_colleges` json COMMENT '适用学院',
|
||||
`effective_date` date COMMENT '生效日期',
|
||||
`expire_date` date COMMENT '失效日期',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`is_required` char(1) DEFAULT '1' COMMENT '是否必填:0-否,1-是',
|
||||
`is_visible` char(1) DEFAULT '1' COMMENT '是否可见:0-否,1-是',
|
||||
|
||||
-- 📊 统计信息
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数',
|
||||
`avg_score` decimal(5,2) DEFAULT 0.00 COMMENT '平均分',
|
||||
`sort_order` int(11) DEFAULT 0 COMMENT '排序序号',
|
||||
`version` int(11) DEFAULT 1 COMMENT '版本号',
|
||||
|
||||
-- 📋 配置信息
|
||||
`input_type` varchar(20) DEFAULT 'number' COMMENT '输入类型:number-数字,text-文本,select-选择,checkbox-复选',
|
||||
`validation_rules` json COMMENT '验证规则',
|
||||
`help_text` varchar(500) COMMENT '帮助说明',
|
||||
`placeholder` varchar(200) COMMENT '输入提示',
|
||||
|
||||
-- 📝 其他字段
|
||||
`reference_standard` varchar(500) COMMENT '参考标准',
|
||||
`related_indicators` json COMMENT '关联指标',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_indicator_code_tenant` (`indicator_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_parent_id` (`parent_id`),
|
||||
KEY `idx_indicator_type` (`indicator_type`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_level` (`level`),
|
||||
KEY `idx_sort_order` (`sort_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测评指标体系表';
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 考核方案表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_scheme`;
|
||||
CREATE TABLE `xskh_assessment_scheme` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 方案基本信息
|
||||
`scheme_code` varchar(32) NOT NULL COMMENT '方案编号(唯一标识)',
|
||||
`scheme_name` varchar(100) NOT NULL COMMENT '方案名称',
|
||||
`scheme_desc` text COMMENT '方案说明(目的及适用范围)',
|
||||
`short_name` varchar(50) COMMENT '方案简称',
|
||||
`version` varchar(20) DEFAULT 'V1.0' COMMENT '方案版本',
|
||||
|
||||
-- 🎓 适用范围
|
||||
`target_grades` json COMMENT '目标年级',
|
||||
`target_majors` json COMMENT '目标专业',
|
||||
`target_colleges` json COMMENT '目标学院',
|
||||
`student_types` json COMMENT '学生类型:undergraduate-本科生,graduate-研究生,exchange-交换生',
|
||||
|
||||
-- 📊 评分配置
|
||||
`total_score` decimal(5,2) DEFAULT 100.00 COMMENT '总分',
|
||||
`pass_score` decimal(5,2) DEFAULT 60.00 COMMENT '及格分',
|
||||
`good_score` decimal(5,2) DEFAULT 75.00 COMMENT '良好分',
|
||||
`excellent_score` decimal(5,2) DEFAULT 85.00 COMMENT '优秀分',
|
||||
`score_precision` tinyint(1) DEFAULT 2 COMMENT '分数精度',
|
||||
|
||||
-- ⚙️ 计算规则
|
||||
`calculation_method` varchar(50) DEFAULT 'weighted' COMMENT '计算方法:weighted-加权平均,sum-直接相加,custom-自定义',
|
||||
`weight_distribution` json COMMENT '权重分配(各指标类型权重)',
|
||||
`bonus_limit` decimal(5,2) DEFAULT 20.00 COMMENT '加分上限',
|
||||
`deduction_limit` decimal(5,2) DEFAULT -20.00 COMMENT '扣分下限',
|
||||
`final_score_formula` text COMMENT '最终得分公式',
|
||||
|
||||
-- ⏰ 时间配置
|
||||
`effective_date` date COMMENT '生效日期',
|
||||
`expire_date` date COMMENT '失效日期',
|
||||
`assessment_cycle` varchar(20) DEFAULT 'semester' COMMENT '评价周期:semester-学期,year-学年,month-月度',
|
||||
`cycle_duration` int(11) DEFAULT 6 COMMENT '周期时长(月)',
|
||||
|
||||
-- 🔄 流程配置
|
||||
`workflow_enabled` char(1) DEFAULT '0' COMMENT '是否启用工作流:0-否,1-是',
|
||||
`approval_required` char(1) DEFAULT '1' COMMENT '是否需要审核:0-否,1-是',
|
||||
`approval_levels` tinyint(1) DEFAULT 2 COMMENT '审核级别数',
|
||||
`auto_publish` char(1) DEFAULT '0' COMMENT '是否自动发布:0-否,1-是',
|
||||
|
||||
-- 👥 权限配置
|
||||
`creator_roles` json COMMENT '创建人角色',
|
||||
`evaluator_roles` json COMMENT '评价人角色',
|
||||
`approver_roles` json COMMENT '审核人角色',
|
||||
`viewer_roles` json COMMENT '查看人角色',
|
||||
|
||||
-- ⚙️ 状态管理
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`is_default` char(1) DEFAULT '0' COMMENT '是否默认方案:0-否,1-是',
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数',
|
||||
|
||||
-- 📊 统计信息
|
||||
`indicator_count` int(11) DEFAULT 0 COMMENT '指标数量',
|
||||
`plan_count` int(11) DEFAULT 0 COMMENT '关联计划数',
|
||||
`student_count` int(11) DEFAULT 0 COMMENT '评价学生数',
|
||||
`avg_score` decimal(5,2) DEFAULT 0.00 COMMENT '平均分',
|
||||
|
||||
-- 📋 配置选项
|
||||
`allow_self_eval` char(1) DEFAULT '1' COMMENT '允许自评:0-否,1-是',
|
||||
`allow_peer_eval` char(1) DEFAULT '0' COMMENT '允许互评:0-否,1-是',
|
||||
`allow_teacher_eval` char(1) DEFAULT '1' COMMENT '允许教师评价:0-否,1-是',
|
||||
`show_ranking` char(1) DEFAULT '1' COMMENT '显示排名:0-否,1-是',
|
||||
`show_score` char(1) DEFAULT '1' COMMENT '显示分数:0-否,1-是',
|
||||
|
||||
-- 📝 其他字段
|
||||
`reference_standard` varchar(500) COMMENT '参考标准',
|
||||
`implementation_guide` text COMMENT '实施指南',
|
||||
`change_log` json COMMENT '变更日志',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_scheme_code_tenant` (`scheme_code`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_effective_date` (`effective_date`),
|
||||
KEY `idx_assessment_cycle` (`assessment_cycle`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考核方案表';
|
||||
|
||||
-- ===========================================
|
||||
-- 7. 方案指标关联表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_scheme_indicator`;
|
||||
CREATE TABLE `xskh_scheme_indicator` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 关联信息
|
||||
`scheme_id` bigint(20) NOT NULL COMMENT '方案ID',
|
||||
`indicator_id` bigint(20) NOT NULL COMMENT '指标ID',
|
||||
`indicator_code` varchar(32) NOT NULL COMMENT '指标编码',
|
||||
`indicator_name` varchar(100) NOT NULL COMMENT '指标名称',
|
||||
|
||||
-- 📊 权重配置
|
||||
`weight` decimal(3,2) DEFAULT 1.00 COMMENT '在方案中的权重',
|
||||
`max_score` decimal(5,2) NOT NULL COMMENT '在方案中的满分',
|
||||
`min_score` decimal(5,2) DEFAULT 0.00 COMMENT '在方案中的最低分',
|
||||
`default_score` decimal(5,2) DEFAULT 0.00 COMMENT '默认分数',
|
||||
|
||||
-- ⚙️ 配置选项
|
||||
`is_required` char(1) DEFAULT '1' COMMENT '是否必填:0-否,1-是',
|
||||
`is_visible` char(1) DEFAULT '1' COMMENT '是否可见:0-否,1-是',
|
||||
`allow_self_eval` char(1) DEFAULT '1' COMMENT '允许自评:0-否,1-是',
|
||||
`calculation_method` varchar(50) COMMENT '计算方法(覆盖指标默认设置)',
|
||||
|
||||
-- 📊 统计信息
|
||||
`sort_order` int(11) DEFAULT 0 COMMENT '排序序号',
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数',
|
||||
`avg_score` decimal(5,2) DEFAULT 0.00 COMMENT '平均分',
|
||||
|
||||
-- 📝 其他字段
|
||||
`custom_desc` text COMMENT '自定义描述(覆盖指标默认描述)',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_scheme_indicator` (`scheme_id`, `indicator_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_scheme_id` (`scheme_id`),
|
||||
KEY `idx_indicator_id` (`indicator_id`),
|
||||
KEY `idx_sort_order` (`sort_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='方案指标关联表';
|
||||
|
||||
-- ===========================================
|
||||
-- 8. 操作日志表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_operation_log`;
|
||||
CREATE TABLE `xskh_operation_log` (
|
||||
-- 🔧 标准基础字段
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志',
|
||||
|
||||
-- 📋 操作信息
|
||||
`operation_id` varchar(32) NOT NULL COMMENT '操作ID',
|
||||
`operation_type` varchar(50) NOT NULL COMMENT '操作类型:create-新增,update-修改,delete-删除,approve-审核,export-导出,import-导入',
|
||||
`business_type` varchar(50) NOT NULL COMMENT '业务类型:discipline-违纪管理,assessment-测评管理,statistics-统计分析',
|
||||
`business_id` bigint(20) COMMENT '业务数据ID',
|
||||
`business_name` varchar(200) COMMENT '业务数据名称',
|
||||
|
||||
-- 👤 操作人信息
|
||||
`operator_id` bigint(20) NOT NULL COMMENT '操作人ID',
|
||||
`operator_name` varchar(50) NOT NULL COMMENT '操作人姓名',
|
||||
`operator_type` varchar(50) COMMENT '操作人类型:admin-管理员,teacher-教师,student-学生',
|
||||
`operator_ip` varchar(50) COMMENT '操作IP地址',
|
||||
`operator_location` varchar(200) COMMENT '操作地点',
|
||||
|
||||
-- 📊 操作内容
|
||||
`operation_desc` varchar(500) COMMENT '操作描述',
|
||||
`operation_params` json COMMENT '操作参数',
|
||||
`old_data` json COMMENT '修改前数据',
|
||||
`new_data` json COMMENT '修改后数据',
|
||||
`changed_fields` json COMMENT '变更字段列表',
|
||||
|
||||
-- 🔄 操作结果
|
||||
`operation_status` char(1) DEFAULT '1' COMMENT '操作状态:1-成功,2-失败,3-部分成功',
|
||||
`error_message` text COMMENT '错误信息',
|
||||
`execution_time` int(11) COMMENT '执行时间(毫秒)',
|
||||
|
||||
-- 📱 终端信息
|
||||
`user_agent` varchar(500) COMMENT '用户代理',
|
||||
`browser` varchar(100) COMMENT '浏览器',
|
||||
`os` varchar(100) COMMENT '操作系统',
|
||||
`device_type` varchar(50) COMMENT '设备类型:pc-电脑,mobile-手机,tablet-平板',
|
||||
|
||||
-- 📝 其他字段
|
||||
`request_url` varchar(500) COMMENT '请求URL',
|
||||
`request_method` varchar(10) COMMENT '请求方法',
|
||||
`response_code` int(11) COMMENT '响应代码',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_tenant_id` (`tenant_id`),
|
||||
KEY `idx_deleted` (`deleted`),
|
||||
KEY `idx_operation_type` (`operation_type`),
|
||||
KEY `idx_business_type` (`business_type`),
|
||||
KEY `idx_operator_id` (`operator_id`),
|
||||
KEY `idx_create_time` (`create_time`),
|
||||
KEY `idx_business_id` (`business_id`),
|
||||
KEY `idx_operation_status` (`operation_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='操作日志表';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,309 @@
|
||||
# 学生考核管理系统数据库设计
|
||||
|
||||
## 📋 文档信息
|
||||
|
||||
| 项目 | 信息 |
|
||||
|------|------|
|
||||
| **模块名称** | 学生考核管理系统 |
|
||||
| **数据库版本** | V1.0.0 |
|
||||
| **创建时间** | 2025-01-26 |
|
||||
| **设计规范** | 遵循 mysql-database-standard.md |
|
||||
| **技术架构** | 前后端分离 + Excel导入导出 + 码表管理 |
|
||||
|
||||
## 🎯 设计原则
|
||||
|
||||
### ✅ 项目规范遵循
|
||||
1. **标准基础字段**: 所有表包含完整的基础字段(id、tenant_id、create_by等)
|
||||
2. **码表管理**: 使用sys_dict_type和sys_dict_data进行码表管理
|
||||
3. **Excel支持**: 所有VO类支持Excel导入导出
|
||||
4. **前后端分离**: 标准的Controller/Service/Mapper架构
|
||||
|
||||
### ✅ 核心特性
|
||||
- **雪花ID主键**: 使用bigint(20)作为主键
|
||||
- **多租户支持**: tenant_id字段实现数据隔离
|
||||
- **逻辑删除**: deleted字段,禁止物理删除
|
||||
- **完整审计**: 创建者、更新者、时间记录
|
||||
- **权限控制**: 完整的菜单权限配置
|
||||
|
||||
## 🗄️ 数据表设计
|
||||
|
||||
### 📊 表清单概览
|
||||
|
||||
| 表名 | 中文名 | 用途 | 类型 |
|
||||
|------|--------|------|------|
|
||||
| xskh_discipline_type | 违纪类型管理表 | 违纪类型配置 | 配置表 |
|
||||
| xskh_punishment_type | 处分类型管理表 | 处分类型配置 | 配置表 |
|
||||
| xskh_discipline_record | 违纪处分记录表 | 违纪处分记录 | 业务表 |
|
||||
| xskh_discipline_appeal | 违纪处分申诉表 | 申诉流程管理 | 业务表 |
|
||||
| xskh_assessment_indicator | 测评指标体系表 | 指标配置管理 | 配置表 |
|
||||
| xskh_assessment_scheme | 考核方案表 | 方案配置管理 | 配置表 |
|
||||
| xskh_scheme_indicator | 方案指标关联表 | 方案指标关联 | 关联表 |
|
||||
| xskh_assessment_plan | 考核计划表 | 计划管理 | 业务表 |
|
||||
| xskh_assessment_record | 综合测评记录表 | 测评记录管理 | 业务表 |
|
||||
| xskh_assessment_detail | 测评明细记录表 | 测评明细数据 | 明细表 |
|
||||
| xskh_bonus_application | 附加分申请表 | 附加分申请 | 业务表 |
|
||||
| xskh_statistics_config | 统计配置表 | 统计配置管理 | 配置表 |
|
||||
| xskh_operation_log | 操作日志表 | 操作审计日志 | 日志表 |
|
||||
|
||||
## 📚 码表设计
|
||||
|
||||
### 字典类型配置
|
||||
|
||||
```sql
|
||||
-- 违纪类型字典
|
||||
INSERT INTO sys_dict_type VALUES (nextval('sys_dict_type_seq'), '000000', '违纪类型', 'xskh_discipline_type', '0', '学生违纪类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型字典
|
||||
INSERT INTO sys_dict_type VALUES (nextval('sys_dict_type_seq'), '000000', '处分类型', 'xskh_punishment_type', '0', '学生处分类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型字典
|
||||
INSERT INTO sys_dict_type VALUES (nextval('sys_dict_type_seq'), '000000', '测评指标类型', 'xskh_indicator_type', '0', '综合测评指标类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态字典
|
||||
INSERT INTO sys_dict_type VALUES (nextval('sys_dict_type_seq'), '000000', '考核状态', 'xskh_assessment_status', '0', '考核计划状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态字典
|
||||
INSERT INTO sys_dict_type VALUES (nextval('sys_dict_type_seq'), '000000', '审核状态', 'xskh_approval_status', '0', '审核流程状态', 1, NOW(), 1, NOW());
|
||||
```
|
||||
|
||||
### 字典数据配置
|
||||
|
||||
```sql
|
||||
-- 违纪类型数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(nextval('sys_dict_data_seq'), '000000', 1, '旷课', 'absence', 'xskh_discipline_type', '', 'danger', 'N', '0', '旷课违纪', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 2, '考试作弊', 'cheating', 'xskh_discipline_type', '', 'danger', 'N', '0', '考试作弊', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 3, '扰乱秩序', 'disorder', 'xskh_discipline_type', '', 'warning', 'N', '0', '扰乱课堂秩序', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 4, '违反宿舍规定', 'dormitory', 'xskh_discipline_type', '', 'warning', 'N', '0', '违反宿舍管理规定', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 5, '打架斗殴', 'fighting', 'xskh_discipline_type', '', 'danger', 'N', '0', '打架斗殴', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 处分类型数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(nextval('sys_dict_data_seq'), '000000', 1, '警告', 'warning', 'xskh_punishment_type', '', 'info', 'N', '0', '警告处分', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 2, '严重警告', 'serious_warning', 'xskh_punishment_type', '', 'warning', 'N', '0', '严重警告处分', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 3, '记过', 'demerit', 'xskh_punishment_type', '', 'warning', 'N', '0', '记过处分', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 4, '留校察看', 'probation', 'xskh_punishment_type', '', 'danger', 'N', '0', '留校察看处分', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 5, '开除学籍', 'expulsion', 'xskh_punishment_type', '', 'danger', 'N', '0', '开除学籍处分', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 测评指标类型数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(nextval('sys_dict_data_seq'), '000000', 1, '德育', 'moral', 'xskh_indicator_type', '', 'success', 'N', '0', '德育指标', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 2, '智育', 'intellectual', 'xskh_indicator_type', '', 'primary', 'N', '0', '智育指标', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 3, '体育', 'physical', 'xskh_indicator_type', '', 'warning', 'N', '0', '体育指标', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 4, '美育', 'aesthetic', 'xskh_indicator_type', '', 'info', 'N', '0', '美育指标', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 5, '劳育', 'labor', 'xskh_indicator_type', '', 'success', 'N', '0', '劳育指标', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 考核状态数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(nextval('sys_dict_data_seq'), '000000', 1, '未开始', 'not_started', 'xskh_assessment_status', '', 'info', 'N', '0', '计划未开始', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 2, '准备中', 'preparing', 'xskh_assessment_status', '', 'warning', 'N', '0', '准备阶段', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 3, '进行中', 'in_progress', 'xskh_assessment_status', '', 'primary', 'N', '0', '考核进行中', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 4, '审核中', 'reviewing', 'xskh_assessment_status', '', 'warning', 'N', '0', '审核阶段', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 5, '已完成', 'completed', 'xskh_assessment_status', '', 'success', 'N', '0', '考核已完成', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 6, '已归档', 'archived', 'xskh_assessment_status', '', 'info', 'N', '0', '已归档', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 7, '已取消', 'cancelled', 'xskh_assessment_status', '', 'danger', 'N', '0', '已取消', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态数据
|
||||
INSERT INTO sys_dict_data VALUES
|
||||
(nextval('sys_dict_data_seq'), '000000', 1, '待审核', 'pending', 'xskh_approval_status', '', 'warning', 'N', '0', '待审核', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 2, '审核中', 'reviewing', 'xskh_approval_status', '', 'primary', 'N', '0', '审核中', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 3, '已通过', 'approved', 'xskh_approval_status', '', 'success', 'N', '0', '审核通过', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 4, '已驳回', 'rejected', 'xskh_approval_status', '', 'danger', 'N', '0', '审核驳回', 1, NOW(), 1, NOW()),
|
||||
(nextval('sys_dict_data_seq'), '000000', 5, '需修改', 'need_modify', 'xskh_approval_status', '', 'warning', 'N', '0', '需要修改', 1, NOW(), 1, NOW());
|
||||
```
|
||||
|
||||
## 🔐 菜单权限设计
|
||||
|
||||
### 菜单结构配置
|
||||
|
||||
```sql
|
||||
-- 主菜单:学生考核管理
|
||||
INSERT INTO sys_menu VALUES(2000, '学生考核管理', 0, 1, 'assessment', NULL, '', 1, 0, 'M', '0', '0', '', 'assessment', 1, NOW(), '', NULL, '学生考核管理');
|
||||
|
||||
-- 二级菜单:违纪处分管理
|
||||
INSERT INTO sys_menu VALUES(2100, '违纪处分管理', 2000, 1, 'discipline', 'xskh/discipline/index', '', 1, 0, 'C', '0', '0', 'xskh:discipline:list', 'discipline', 1, NOW(), '', NULL, '违纪处分管理');
|
||||
|
||||
-- 违纪处分管理按钮权限
|
||||
INSERT INTO sys_menu VALUES(2101, '违纪处分查询', 2100, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:query', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2102, '违纪处分新增', 2100, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:add', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2103, '违纪处分修改', 2100, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:edit', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2104, '违纪处分删除', 2100, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:remove', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2105, '违纪处分导出', 2100, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:export', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2106, '违纪处分导入', 2100, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:import', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2107, '违纪处分审核', 2100, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:audit', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 二级菜单:综合测评管理
|
||||
INSERT INTO sys_menu VALUES(2200, '综合测评管理', 2000, 2, 'assessment', 'xskh/assessment/index', '', 1, 0, 'C', '0', '0', 'xskh:assessment:list', 'assessment', 1, NOW(), '', NULL, '综合测评管理');
|
||||
|
||||
-- 综合测评管理按钮权限
|
||||
INSERT INTO sys_menu VALUES(2201, '测评记录查询', 2200, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:query', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2202, '测评记录新增', 2200, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:add', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2203, '测评记录修改', 2200, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:edit', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2204, '测评记录删除', 2200, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:remove', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2205, '测评记录导出', 2200, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:export', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2206, '测评记录导入', 2200, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:import', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2207, '测评记录审核', 2200, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:audit', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 二级菜单:考核方案管理
|
||||
INSERT INTO sys_menu VALUES(2300, '考核方案管理', 2000, 3, 'scheme', 'xskh/scheme/index', '', 1, 0, 'C', '0', '0', 'xskh:scheme:list', 'scheme', 1, NOW(), '', NULL, '考核方案管理');
|
||||
|
||||
-- 考核方案管理按钮权限
|
||||
INSERT INTO sys_menu VALUES(2301, '方案查询', 2300, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:query', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2302, '方案新增', 2300, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:add', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2303, '方案修改', 2300, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:edit', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2304, '方案删除', 2300, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:remove', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2305, '方案导出', 2300, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:export', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 二级菜单:统计分析
|
||||
INSERT INTO sys_menu VALUES(2400, '统计分析', 2000, 4, 'statistics', 'xskh/statistics/index', '', 1, 0, 'C', '0', '0', 'xskh:statistics:list', 'statistics', 1, NOW(), '', NULL, '统计分析');
|
||||
|
||||
-- 统计分析按钮权限
|
||||
INSERT INTO sys_menu VALUES(2401, '统计查询', 2400, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:query', '#', 1, NOW(), '', NULL, '');
|
||||
INSERT INTO sys_menu VALUES(2402, '统计导出', 2400, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:export', '#', 1, NOW(), '', NULL, '');
|
||||
```
|
||||
|
||||
## 📊 Excel导入导出支持
|
||||
|
||||
### VO类基础字段规范
|
||||
|
||||
所有VO类必须包含以下基础字段:
|
||||
|
||||
```java
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
```
|
||||
|
||||
### Excel导入导出配置示例
|
||||
|
||||
```java
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XskhDisciplineRecordVo implements Serializable {
|
||||
|
||||
@ExcelProperty(value = "记录编号")
|
||||
private String recordNo;
|
||||
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentNo;
|
||||
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
@ExcelProperty(value = "违纪类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xskh_discipline_type")
|
||||
private String disciplineType;
|
||||
|
||||
@ExcelProperty(value = "处分类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xskh_punishment_type")
|
||||
private String punishmentType;
|
||||
|
||||
@ExcelProperty(value = "违纪日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date disciplineDate;
|
||||
|
||||
@ExcelProperty(value = "处分日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date punishmentDate;
|
||||
|
||||
@ExcelProperty(value = "记录状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xskh_record_status")
|
||||
private String recordStatus;
|
||||
|
||||
// 基础字段
|
||||
private Long createBy;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
private Long updateBy;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
```
|
||||
|
||||
## 🏗️ 架构设计
|
||||
|
||||
### 前后端分离架构
|
||||
|
||||
```
|
||||
前端 (Vue3)
|
||||
├── views/xskh/
|
||||
│ ├── discipline/ # 违纪处分管理
|
||||
│ ├── assessment/ # 综合测评管理
|
||||
│ ├── scheme/ # 考核方案管理
|
||||
│ └── statistics/ # 统计分析
|
||||
│
|
||||
后端 (Spring Boot)
|
||||
├── controller/ # 控制层
|
||||
├── service/ # 服务层
|
||||
├── mapper/ # 数据访问层
|
||||
├── domain/
|
||||
│ ├── entity/ # 实体类
|
||||
│ ├── vo/ # 视图对象
|
||||
│ └── bo/ # 业务对象
|
||||
└── utils/ # 工具类
|
||||
```
|
||||
|
||||
### 标准接口设计
|
||||
|
||||
每个模块包含16个标准接口:
|
||||
1. **基础管理接口(6个)**: list、详情、新增、修改、删除、可用选项
|
||||
2. **业务功能接口(4个)**: 我的数据、待处理、规则检查、审批
|
||||
3. **辅助功能接口(6个)**: 导出、导入、统计、批量、启用、禁用
|
||||
|
||||
### 统一响应格式
|
||||
|
||||
```java
|
||||
// 分页查询响应
|
||||
TableDataInfo<List<XskhDisciplineRecordVo>> response = TableDataInfo.build(records);
|
||||
|
||||
// 非分页响应
|
||||
R<XskhDisciplineRecordVo> response = R.ok(record);
|
||||
|
||||
// 操作响应
|
||||
R<Void> response = R.ok();
|
||||
```
|
||||
|
||||
## 📈 开发流程
|
||||
|
||||
### 1. 数据库设计 → 2. 代码生成 → 3. 业务开发 → 4. 前端开发 → 5. 测试验证
|
||||
|
||||
1. **数据库设计**: 遵循项目规范,创建标准表结构
|
||||
2. **代码生成**: 使用代码生成器生成基础代码
|
||||
3. **业务开发**: 实现业务逻辑和权限控制
|
||||
4. **前端开发**: 创建Vue页面和组件
|
||||
5. **测试验证**: API测试和功能验证
|
||||
|
||||
## 📝 总结
|
||||
|
||||
本设计完全遵循项目规范要求:
|
||||
- ✅ **标准基础字段**: 所有表包含完整基础字段
|
||||
- ✅ **码表管理**: 使用系统字典表管理所有码表
|
||||
- ✅ **Excel支持**: 完整的导入导出功能
|
||||
- ✅ **前后端分离**: 标准的架构设计
|
||||
- ✅ **权限控制**: 完整的菜单权限配置
|
||||
- ✅ **规范一致**: 与现有系统保持高度一致
|
||||
|
||||
该设计为学生考核管理系统提供了完整、标准、可扩展的数据库基础。
|
||||
@@ -0,0 +1,96 @@
|
||||
-- ========================================
|
||||
-- 学生考核管理系统 - 菜单权限配置脚本
|
||||
-- ========================================
|
||||
-- 版本: V1.0.0
|
||||
-- 创建时间: 2025-01-26
|
||||
-- 修复时间: 2025-01-28
|
||||
-- 说明: 修复字段名query->query_param,适配当前数据库结构
|
||||
-- ========================================
|
||||
|
||||
USE hzdyjs_xg;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 主菜单:学生考核管理
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9000, '学生考核管理', 0, 8, 'assessment', NULL, '', 1, 0, 'M', '0', '0', '', 'assessment', 1, NOW(), 1, NOW(), '学生考核管理系统');
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 二级菜单:违纪处分管理
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9100, '违纪处分管理', 9000, 1, 'discipline', 'xskh/discipline/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineRecord:list', 'discipline', 1, NOW(), 1, NOW(), '违纪处分记录管理');
|
||||
|
||||
-- 违纪处分管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9101, '违纪处分查询', 9100, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:query', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9102, '违纪处分新增', 9100, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:add', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9103, '违纪处分修改', 9100, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:edit', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9104, '违纪处分删除', 9100, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:remove', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9105, '违纪处分导出', 9100, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:export', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9106, '违纪处分导入', 9100, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:import', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9107, '违纪处分审核', 9100, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:approve', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9108, '违纪处分撤销', 9100, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:revoke', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9109, '违纪处分归档', 9100, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:archive', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9110, '违纪处分统计', 9100, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:stats', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9111, '学生记录检查', 9100, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:check', '#', 1, NOW(), 1, NOW(), ''),
|
||||
(9112, '我的违纪记录', 9100, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:my', '#', 1, NOW(), 1, NOW(), '');
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 角色权限配置
|
||||
-- ===========================================
|
||||
|
||||
-- 为超级管理员角色分配权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(1, 9000), -- 学生考核管理主菜单
|
||||
(1, 9100), -- 违纪处分管理
|
||||
(1, 9101), -- 违纪处分查询
|
||||
(1, 9102), -- 违纪处分新增
|
||||
(1, 9103), -- 违纪处分修改
|
||||
(1, 9104), -- 违纪处分删除
|
||||
(1, 9105), -- 违纪处分导出
|
||||
(1, 9106), -- 违纪处分导入
|
||||
(1, 9107), -- 违纪处分审核
|
||||
(1, 9108), -- 违纪处分撤销
|
||||
(1, 9109), -- 违纪处分归档
|
||||
(1, 9110), -- 违纪处分统计
|
||||
(1, 9111), -- 学生记录检查
|
||||
(1, 9112); -- 我的违纪记录
|
||||
|
||||
-- 为学工管理员角色分配权限(角色ID假设为2)
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(2, 9000), -- 学生考核管理主菜单
|
||||
(2, 9100), -- 违纪处分管理
|
||||
(2, 9101), -- 违纪处分查询
|
||||
(2, 9102), -- 违纪处分新增
|
||||
(2, 9103), -- 违纪处分修改
|
||||
(2, 9105), -- 违纪处分导出
|
||||
(2, 9106), -- 违纪处分导入
|
||||
(2, 9107), -- 违纪处分审核
|
||||
(2, 9110), -- 违纪处分统计
|
||||
(2, 9111); -- 学生记录检查
|
||||
|
||||
-- 为辅导员角色分配权限(角色ID假设为3)
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(3, 9000), -- 学生考核管理主菜单
|
||||
(3, 9100), -- 违纪处分管理
|
||||
(3, 9101), -- 违纪处分查询
|
||||
(3, 9102), -- 违纪处分新增
|
||||
(3, 9103), -- 违纪处分修改
|
||||
(3, 9105), -- 违纪处分导出
|
||||
(3, 9110), -- 违纪处分统计
|
||||
(3, 9111); -- 学生记录检查
|
||||
|
||||
-- 为学生角色分配权限(角色ID假设为4)
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(4, 9000), -- 学生考核管理主菜单
|
||||
(4, 9100), -- 违纪处分管理
|
||||
(4, 9101), -- 违纪处分查询
|
||||
(4, 9112); -- 我的违纪记录
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ========================================
|
||||
-- 脚本执行完成
|
||||
-- ========================================
|
||||
@@ -0,0 +1,184 @@
|
||||
-- ==========================================
|
||||
-- 学生考核管理系统菜单权限配置
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-26
|
||||
-- 说明:遵循项目菜单权限管理规范
|
||||
-- 🔧 ID范围修正:9000-9699 (避免与其他模块冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 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
|
||||
(9000, '学生考核管理', 0, 8, 'assessment', NULL, '', 1, 0, 'M', '0', '0', '', 'assessment', 1, 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
|
||||
(9100, '违纪处分管理', 9000, 1, 'discipline', 'xskh/discipline/index', '', 1, 0, 'C', '0', '0', 'xskh:discipline:list', 'discipline', 1, 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
|
||||
(9101, '违纪处分查询', 9100, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9102, '违纪处分新增', 9100, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9103, '违纪处分修改', 9100, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9104, '违纪处分删除', 9100, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9105, '违纪处分导出', 9100, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9106, '违纪处分导入', 9100, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9107, '违纪处分审核', 9100, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:discipline:audit', '#', 1, 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
|
||||
(9110, '处分申诉管理', 9000, 2, 'appeal', 'xskh/appeal/index', '', 1, 0, 'C', '0', '0', 'xskh:appeal:list', 'appeal', 1, 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
|
||||
(9111, '申诉记录查询', 9110, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9112, '申诉记录新增', 9110, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9113, '申诉记录修改', 9110, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9114, '申诉记录删除', 9110, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9115, '申诉记录导出', 9110, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9116, '申诉记录审核', 9110, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:appeal:audit', '#', 1, 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
|
||||
(9200, '综合测评管理', 9000, 3, 'assessment', 'xskh/assessment/index', '', 1, 0, 'C', '0', '0', 'xskh:assessment:list', 'assessment', 1, 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
|
||||
(9201, '测评记录查询', 9200, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9202, '测评记录新增', 9200, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9203, '测评记录修改', 9200, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9204, '测评记录删除', 9200, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9205, '测评记录导出', 9200, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9206, '测评记录导入', 9200, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:import', '#', 1, NOW(), '', NULL, ''),
|
||||
(9207, '测评记录审核', 9200, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:audit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9208, '测评分数录入', 9200, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessment:score', '#', 1, 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
|
||||
(9210, '附加分申请管理', 9000, 4, 'bonus', 'xskh/bonus/index', '', 1, 0, 'C', '0', '0', 'xskh:bonus:list', 'bonus', 1, 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
|
||||
(9211, '附加分申请查询', 9210, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9212, '附加分申请新增', 9210, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9213, '附加分申请修改', 9210, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9214, '附加分申请删除', 9210, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9215, '附加分申请导出', 9210, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9216, '附加分申请审核', 9210, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:bonus:audit', '#', 1, 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
|
||||
(9300, '考核方案管理', 9000, 5, 'scheme', 'xskh/scheme/index', '', 1, 0, 'C', '0', '0', 'xskh:scheme:list', 'scheme', 1, 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
|
||||
(9301, '方案查询', 9300, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9302, '方案新增', 9300, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9303, '方案修改', 9300, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9304, '方案删除', 9300, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9305, '方案导出', 9300, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9306, '方案复制', 9300, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:copy', '#', 1, NOW(), '', NULL, ''),
|
||||
(9307, '方案启用', 9300, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9308, '方案禁用', 9300, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:scheme:disable', '#', 1, 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
|
||||
(9310, '测评指标管理', 9000, 6, 'indicator', 'xskh/indicator/index', '', 1, 0, 'C', '0', '0', 'xskh:indicator:list', 'indicator', 1, 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
|
||||
(9311, '指标查询', 9310, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9312, '指标新增', 9310, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9313, '指标修改', 9310, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9314, '指标删除', 9310, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9315, '指标导出', 9310, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9316, '指标启用', 9310, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:enable', '#', 1, NOW(), '', NULL, ''),
|
||||
(9317, '指标禁用', 9310, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:indicator:disable', '#', 1, 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
|
||||
(9320, '考核计划管理', 9000, 7, 'plan', 'xskh/plan/index', '', 1, 0, 'C', '0', '0', 'xskh:plan:list', 'plan', 1, 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
|
||||
(9321, '计划查询', 9320, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9322, '计划新增', 9320, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9323, '计划修改', 9320, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9324, '计划删除', 9320, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9325, '计划导出', 9320, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9326, '计划启动', 9320, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:start', '#', 1, NOW(), '', NULL, ''),
|
||||
(9327, '计划结束', 9320, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:end', '#', 1, NOW(), '', NULL, ''),
|
||||
(9328, '计划归档', 9320, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:plan:archive', '#', 1, 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
|
||||
(9400, '统计分析', 9000, 8, 'statistics', 'xskh/statistics/index', '', 1, 0, 'C', '0', '0', 'xskh:statistics:list', 'statistics', 1, 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
|
||||
(9401, '统计查询', 9400, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9402, '统计导出', 9400, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9403, '图表查看', 9400, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:chart', '#', 1, NOW(), '', NULL, ''),
|
||||
(9404, '报表生成', 9400, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:statistics:report', '#', 1, 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
|
||||
(9500, '系统配置', 9000, 9, 'config', 'xskh/config/index', '', 1, 0, 'C', '0', '0', 'xskh:config:list', 'config', 1, 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
|
||||
(9501, '违纪类型管理', 9500, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:config:disciplineType', '#', 1, NOW(), '', NULL, ''),
|
||||
(9502, '处分类型管理', 9500, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:config:punishmentType', '#', 1, NOW(), '', NULL, ''),
|
||||
(9503, '系统参数配置', 9500, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:config:param', '#', 1, NOW(), '', NULL, ''),
|
||||
(9504, '操作日志查看', 9500, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:config:log', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 11. 学生端菜单(移动端/Web端学生功能)
|
||||
-- ===========================================
|
||||
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
|
||||
(9600, '我的考核', 0, 9, 'myAssessment', NULL, '', 1, 0, 'M', '0', '0', '', 'myAssessment', 1, 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
|
||||
(9610, '我的违纪记录', 9600, 1, 'myDiscipline', 'student/discipline/index', '', 1, 0, 'C', '0', '0', 'student:discipline:list', 'discipline', 1, NOW(), '', NULL, '学生查看违纪记录'),
|
||||
(9620, '我的测评记录', 9600, 2, 'myAssessment', 'student/assessment/index', '', 1, 0, 'C', '0', '0', 'student:assessment:list', 'assessment', 1, NOW(), '', NULL, '学生查看测评记录'),
|
||||
(9630, '附加分申请', 9600, 3, 'bonusApply', 'student/bonus/index', '', 1, 0, 'C', '0', '0', 'student:bonus:apply', 'bonus', 1, NOW(), '', NULL, '学生申请附加分'),
|
||||
(9640, '处分申诉', 9600, 4, 'disciplineAppeal', 'student/appeal/index', '', 1, 0, 'C', '0', '0', 'student:appeal:apply', 'appeal', 1, 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
|
||||
(9611, '违纪记录查询', 9610, 1, '', '', '', 1, 0, 'F', '0', '0', 'student:discipline:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9612, '违纪记录详情', 9610, 2, '', '', '', 1, 0, 'F', '0', '0', 'student:discipline:detail', '#', 1, NOW(), '', NULL, ''),
|
||||
(9621, '测评记录查询', 9620, 1, '', '', '', 1, 0, 'F', '0', '0', 'student:assessment:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9622, '测评自评', 9620, 2, '', '', '', 1, 0, 'F', '0', '0', 'student:assessment:selfEval', '#', 1, NOW(), '', NULL, ''),
|
||||
(9623, '测评记录详情', 9620, 3, '', '', '', 1, 0, 'F', '0', '0', 'student:assessment:detail', '#', 1, NOW(), '', NULL, ''),
|
||||
(9631, '附加分申请提交', 9630, 1, '', '', '', 1, 0, 'F', '0', '0', 'student:bonus:submit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9632, '附加分申请查询', 9630, 2, '', '', '', 1, 0, 'F', '0', '0', 'student:bonus:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9633, '附加分申请修改', 9630, 3, '', '', '', 1, 0, 'F', '0', '0', 'student:bonus:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9641, '处分申诉提交', 9640, 1, '', '', '', 1, 0, 'F', '0', '0', 'student:appeal:submit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9642, '处分申诉查询', 9640, 2, '', '', '', 1, 0, 'F', '0', '0', 'student:appeal:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9643, '处分申诉修改', 9640, 3, '', '', '', 1, 0, 'F', '0', '0', 'student:appeal:edit', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,67 @@
|
||||
-- ==========================================
|
||||
-- 学生考核计划管理模块菜单权限配置
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:考核计划管理菜单权限配置,使用安全ID范围避免冲突
|
||||
-- 🔧 ID范围:9700-9799 (避免与现有9000-9699冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 考核计划管理菜单(在学生考核管理主菜单下)
|
||||
-- ===========================================
|
||||
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
|
||||
(9700, '考核计划管理', 9000, 5, 'assessmentPlan', 'xskh/assessmentPlan/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentPlan:list', 'plan', 1, 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
|
||||
(9701, '考核计划查询', 9700, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9702, '考核计划新增', 9700, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9703, '考核计划修改', 9700, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9704, '考核计划删除', 9700, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9705, '考核计划导出', 9700, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9706, '考核计划导入', 9700, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:import', '#', 1, 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
|
||||
(9707, '考核计划发布', 9700, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:publish', '#', 1, NOW(), '', NULL, ''),
|
||||
(9708, '撤销计划发布', 9700, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:unpublish', '#', 1, NOW(), '', NULL, ''),
|
||||
(9709, '考核计划开始', 9700, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:start', '#', 1, NOW(), '', NULL, ''),
|
||||
(9710, '考核计划结束', 9700, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:end', '#', 1, NOW(), '', NULL, ''),
|
||||
(9711, '考核计划取消', 9700, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:cancel', '#', 1, NOW(), '', NULL, ''),
|
||||
(9712, '考核计划归档', 9700, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:archive', '#', 1, 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
|
||||
(9713, '计划统计更新', 9700, 13, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:statistics', '#', 1, NOW(), '', NULL, ''),
|
||||
(9714, '计划复制功能', 9700, 14, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:copy', '#', 1, NOW(), '', NULL, ''),
|
||||
(9715, '批量状态更新', 9700, 15, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:batchStatus', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 角色权限关联(默认给超级管理员角色)
|
||||
-- ===========================================
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(1, 9700), -- 考核计划管理菜单
|
||||
(1, 9701), -- 考核计划查询
|
||||
(1, 9702), -- 考核计划新增
|
||||
(1, 9703), -- 考核计划修改
|
||||
(1, 9704), -- 考核计划删除
|
||||
(1, 9705), -- 考核计划导出
|
||||
(1, 9706), -- 考核计划导入
|
||||
(1, 9707), -- 考核计划发布
|
||||
(1, 9708), -- 撤销计划发布
|
||||
(1, 9709), -- 考核计划开始
|
||||
(1, 9710), -- 考核计划结束
|
||||
(1, 9711), -- 考核计划取消
|
||||
(1, 9712), -- 考核计划归档
|
||||
(1, 9713), -- 计划统计更新
|
||||
(1, 9714), -- 计划复制功能
|
||||
(1, 9715); -- 批量状态更新
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,219 @@
|
||||
# 综合测评记录管理 - 权限配置执行指南
|
||||
|
||||
**创建时间**: 2025-01-28
|
||||
**更新时间**: 2025-01-28
|
||||
**执行人员**: 系统管理员
|
||||
**风险等级**: 🟡 中等风险(涉及数据库权限配置)
|
||||
|
||||
---
|
||||
|
||||
## 📋 执行前准备
|
||||
|
||||
### ✅ 1. 环境确认
|
||||
- **数据库环境**: MySQL 5.7+ 或 8.0+
|
||||
- **数据库名称**: `hzdyjs_xg`
|
||||
- **执行权限**: 需要具有 `INSERT`、`DELETE`、`SELECT` 权限的数据库账号
|
||||
- **备份状态**: 建议在执行前备份 `sys_menu` 和 `sys_role_menu` 表
|
||||
|
||||
### ✅ 2. 前置条件检查
|
||||
执行以下SQL确认前置条件:
|
||||
|
||||
```sql
|
||||
-- 检查学生考核管理主菜单是否存在
|
||||
SELECT menu_id, menu_name, status FROM sys_menu WHERE menu_id = 9000;
|
||||
-- 预期结果:应该返回一行记录,menu_name='学生考核管理',status='0'
|
||||
|
||||
-- 检查ID范围是否冲突
|
||||
SELECT menu_id, menu_name FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
-- 预期结果:应该返回空结果集,表示没有ID冲突
|
||||
```
|
||||
|
||||
### ✅ 3. 角色ID确认
|
||||
确认系统中的角色ID分配:
|
||||
|
||||
```sql
|
||||
-- 查看系统角色配置
|
||||
SELECT role_id, role_name, role_key, status FROM sys_role ORDER BY role_id;
|
||||
```
|
||||
|
||||
**注意**: 脚本中假设的角色ID可能需要调整:
|
||||
- 超级管理员: 1
|
||||
- 学生处管理员: 2
|
||||
- 二级学院管理员: 3
|
||||
- 辅导员: 4
|
||||
- 学生: 5
|
||||
|
||||
---
|
||||
|
||||
## 🚀 执行步骤
|
||||
|
||||
### 第一步:备份数据(强烈推荐)
|
||||
|
||||
```sql
|
||||
-- 备份sys_menu表(9720-9739范围)
|
||||
CREATE TABLE sys_menu_backup_20250128 AS
|
||||
SELECT * FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- 备份sys_role_menu表(9720-9739范围)
|
||||
CREATE TABLE sys_role_menu_backup_20250128 AS
|
||||
SELECT * FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
```
|
||||
|
||||
### 第二步:执行权限配置脚本
|
||||
|
||||
**方式一:通过数据库管理工具执行**
|
||||
1. 打开Navicat、DBeaver或其他数据库管理工具
|
||||
2. 连接到`hzdyjs_xg`数据库
|
||||
3. 复制`综合测评记录管理菜单权限配置-完整版.sql`脚本内容
|
||||
4. 执行脚本
|
||||
|
||||
**方式二:通过命令行执行**
|
||||
```bash
|
||||
# 进入项目目录
|
||||
cd /Users/weizzzz/Documents/Cursor/0805cursor/all-project
|
||||
|
||||
# 执行SQL脚本
|
||||
mysql -h47.99.164.66 -u用户名 -p密码 -P3306 hzdyjs_xg < "docs/设计文档/database/学生考核管理/综合测评记录管理菜单权限配置-完整版.sql"
|
||||
```
|
||||
|
||||
### 第三步:验证执行结果
|
||||
|
||||
执行脚本后,检查以下验证查询的结果:
|
||||
|
||||
```sql
|
||||
-- 1. 验证菜单创建情况
|
||||
SELECT COUNT(*) as '菜单数量' FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9737;
|
||||
-- 预期结果:18
|
||||
|
||||
-- 2. 验证权限分配情况
|
||||
SELECT role_id, COUNT(*) as '权限数量'
|
||||
FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9737
|
||||
GROUP BY role_id ORDER BY role_id;
|
||||
-- 预期结果:不同角色分配了不同数量的权限
|
||||
|
||||
-- 3. 查看菜单层次结构
|
||||
SELECT
|
||||
CASE
|
||||
WHEN parent_id = 9000 THEN CONCAT('📊 ', menu_name, ' (主菜单)')
|
||||
WHEN parent_id = 9720 THEN CONCAT(' ├── ', menu_name, ' (功能权限)')
|
||||
ELSE CONCAT(' └── ', menu_name, ' (其他)')
|
||||
END AS '菜单结构',
|
||||
menu_id AS 'ID',
|
||||
perms AS '权限标识'
|
||||
FROM sys_menu
|
||||
WHERE menu_id = 9720 OR parent_id = 9720
|
||||
ORDER BY parent_id, order_num;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 角色权限调整(可选)
|
||||
|
||||
如果系统中的角色ID与脚本假设不同,需要手动调整:
|
||||
|
||||
### 查看当前角色配置
|
||||
```sql
|
||||
SELECT role_id, role_name, role_key FROM sys_role WHERE status = '0';
|
||||
```
|
||||
|
||||
### 手动分配权限(示例)
|
||||
```sql
|
||||
-- 为特定角色分配所有权限
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 你的角色ID, menu_id FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9737;
|
||||
|
||||
-- 为特定角色分配部分权限
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 你的角色ID, menu_id FROM sys_menu WHERE menu_id IN (9720, 9721, 9725, 9727);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ 故障排除
|
||||
|
||||
### 常见问题及解决方案
|
||||
|
||||
#### 1. 父菜单不存在错误
|
||||
**错误信息**: `Cannot add or update a child row: a foreign key constraint fails`
|
||||
**解决方案**:
|
||||
```sql
|
||||
-- 先创建学生考核管理主菜单
|
||||
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, menu_type, visible, status, icon, create_by, create_time)
|
||||
VALUES (9000, '学生考核管理', 0, 8, 'assessment', 'M', '0', '0', 'assessment', 1, NOW());
|
||||
```
|
||||
|
||||
#### 2. ID冲突错误
|
||||
**错误信息**: `Duplicate entry '9720' for key 'PRIMARY'`
|
||||
**解决方案**:
|
||||
```sql
|
||||
-- 删除冲突的菜单项
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
-- 然后重新执行脚本
|
||||
```
|
||||
|
||||
#### 3. 角色ID不存在错误
|
||||
**错误信息**: `Cannot add or update a child row: a foreign key constraint fails`
|
||||
**解决方案**: 修改脚本中的角色ID为系统中实际存在的角色ID
|
||||
|
||||
---
|
||||
|
||||
## 🔄 回滚操作
|
||||
|
||||
如果需要撤销权限配置:
|
||||
|
||||
```sql
|
||||
-- 完整回滚(删除所有相关配置)
|
||||
START TRANSACTION;
|
||||
|
||||
-- 删除角色权限关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- 删除菜单项
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- 确认删除结果
|
||||
SELECT COUNT(*) as '剩余菜单数量' FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
-- 预期结果:0
|
||||
|
||||
COMMIT;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 执行结果验证清单
|
||||
|
||||
执行完成后,请确认以下项目:
|
||||
|
||||
- [ ] **菜单创建**: 18个菜单项全部创建成功
|
||||
- [ ] **权限分配**: 各角色权限分配符合预期
|
||||
- [ ] **菜单显示**: 在系统菜单管理中可以看到"综合测评记录"菜单
|
||||
- [ ] **权限验证**: 不同角色登录后可以看到对应的功能按钮
|
||||
- [ ] **功能测试**: 点击菜单可以正常访问页面(需要前端页面已部署)
|
||||
|
||||
---
|
||||
|
||||
## 📞 技术支持
|
||||
|
||||
如果执行过程中遇到问题:
|
||||
|
||||
1. **检查日志**: 查看数据库错误日志
|
||||
2. **验证环境**: 确认数据库版本和权限
|
||||
3. **回滚操作**: 如有问题立即执行回滚
|
||||
4. **记录问题**: 详细记录错误信息和执行环境
|
||||
|
||||
---
|
||||
|
||||
## 📝 执行记录
|
||||
|
||||
**执行时间**: _______________
|
||||
**执行人员**: _______________
|
||||
**执行结果**: [ ] 成功 [ ] 失败
|
||||
**备注**: _______________
|
||||
|
||||
---
|
||||
|
||||
**⚠️ 重要提醒**:
|
||||
- 本操作涉及系统权限配置,请在测试环境先验证
|
||||
- 执行前务必备份相关数据表
|
||||
- 如有疑问,请联系系统管理员或技术支持
|
||||
@@ -0,0 +1,73 @@
|
||||
-- ==========================================
|
||||
-- 测评指标体系管理字典数据配置
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:遵循项目码表管理规范,使用系统字典表
|
||||
-- ID范围:dict_id 6010-6020, dict_code 7300-7500 (避免冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 字典类型配置
|
||||
-- ===========================================
|
||||
|
||||
-- 测评指标类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6010, '000000', '测评指标类型', 'xskh_indicator_type', '0', '综合测评指标类型分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 评分类型字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6011, '000000', '评分类型', 'xskh_score_type', '0', '指标评分类型', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 评分方式字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6012, '000000', '评分方式', 'xskh_scoring_method', '0', '指标评分方式', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6013, '000000', '审核状态', 'xskh_review_status', '0', '指标审核状态', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标层级字典
|
||||
INSERT INTO `sys_dict_type` (`dict_id`, `tenant_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(6014, '000000', '指标层级', 'xskh_indicator_level', '0', '指标层级分类', 1, NOW(), 1, NOW());
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 字典数据配置
|
||||
-- ===========================================
|
||||
|
||||
-- 测评指标类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7301, '000000', 1, '德育', 'moral', 'xskh_indicator_type', '', 'success', 'N', '0', '思想品德、政治觉悟、道德修养', 1, NOW(), 1, NOW()),
|
||||
(7302, '000000', 2, '智育', 'intellectual', 'xskh_indicator_type', '', 'primary', 'N', '0', '学业成绩、学科竞赛、科研能力', 1, NOW(), 1, NOW()),
|
||||
(7303, '000000', 3, '体育', 'physical', 'xskh_indicator_type', '', 'warning', 'N', '0', '体能测试、体育竞赛、日常锻炼', 1, NOW(), 1, NOW()),
|
||||
(7304, '000000', 4, '美育', 'aesthetic', 'xskh_indicator_type', '', 'info', 'N', '0', '艺术活动、作品创作、审美能力', 1, NOW(), 1, NOW()),
|
||||
(7305, '000000', 5, '劳育', 'labor', 'xskh_indicator_type', '', 'success', 'N', '0', '劳动实践、勤工俭学、劳动技能', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 评分类型数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7311, '000000', 1, '固定分值', 'fixed', 'xskh_score_type', '', 'primary', 'Y', '0', '固定的分值标准', 1, NOW(), 1, NOW()),
|
||||
(7312, '000000', 2, '区间分值', 'range', 'xskh_score_type', '', 'info', 'N', '0', '在一定区间内的分值', 1, NOW(), 1, NOW()),
|
||||
(7313, '000000', 3, '公式计算', 'formula', 'xskh_score_type', '', 'warning', 'N', '0', '通过公式计算得出分值', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 评分方式数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7321, '000000', 1, '手工评分', 'manual', 'xskh_scoring_method', '', 'primary', 'Y', '0', '人工手动评分', 1, NOW(), 1, NOW()),
|
||||
(7322, '000000', 2, '自动计算', 'auto', 'xskh_scoring_method', '', 'success', 'N', '0', '系统自动计算分数', 1, NOW(), 1, NOW()),
|
||||
(7323, '000000', 3, '混合模式', 'mixed', 'xskh_scoring_method', '', 'warning', 'N', '0', '手工评分与自动计算结合', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 审核状态数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7331, '000000', 1, '草稿', 'draft', 'xskh_review_status', '', 'info', 'Y', '0', '初始草稿状态', 1, NOW(), 1, NOW()),
|
||||
(7332, '000000', 2, '审核中', 'reviewing', 'xskh_review_status', '', 'warning', 'N', '0', '正在审核中', 1, NOW(), 1, NOW()),
|
||||
(7333, '000000', 3, '已通过', 'approved', 'xskh_review_status', '', 'success', 'N', '0', '审核通过', 1, NOW(), 1, NOW()),
|
||||
(7334, '000000', 4, '已驳回', 'rejected', 'xskh_review_status', '', 'danger', 'N', '0', '审核驳回', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 指标层级数据
|
||||
INSERT INTO `sys_dict_data` (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
|
||||
(7341, '000000', 1, '一级指标', '1', 'xskh_indicator_level', '', 'primary', 'Y', '0', '顶级指标分类', 1, NOW(), 1, NOW()),
|
||||
(7342, '000000', 2, '二级指标', '2', 'xskh_indicator_level', '', 'info', 'N', '0', '二级指标细分', 1, NOW(), 1, NOW()),
|
||||
(7343, '000000', 3, '三级指标', '3', 'xskh_indicator_level', '', 'warning', 'N', '0', '三级指标明细', 1, NOW(), 1, NOW());
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,145 @@
|
||||
-- ==========================================
|
||||
-- 测评指标体系管理数据库表结构
|
||||
-- 版本:V1.0.0
|
||||
-- 创建时间:2025-01-27
|
||||
-- 说明:遵循项目数据库建设规范
|
||||
-- 特性:雪花ID、逻辑删除、多租户、码表管理、Excel支持
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 测评指标体系管理表
|
||||
-- ===========================================
|
||||
DROP TABLE IF EXISTS `xskh_assessment_indicator`;
|
||||
CREATE TABLE `xskh_assessment_indicator` (
|
||||
-- 🔧 标准基础字段(必须)
|
||||
`id` bigint(20) NOT NULL COMMENT '主键ID(雪花ID)',
|
||||
`tenant_id` varchar(20) NOT NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)',
|
||||
|
||||
-- 📋 基础信息字段
|
||||
`indicator_code` varchar(32) NOT NULL COMMENT '指标编码(唯一标识)',
|
||||
`indicator_name` varchar(100) NOT NULL COMMENT '指标名称',
|
||||
`indicator_desc` text COMMENT '指标描述说明',
|
||||
`indicator_type` varchar(20) NOT NULL COMMENT '指标类型:moral-德育,intellectual-智育,physical-体育,aesthetic-美育,labor-劳育',
|
||||
|
||||
-- 🏗️ 层级结构字段
|
||||
`parent_id` bigint(20) DEFAULT 0 COMMENT '父级指标ID(支持分类层级)',
|
||||
`level` tinyint(1) DEFAULT 1 COMMENT '层级:1-一级,2-二级,3-三级',
|
||||
`sort_order` int(11) DEFAULT 0 COMMENT '排序号',
|
||||
|
||||
-- 🎯 评分配置字段
|
||||
`score_type` varchar(20) DEFAULT 'fixed' COMMENT '评分类型:fixed-固定分值,range-区间分值,formula-公式计算',
|
||||
`max_score` decimal(5,2) DEFAULT 100.00 COMMENT '最高分值',
|
||||
`min_score` decimal(5,2) DEFAULT 0.00 COMMENT '最低分值',
|
||||
`default_score` decimal(5,2) DEFAULT 0.00 COMMENT '默认分值',
|
||||
`score_unit` varchar(20) DEFAULT '分' COMMENT '分值单位',
|
||||
|
||||
-- 📊 权重配置字段
|
||||
`weight` decimal(5,4) DEFAULT 1.0000 COMMENT '权重系数(0.0001-1.0000)',
|
||||
`weight_desc` varchar(200) COMMENT '权重说明',
|
||||
|
||||
-- 📋 评分标准字段
|
||||
`scoring_criteria` text COMMENT '评分标准(JSON格式)',
|
||||
`scoring_method` varchar(20) DEFAULT 'manual' COMMENT '评分方式:manual-手工评分,auto-自动计算,mixed-混合模式',
|
||||
`calculation_formula` text COMMENT '计算公式(当评分方式为auto或mixed时使用)',
|
||||
|
||||
-- 🔗 关联配置字段
|
||||
`data_source` varchar(50) COMMENT '数据来源(系统模块或外部接口)',
|
||||
`reference_table` varchar(100) COMMENT '关联数据表',
|
||||
`reference_field` varchar(100) COMMENT '关联数据字段',
|
||||
|
||||
-- 📅 适用范围字段
|
||||
`applicable_grades` json COMMENT '适用年级(JSON数组)',
|
||||
`applicable_majors` json COMMENT '适用专业(JSON数组)',
|
||||
`applicable_colleges` json COMMENT '适用学院(JSON数组)',
|
||||
|
||||
-- ⚙️ 状态控制字段
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
|
||||
`is_published` char(1) DEFAULT '0' COMMENT '是否发布:0-未发布,1-已发布',
|
||||
`is_required` char(1) DEFAULT '1' COMMENT '是否必填:0-非必填,1-必填',
|
||||
`is_visible` char(1) DEFAULT '1' COMMENT '是否可见:0-隐藏,1-显示',
|
||||
|
||||
-- 📝 审核字段
|
||||
`review_status` varchar(20) DEFAULT 'draft' COMMENT '审核状态:draft-草稿,reviewing-审核中,approved-已通过,rejected-已驳回',
|
||||
`reviewer_id` bigint(20) COMMENT '审核人ID',
|
||||
`reviewer_name` varchar(50) COMMENT '审核人姓名',
|
||||
`review_time` datetime COMMENT '审核时间',
|
||||
`review_remark` varchar(500) COMMENT '审核备注',
|
||||
|
||||
-- 📊 统计字段
|
||||
`usage_count` int(11) DEFAULT 0 COMMENT '使用次数统计',
|
||||
`last_used_time` datetime COMMENT '最后使用时间',
|
||||
|
||||
-- 🔧 系统字段
|
||||
`version` int(11) DEFAULT 1 COMMENT '版本号',
|
||||
`remark` varchar(500) COMMENT '备注信息',
|
||||
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_indicator_code` (`indicator_code`, `tenant_id`),
|
||||
KEY `idx_indicator_type` (`indicator_type`),
|
||||
KEY `idx_parent_id` (`parent_id`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_is_published` (`is_published`),
|
||||
KEY `idx_create_time` (`create_time`),
|
||||
KEY `idx_tenant_deleted` (`tenant_id`, `deleted`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='测评指标体系管理表';
|
||||
|
||||
-- ===========================================
|
||||
-- 初始化示例数据
|
||||
-- ===========================================
|
||||
|
||||
-- 德育指标示例
|
||||
INSERT INTO `xskh_assessment_indicator`
|
||||
(`id`, `tenant_id`, `indicator_code`, `indicator_name`, `indicator_desc`, `indicator_type`, `parent_id`, `level`, `sort_order`, `max_score`, `min_score`, `default_score`, `weight`, `scoring_criteria`, `status`, `is_published`, `is_required`, `create_by`, `create_time`, `update_by`, `update_time`)
|
||||
VALUES
|
||||
(1750000000000000001, '000000', 'MORAL_001', '思想品德表现', '学生思想品德、政治觉悟、道德修养等方面的综合表现', 'moral', 0, 1, 1, 20.00, 0.00, 15.00, 0.2000, '{"excellent": {"score": 18-20, "desc": "表现优秀"}, "good": {"score": 15-17, "desc": "表现良好"}, "average": {"score": 10-14, "desc": "表现一般"}, "poor": {"score": 0-9, "desc": "表现较差"}}', '1', '1', '1', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000002, '000000', 'MORAL_002', '社会实践参与', '参与社会实践活动的积极性和表现情况', 'moral', 0, 1, 2, 15.00, 0.00, 10.00, 0.1500, '{"excellent": {"score": 13-15, "desc": "积极参与,表现突出"}, "good": {"score": 10-12, "desc": "参与良好"}, "average": {"score": 6-9, "desc": "参与一般"}, "poor": {"score": 0-5, "desc": "参与较少"}}', '1', '1', '1', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000003, '000000', 'MORAL_003', '志愿服务时长', '参与志愿服务活动的时长统计', 'moral', 0, 1, 3, 10.00, 0.00, 5.00, 0.1000, '{"calculation": "服务时长/10小时 * 满分", "maxHours": 100, "scorePerHour": 0.1}', '1', '1', '0', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 智育指标示例
|
||||
INSERT INTO `xskh_assessment_indicator`
|
||||
(`id`, `tenant_id`, `indicator_code`, `indicator_name`, `indicator_desc`, `indicator_type`, `parent_id`, `level`, `sort_order`, `max_score`, `min_score`, `default_score`, `weight`, `scoring_criteria`, `scoring_method`, `status`, `is_published`, `is_required`, `create_by`, `create_time`, `update_by`, `update_time`)
|
||||
VALUES
|
||||
(1750000000000000004, '000000', 'INTEL_001', '学业成绩表现', '学生各科目成绩的综合表现', 'intellectual', 0, 1, 1, 40.00, 0.00, 30.00, 0.4000, '{"calculation": "GPA * 10", "maxGPA": 4.0, "minGPA": 0.0}', 'auto', '1', '1', '1', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000005, '000000', 'INTEL_002', '学科竞赛获奖', '参与学科竞赛并获奖的情况', 'intellectual', 0, 1, 2, 20.00, 0.00, 0.00, 0.2000, '{"national": {"first": 20, "second": 18, "third": 15}, "provincial": {"first": 15, "second": 12, "third": 10}, "school": {"first": 8, "second": 6, "third": 4}}', 'manual', '1', '1', '0', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000006, '000000', 'INTEL_003', '科研项目参与', '参与科研项目的情况和贡献', 'intellectual', 0, 1, 3, 15.00, 0.00, 0.00, 0.1500, '{"leader": 15, "member": 10, "assistant": 5}', 'manual', '1', '1', '0', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 体育指标示例
|
||||
INSERT INTO `xskh_assessment_indicator`
|
||||
(`id`, `tenant_id`, `indicator_code`, `indicator_name`, `indicator_desc`, `indicator_type`, `parent_id`, `level`, `sort_order`, `max_score`, `min_score`, `default_score`, `weight`, `scoring_criteria`, `status`, `is_published`, `is_required`, `create_by`, `create_time`, `update_by`, `update_time`)
|
||||
VALUES
|
||||
(1750000000000000007, '000000', 'PHYS_001', '体能测试成绩', '国家体能测试标准成绩', 'physical', 0, 1, 1, 15.00, 0.00, 10.00, 0.1500, '{"excellent": 15, "good": 12, "average": 10, "poor": 5}', '1', '1', '1', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000008, '000000', 'PHYS_002', '体育竞赛参与', '参与体育竞赛和运动会的情况', 'physical', 0, 1, 2, 10.00, 0.00, 0.00, 0.1000, '{"champion": 10, "runner_up": 8, "third": 6, "participation": 3}', '1', '1', '0', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000009, '000000', 'PHYS_003', '日常锻炼记录', '日常体育锻炼的频率和质量', 'physical', 0, 1, 3, 5.00, 0.00, 3.00, 0.0500, '{"daily": 5, "frequent": 4, "occasional": 2, "rare": 1}', '1', '1', '0', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 美育指标示例
|
||||
INSERT INTO `xskh_assessment_indicator`
|
||||
(`id`, `tenant_id`, `indicator_code`, `indicator_name`, `indicator_desc`, `indicator_type`, `parent_id`, `level`, `sort_order`, `max_score`, `min_score`, `default_score`, `weight`, `scoring_criteria`, `status`, `is_published`, `is_required`, `create_by`, `create_time`, `update_by`, `update_time`)
|
||||
VALUES
|
||||
(1750000000000000010, '000000', 'AEST_001', '艺术活动参与', '参与各类艺术活动和文艺演出', 'aesthetic', 0, 1, 1, 8.00, 0.00, 4.00, 0.0800, '{"leading_role": 8, "main_role": 6, "supporting_role": 4, "participation": 2}', '1', '1', '0', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000011, '000000', 'AEST_002', '艺术作品创作', '创作文学、绘画、音乐等艺术作品', 'aesthetic', 0, 1, 2, 7.00, 0.00, 0.00, 0.0700, '{"published": 7, "awarded": 5, "exhibited": 3, "created": 1}', '1', '1', '0', 1, NOW(), 1, NOW());
|
||||
|
||||
-- 劳育指标示例
|
||||
INSERT INTO `xskh_assessment_indicator`
|
||||
(`id`, `tenant_id`, `indicator_code`, `indicator_name`, `indicator_desc`, `indicator_type`, `parent_id`, `level`, `sort_order`, `max_score`, `min_score`, `default_score`, `weight`, `scoring_criteria`, `status`, `is_published`, `is_required`, `create_by`, `create_time`, `update_by`, `update_time`)
|
||||
VALUES
|
||||
(1750000000000000012, '000000', 'LABOR_001', '劳动实践参与', '参与校内外劳动实践活动', 'labor', 0, 1, 1, 10.00, 0.00, 6.00, 0.1000, '{"excellent": 10, "good": 8, "average": 6, "poor": 3}', '1', '1', '1', 1, NOW(), 1, NOW()),
|
||||
|
||||
(1750000000000000013, '000000', 'LABOR_002', '勤工俭学表现', '参与勤工俭学工作的表现', 'labor', 0, 1, 2, 5.00, 0.00, 0.00, 0.0500, '{"outstanding": 5, "good": 4, "average": 3, "basic": 2}', '1', '1', '0', 1, NOW(), 1, NOW());
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -0,0 +1,150 @@
|
||||
-- 学生考核管理模块重复菜单清理脚本
|
||||
-- 执行时间: 2025-01-28
|
||||
-- 说明: 保留违纪处分申请(9100)和处分记录审批(9120),清理其他重复菜单
|
||||
|
||||
-- ============================================
|
||||
-- 第一步: 查看当前重复菜单情况
|
||||
-- ============================================
|
||||
|
||||
SELECT '=== 清理前菜单统计 ===' as info;
|
||||
SELECT
|
||||
COUNT(*) as total_menus,
|
||||
'学生考核管理子菜单总数' as description
|
||||
FROM sys_menu
|
||||
WHERE parent_id = 9000;
|
||||
|
||||
SELECT '=== 重复菜单分析 ===' as info;
|
||||
SELECT
|
||||
path,
|
||||
COUNT(*) as duplicate_count,
|
||||
GROUP_CONCAT(menu_id ORDER BY menu_id) as menu_ids
|
||||
FROM sys_menu
|
||||
WHERE parent_id = 9000
|
||||
GROUP BY path
|
||||
HAVING COUNT(*) > 1
|
||||
ORDER BY path;
|
||||
|
||||
-- ============================================
|
||||
-- 第二步: 删除重复菜单及其子菜单
|
||||
-- ============================================
|
||||
|
||||
-- 1. 删除重复的考核计划管理菜单 (保留9800,删除9200及其子菜单)
|
||||
SELECT '删除重复的考核计划管理菜单 (menu_id=9200及其子菜单)' as info;
|
||||
|
||||
-- 删除角色菜单关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9200 AND 9219;
|
||||
|
||||
-- 删除子菜单
|
||||
DELETE FROM sys_menu WHERE parent_id = 9200;
|
||||
|
||||
-- 删除主菜单
|
||||
DELETE FROM sys_menu WHERE menu_id = 9200;
|
||||
|
||||
-- 2. 删除重复的测评明细管理菜单 (保留9860,删除9210及其子菜单)
|
||||
SELECT '删除重复的测评明细管理菜单 (menu_id=9210及其子菜单)' as info;
|
||||
|
||||
-- 删除角色菜单关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9210 AND 9219;
|
||||
|
||||
-- 删除子菜单
|
||||
DELETE FROM sys_menu WHERE parent_id = 9210;
|
||||
|
||||
-- 删除主菜单
|
||||
DELETE FROM sys_menu WHERE menu_id = 9210;
|
||||
|
||||
-- 3. 删除重复的附加分申请菜单 (保留9880,删除9220及其子菜单)
|
||||
SELECT '删除重复的附加分申请菜单 (menu_id=9220及其子菜单)' as info;
|
||||
|
||||
-- 删除角色菜单关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9220 AND 9229;
|
||||
|
||||
-- 删除子菜单
|
||||
DELETE FROM sys_menu WHERE parent_id = 9220;
|
||||
|
||||
-- 删除主菜单
|
||||
DELETE FROM sys_menu WHERE menu_id = 9220;
|
||||
|
||||
-- 4. 删除重复的方案指标关联菜单 (保留9940,删除9230及其子菜单)
|
||||
SELECT '删除重复的方案指标关联菜单 (menu_id=9230及其子菜单)' as info;
|
||||
|
||||
-- 删除角色菜单关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9230 AND 9239;
|
||||
|
||||
-- 删除子菜单
|
||||
DELETE FROM sys_menu WHERE parent_id = 9230;
|
||||
|
||||
-- 删除主菜单
|
||||
DELETE FROM sys_menu WHERE menu_id = 9230;
|
||||
|
||||
-- ============================================
|
||||
-- 第三步: 更新菜单排序
|
||||
-- ============================================
|
||||
|
||||
SELECT '更新菜单排序' as info;
|
||||
|
||||
-- 更新保留菜单的排序
|
||||
UPDATE sys_menu SET order_num = 1 WHERE menu_id = 9100; -- 违纪处分申请
|
||||
UPDATE sys_menu SET order_num = 2 WHERE menu_id = 9120; -- 处分记录审批
|
||||
UPDATE sys_menu SET order_num = 3 WHERE menu_id = 9800; -- 考核计划管理
|
||||
UPDATE sys_menu SET order_num = 4 WHERE menu_id = 9820; -- 考核方案管理
|
||||
UPDATE sys_menu SET order_num = 5 WHERE menu_id = 9840; -- 指标体系管理
|
||||
UPDATE sys_menu SET order_num = 6 WHERE menu_id = 9860; -- 测评明细管理
|
||||
UPDATE sys_menu SET order_num = 7 WHERE menu_id = 9880; -- 附加分申请
|
||||
UPDATE sys_menu SET order_num = 8 WHERE menu_id = 9900; -- 违纪类型管理
|
||||
UPDATE sys_menu SET order_num = 9 WHERE menu_id = 9920; -- 处分类型管理
|
||||
UPDATE sys_menu SET order_num = 10 WHERE menu_id = 9940; -- 方案指标关联
|
||||
|
||||
-- ============================================
|
||||
-- 第四步: 验证清理结果
|
||||
-- ============================================
|
||||
|
||||
SELECT '=== 清理后菜单统计 ===' as info;
|
||||
SELECT
|
||||
COUNT(*) as total_menus,
|
||||
'学生考核管理子菜单总数' as description
|
||||
FROM sys_menu
|
||||
WHERE parent_id = 9000;
|
||||
|
||||
SELECT '=== 最终保留的菜单列表 ===' as info;
|
||||
SELECT
|
||||
menu_id,
|
||||
menu_name,
|
||||
path,
|
||||
perms,
|
||||
order_num,
|
||||
CASE
|
||||
WHEN menu_id = 9100 THEN '违纪处分申请'
|
||||
WHEN menu_id = 9120 THEN '处分记录审批'
|
||||
WHEN menu_id = 9800 THEN '考核计划管理'
|
||||
WHEN menu_id = 9820 THEN '考核方案管理'
|
||||
WHEN menu_id = 9840 THEN '指标体系管理'
|
||||
WHEN menu_id = 9860 THEN '测评明细管理'
|
||||
WHEN menu_id = 9880 THEN '附加分申请'
|
||||
WHEN menu_id = 9900 THEN '违纪类型管理'
|
||||
WHEN menu_id = 9920 THEN '处分类型管理'
|
||||
WHEN menu_id = 9940 THEN '方案指标关联'
|
||||
ELSE '其他'
|
||||
END as menu_description
|
||||
FROM sys_menu
|
||||
WHERE parent_id = 9000
|
||||
ORDER BY order_num;
|
||||
|
||||
SELECT '=== 验证无重复路径 ===' as info;
|
||||
SELECT
|
||||
path,
|
||||
COUNT(*) as count,
|
||||
GROUP_CONCAT(menu_id) as menu_ids
|
||||
FROM sys_menu
|
||||
WHERE parent_id = 9000
|
||||
GROUP BY path
|
||||
ORDER BY path;
|
||||
|
||||
-- ============================================
|
||||
-- 清理完成总结
|
||||
-- ============================================
|
||||
|
||||
SELECT '=== 清理完成总结 ===' as info;
|
||||
SELECT
|
||||
'删除了4个重复菜单及其子菜单' as action,
|
||||
'保留了10个唯一菜单' as result,
|
||||
'包括违纪处分申请和处分记录审批' as note;
|
||||
@@ -0,0 +1,183 @@
|
||||
-- =====================================================
|
||||
-- 综合测评记录管理菜单权限配置 - 完整版
|
||||
-- 创建时间: 2025-01-28
|
||||
-- ID范围: 9720-9739 (严格按照ID分配规范,已确认无冲突)
|
||||
-- 模块: 学生考核管理系统 - 综合测评记录管理
|
||||
-- 防冲突措施: 包含完整的ID冲突检查和回滚机制
|
||||
-- =====================================================
|
||||
|
||||
-- =====================================================
|
||||
-- 安全检查:确保学生考核管理主菜单存在
|
||||
-- =====================================================
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) > 0 THEN '✅ 学生考核管理主菜单(9000)已存在,可以继续执行'
|
||||
ELSE '❌ 学生考核管理主菜单(9000)不存在,请先执行学生考核管理系统主菜单配置脚本'
|
||||
END AS '前置检查结果'
|
||||
FROM sys_menu WHERE menu_id = 9000;
|
||||
|
||||
-- =====================================================
|
||||
-- 冲突检查:确保ID范围9720-9739没有被占用
|
||||
-- =====================================================
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN '✅ ID范围9720-9739安全,没有冲突'
|
||||
ELSE CONCAT('❌ 发现冲突!已存在菜单ID:', GROUP_CONCAT(menu_id), ',请检查ID分配')
|
||||
END AS 'ID冲突检查结果',
|
||||
COUNT(*) AS '冲突数量'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- =====================================================
|
||||
-- 开始事务,确保数据一致性
|
||||
-- =====================================================
|
||||
START TRANSACTION;
|
||||
|
||||
-- =====================================================
|
||||
-- 清理可能存在的旧数据(防止重复执行脚本时冲突)
|
||||
-- =====================================================
|
||||
-- 删除角色菜单关联
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
-- 删除菜单
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- =====================================================
|
||||
-- 1. 综合测评记录管理主菜单
|
||||
-- =====================================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9720, '综合测评记录', 9000, 6, 'assessmentRecord', 'xskh/assessmentRecord/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentRecord:list', 'record', 103, 1, NOW(), 1, NOW(), '综合测评记录管理');
|
||||
|
||||
-- =====================================================
|
||||
-- 2. 综合测评记录管理基础功能按钮权限
|
||||
-- =====================================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9721, '综合测评记录查询', 9720, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:query', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9722, '综合测评记录新增', 9720, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:add', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9723, '综合测评记录修改', 9720, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:edit', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9724, '综合测评记录删除', 9720, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:remove', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9725, '综合测评记录导出', 9720, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:export', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9726, '综合测评记录导入', 9720, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:import', '#', 103, 1, NOW(), 1, NOW(), '');
|
||||
|
||||
-- =====================================================
|
||||
-- 3. 综合测评记录管理业务功能按钮权限
|
||||
-- =====================================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9727, '我的测评记录', 9720, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:myRecords', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9728, '待审核记录', 9720, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:pending', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9729, '提交测评记录', 9720, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:submit', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9730, '审核测评记录', 9720, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:approve', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9731, '撤销测评记录', 9720, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:revoke', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9732, '锁定测评记录', 9720, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:lock', '#', 103, 1, NOW(), 1, NOW(), '');
|
||||
|
||||
-- =====================================================
|
||||
-- 4. 综合测评记录管理高级功能按钮权限
|
||||
-- =====================================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9733, '计算测评排名', 9720, 13, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:calculateRanking', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9734, '批量生成记录', 9720, 14, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:batchGenerate', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9735, '测评统计信息', 9720, 15, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:statistics', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9736, '强制删除记录', 9720, 16, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:forceRemove', '#', 103, 1, NOW(), 1, NOW(), ''),
|
||||
(9737, '批量更新状态', 9720, 17, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:batchUpdateStatus', '#', 103, 1, NOW(), 1, NOW(), '');
|
||||
|
||||
-- =====================================================
|
||||
-- 5. 角色权限配置
|
||||
-- =====================================================
|
||||
|
||||
-- 5.1 为超级管理员角色(1)分配所有权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 1, menu_id FROM `sys_menu` WHERE menu_id BETWEEN 9720 AND 9737
|
||||
ON DUPLICATE KEY UPDATE role_id = VALUES(role_id);
|
||||
|
||||
-- 5.2 为学生处管理员角色(假设为2)分配所有权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 2, menu_id FROM `sys_menu` WHERE menu_id BETWEEN 9720 AND 9737
|
||||
ON DUPLICATE KEY UPDATE role_id = VALUES(role_id);
|
||||
|
||||
-- 5.3 为二级学院管理员角色(假设为3)分配部分权限(排除强制删除、批量生成等敏感操作)
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 3, menu_id FROM `sys_menu` WHERE menu_id BETWEEN 9720 AND 9737
|
||||
AND menu_id NOT IN (9734, 9736) -- 排除批量生成、强制删除
|
||||
ON DUPLICATE KEY UPDATE role_id = VALUES(role_id);
|
||||
|
||||
-- 5.4 为辅导员角色(假设为4)分配基础权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 4, menu_id FROM `sys_menu` WHERE menu_id IN (
|
||||
9720, -- 主菜单
|
||||
9721, -- 查询
|
||||
9725, -- 导出
|
||||
9727, -- 我的记录
|
||||
9728, -- 待审核
|
||||
9729, -- 提交
|
||||
9730 -- 审核
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE role_id = VALUES(role_id);
|
||||
|
||||
-- 5.5 为学生角色(假设为5)分配学生相关权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 5, menu_id FROM `sys_menu` WHERE menu_id IN (
|
||||
9720, -- 主菜单
|
||||
9721, -- 查询
|
||||
9727, -- 我的记录
|
||||
9729 -- 提交
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE role_id = VALUES(role_id);
|
||||
|
||||
-- =====================================================
|
||||
-- 6. 验证配置结果
|
||||
-- =====================================================
|
||||
|
||||
-- 验证菜单创建情况
|
||||
SELECT
|
||||
'✅ 菜单配置验证' AS '验证项目',
|
||||
COUNT(*) AS '新增菜单数量',
|
||||
CASE
|
||||
WHEN COUNT(*) = 18 THEN '✅ 正确'
|
||||
ELSE '❌ 数量不正确,应该是18个'
|
||||
END AS '验证结果'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9737;
|
||||
|
||||
-- 验证角色权限分配情况
|
||||
SELECT
|
||||
'✅ 角色权限验证' AS '验证项目',
|
||||
COUNT(DISTINCT role_id) AS '分配角色数量',
|
||||
COUNT(*) AS '权限分配总数'
|
||||
FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9737;
|
||||
|
||||
-- 显示菜单层次结构
|
||||
SELECT
|
||||
CASE
|
||||
WHEN parent_id = 9000 THEN CONCAT('📊 ', menu_name, ' (主菜单)')
|
||||
WHEN parent_id = 9720 THEN CONCAT(' ├── ', menu_name, ' (功能权限)')
|
||||
ELSE CONCAT(' └── ', menu_name, ' (其他)')
|
||||
END AS '菜单结构',
|
||||
menu_id AS 'ID',
|
||||
perms AS '权限标识',
|
||||
CASE
|
||||
WHEN menu_type = 'M' THEN '目录'
|
||||
WHEN menu_type = 'C' THEN '菜单'
|
||||
WHEN menu_type = 'F' THEN '按钮'
|
||||
ELSE '未知'
|
||||
END AS '类型'
|
||||
FROM sys_menu
|
||||
WHERE menu_id = 9720 OR parent_id = 9720
|
||||
ORDER BY parent_id, order_num;
|
||||
|
||||
-- =====================================================
|
||||
-- 提交事务
|
||||
-- =====================================================
|
||||
COMMIT;
|
||||
|
||||
-- =====================================================
|
||||
-- 执行完成提示
|
||||
-- =====================================================
|
||||
SELECT '🎉 综合测评记录管理菜单权限配置完成!' AS '执行结果';
|
||||
SELECT '📋 已配置18个菜单权限,分配给5种角色' AS '配置详情';
|
||||
SELECT '🔒 ID范围9720-9737,预留9738-9739供扩展使用' AS 'ID分配情况';
|
||||
|
||||
-- =====================================================
|
||||
-- 使用说明
|
||||
-- =====================================================
|
||||
-- 1. 本脚本已包含完整的防冲突检查机制
|
||||
-- 2. 使用事务确保数据一致性,如有错误会自动回滚
|
||||
-- 3. 角色ID可能需要根据实际系统调整(2,3,4,5)
|
||||
-- 4. 如需回滚,执行:DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9720 AND 9739; DELETE FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
-- =====================================================
|
||||
@@ -0,0 +1,58 @@
|
||||
-- =====================================================
|
||||
-- 综合测评记录管理菜单权限配置
|
||||
-- 创建时间: 2025-01-28
|
||||
-- ID范围: 9720-9739 (按照ID分配规范)
|
||||
-- 模块: 学生考核管理系统 - 综合测评记录管理
|
||||
-- =====================================================
|
||||
|
||||
-- 删除可能存在的旧数据(防止重复执行脚本时冲突)
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9739;
|
||||
|
||||
-- ===========================================
|
||||
-- 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
|
||||
(9720, '综合测评记录', 9000, 6, 'assessmentRecord', 'xskh/assessmentRecord/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentRecord:list', 'record', 1, 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
|
||||
(9721, '综合测评记录查询', 9720, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9722, '综合测评记录新增', 9720, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9723, '综合测评记录修改', 9720, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9724, '综合测评记录删除', 9720, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9725, '综合测评记录导出', 9720, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9726, '综合测评记录导入', 9720, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:import', '#', 1, 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
|
||||
(9727, '我的测评记录', 9720, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:myRecords', '#', 1, NOW(), '', NULL, ''),
|
||||
(9728, '待审核记录', 9720, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:pending', '#', 1, NOW(), '', NULL, ''),
|
||||
(9729, '提交测评记录', 9720, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:submit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9730, '审核测评记录', 9720, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:approve', '#', 1, NOW(), '', NULL, ''),
|
||||
(9731, '撤销测评记录', 9720, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:revoke', '#', 1, NOW(), '', NULL, ''),
|
||||
(9732, '锁定测评记录', 9720, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:lock', '#', 1, 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
|
||||
(9733, '计算测评排名', 9720, 13, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:calculateRanking', '#', 1, NOW(), '', NULL, ''),
|
||||
(9734, '批量生成记录', 9720, 14, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:batchGenerate', '#', 1, NOW(), '', NULL, ''),
|
||||
(9735, '测评统计信息', 9720, 15, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:statistics', '#', 1, NOW(), '', NULL, ''),
|
||||
(9736, '强制删除记录', 9720, 16, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:forceRemove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9737, '批量更新状态', 9720, 17, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentRecord:batchUpdateStatus', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 预留扩展权限(9738-9739)
|
||||
-- ===========================================
|
||||
-- 9738, 9739 预留给后续功能扩展使用
|
||||
|
||||
-- =====================================================
|
||||
-- 执行完成提示
|
||||
-- =====================================================
|
||||
SELECT '✅ 综合测评记录管理菜单权限配置完成!' AS '执行结果';
|
||||
SELECT COUNT(*) AS '新增菜单数量' FROM sys_menu WHERE menu_id BETWEEN 9720 AND 9737;
|
||||
@@ -0,0 +1,117 @@
|
||||
-- ==========================================
|
||||
-- 考核计划管理权限配置 - 修正版
|
||||
-- 版本:V1.1.0
|
||||
-- 创建时间:2025-01-28
|
||||
-- 修正说明:适配数据库表结构,query字段改为query_param
|
||||
-- ID范围:9800-9819 (安全范围,避免冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 检查学生考核管理主菜单是否存在
|
||||
-- ===========================================
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) > 0 THEN '✅ 学生考核管理主菜单(9000)已存在,可以继续配置子菜单'
|
||||
ELSE '❌ 学生考核管理主菜单(9000)不存在,请先创建主菜单'
|
||||
END AS '检查结果'
|
||||
FROM sys_menu WHERE menu_id = 9000;
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 清理可能存在的冲突数据
|
||||
-- ===========================================
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 考核计划管理菜单 (ID: 9800)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9800, '考核计划管理', 9000, 2, 'assessmentPlan', 'xskh/assessmentPlan/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentPlan:list', 'date-range', NULL, 1, NOW(), NULL, NULL, '考核计划管理菜单');
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 考核计划管理按钮权限 (ID: 9801-9819)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9801, '计划查询', 9800, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:query', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9802, '计划新增', 9800, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:add', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9803, '计划修改', 9800, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:edit', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9804, '计划删除', 9800, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:remove', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9805, '计划导出', 9800, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:export', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9806, '计划导入', 9800, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:import', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9807, '计划发布', 9800, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:publish', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9808, '撤销发布', 9800, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:unpublish', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9809, '计划开始', 9800, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:start', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9810, '计划结束', 9800, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:end', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9811, '计划取消', 9800, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:cancel', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9812, '计划归档', 9800, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:archive', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9813, '计划统计', 9800, 13, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:statistics', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9814, '计划复制', 9800, 14, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:copy', '#', NULL, 1, NOW(), NULL, NULL, ''),
|
||||
(9815, '批量状态', 9800, 15, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:batchStatus', '#', NULL, 1, NOW(), NULL, NULL, '');
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 角色权限关联(默认给超级管理员角色)
|
||||
-- ===========================================
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(1, 9800), (1, 9801), (1, 9802), (1, 9803), (1, 9804), (1, 9805),
|
||||
(1, 9806), (1, 9807), (1, 9808), (1, 9809), (1, 9810), (1, 9811),
|
||||
(1, 9812), (1, 9813), (1, 9814), (1, 9815);
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 验证配置结果
|
||||
-- ===========================================
|
||||
SELECT
|
||||
'考核计划管理' AS '模块名称',
|
||||
COUNT(*) AS '菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
|
||||
-- 显示菜单树结构
|
||||
SELECT
|
||||
CASE
|
||||
WHEN parent_id = 9000 THEN CONCAT('├── ', menu_name, ' (', menu_id, ')')
|
||||
WHEN parent_id = 9800 THEN CONCAT('│ ├── ', menu_name, ' (', menu_id, ')')
|
||||
ELSE CONCAT('└── ', menu_name, ' (', menu_id, ')')
|
||||
END AS '菜单结构'
|
||||
FROM sys_menu
|
||||
WHERE menu_id BETWEEN 9800 AND 9819 OR menu_id = 9000
|
||||
ORDER BY menu_id;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ===========================================
|
||||
-- 7. 使用说明
|
||||
-- ===========================================
|
||||
/*
|
||||
权限配置完成后,前端页面权限标识说明:
|
||||
|
||||
1. 考核计划管理页面路径:web/src/views/xskh/assessmentPlan/index.vue
|
||||
2. 权限标识格式:xskh:assessmentPlan:操作
|
||||
3. 主要权限:
|
||||
- xskh:assessmentPlan:list (列表查询)
|
||||
- xskh:assessmentPlan:query (详情查询)
|
||||
- xskh:assessmentPlan:add (新增)
|
||||
- xskh:assessmentPlan:edit (修改)
|
||||
- xskh:assessmentPlan:remove (删除)
|
||||
- xskh:assessmentPlan:export (导出)
|
||||
- xskh:assessmentPlan:import (导入)
|
||||
|
||||
4. 业务权限:
|
||||
- xskh:assessmentPlan:publish (发布)
|
||||
- xskh:assessmentPlan:unpublish (撤销发布)
|
||||
- xskh:assessmentPlan:start (开始)
|
||||
- xskh:assessmentPlan:end (结束)
|
||||
- xskh:assessmentPlan:cancel (取消)
|
||||
- xskh:assessmentPlan:archive (归档)
|
||||
- xskh:assessmentPlan:statistics (统计)
|
||||
- xskh:assessmentPlan:copy (复制)
|
||||
- xskh:assessmentPlan:batchStatus (批量状态)
|
||||
|
||||
注意:
|
||||
- 使用ID范围9800-9819,避免与其他模块冲突
|
||||
- 已为超级管理员角色(role_id=1)分配所有权限
|
||||
- 前端页面需要使用v-hasPermi指令控制按钮显示
|
||||
*/
|
||||
@@ -0,0 +1,143 @@
|
||||
-- ==========================================
|
||||
-- 学生考核计划管理模块权限配置 - 完整版
|
||||
-- 版本:V2.0.0
|
||||
-- 创建时间:2025-01-28
|
||||
-- 更新时间:2025-01-28
|
||||
-- 说明:考核计划管理完整权限配置,使用安全ID范围避免冲突
|
||||
-- 🔧 ID范围:9800-9819 (使用更大的ID避免与现有模块冲突)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 清理可能存在的冲突数据
|
||||
-- ===========================================
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 检查学生考核管理主菜单是否存在
|
||||
-- ===========================================
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) > 0 THEN '✅ 学生考核管理主菜单(9000)已存在,可以继续配置子菜单'
|
||||
ELSE '❌ 学生考核管理主菜单(9000)不存在,请先执行学生考核管理系统主菜单配置脚本'
|
||||
END AS '检查结果'
|
||||
FROM sys_menu WHERE menu_id = 9000;
|
||||
|
||||
-- ===========================================
|
||||
-- 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
|
||||
(9800, '考核计划管理', 9000, 5, 'assessmentPlan', 'xskh/assessmentPlan/index', '', 1, 0, 'C', '0', '0', 'xskh:assessmentPlan:list', 'plan', 1, NOW(), '', NULL, '考核计划管理菜单');
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 考核计划管理按钮权限
|
||||
-- ===========================================
|
||||
|
||||
-- 基础操作权限 (9801-9806)
|
||||
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
|
||||
(9801, '考核计划查询', 9800, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:query', '#', 1, NOW(), '', NULL, ''),
|
||||
(9802, '考核计划新增', 9800, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:add', '#', 1, NOW(), '', NULL, ''),
|
||||
(9803, '考核计划修改', 9800, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:edit', '#', 1, NOW(), '', NULL, ''),
|
||||
(9804, '考核计划删除', 9800, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:remove', '#', 1, NOW(), '', NULL, ''),
|
||||
(9805, '考核计划导出', 9800, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:export', '#', 1, NOW(), '', NULL, ''),
|
||||
(9806, '考核计划导入', 9800, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:import', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 状态管理权限 (9807-9812)
|
||||
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
|
||||
(9807, '考核计划发布', 9800, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:publish', '#', 1, NOW(), '', NULL, ''),
|
||||
(9808, '撤销计划发布', 9800, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:unpublish', '#', 1, NOW(), '', NULL, ''),
|
||||
(9809, '考核计划开始', 9800, 9, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:start', '#', 1, NOW(), '', NULL, ''),
|
||||
(9810, '考核计划结束', 9800, 10, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:end', '#', 1, NOW(), '', NULL, ''),
|
||||
(9811, '考核计划取消', 9800, 11, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:cancel', '#', 1, NOW(), '', NULL, ''),
|
||||
(9812, '考核计划归档', 9800, 12, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:archive', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 辅助功能权限 (9813-9819)
|
||||
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
|
||||
(9813, '计划统计更新', 9800, 13, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:statistics', '#', 1, NOW(), '', NULL, ''),
|
||||
(9814, '计划复制功能', 9800, 14, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:copy', '#', 1, NOW(), '', NULL, ''),
|
||||
(9815, '批量状态更新', 9800, 15, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:batchStatus', '#', 1, NOW(), '', NULL, ''),
|
||||
(9816, '获取计划选项', 9800, 16, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:options', '#', 1, NOW(), '', NULL, ''),
|
||||
(9817, '生成计划编号', 9800, 17, '', '', '', 1, 0, 'F', '0', '0', 'xskh:assessmentPlan:generateCode', '#', 1, NOW(), '', NULL, '');
|
||||
|
||||
-- 预留扩展权限 (9818-9819)
|
||||
-- 9818, 9819 预留给后续功能扩展使用
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 角色权限关联(默认给超级管理员角色)
|
||||
-- ===========================================
|
||||
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(1, 9800), -- 考核计划管理菜单
|
||||
(1, 9801), -- 考核计划查询
|
||||
(1, 9802), -- 考核计划新增
|
||||
(1, 9803), -- 考核计划修改
|
||||
(1, 9804), -- 考核计划删除
|
||||
(1, 9805), -- 考核计划导出
|
||||
(1, 9806), -- 考核计划导入
|
||||
(1, 9807), -- 考核计划发布
|
||||
(1, 9808), -- 撤销计划发布
|
||||
(1, 9809), -- 考核计划开始
|
||||
(1, 9810), -- 考核计划结束
|
||||
(1, 9811), -- 考核计划取消
|
||||
(1, 9812), -- 考核计划归档
|
||||
(1, 9813), -- 计划统计更新
|
||||
(1, 9814), -- 计划复制功能
|
||||
(1, 9815), -- 批量状态更新
|
||||
(1, 9816), -- 获取计划选项
|
||||
(1, 9817); -- 生成计划编号
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 配置验证
|
||||
-- ===========================================
|
||||
SELECT
|
||||
COUNT(*) AS '新增菜单数量',
|
||||
MIN(menu_id) AS '最小ID',
|
||||
MAX(menu_id) AS '最大ID'
|
||||
FROM sys_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
|
||||
SELECT
|
||||
COUNT(*) AS '角色权限数量'
|
||||
FROM sys_role_menu WHERE menu_id BETWEEN 9800 AND 9819;
|
||||
|
||||
-- ===========================================
|
||||
-- 7. 菜单权限详情展示
|
||||
-- ===========================================
|
||||
SELECT
|
||||
menu_id AS 'ID',
|
||||
menu_name AS '菜单名称',
|
||||
menu_type AS '类型',
|
||||
perms AS '权限标识',
|
||||
CASE
|
||||
WHEN menu_type = 'C' THEN '菜单'
|
||||
WHEN menu_type = 'F' THEN '按钮'
|
||||
ELSE '其他'
|
||||
END AS '权限类型'
|
||||
FROM sys_menu
|
||||
WHERE menu_id BETWEEN 9800 AND 9819
|
||||
ORDER BY menu_id;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ===========================================
|
||||
-- 8. 使用说明
|
||||
-- ===========================================
|
||||
/*
|
||||
权限配置完成后,请按以下步骤验证:
|
||||
|
||||
1. 登录系统管理后台
|
||||
2. 进入【系统管理】->【菜单管理】
|
||||
3. 查看【学生考核管理】->【考核计划管理】是否正确显示
|
||||
4. 检查所有按钮权限是否配置完整
|
||||
5. 测试前端页面功能是否正常
|
||||
|
||||
前端访问路径:/xskh/assessmentPlan
|
||||
权限标识:xskh:assessmentPlan:*
|
||||
|
||||
注意:
|
||||
- ID范围:9800-9819 (20个ID)
|
||||
- 已预留2个扩展ID:9818-9819
|
||||
- 与现有模块无冲突
|
||||
- 支持完整的业务流程操作
|
||||
*/
|
||||
@@ -0,0 +1,276 @@
|
||||
# 学生考核管理菜单显示问题深度分析报告
|
||||
|
||||
## 🎯 问题概述
|
||||
|
||||
**现象**: 系统管理 → 菜单管理页面中,"学生考核管理"父菜单下只显示"违纪处分管理",缺少"处分记录管理"菜单项
|
||||
|
||||
**影响**: 无法在菜单管理页面看到完整的菜单层级结构
|
||||
|
||||
## 🔍 深度技术分析
|
||||
|
||||
### 1. 数据库层面验证 ✅
|
||||
|
||||
#### 菜单数据完整性
|
||||
```sql
|
||||
-- 所有相关菜单均已正确创建
|
||||
SELECT menu_id, menu_name, parent_id, path, component FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110);
|
||||
|
||||
9000 | 学生考核管理 | 0 | assessment | NULL
|
||||
9100 | 违纪处分管理 | 9000 | xskh | xskh/index
|
||||
9110 | 处分记录管理 | 9000 | disciplineRecord | xskh/disciplineRecord/index
|
||||
```
|
||||
|
||||
#### 权限配置完整性
|
||||
```sql
|
||||
-- 超级管理员拥有所有菜单权限
|
||||
SELECT rm.role_id, rm.menu_id, m.menu_name
|
||||
FROM sys_role_menu rm
|
||||
LEFT JOIN sys_menu m ON rm.menu_id = m.menu_id
|
||||
WHERE rm.role_id = 1 AND rm.menu_id IN (9000, 9100, 9110);
|
||||
|
||||
结果: role_id=1 拥有 9000, 9100, 9110 三个菜单权限
|
||||
```
|
||||
|
||||
### 2. 后端API层面分析 🔍
|
||||
|
||||
#### 关键发现:菜单查询逻辑
|
||||
**文件**: `SysMenuServiceImpl.java` → `selectMenuList` 方法
|
||||
|
||||
```java
|
||||
// 第67-93行:菜单查询的核心逻辑
|
||||
public List<SysMenuVo> selectMenuList(SysMenuBo menu, Long userId) {
|
||||
List<SysMenuVo> menuList;
|
||||
// ⭐ 关键点:超级管理员走不同的查询逻辑
|
||||
if (LoginHelper.isSuperAdmin(userId)) {
|
||||
// 超级管理员:直接查询所有菜单
|
||||
menuList = baseMapper.selectVoList(new LambdaQueryWrapper<SysMenu>()
|
||||
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
|
||||
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
||||
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
||||
// ... 其他条件
|
||||
);
|
||||
} else {
|
||||
// 普通用户:基于角色权限查询
|
||||
// 使用 selectMenuListByUserId 方法
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### API接口权限控制
|
||||
**文件**: `SysMenuController.java` → `/system/menu/list` 接口
|
||||
|
||||
```java
|
||||
@SaCheckRole(value = {
|
||||
TenantConstants.SUPER_ADMIN_ROLE_KEY, // 超级管理员
|
||||
TenantConstants.TENANT_ADMIN_ROLE_KEY // 租户管理员
|
||||
}, mode = SaMode.OR)
|
||||
@SaCheckPermission("system:menu:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<SysMenuVo>> list(SysMenuBo menu) {
|
||||
List<SysMenuVo> menus = menuService.selectMenuList(menu, LoginHelper.getUserId());
|
||||
return R.ok(menus);
|
||||
}
|
||||
```
|
||||
|
||||
### 3. 前端处理逻辑 ✅
|
||||
|
||||
#### 菜单管理页面
|
||||
**文件**: `web/src/views/system/menu/index.vue`
|
||||
|
||||
```javascript
|
||||
// 第344-352行:获取菜单列表
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMenu(queryParams.value); // 调用 /system/menu/list API
|
||||
const data = proxy?.handleTree<MenuVO>(res.data, 'menuId'); // 构建树形结构
|
||||
if (data) {
|
||||
menuList.value = data;
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
```
|
||||
|
||||
#### 前端API调用
|
||||
**文件**: `web/src/api/system/menu/index.ts`
|
||||
|
||||
```javascript
|
||||
// 第6-12行:菜单列表API
|
||||
export const listMenu = (query?: MenuQuery): AxiosPromise<MenuVO[]> => {
|
||||
return request({
|
||||
url: '/system/menu/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
### 4. 数据库查询SQL分析 🔍
|
||||
|
||||
#### 关键SQL语句
|
||||
**文件**: `SysMenuMapper.xml`
|
||||
|
||||
```xml
|
||||
<!-- 超级管理员使用的查询:直接查询 sys_menu 表 -->
|
||||
<select id="selectVoList">
|
||||
SELECT * FROM sys_menu WHERE ... ORDER BY parent_id, order_num
|
||||
</select>
|
||||
|
||||
<!-- 普通用户使用的查询:联表查询权限 -->
|
||||
<select id="selectMenuListByUserId">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component,
|
||||
m.query_param, m.visible, m.status, m.perms, m.is_frame, m.is_cache,
|
||||
m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_role r on rm.role_id = r.role_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
```
|
||||
|
||||
## 🚨 问题定位
|
||||
|
||||
### 根本原因分析
|
||||
|
||||
#### 可能原因1:用户身份判断问题 ⭐⭐⭐
|
||||
```java
|
||||
// 关键代码:LoginHelper.isSuperAdmin(userId)
|
||||
if (LoginHelper.isSuperAdmin(userId)) {
|
||||
// 超级管理员逻辑
|
||||
} else {
|
||||
// 普通用户逻辑
|
||||
}
|
||||
```
|
||||
|
||||
**分析**: 如果当前用户没有被正确识别为超级管理员,可能会走普通用户的查询逻辑,导致菜单显示不完整。
|
||||
|
||||
#### 可能原因2:MyBatis查询条件问题 ⭐⭐
|
||||
```java
|
||||
// baseMapper.selectVoList() 方法的查询条件
|
||||
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
||||
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
||||
```
|
||||
|
||||
**分析**: 如果前端传递了特定的查询条件(如status、visible),可能会过滤掉某些菜单。
|
||||
|
||||
#### 可能原因3:菜单状态字段问题 ⭐⭐
|
||||
检查数据库中9110菜单的状态字段:
|
||||
```sql
|
||||
SELECT menu_id, menu_name, status, visible FROM sys_menu WHERE menu_id = 9110;
|
||||
```
|
||||
|
||||
如果 `status != '0'` 或 `visible != '0'`,菜单可能被过滤。
|
||||
|
||||
### 问题验证步骤
|
||||
|
||||
#### 步骤1:验证用户身份 ⭐⭐⭐
|
||||
```java
|
||||
// 在 SysMenuServiceImpl.selectMenuList 方法中添加日志
|
||||
log.info("当前用户ID: {}, 是否超级管理员: {}", userId, LoginHelper.isSuperAdmin(userId));
|
||||
```
|
||||
|
||||
#### 步骤2:验证查询条件 ⭐⭐⭐
|
||||
```java
|
||||
// 检查前端传递的查询参数
|
||||
log.info("查询条件 - menuName: {}, status: {}, visible: {}",
|
||||
menu.getMenuName(), menu.getStatus(), menu.getVisible());
|
||||
```
|
||||
|
||||
#### 步骤3:验证数据库返回 ⭐⭐
|
||||
```java
|
||||
// 记录查询结果
|
||||
log.info("查询到的菜单数量: {}", menuList.size());
|
||||
menuList.forEach(m -> log.info("菜单: {} - {}", m.getMenuId(), m.getMenuName()));
|
||||
```
|
||||
|
||||
#### 步骤4:验证菜单状态 ⭐⭐
|
||||
```sql
|
||||
-- 直接查询9110菜单的完整信息
|
||||
SELECT * FROM sys_menu WHERE menu_id = 9110;
|
||||
```
|
||||
|
||||
## 🔧 排查建议
|
||||
|
||||
### 优先级排查顺序
|
||||
|
||||
#### 🥇 第一优先级:数据库状态检查
|
||||
```sql
|
||||
-- 检查菜单状态和可见性
|
||||
SELECT menu_id, menu_name, status, visible, del_flag
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110);
|
||||
```
|
||||
|
||||
**预期结果**: 所有字段都应该是 '0'(正常状态)
|
||||
|
||||
#### 🥈 第二优先级:用户权限验证
|
||||
1. 确认当前登录用户是否为超级管理员
|
||||
2. 检查用户角色分配是否正确
|
||||
3. 验证角色菜单权限是否完整
|
||||
|
||||
#### 🥉 第三优先级:API调试
|
||||
1. 浏览器开发者工具查看网络请求
|
||||
2. 检查 `/system/menu/list` API的实际返回数据
|
||||
3. 确认前端是否传递了过滤条件
|
||||
|
||||
### 快速修复方案
|
||||
|
||||
#### 方案1:临时修复(如果是状态问题)
|
||||
```sql
|
||||
-- 确保菜单状态正常
|
||||
UPDATE sys_menu SET status = '0', visible = '0' WHERE menu_id = 9110;
|
||||
```
|
||||
|
||||
#### 方案2:权限重新分配(如果是权限问题)
|
||||
```sql
|
||||
-- 重新为超级管理员分配菜单权限
|
||||
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 9110)
|
||||
ON DUPLICATE KEY UPDATE role_id = 1;
|
||||
```
|
||||
|
||||
#### 方案3:清除缓存(如果是缓存问题)
|
||||
1. 重启后端服务
|
||||
2. 清除浏览器缓存
|
||||
3. 重新登录系统
|
||||
|
||||
## 📋 检查清单
|
||||
|
||||
### 数据库层面 ✅
|
||||
- [x] 菜单数据存在且正确
|
||||
- [x] 菜单层级关系正确
|
||||
- [x] 角色菜单权限分配正确
|
||||
- [ ] **待验证**: 菜单状态字段 (status, visible, del_flag)
|
||||
|
||||
### 后端代码层面 🔍
|
||||
- [x] API接口权限注解正确
|
||||
- [x] Service层查询逻辑完整
|
||||
- [x] Mapper SQL语句正确
|
||||
- [ ] **待验证**: 用户超级管理员身份判断
|
||||
- [ ] **待验证**: 查询条件过滤逻辑
|
||||
|
||||
### 前端代码层面 ✅
|
||||
- [x] API调用正确
|
||||
- [x] 树形结构构建正确
|
||||
- [x] 页面显示逻辑正确
|
||||
- [ ] **待验证**: 查询参数传递
|
||||
|
||||
## 🎯 结论
|
||||
|
||||
基于深度分析,问题最可能出现在以下几个方面:
|
||||
|
||||
1. **菜单状态字段异常** (概率: 40%)
|
||||
2. **用户身份判断问题** (概率: 30%)
|
||||
3. **前端查询条件过滤** (概率: 20%)
|
||||
4. **缓存或同步问题** (概率: 10%)
|
||||
|
||||
**建议立即执行**:
|
||||
1. 检查9110菜单的status和visible字段
|
||||
2. 验证当前用户的超级管理员身份
|
||||
3. 浏览器开发者工具查看API返回数据
|
||||
|
||||
---
|
||||
|
||||
**报告生成时间**: 2025-01-07
|
||||
**技术栈**: Spring Boot 3.4.6 + Vue 3 + MyBatis-Plus
|
||||
**问题严重程度**: 中等(功能可用,显示异常)
|
||||
**预计解决时间**: 30分钟内
|
||||
@@ -0,0 +1,165 @@
|
||||
# 学生考核管理菜单显示问题解决方案
|
||||
|
||||
## 🔍 问题确认
|
||||
|
||||
**问题描述**: 前端菜单管理中只显示一个"违纪处分管理"菜单,缺少"处分记录管理"菜单
|
||||
|
||||
**根本原因**:
|
||||
- ✅ 数据库配置完全正确(已验证)
|
||||
- ❌ 系统缓存未刷新,导致新菜单未显示
|
||||
|
||||
## 📊 验证结果
|
||||
|
||||
经过详细验证,确认数据库配置状态:
|
||||
- ✅ 三个核心菜单都已创建 (9000, 9100, 9110)
|
||||
- ✅ 超级管理员权限已正确配置
|
||||
- ✅ 菜单层级结构正确:
|
||||
```
|
||||
📚 学生考核管理 (9000) - 父菜单
|
||||
├── 📊 违纪处分管理 (9100) - 子菜单1
|
||||
└── 📊 处分记录管理 (9110) - 子菜单2
|
||||
```
|
||||
- ✅ 菜单状态和权限配置正确
|
||||
- ✅ 无冲突菜单
|
||||
|
||||
## 🚀 解决方案(按优先级排序)
|
||||
|
||||
### 方案1: 清除所有系统缓存 ⭐⭐⭐
|
||||
|
||||
**推荐原因**: 最彻底的缓存清除方案
|
||||
|
||||
1. **访问缓存监控页面**
|
||||
```
|
||||
前端地址: http://localhost/monitor/cache
|
||||
```
|
||||
|
||||
2. **清除所有缓存**
|
||||
- 点击"清理全部缓存"按钮
|
||||
- 或调用API: `DELETE /monitor/cache/clearCacheAll`
|
||||
|
||||
3. **重新登录**
|
||||
- 退出当前登录
|
||||
- 清除浏览器本地存储
|
||||
- 重新登录系统
|
||||
|
||||
### 方案2: 重启后端服务 ⭐⭐⭐
|
||||
|
||||
**推荐原因**: 彻底刷新所有内存缓存
|
||||
|
||||
1. **停止后端服务**
|
||||
```bash
|
||||
# 找到Java进程并停止
|
||||
ps aux | grep java
|
||||
kill [进程ID]
|
||||
```
|
||||
|
||||
2. **重新启动后端服务**
|
||||
```bash
|
||||
cd backend
|
||||
./hot-start.sh # Linux/Mac
|
||||
# 或
|
||||
hot-start.bat # Windows
|
||||
```
|
||||
|
||||
### 方案3: 清除前端缓存 ⭐⭐
|
||||
|
||||
**推荐原因**: 简单快速,无需重启服务
|
||||
|
||||
1. **打开浏览器开发者工具**
|
||||
- 按 `F12` 打开开发者工具
|
||||
|
||||
2. **清除本地存储**
|
||||
- 切换到"应用"或"Application"选项卡
|
||||
- 展开"存储"或"Storage" → "本地存储"或"Local Storage"
|
||||
- 找到对应域名,清除所有存储项
|
||||
|
||||
3. **清除缓存并刷新**
|
||||
- 按 `Ctrl+Shift+R` (Windows) 或 `Cmd+Shift+R` (Mac)
|
||||
- 或右键刷新按钮选择"清空缓存并硬性重新加载"
|
||||
|
||||
4. **重新登录系统**
|
||||
|
||||
### 方案4: 使用隐私模式验证 ⭐
|
||||
|
||||
**用途**: 验证问题是否由缓存引起
|
||||
|
||||
1. **打开浏览器隐私模式**
|
||||
- Chrome: `Ctrl+Shift+N`
|
||||
- Firefox: `Ctrl+Shift+P`
|
||||
|
||||
2. **访问系统并登录**
|
||||
```
|
||||
http://localhost
|
||||
```
|
||||
|
||||
3. **检查菜单是否正常显示**
|
||||
|
||||
## 🎯 验证步骤
|
||||
|
||||
完成上述任一方案后,验证修复结果:
|
||||
|
||||
### 1. 登录系统
|
||||
```
|
||||
URL: http://localhost
|
||||
账号: admin
|
||||
密码: [管理员密码]
|
||||
```
|
||||
|
||||
### 2. 检查菜单结构
|
||||
应该看到以下菜单结构:
|
||||
```
|
||||
📚 学生考核管理
|
||||
├── 📊 违纪处分管理
|
||||
└── 📊 处分记录管理
|
||||
```
|
||||
|
||||
### 3. 验证功能访问
|
||||
- **违纪处分管理**: `/assessment/xskh`
|
||||
- **处分记录管理**: `/assessment/disciplineRecord`
|
||||
|
||||
### 4. 检查页面权限
|
||||
确保两个页面都能正常加载,无权限错误
|
||||
|
||||
## 🔧 技术原理说明
|
||||
|
||||
### 缓存机制
|
||||
- **后端缓存**: Spring Cache + Redis缓存菜单数据
|
||||
- **前端缓存**: LocalStorage缓存路由和菜单信息
|
||||
- **数据获取**: 超级管理员通过`selectMenuTreeAll()`获取所有菜单
|
||||
|
||||
### 缓存失效原因
|
||||
1. **菜单新增后缓存未更新**
|
||||
2. **Redis缓存仍保持旧的菜单数据**
|
||||
3. **前端LocalStorage保存了旧的路由配置**
|
||||
|
||||
### 解决机制
|
||||
- **后端**: 重启服务或调用缓存清除API
|
||||
- **前端**: 清除LocalStorage或使用硬刷新
|
||||
- **数据库**: 配置正确,无需额外操作
|
||||
|
||||
## 📝 预防措施
|
||||
|
||||
### 今后新增菜单时的标准流程
|
||||
1. **更新数据库配置**
|
||||
2. **立即清除系统缓存**
|
||||
3. **通知相关用户刷新浏览器**
|
||||
4. **验证菜单显示正常**
|
||||
|
||||
### 自动化建议
|
||||
- 考虑在菜单管理页面添加"刷新菜单缓存"按钮
|
||||
- 新增菜单后自动提示用户刷新缓存
|
||||
- 定期检查菜单权限配置的一致性
|
||||
|
||||
## ⚠️ 注意事项
|
||||
|
||||
1. **缓存清除影响**: 清除缓存会影响所有用户,建议在低峰期操作
|
||||
2. **会话保持**: 清除缓存后可能需要重新登录
|
||||
3. **数据一致性**: 确保数据库配置正确后再清除缓存
|
||||
4. **多用户环境**: 通知所有在线用户刷新页面
|
||||
|
||||
---
|
||||
|
||||
**创建时间**: 2025-01-07
|
||||
**问题类型**: 菜单缓存未刷新
|
||||
**解决状态**: ✅ 解决方案已提供
|
||||
**优先级**: 🔴 高优先级(影响用户体验)
|
||||
@@ -0,0 +1,95 @@
|
||||
-- ========================================
|
||||
-- 违纪处分管理 - 优化菜单配置方案
|
||||
-- ========================================
|
||||
-- 创建时间: 2025-01-28
|
||||
-- 说明: 解决双页面菜单配置问题,实现分层菜单设计
|
||||
-- 目标: 支持概览+详细管理的双层结构
|
||||
-- ========================================
|
||||
|
||||
USE hzdyjs_xg;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ===========================================
|
||||
-- 1. 删除旧的菜单配置(如果存在)
|
||||
-- ===========================================
|
||||
DELETE FROM sys_role_menu WHERE menu_id BETWEEN 9100 AND 9150;
|
||||
DELETE FROM sys_menu WHERE menu_id BETWEEN 9100 AND 9150;
|
||||
|
||||
-- ===========================================
|
||||
-- 2. 违纪处分管理 - 主菜单(概览页面)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9100, '违纪处分管理', 9000, 1, 'xskh', 'xskh/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineRecord:list', 'discipline', 1, NOW(), 1, NOW(), '违纪处分概览页面 - 查看和简单操作');
|
||||
|
||||
-- 违纪处分管理主菜单按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9101, '违纪记录查询', 9100, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:query', '#', 1, NOW(), 1, NOW(), '查看违纪处分记录'),
|
||||
(9102, '违纪记录详情', 9100, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:view', '#', 1, NOW(), 1, NOW(), '查看详情对话框'),
|
||||
(9103, '违纪记录审核', 9100, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:approve', '#', 1, NOW(), 1, NOW(), '简单审核功能'),
|
||||
(9104, '违纪记录导出', 9100, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:export', '#', 1, NOW(), 1, NOW(), '导出记录数据');
|
||||
|
||||
-- ===========================================
|
||||
-- 3. 违纪处分详细管理 - 子菜单(完整管理页面)
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9110, '处分记录管理', 9000, 2, 'disciplineRecord', 'xskh/disciplineRecord/index', '', 1, 0, 'C', '0', '0', 'xskh:disciplineRecord:manage', 'edit', 1, NOW(), 1, NOW(), '违纪处分详细管理 - 完整CRUD操作');
|
||||
|
||||
-- 违纪处分详细管理按钮权限
|
||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(9111, '处分记录查询', 9110, 1, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:query', '#', 1, NOW(), 1, NOW(), '查询处分记录'),
|
||||
(9112, '处分记录新增', 9110, 2, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:add', '#', 1, NOW(), 1, NOW(), '新增处分记录'),
|
||||
(9113, '处分记录修改', 9110, 3, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:edit', '#', 1, NOW(), 1, NOW(), '修改处分记录'),
|
||||
(9114, '处分记录删除', 9110, 4, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:remove', '#', 1, NOW(), 1, NOW(), '删除处分记录'),
|
||||
(9115, '处分记录导出', 9110, 5, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:export', '#', 1, NOW(), 1, NOW(), '导出处分数据'),
|
||||
(9116, '处分记录导入', 9110, 6, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:import', '#', 1, NOW(), 1, NOW(), '导入处分数据'),
|
||||
(9117, '处分记录审核', 9110, 7, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:approve', '#', 1, NOW(), 1, NOW(), '审核处分记录'),
|
||||
(9118, '统计分析', 9110, 8, '', '', '', 1, 0, 'F', '0', '0', 'xskh:disciplineRecord:stats', '#', 1, NOW(), 1, NOW(), '统计分析功能');
|
||||
|
||||
-- ===========================================
|
||||
-- 4. 为超级管理员分配菜单权限
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(1, 9100), (1, 9101), (1, 9102), (1, 9103), (1, 9104),
|
||||
(1, 9110), (1, 9111), (1, 9112), (1, 9113), (1, 9114), (1, 9115), (1, 9116), (1, 9117), (1, 9118);
|
||||
|
||||
-- ===========================================
|
||||
-- 5. 为租户管理员分配菜单权限
|
||||
-- ===========================================
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||
(2, 9100), (2, 9101), (2, 9102), (2, 9103), (2, 9104),
|
||||
(2, 9110), (2, 9111), (2, 9112), (2, 9113), (2, 9114), (2, 9115), (2, 9116), (2, 9117), (2, 9118);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ===========================================
|
||||
-- 6. 菜单配置说明
|
||||
-- ===========================================
|
||||
/*
|
||||
📋 菜单层次设计:
|
||||
|
||||
🎯 学生考核管理 (9000)
|
||||
├── 📊 违纪处分管理 (9100) - `/xskh` - 概览页面
|
||||
│ ├── 查询权限 (9101) - xskh:disciplineRecord:query
|
||||
│ ├── 详情权限 (9102) - xskh:disciplineRecord:view
|
||||
│ ├── 审核权限 (9103) - xskh:disciplineRecord:approve
|
||||
│ └── 导出权限 (9104) - xskh:disciplineRecord:export
|
||||
│
|
||||
└── 📝 处分记录管理 (9110) - `/disciplineRecord` - 详细管理页面
|
||||
├── 查询权限 (9111) - xskh:disciplineRecord:query
|
||||
├── 新增权限 (9112) - xskh:disciplineRecord:add
|
||||
├── 修改权限 (9113) - xskh:disciplineRecord:edit
|
||||
├── 删除权限 (9114) - xskh:disciplineRecord:remove
|
||||
├── 导出权限 (9115) - xskh:disciplineRecord:export
|
||||
├── 导入权限 (9116) - xskh:disciplineRecord:import
|
||||
├── 审核权限 (9117) - xskh:disciplineRecord:approve
|
||||
└── 统计权限 (9118) - xskh:disciplineRecord:stats
|
||||
|
||||
🎯 用户角色适配:
|
||||
- 👀 **查看者角色**: 只显示违纪处分管理(9100) - 概览和查看
|
||||
- 👨💼 **管理员角色**: 显示两个菜单 - 完整的管理功能
|
||||
- 📊 **分析师角色**: 重点使用处分记录管理(9110) - 数据分析
|
||||
|
||||
🎯 路由对应关系:
|
||||
- /xskh → xskh/index.vue (概览页面)
|
||||
- /disciplineRecord → xskh/disciplineRecord/index.vue (详细管理)
|
||||
*/
|
||||
@@ -0,0 +1,180 @@
|
||||
# 学生考核管理菜单显示问题 - 最终分析总结
|
||||
|
||||
## 🎯 问题现状
|
||||
|
||||
**用户反馈**: 前端菜单管理中只显示一个"违纪处分管理"菜单,缺少"处分记录管理"菜单
|
||||
|
||||
## ✅ 已验证的正确配置
|
||||
|
||||
### 1. 数据库配置 ✅
|
||||
- **菜单数据**: 9000、9100、9110 三个菜单已正确创建
|
||||
- **层级关系**: 父子关系配置正确
|
||||
- **权限分配**: 超级管理员拥有所有菜单权限
|
||||
|
||||
### 2. 代码配置 ✅
|
||||
- **后端API**: `/system/menu/list` 接口实现正确
|
||||
- **前端页面**: 菜单管理页面逻辑正确
|
||||
- **路由配置**: Vue路由配置完整
|
||||
|
||||
## 🔍 技术分析结果
|
||||
|
||||
### 核心发现:双重查询逻辑
|
||||
**关键代码**: `SysMenuServiceImpl.selectMenuList()`
|
||||
|
||||
```java
|
||||
if (LoginHelper.isSuperAdmin(userId)) {
|
||||
// 超级管理员:直接查询 sys_menu 表
|
||||
menuList = baseMapper.selectVoList(queryWrapper);
|
||||
} else {
|
||||
// 普通用户:联表查询权限
|
||||
menuList = baseMapper.selectMenuListByUserId(wrapper);
|
||||
}
|
||||
```
|
||||
|
||||
### 关键查询条件
|
||||
```java
|
||||
LambdaQueryWrapper<SysMenu> queryWrapper = new LambdaQueryWrapper<SysMenu>()
|
||||
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
|
||||
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
||||
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
||||
// ... 其他条件
|
||||
```
|
||||
|
||||
## 🚨 问题根源分析
|
||||
|
||||
### 最可能的原因(按概率排序)
|
||||
|
||||
#### 1. 菜单状态字段异常 (40%) ⭐⭐⭐
|
||||
**可能情况**:
|
||||
```sql
|
||||
-- 9110菜单的状态可能不正常
|
||||
SELECT menu_id, menu_name, status, visible, del_flag
|
||||
FROM sys_menu WHERE menu_id = 9110;
|
||||
|
||||
-- 如果结果显示:
|
||||
-- status = '1' (停用) 或 visible = '1' (隐藏) 或 del_flag = '2' (删除)
|
||||
-- 就会导致菜单被过滤掉
|
||||
```
|
||||
|
||||
#### 2. 用户身份判断问题 (30%) ⭐⭐
|
||||
**可能情况**:
|
||||
- 当前用户没有被正确识别为超级管理员
|
||||
- 用户角色配置有问题
|
||||
- LoginHelper.isSuperAdmin() 方法判断逻辑异常
|
||||
|
||||
#### 3. 前端查询条件过滤 (20%) ⭐
|
||||
**可能情况**:
|
||||
- 前端菜单管理页面传递了过滤条件
|
||||
- 搜索框或状态筛选影响了查询结果
|
||||
|
||||
#### 4. 缓存或数据同步问题 (10%)
|
||||
**可能情况**:
|
||||
- 数据库更新后缓存未清除
|
||||
- 前后端数据不同步
|
||||
|
||||
## 🔧 立即排查步骤
|
||||
|
||||
### 步骤1:检查菜单状态(最高优先级) 🥇
|
||||
```sql
|
||||
-- 执行这个SQL查询,检查9110菜单状态
|
||||
SELECT menu_id, menu_name, status, visible, del_flag, create_time, update_time
|
||||
FROM sys_menu
|
||||
WHERE menu_id = 9110;
|
||||
|
||||
-- 预期结果应该是:
|
||||
-- status = '0', visible = '0', del_flag = '0'
|
||||
```
|
||||
|
||||
### 步骤2:浏览器API调试 🥈
|
||||
1. **打开菜单管理页面**
|
||||
2. **按F12打开开发者工具**
|
||||
3. **查看Network标签**
|
||||
4. **刷新页面,观察 `/system/menu/list` 请求**
|
||||
5. **检查返回的数据是否包含menu_id=9110**
|
||||
|
||||
### 步骤3:检查用户身份 🥉
|
||||
在后端代码中临时添加日志:
|
||||
```java
|
||||
// SysMenuServiceImpl.selectMenuList 方法开头添加
|
||||
log.info("=== 菜单查询调试 ===");
|
||||
log.info("用户ID: {}", userId);
|
||||
log.info("是否超级管理员: {}", LoginHelper.isSuperAdmin(userId));
|
||||
log.info("查询条件: {}", menu);
|
||||
```
|
||||
|
||||
## 🛠️ 快速解决方案
|
||||
|
||||
### 方案A:修复菜单状态(如果是状态问题)
|
||||
```sql
|
||||
-- 确保9110菜单状态正常
|
||||
UPDATE sys_menu
|
||||
SET status = '0', visible = '0', del_flag = '0'
|
||||
WHERE menu_id = 9110;
|
||||
```
|
||||
|
||||
### 方案B:重置权限(如果是权限问题)
|
||||
```sql
|
||||
-- 重新分配超级管理员权限
|
||||
DELETE FROM sys_role_menu WHERE role_id = 1 AND menu_id = 9110;
|
||||
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 9110);
|
||||
```
|
||||
|
||||
### 方案C:清理缓存(如果是缓存问题)
|
||||
1. 重启后端服务
|
||||
2. 清除浏览器缓存
|
||||
3. 重新登录系统
|
||||
|
||||
## 📋 验证方法
|
||||
|
||||
### 数据库验证
|
||||
```sql
|
||||
-- 1. 检查菜单完整性
|
||||
SELECT menu_id, menu_name, parent_id, status, visible
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110)
|
||||
ORDER BY menu_id;
|
||||
|
||||
-- 2. 检查权限分配
|
||||
SELECT rm.role_id, rm.menu_id, m.menu_name, r.role_name
|
||||
FROM sys_role_menu rm
|
||||
LEFT JOIN sys_menu m ON rm.menu_id = m.menu_id
|
||||
LEFT JOIN sys_role r ON rm.role_id = r.role_id
|
||||
WHERE rm.menu_id IN (9000, 9100, 9110) AND rm.role_id = 1;
|
||||
```
|
||||
|
||||
### 前端验证
|
||||
1. **菜单管理页面**: 检查是否显示完整菜单树
|
||||
2. **侧边栏菜单**: 检查是否正常显示(作为对比)
|
||||
3. **权限管理**: 检查角色权限分配页面
|
||||
|
||||
## 🎯 最终建议
|
||||
|
||||
### 立即执行(5分钟内)
|
||||
1. **执行SQL检查**: 查询9110菜单的status、visible、del_flag字段
|
||||
2. **浏览器调试**: 查看 `/system/menu/list` API的实际返回数据
|
||||
|
||||
### 如果上述检查正常
|
||||
1. **添加后端日志**: 在菜单查询方法中添加调试日志
|
||||
2. **检查用户权限**: 确认当前用户的超级管理员身份
|
||||
3. **清除缓存重试**: 重启服务并清除缓存
|
||||
|
||||
### 预期解决时间
|
||||
- **状态问题**: 5分钟内解决
|
||||
- **权限问题**: 10分钟内解决
|
||||
- **代码问题**: 30分钟内解决
|
||||
|
||||
## 📞 联系支持
|
||||
|
||||
如果按照上述步骤仍未解决问题,请提供:
|
||||
|
||||
1. **SQL查询结果**: 9110菜单的完整状态信息
|
||||
2. **API返回数据**: `/system/menu/list` 的实际响应
|
||||
3. **用户信息**: 当前登录用户的角色和权限信息
|
||||
4. **浏览器截图**: 菜单管理页面的显示情况
|
||||
|
||||
---
|
||||
|
||||
**分析完成时间**: 2025-01-07
|
||||
**问题类型**: 菜单显示异常
|
||||
**可能性**: 数据状态问题 > 权限问题 > 代码逻辑问题
|
||||
**紧急程度**: 中等(功能可用,显示不完整)
|
||||
@@ -0,0 +1,149 @@
|
||||
# 学生考核管理菜单显示问题分析报告
|
||||
|
||||
## 🔍 问题现象
|
||||
|
||||
**用户反馈**: 前端菜单管理中只显示一个"违纪处分管理"菜单,缺少"处分记录管理"菜单
|
||||
|
||||
## 📊 问题分析过程
|
||||
|
||||
### 1. 数据库配置验证 ✅
|
||||
|
||||
经过详细验证,数据库配置完全正确:
|
||||
|
||||
#### 菜单配置状态
|
||||
```sql
|
||||
-- 三个核心菜单都已创建
|
||||
9000 | 学生考核管理 | 0 | assessment | NULL | M
|
||||
9100 | 违纪处分管理 | 9000 | xskh | xskh/index | C
|
||||
9110 | 处分记录管理 | 9000 | disciplineRecord | xskh/disciplineRecord/index | C
|
||||
```
|
||||
|
||||
#### 权限配置状态
|
||||
```sql
|
||||
-- 超级管理员权限已正确配置
|
||||
role_id=1 (超级管理员) 拥有以下菜单权限:
|
||||
- 9000 学生考核管理
|
||||
- 9100 违纪处分管理
|
||||
- 9110 处分记录管理
|
||||
- 9101-9118 所有子权限
|
||||
```
|
||||
|
||||
#### 层级结构验证
|
||||
```
|
||||
📚 学生考核管理 (9000) - 父菜单
|
||||
├── 📊 违纪处分管理 (9100) - 子菜单1 ✅
|
||||
└── 📊 处分记录管理 (9110) - 子菜单2 ✅
|
||||
```
|
||||
|
||||
### 2. 前端配置验证 ✅
|
||||
|
||||
#### 路由配置状态
|
||||
- ✅ 路由文件存在:`/web/src/router/modules/xskh.ts`
|
||||
- ✅ 两个子路由都已配置:
|
||||
- `/assessment/xskh` → 违纪处分管理
|
||||
- `/assessment/disciplineRecord` → 处分记录管理
|
||||
- ✅ 前端页面文件存在:
|
||||
- `/web/src/views/xskh/index.vue`
|
||||
- `/web/src/views/xskh/disciplineRecord/index.vue`
|
||||
|
||||
### 3. 菜单管理页面显示机制分析 🔍
|
||||
|
||||
#### 菜单管理的数据来源
|
||||
菜单管理页面显示的菜单来源于:
|
||||
1. **后端API**: `/system/menu/list` - 获取菜单列表
|
||||
2. **权限过滤**: 基于当前用户角色权限过滤
|
||||
3. **前端渲染**: 树形结构展示菜单
|
||||
|
||||
#### 核心问题发现 🎯
|
||||
|
||||
**菜单管理页面** 和 **侧边栏菜单** 是两套不同的机制:
|
||||
|
||||
1. **侧边栏菜单** (正常工作)
|
||||
- 数据来源: `/system/menu/getRouters` API
|
||||
- 权限控制: 基于用户角色菜单权限
|
||||
- 显示方式: 动态路由 + 侧边栏渲染
|
||||
|
||||
2. **菜单管理页面** (存在问题)
|
||||
- 数据来源: `/system/menu/list` API
|
||||
- 权限控制: 基于菜单的visible和status字段
|
||||
- 显示方式: Element Plus Tree组件
|
||||
|
||||
## 🚨 根本原因
|
||||
|
||||
### 问题1: 静态路由与动态菜单的冲突
|
||||
|
||||
**发现**: 学生考核管理的路由配置在 `/web/src/router/modules/xskh.ts` 中,但这是**静态路由配置**
|
||||
|
||||
**冲突点**:
|
||||
- 数据库中配置的菜单路径和组件路径
|
||||
- 前端静态路由中配置的路径和组件路径
|
||||
- 菜单管理页面试图显示数据库中的菜单配置
|
||||
- 但前端路由系统使用的是静态路由配置
|
||||
|
||||
### 问题2: 菜单管理页面的权限判断逻辑
|
||||
|
||||
**可能原因**:
|
||||
1. 菜单管理页面的权限判断可能有特殊逻辑
|
||||
2. 可能存在前端过滤逻辑,导致某些菜单不显示
|
||||
3. 可能存在缓存问题,导致新菜单未显示
|
||||
|
||||
### 问题3: component字段的影响
|
||||
|
||||
**数据库配置**:
|
||||
```sql
|
||||
9100 | 违纪处分管理 | xskh/index -- 显示正常
|
||||
9110 | 处分记录管理 | xskh/disciplineRecord/index -- 显示异常
|
||||
```
|
||||
|
||||
**分析**: `component` 字段可能影响菜单管理页面的显示逻辑
|
||||
|
||||
## 🎯 需要进一步验证的点
|
||||
|
||||
### 1. 检查菜单管理页面的前端代码
|
||||
- 查看菜单列表的获取逻辑
|
||||
- 查看菜单过滤和显示逻辑
|
||||
- 确认是否有特殊的权限判断
|
||||
|
||||
### 2. 检查后端菜单API
|
||||
- 验证 `/system/menu/list` API的返回结果
|
||||
- 确认超级管理员是否能获取到所有菜单
|
||||
- 检查菜单查询的权限控制逻辑
|
||||
|
||||
### 3. 检查浏览器调试信息
|
||||
- 查看菜单管理页面的网络请求
|
||||
- 确认API返回的菜单数据是否包含9110
|
||||
- 查看前端控制台是否有错误信息
|
||||
|
||||
## 📋 后续排查建议
|
||||
|
||||
### 立即行动项
|
||||
1. **检查菜单管理页面前端代码** - 查看具体的过滤和显示逻辑
|
||||
2. **API数据验证** - 直接调用API确认数据返回情况
|
||||
3. **浏览器调试** - 查看实际的网络请求和数据流
|
||||
|
||||
### 可能的解决方案
|
||||
1. **修复前端过滤逻辑** - 如果是前端过滤问题
|
||||
2. **修复后端查询逻辑** - 如果是后端权限问题
|
||||
3. **调整菜单配置** - 如果是配置格式问题
|
||||
4. **清除缓存重试** - 如果确实是缓存问题
|
||||
|
||||
## ⚠️ 重要发现
|
||||
|
||||
**核心矛盾**:
|
||||
- ✅ 数据库配置正确
|
||||
- ✅ 权限配置正确
|
||||
- ✅ 前端路由配置正确
|
||||
- ❌ 菜单管理页面显示异常
|
||||
|
||||
这表明问题可能出现在:
|
||||
1. **菜单管理页面的显示逻辑**
|
||||
2. **菜单列表API的查询逻辑**
|
||||
3. **特定的权限过滤机制**
|
||||
|
||||
---
|
||||
|
||||
**分析时间**: 2025-01-07
|
||||
**问题类型**: 前端菜单管理页面显示异常
|
||||
**数据库状态**: ✅ 正确
|
||||
**权限配置**: ✅ 正确
|
||||
**下一步**: 🔍 深入前端和API逻辑分析
|
||||
@@ -0,0 +1,133 @@
|
||||
-- =============================================
|
||||
-- 验证学生考核管理菜单配置
|
||||
-- 创建时间: 2025-01-07
|
||||
-- 说明: 验证菜单和权限配置是否正确
|
||||
-- =============================================
|
||||
|
||||
-- 1. 验证菜单基本信息
|
||||
SELECT '=== 菜单基本信息验证 ===' AS info;
|
||||
SELECT
|
||||
menu_id,
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110)
|
||||
ORDER BY parent_id, order_num;
|
||||
|
||||
-- 2. 验证菜单层级结构
|
||||
SELECT '=== 菜单层级结构验证 ===' AS info;
|
||||
SELECT
|
||||
CASE
|
||||
WHEN parent_id = 0 THEN CONCAT('📚 ', menu_name, ' (父菜单)')
|
||||
WHEN parent_id = 9000 THEN CONCAT(' ├── 📊 ', menu_name, ' (子菜单)')
|
||||
ELSE CONCAT(' └── ', menu_name)
|
||||
END AS menu_structure,
|
||||
menu_id,
|
||||
parent_id,
|
||||
menu_type,
|
||||
status
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110) OR parent_id IN (9000, 9100, 9110)
|
||||
ORDER BY parent_id, order_num;
|
||||
|
||||
-- 3. 验证角色权限配置
|
||||
SELECT '=== 角色权限配置验证 ===' AS info;
|
||||
SELECT
|
||||
rm.role_id,
|
||||
r.role_name,
|
||||
rm.menu_id,
|
||||
m.menu_name,
|
||||
m.menu_type
|
||||
FROM sys_role_menu rm
|
||||
LEFT JOIN sys_role r ON rm.role_id = r.role_id
|
||||
LEFT JOIN sys_menu m ON rm.menu_id = m.menu_id
|
||||
WHERE rm.menu_id IN (9000, 9100, 9110)
|
||||
ORDER BY rm.role_id, rm.menu_id;
|
||||
|
||||
-- 4. 验证完整的权限链(用于超级管理员)
|
||||
SELECT '=== 超级管理员权限链验证 ===' AS info;
|
||||
SELECT
|
||||
m.menu_id,
|
||||
m.menu_name,
|
||||
m.parent_id,
|
||||
m.menu_type,
|
||||
m.status,
|
||||
m.visible,
|
||||
CASE
|
||||
WHEN rm.menu_id IS NOT NULL THEN '✅ 已配置'
|
||||
ELSE '❌ 未配置'
|
||||
END AS permission_status
|
||||
FROM sys_menu m
|
||||
LEFT JOIN sys_role_menu rm ON m.menu_id = rm.menu_id AND rm.role_id = 1
|
||||
WHERE m.menu_id IN (9000, 9100, 9110)
|
||||
ORDER BY m.parent_id, m.order_num;
|
||||
|
||||
-- 5. 验证用户可访问的菜单(模拟超级管理员查询)
|
||||
SELECT '=== 用户菜单访问验证 ===' AS info;
|
||||
SELECT DISTINCT
|
||||
m.menu_id,
|
||||
m.parent_id,
|
||||
m.menu_name,
|
||||
m.path,
|
||||
m.component,
|
||||
m.menu_type,
|
||||
m.visible,
|
||||
m.status,
|
||||
m.order_num
|
||||
FROM sys_menu m
|
||||
LEFT JOIN sys_role_menu rm ON m.menu_id = rm.menu_id AND m.status = '0'
|
||||
LEFT JOIN sys_role r ON rm.role_id = r.role_id AND r.status = '0'
|
||||
WHERE m.menu_type IN ('M', 'C')
|
||||
AND m.menu_id IN (9000, 9100, 9110)
|
||||
AND r.role_id IN (SELECT role_id FROM sys_user_role WHERE user_id = 1)
|
||||
ORDER BY m.parent_id, m.order_num;
|
||||
|
||||
-- 6. 检查可能的冲突菜单
|
||||
SELECT '=== 冲突菜单检查 ===' AS info;
|
||||
SELECT
|
||||
menu_id,
|
||||
menu_name,
|
||||
path,
|
||||
component,
|
||||
'path重复' AS conflict_type
|
||||
FROM sys_menu
|
||||
WHERE path IN ('assessment', 'xskh', 'disciplineRecord')
|
||||
AND menu_id NOT IN (9000, 9100, 9110)
|
||||
UNION ALL
|
||||
SELECT
|
||||
menu_id,
|
||||
menu_name,
|
||||
path,
|
||||
component,
|
||||
'component重复' AS conflict_type
|
||||
FROM sys_menu
|
||||
WHERE component IN ('xskh/index', 'xskh/disciplineRecord/index')
|
||||
AND menu_id NOT IN (9000, 9100, 9110);
|
||||
|
||||
-- 7. 建议的解决方案验证
|
||||
SELECT '=== 解决方案建议 ===' AS info;
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) = 3 THEN '✅ 三个核心菜单都已创建'
|
||||
ELSE CONCAT('❌ 缺少菜单,当前只有 ', COUNT(*), ' 个')
|
||||
END AS menu_count_check,
|
||||
COUNT(*) as actual_count
|
||||
FROM sys_menu
|
||||
WHERE menu_id IN (9000, 9100, 9110) AND status = '0';
|
||||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) >= 3 THEN '✅ 超级管理员权限已配置'
|
||||
ELSE CONCAT('❌ 权限配置不完整,当前只有 ', COUNT(*), ' 个')
|
||||
END AS permission_check,
|
||||
COUNT(*) as actual_permissions
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1 AND menu_id IN (9000, 9100, 9110);
|
||||
Reference in new issue
Block a user