add-student-leave-approval-status-dict.sql 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- 学生请假审批状态字典配置脚本
  2. -- 日期: 2025-01-27
  3. -- 说明: 创建学生请假审批状态字典类型和数据
  4. -- 1. 创建字典类型
  5. INSERT IGNORE INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_by, create_time, remark)
  6. VALUES (2000000000000000001, '000000', '学生请假审批状态', 'student_leave_approval_status', 1, now(), '学生请假申请审批状态字典');
  7. -- 2. 创建字典数据
  8. -- 已撤销
  9. 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)
  10. VALUES (2000000000000001001, '000000', 1, '已撤销', 'cancel', 'student_leave_approval_status', '', 'info', 'N', 1, now(), '已撤销');
  11. -- 草稿
  12. 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)
  13. VALUES (2000000000000001002, '000000', 2, '草稿', 'draft', 'student_leave_approval_status', '', 'info', 'N', 1, now(), '草稿状态');
  14. -- 待审核
  15. 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)
  16. VALUES (2000000000000001003, '000000', 3, '待审核', 'waiting', 'student_leave_approval_status', '', 'warning', 'N', 1, now(), '待审核状态');
  17. -- 已完成
  18. 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)
  19. VALUES (2000000000000001004, '000000', 4, '已完成', 'finish', 'student_leave_approval_status', '', 'success', 'N', 1, now(), '已完成状态');
  20. -- 已作废
  21. 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)
  22. VALUES (2000000000000001005, '000000', 5, '已作废', 'invalid', 'student_leave_approval_status', '', 'danger', 'N', 1, now(), '已作废状态');
  23. -- 已退回
  24. 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)
  25. VALUES (2000000000000001006, '000000', 6, '已退回', 'back', 'student_leave_approval_status', '', 'warning', 'N', 1, now(), '已退回状态');
  26. -- 已终止
  27. 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)
  28. VALUES (2000000000000001007, '000000', 7, '已终止', 'termination', 'student_leave_approval_status', '', 'danger', 'N', 1, now(), '已终止状态');
  29. -- 3. 验证创建结果
  30. SELECT
  31. '字典类型' as check_item,
  32. dict_name,
  33. dict_type,
  34. create_time
  35. FROM sys_dict_type
  36. WHERE dict_type = 'student_leave_approval_status';
  37. SELECT
  38. '字典数据' as check_item,
  39. dict_sort,
  40. dict_label,
  41. dict_value,
  42. list_class
  43. FROM sys_dict_data
  44. WHERE dict_type = 'student_leave_approval_status'
  45. ORDER BY dict_sort;