勤工俭学完整字典数据.sql 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. -- =====================================================
  2. -- 勤工俭学管理系统完整字典数据脚本
  3. -- 项目: 校园管理系统 - 勤工俭学模块
  4. -- 版本: v1.0
  5. -- 创建时间: 2025-01-03
  6. -- 说明: 基于实际字典表结构的完整字典数据
  7. -- =====================================================
  8. -- 设置字符集
  9. SET NAMES utf8mb4;
  10. -- =====================================================
  11. -- 1. 岗位状态字典数据
  12. -- =====================================================
  13. -- 1.1 草稿
  14. INSERT INTO `sys_dict_data`
  15. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  16. VALUES
  17. (1736001001, '000000', 1, '草稿', 'DRAFT', 'work_study_position_status', '', 'info', 'N', 103, 1, NOW(), '岗位创建但未发布');
  18. -- 1.2 已发布
  19. INSERT INTO `sys_dict_data`
  20. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  21. VALUES
  22. (1736001002, '000000', 2, '已发布', 'PUBLISHED', 'work_study_position_status', '', 'primary', 'N', 103, 1, NOW(), '岗位已发布但未开始招录');
  23. -- 1.3 招录中
  24. INSERT INTO `sys_dict_data`
  25. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  26. VALUES
  27. (1736001003, '000000', 3, '招录中', 'RECRUITING', 'work_study_position_status', '', 'success', 'Y', 103, 1, NOW(), '岗位正在招录学生');
  28. -- 1.4 已满员
  29. INSERT INTO `sys_dict_data`
  30. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  31. VALUES
  32. (1736001004, '000000', 4, '已满员', 'FULL', 'work_study_position_status', '', 'warning', 'N', 103, 1, NOW(), '岗位申请人数已满');
  33. -- 1.5 已过期
  34. INSERT INTO `sys_dict_data`
  35. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  36. VALUES
  37. (1736001005, '000000', 5, '已过期', 'EXPIRED', 'work_study_position_status', '', 'danger', 'N', 103, 1, NOW(), '岗位已过有效期');
  38. -- 1.6 已暂停
  39. INSERT INTO `sys_dict_data`
  40. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  41. VALUES
  42. (1736001006, '000000', 6, '已暂停', 'SUSPENDED', 'work_study_position_status', '', 'info', 'N', 103, 1, NOW(), '岗位暂时停止招录');
  43. -- 1.7 已取消
  44. INSERT INTO `sys_dict_data`
  45. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  46. VALUES
  47. (1736001007, '000000', 7, '已取消', 'CANCELLED', 'work_study_position_status', '', 'danger', 'N', 103, 1, NOW(), '岗位被取消');
  48. -- =====================================================
  49. -- 2. 申请状态字典数据
  50. -- =====================================================
  51. -- 2.1 草稿
  52. INSERT INTO `sys_dict_data`
  53. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  54. VALUES
  55. (1736002001, '000000', 1, '草稿', 'DRAFT', 'work_study_application_status', '', 'info', 'N', 103, 1, NOW(), '申请暂存未提交');
  56. -- 2.2 已提交
  57. INSERT INTO `sys_dict_data`
  58. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  59. VALUES
  60. (1736002002, '000000', 2, '已提交', 'SUBMITTED', 'work_study_application_status', '', 'primary', 'Y', 103, 1, NOW(), '申请已提交,等待学院审核');
  61. -- 2.3 学院审核中
  62. INSERT INTO `sys_dict_data`
  63. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  64. VALUES
  65. (1736002003, '000000', 3, '学院审核中', 'COLLEGE_REVIEWING', 'work_study_application_status', '', 'primary', 'N', 103, 1, NOW(), '二级学院正在审核');
  66. -- 2.4 学院审核通过
  67. INSERT INTO `sys_dict_data`
  68. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  69. VALUES
  70. (1736002004, '000000', 4, '学院审核通过', 'COLLEGE_PASSED', 'work_study_application_status', '', 'success', 'N', 103, 1, NOW(), '学院审核通过,待学生处审核');
  71. -- 2.5 学院审核不通过
  72. INSERT INTO `sys_dict_data`
  73. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  74. VALUES
  75. (1736002005, '000000', 5, '学院审核不通过', 'COLLEGE_REJECTED', 'work_study_application_status', '', 'danger', 'N', 103, 1, NOW(), '学院审核未通过');
  76. -- 2.6 学生处审核中
  77. INSERT INTO `sys_dict_data`
  78. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  79. VALUES
  80. (1736002006, '000000', 6, '学生处审核中', 'FINAL_REVIEWING', 'work_study_application_status', '', 'warning', 'N', 103, 1, NOW(), '学生处正在终审');
  81. -- 2.7 审核通过
  82. INSERT INTO `sys_dict_data`
  83. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  84. VALUES
  85. (1736002007, '000000', 7, '审核通过', 'APPROVED', 'work_study_application_status', '', 'success', 'N', 103, 1, NOW(), '最终审核通过');
  86. -- 2.8 审核不通过
  87. INSERT INTO `sys_dict_data`
  88. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  89. VALUES
  90. (1736002008, '000000', 8, '审核不通过', 'REJECTED', 'work_study_application_status', '', 'danger', 'N', 103, 1, NOW(), '最终审核未通过');
  91. -- 2.9 已撤回
  92. INSERT INTO `sys_dict_data`
  93. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  94. VALUES
  95. (1736002009, '000000', 9, '已撤回', 'WITHDRAWN', 'work_study_application_status', '', 'info', 'N', 103, 1, NOW(), '学生主动撤回申请');
  96. -- =====================================================
  97. -- 3. 审核状态字典数据
  98. -- =====================================================
  99. -- 3.1 待审核
  100. INSERT INTO `sys_dict_data`
  101. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  102. VALUES
  103. (1736003001, '000000', 1, '待审核', 'PENDING', 'work_study_review_status', '', 'warning', 'Y', 103, 1, NOW(), '等待审核');
  104. -- 3.2 审核通过
  105. INSERT INTO `sys_dict_data`
  106. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  107. VALUES
  108. (1736003002, '000000', 2, '审核通过', 'PASSED', 'work_study_review_status', '', 'success', 'N', 103, 1, NOW(), '审核通过');
  109. -- 3.3 审核不通过
  110. INSERT INTO `sys_dict_data`
  111. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  112. VALUES
  113. (1736003003, '000000', 3, '审核不通过', 'REJECTED', 'work_study_review_status', '', 'danger', 'N', 103, 1, NOW(), '审核不通过');
  114. -- =====================================================
  115. -- 4. 岗位发布范围字典数据
  116. -- =====================================================
  117. -- 4.1 本学院
  118. INSERT INTO `sys_dict_data`
  119. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  120. VALUES
  121. (1736004001, '000000', 1, '本学院', 'COLLEGE', 'work_study_position_scope', '', 'primary', 'Y', 103, 1, NOW(), '仅本学院学生可见和申请');
  122. -- 4.2 全校
  123. INSERT INTO `sys_dict_data`
  124. (`dict_code`, `tenant_id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `create_dept`, `create_by`, `create_time`, `remark`)
  125. VALUES
  126. (1736004002, '000000', 2, '全校', 'UNIVERSITY', 'work_study_position_scope', '', 'success', 'N', 103, 1, NOW(), '所有学生可见和申请');
  127. -- =====================================================
  128. -- 5. 查询验证字典数据
  129. -- =====================================================
  130. -- 5.1 查询岗位状态字典
  131. SELECT
  132. dict_label as '标签',
  133. dict_value as '值',
  134. dict_type as '字典类型',
  135. list_class as '样式',
  136. remark as '说明'
  137. FROM sys_dict_data
  138. WHERE dict_type = 'work_study_position_status'
  139. ORDER BY dict_sort;
  140. -- 5.2 查询申请状态字典
  141. SELECT
  142. dict_label as '标签',
  143. dict_value as '值',
  144. dict_type as '字典类型',
  145. list_class as '样式',
  146. remark as '说明'
  147. FROM sys_dict_data
  148. WHERE dict_type = 'work_study_application_status'
  149. ORDER BY dict_sort;
  150. -- 5.3 查询审核状态字典
  151. SELECT
  152. dict_label as '标签',
  153. dict_value as '值',
  154. dict_type as '字典类型',
  155. list_class as '样式',
  156. remark as '说明'
  157. FROM sys_dict_data
  158. WHERE dict_type = 'work_study_review_status'
  159. ORDER BY dict_sort;
  160. -- 5.4 查询发布范围字典
  161. SELECT
  162. dict_label as '标签',
  163. dict_value as '值',
  164. dict_type as '字典类型',
  165. list_class as '样式',
  166. remark as '说明'
  167. FROM sys_dict_data
  168. WHERE dict_type = 'work_study_position_scope'
  169. ORDER BY dict_sort;
  170. -- =====================================================
  171. -- 6. 脚本执行完成提示
  172. -- =====================================================
  173. SELECT 'JCBT勤工俭学模块完整字典数据插入完成!' AS '执行结果';
  174. SELECT
  175. (SELECT COUNT(*) FROM sys_dict_data WHERE dict_type LIKE 'work_study%') AS '字典数据总数',
  176. (SELECT COUNT(*) FROM sys_dict_data WHERE dict_type = 'work_study_position_status') AS '岗位状态数量',
  177. (SELECT COUNT(*) FROM sys_dict_data WHERE dict_type = 'work_study_application_status') AS '申请状态数量',
  178. (SELECT COUNT(*) FROM sys_dict_data WHERE dict_type = 'work_study_review_status') AS '审核状态数量',
  179. (SELECT COUNT(*) FROM sys_dict_data WHERE dict_type = 'work_study_position_scope') AS '发布范围数量';