| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- -- 学生请假审批状态字典配置脚本
- -- 日期: 2025-01-27
- -- 说明: 创建学生请假审批状态字典类型和数据
- -- 1. 创建字典类型
- INSERT IGNORE INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_by, create_time, remark)
- VALUES (2000000000000000001, '000000', '学生请假审批状态', 'student_leave_approval_status', 1, now(), '学生请假申请审批状态字典');
- -- 2. 创建字典数据
- -- 已撤销
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001001, '000000', 1, '已撤销', 'cancel', 'student_leave_approval_status', '', 'info', 'N', 1, now(), '已撤销');
- -- 草稿
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001002, '000000', 2, '草稿', 'draft', 'student_leave_approval_status', '', 'info', 'N', 1, now(), '草稿状态');
- -- 待审核
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001003, '000000', 3, '待审核', 'waiting', 'student_leave_approval_status', '', 'warning', 'N', 1, now(), '待审核状态');
- -- 已完成
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001004, '000000', 4, '已完成', 'finish', 'student_leave_approval_status', '', 'success', 'N', 1, now(), '已完成状态');
- -- 已作废
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001005, '000000', 5, '已作废', 'invalid', 'student_leave_approval_status', '', 'danger', 'N', 1, now(), '已作废状态');
- -- 已退回
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001006, '000000', 6, '已退回', 'back', 'student_leave_approval_status', '', 'warning', 'N', 1, now(), '已退回状态');
- -- 已终止
- INSERT IGNORE 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, remark)
- VALUES (2000000000000001007, '000000', 7, '已终止', 'termination', 'student_leave_approval_status', '', 'danger', 'N', 1, now(), '已终止状态');
- -- 3. 验证创建结果
- SELECT
- '字典类型' as check_item,
- dict_name,
- dict_type,
- create_time
- FROM sys_dict_type
- WHERE dict_type = 'student_leave_approval_status';
- SELECT
- '字典数据' as check_item,
- dict_sort,
- dict_label,
- dict_value,
- list_class
- FROM sys_dict_data
- WHERE dict_type = 'student_leave_approval_status'
- ORDER BY dict_sort;
|