sqlManage.sql 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. /*
  2. 数据库更新的sql语句跟随git进行提交。
  3. 每次git更新之后,请务必仔细留意并阅读数据库更新脚本文档sqlManageUpdate.md
  4. */
  5. /*
  6. ---------------------------------------------------------------------
  7. -- @author andy.wu
  8. -- @description 公共备注表(ahrs_public_notes)新增文件路径字段(attachment)
  9. -- @time 2023.2.20 16:07
  10. -- @IndexNumber serial_1 对应sql文档的序号
  11. ---------------------------------------------------------------------
  12. alter table ahrs_public_notes
  13. add attachment varchar(255) comment '附件路径';
  14. */
  15. /*
  16. ---------------------------------------------------------------------
  17. -- @author linian
  18. -- @description 修改招聘的学历、学位字典排序
  19. -- @time 2023.2.22 10:02
  20. -- @IndexNumber serial_2
  21. ---------------------------------------------------------------------
  22. UPDATE sys_dict_data SET dict_sort = '1' WHERE dict_type = 'recruit_education' AND dict_value = '5';
  23. UPDATE sys_dict_data SET dict_sort = '2' WHERE dict_type = 'recruit_education' AND dict_value = '4';
  24. UPDATE sys_dict_data SET dict_sort = '3' WHERE dict_type = 'recruit_education' AND dict_value = '3';
  25. UPDATE sys_dict_data SET dict_sort = '4' WHERE dict_type = 'recruit_education' AND dict_value = '2';
  26. UPDATE sys_dict_data SET dict_sort = '5' WHERE dict_type = 'recruit_education' AND dict_value = '1';
  27. UPDATE sys_dict_data SET dict_sort = '6' WHERE dict_type = 'recruit_education' AND dict_value = '6';
  28. UPDATE sys_dict_data SET dict_sort = '7' WHERE dict_type = 'recruit_education' AND dict_value = '7';
  29. UPDATE sys_dict_data SET dict_sort = '0' WHERE dict_type = 'recruit_degree' AND dict_value = '5';
  30. UPDATE sys_dict_data SET dict_sort = '1' WHERE dict_type = 'recruit_degree' AND dict_value = '4';
  31. UPDATE sys_dict_data SET dict_sort = '2' WHERE dict_type = 'recruit_degree' AND dict_value = '3';
  32. UPDATE sys_dict_data SET dict_sort = '3' WHERE dict_type = 'recruit_degree' AND dict_value = '2';
  33. UPDATE sys_dict_data SET dict_sort = '4' WHERE dict_type = 'recruit_degree' AND dict_value = '1';
  34. UPDATE sys_dict_data SET dict_sort = '5' WHERE dict_type = 'recruit_degree' AND dict_value = '0';
  35. */
  36. /*
  37. -----------------------------------------------------------------------
  38. -- @author andy.wu
  39. -- @description 调动信息表(ahrs_post_transfer),新增人事综合管理部门意见(rszhgl_dept_comment),新增调出单位意见(export_dept_comment)字段
  40. -- @time 2023.2.24 16:07
  41. -- @IndexNumber serial_3
  42. -----------------------------------------------------------------------
  43. */
  44. alter table ahrs_post_transfer
  45. add rszhgl_dept_comment varchar(255) comment '人事综合管理部门意见';
  46. alter table ahrs_post_transfer
  47. add export_dept_comment varchar(255) comment '调出单位意见';
  48. /*
  49. -----------------------------------------------------------------------
  50. -- @author andy.wu
  51. -- @description 创建消息通知表(sys_message_notice) 用于消息通知模块
  52. -- @time 2023.2.28 16:20
  53. -- @IndexNumber serial_4
  54. -----------------------------------------------------------------------
  55. */
  56. create table sys_message_notice
  57. (
  58. message_id bigint auto_increment comment '消息id'
  59. primary key,
  60. message_content varchar(255) null comment '消息内容',
  61. message_execution_time datetime null comment '执行时间',
  62. create_by varchar(255) default 'admin' null comment '创建人',
  63. status char(2) default '0' null comment '状态(0正常,1作废)'
  64. )
  65. comment '消息通知表';
  66. /*
  67. -----------------------------------------------------------------------
  68. -- @author andy.wu
  69. -- @description 新增定时任务 ,每半小时查询一次数据库更新redis的消息有序列表 (已作废)
  70. -- @time 2023.3.5 12:34
  71. -- @IndexNumber serial_5
  72. -----------------------------------------------------------------------
  73. */
  74. # INSERT INTO `sys_job`(`job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '定时查询消息更新数据库', 'DEFAULT', 'MessageForRedisTask.messageForRedisTask()', '0 0/30 * * * ?', '3', '1', '0', 'admin', '2023-03-01 15:51:56', '', '2023-03-01 15:55:36', '');
  75. /*
  76. -----------------------------------------------------------------------
  77. -- @author linian
  78. -- @description 将角色名称中代理改为辅助
  79. -- @time 2023.3.9 10:22
  80. -- @IndexNumber serial_6
  81. -----------------------------------------------------------------------
  82. */
  83. update sys_role set role_name = '人事综合管理部门终审领导辅助' where role_key = 'manageOperatorAgent';
  84. update sys_role set role_name = '人事综合管理部门初审领导辅助' where role_key = 'managePriLeaderAgent';
  85. update sys_role set role_name = '人事综合管理部门操作员辅助' where role_key = 'manageHigLeaderAgent';
  86. /*
  87. -----------------------------------------------------------------------
  88. -- @author linian
  89. -- @description 人员状态中主管部门取消,统一改为 事业单位到事业单位交流
  90. -- @time 2023.3.9 10:22
  91. -- @IndexNumber serial_7
  92. -----------------------------------------------------------------------
  93. */
  94. UPDATE sys_dict_data SET dict_label = '事业单位到事业单位交流' WHERE dict_type = 'per_status' AND dict_value = '2301';
  95. UPDATE sys_dict_data SET status = '1' WHERE dict_type = 'per_status' AND dict_value = '2304';
  96. /*
  97. -----------------------------------------------------------------------
  98. -- @author andy.wu
  99. -- @description 消息表新增执行结束时间 message_end_time,删除定时刷新redis的任务
  100. -- @time 2023.3.10 9:26
  101. -- @IndexNumber serial_8
  102. -----------------------------------------------------------------------
  103. */
  104. alter table sys_message_notice add message_end_time datetime comment '执行结束时间';
  105. delete from sys_job where job_name='定时查询消息更新数据库';
  106. /*
  107. -----------------------------------------------------------------------
  108. -- @author linian
  109. -- @description 创建短信记录表,用于记录保存每一次的短信内容
  110. -- @time 2023.3.16 10:22
  111. -- @IndexNumber serial_9
  112. -----------------------------------------------------------------------
  113. */
  114. create table sys_msg_record
  115. (
  116. id varchar(36) not null comment '短信记录id'
  117. primary key,
  118. tel varchar(16) null comment '发送号码',
  119. msg varchar(2048) null comment '短信内容',
  120. send_result varchar(128) null comment '发送返回结果',
  121. send_time datetime not null comment '发送时间',
  122. sender varchar(32) null comment '发送人',
  123. remark varchar(256) null comment '备注',
  124. version varchar(4) null comment '版本',
  125. create_by varchar(32) null comment '创建人',
  126. create_time datetime null comment '创建时间',
  127. update_by varchar(32) null comment '修改人',
  128. update_time datetime null comment '修改时间',
  129. del_flag varchar(2) null comment '删除标识 00 未删除 01 已删除'
  130. )
  131. comment '短信记录表';
  132. /*
  133. -----------------------------------------------------------------------
  134. -- @author linian
  135. -- @description 添加短信日志菜单及子菜单
  136. -- @time 2023.3.16 10:22
  137. -- @IndexNumber serial_10
  138. -----------------------------------------------------------------------
  139. */
  140. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2306, '短信日志', 2053, 6, '/system/msgLog', 'menuItem', 'C', '0', 'system:msgLog:view', '#', 'admin', '2022-11-17 15:25:40', '', null, '');
  141. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2307, '日志查询', 2306, 1, '#', 'menuItem', 'F', '', 'system:msgLog:list', '#', 'admin', '2022-11-17 15:26:08', 'admin', '2022-11-17 15:26:39', '');
  142. /*
  143. -----------------------------------------------------------------------
  144. -- @author wengchengjian
  145. -- @description 将人员表的人员状态是不同主管单位间调用的改成单位间调动
  146. -- @time 2023.3.17 9:13 serial_11
  147. -----------------------------------------------------------------------
  148. */
  149. UPDATE ahrs_personnel SET personnel_status = '2301' WHERE personnel_status = '2304'
  150. /*
  151. -----------------------------------------------------------------------
  152. -- @author linian
  153. -- @description 处分表添加处分截止时间
  154. -- @time 2023.3.17 10:06
  155. -- @IndexNumber serial_12
  156. -----------------------------------------------------------------------
  157. */
  158. alter table ahrs_personnel_disposition
  159. add approval_end_time datetime null comment '处分截止时间' after approval_time;
  160. alter table ahrs_disposition
  161. add approval_end_time datetime null comment '处分截止时间' after approval_time;
  162. /*
  163. -----------------------------------------------------------------------
  164. -- @author linian
  165. -- @description 修改添加处分字典值
  166. -- @time 2023.3.17 14:26
  167. -- @IndexNumber serial_13
  168. -----------------------------------------------------------------------
  169. */
  170. -- 先删除原有的字典值
  171. delete from sys_dict_data where dict_type = 'dis_kind';
  172. -- 再添加新的字典值
  173. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20199, 1, '党的纪律处分', '1', null, 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:30:03', '', '2023-03-17 10:44:23', null, '');
  174. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20206, 1, '党内警告', '101', '1', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:36:02', '', '2023-03-17 10:44:27', null, '');
  175. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20207, 2, '党内严重警告', '102', '1', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:36:19', '', '2023-03-17 10:44:30', null, '');
  176. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20208, 3, '撤销党内职务', '103', '1', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:36:37', '', '2023-03-17 10:44:33', null, '');
  177. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20209, 4, '留党察看', '104', '1', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:36:59', '', '2023-03-17 10:44:41', null, '');
  178. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20211, 5, '开除党籍', '105', '1', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:37:37', '', '2023-03-17 10:44:47', null, '');
  179. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20200, 2, '政务处分', '2', null, 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:31:43', '', '2023-03-17 10:44:50', null, '');
  180. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (1939, 1, '警告', '201', '2', 'dis_kind', '', '', 'N', '0', '', '2020-04-08 19:19:37', '', '2023-03-17 10:47:07', null, '');
  181. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20201, 2, '记过', '202', '2', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:33:12', '', '2023-03-17 10:47:12', null, '');
  182. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20204, 3, '记大过', '203', '2', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:35:21', '', '2023-03-17 10:47:27', null, '');
  183. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20202, 4, '降低岗位等级', '204', '2', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:33:44', '', '2023-03-17 10:47:52', null, '');
  184. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20205, 5, '撤职', '205', '2', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:35:34', '', '2023-03-17 10:52:10', null, '');
  185. INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_parent_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark, ancestors) VALUES (20203, 6, '开除', '206', '2', 'dis_kind', null, null, 'N', '0', '', '2023-03-15 15:34:54', '', '2023-03-17 10:52:17', null, '');
  186. -- 将处分表中的原有字典值变更
  187. update ahrs_disposition set disposition_kind = '201' where disposition_kind = '01';
  188. update ahrs_disposition set disposition_kind = '202' where disposition_kind = '02';
  189. update ahrs_disposition set disposition_kind = '204' where disposition_kind = '03';
  190. update ahrs_disposition set disposition_kind = '206' where disposition_kind = '0104';
  191. /*
  192. -----------------------------------------------------------------------
  193. -- @author linian
  194. -- @description 添加系统更新日志菜单及子菜单
  195. -- @time 2023.3.17 16:37
  196. -- @IndexNumber serial_14
  197. -----------------------------------------------------------------------
  198. */
  199. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2301, '系统更新日志', 2053, 5, '/ahrs/sysLog', 'menuItem', 'C', '0', 'ahrs:sysLog:view', '#', 'admin', '2022-11-07 16:58:16', '', null, '');
  200. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2302, '日志查询', 2301, 1, '#', 'menuItem', 'F', '', 'ahrs:sysLog:list', '#', 'admin', '2022-11-07 16:59:13', '', null, '');
  201. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2303, '日志新增', 2301, 2, '#', 'menuItem', 'F', '', 'ahrs:sysLog:add', '#', 'admin', '2022-11-07 16:59:53', '', null, '');
  202. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2304, '日志删除', 2301, 3, '#', 'menuItem', 'F', '', 'ahrs:sysLog:remove', '#', 'admin', '2022-11-07 17:00:46', '', null, '');
  203. INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2305, '日志修改', 2301, 4, '#', 'menuItem', 'F', '', 'ahrs:userRole:edit', '#', 'admin', '2022-11-07 17:01:08', '', null, '');
  204. /*
  205. -----------------------------------------------------------------------
  206. -- @author linian
  207. -- @description 创建系统更新日志表,用于保存系统更新日志的内容
  208. -- @time 2023.3.17 16:37
  209. -- @IndexNumber serial_15
  210. -----------------------------------------------------------------------
  211. */
  212. create table sys_log
  213. (
  214. log_id varchar(32) not null
  215. primary key,
  216. log_code varchar(32) not null comment '日志编码',
  217. log_title varchar(512) null comment '日志标题',
  218. log_content blob not null comment '日志内容',
  219. create_time datetime not null comment '创建时间',
  220. creater varchar(32) null comment '创建人',
  221. update_time datetime not null comment '更新时间',
  222. updater varchar(32) null comment '更新人员',
  223. delete_flag varchar(2) not null comment '删除标识 00未删除 01已删除'
  224. )
  225. comment '系统日志';
  226. /*
  227. -----------------------------------------------------------------------
  228. -- @author andy.wu
  229. -- @description 消息表新增删除标志 del_flag
  230. -- @time 2023.3.17 16:51
  231. -- @IndexNumber serial_16
  232. -----------------------------------------------------------------------
  233. */
  234. alter table sys_message_notice add del_flag char(2) comment '删除标志';
  235. /*
  236. -----------------------------------------------------------------------
  237. -- @author linian
  238. -- @description 招聘计划变动和招聘计划子表添加年龄条件字段,用于灵活判断招聘人员年龄是否超标
  239. -- @time 2023.3.23 09:28
  240. -- @IndexNumber serial_17
  241. -----------------------------------------------------------------------
  242. */
  243. alter table ahrs_recruit_plan_change
  244. add age_condition varchar(16) null comment '年龄条件' after age;
  245. alter table ahrs_recruit_plan_child
  246. add age_condition varchar(16) null comment '年龄条件' after age;
  247. /*
  248. -----------------------------------------------------------------------
  249. -- @author ding
  250. -- @description 新增人员备注表
  251. -- @time 2023.3.23 09:35
  252. -- @IndexNumber serial_18
  253. -----------------------------------------------------------------------
  254. */
  255. CREATE TABLE `ahrs_personnel_remark` (
  256. `id` int NOT NULL AUTO_INCREMENT COMMENT '备注id',
  257. `remark_dept_id` int NULL COMMENT '被备注单位id',
  258. `remark_dept_name` varchar(255) NULL COMMENT '被备注单位名称',
  259. `remark_idcard` varchar(255) NULL COMMENT '被备注的人',
  260. `remark_name` varchar(255) NULL COMMENT '被备注人名',
  261. `user_name` varchar(255) NULL COMMENT '备注人',
  262. `dept_name` varchar(255) NULL COMMENT '备注单位名称',
  263. `dept_id` int NULL COMMENT '备注单位id',
  264. `title` varchar(500) NULL COMMENT '备注内容',
  265. `attachment` varchar(255) NULL COMMENT '附件',
  266. `del_flag` varchar(255) NULL DEFAULT 0 COMMENT '是否删除',
  267. `create_by` varchar(255) NULL COMMENT '创建人',
  268. `create_time` datetime NULL COMMENT '创建时间',
  269. `update_by` varchar(255) NULL COMMENT '修改人',
  270. `update_time` datetime NULL COMMENT '修改时间',
  271. PRIMARY KEY (`id`)
  272. ) COMMENT = '人员备注表';
  273. /*
  274. -----------------------------------------------------------------------
  275. -- @author ding
  276. -- @description 人员备注菜单添加和权限配置
  277. -- @time 2023.3.23 09:35
  278. -- @IndexNumber serial_20
  279. -----------------------------------------------------------------------
  280. */
  281. INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2310, '人员备注控制', 2308, 2, '#', 'menuItem', 'F', '', 'ahrs:personnleRemark:viewTwo', '#', 'admin', '2023-03-24 10:46:31', 'admin', '2023-03-24 10:48:47', '');
  282. INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2309, '人员备注新增', 2308, 0, '#', 'menuItem', 'F', '', 'ahrs:personnleRemark:add', '#', 'admin', '2023-03-23 13:51:43', '', NULL, '');
  283. INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2308, '人员备注', 2077, 1, '#', 'menuItem', 'C', '', 'ahrs:personnleRemark:view', '#', 'admin', '2023-03-23 09:45:00', 'admin', '2023-03-23 10:18:45', '');
  284. /*操作员权限配置*/
  285. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (104, 2308);
  286. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (104, 2309);
  287. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (104, 2310);
  288. /*初审权限配置*/
  289. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (105, 2308);
  290. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (105, 2309);
  291. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (105, 2310);
  292. /*终审权限配置*/
  293. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (106, 2308);
  294. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (106, 2309);
  295. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (106, 2310);
  296. /*
  297. -----------------------------------------------------------------------
  298. -- @author wengchengjian
  299. -- @description 岗位变更表增加'确认函中修改后的备注'字段
  300. -- @time 2023.3.24 17:00
  301. -- @IndexNumber serial_19
  302. -----------------------------------------------------------------------
  303. */
  304. ALTER TABLE `ahrs_post_change`
  305. ADD COLUMN `confirmation_note` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '确认函中修改后的备注' AFTER `org_staff_grades`;
  306. /*
  307. -----------------------------------------------------------------------
  308. -- @author wengchengjian
  309. -- @description 人员备注 显示已删除记录按钮 和 删除按钮 菜单添加 和 权限控制(仅操作员有这俩个权限)
  310. -- @time 2023.3.24 17:00
  311. -- @IndexNumber serial_20
  312. -----------------------------------------------------------------------
  313. */
  314. INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2312, '显示全部记录(包括删除)', 2308, 4, '#', 'menuItem', 'F', '', 'ahrs:personnleRemark:all', '#', 'admin', '2023-03-29 10:29:04', '', NULL, '');
  315. INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2311, '人员备注删除', 2308, 3, '#', 'menuItem', 'F', '', 'ahrs:personnleRemark:remove', '#', 'admin', '2023-03-29 10:09:01', '', NULL, '');
  316. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (104, 2311);
  317. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (104, 2312);
  318. /*
  319. -----------------------------------------------------------------------
  320. -- @author andi.wu
  321. -- @description 用户表新增人员附件字段attachment
  322. -- @time 2023.03.30
  323. -- @IndexNumber serial_21
  324. -----------------------------------------------------------------------
  325. */
  326. alter table sys_user
  327. add attachment varchar(255) default '' comment '用户附件' after remark;
  328. /*
  329. -----------------------------------------------------------------------
  330. -- @author andi.wu
  331. -- @description 用户信息修改记录表新增附件字段
  332. -- @time 2023.03.30
  333. -- @IndexNumber serial_22
  334. -----------------------------------------------------------------------
  335. */
  336. alter table sys_user_change_log
  337. add attachment varchar(255) default '' comment '用户附件' after remark;