soc.sql 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. create table if not exists core_reminder_configuration
  2. (
  3. config_id bigint not null comment '配置ID'
  4. primary key,
  5. reminder_type int not null comment '提醒类型(0:逾期提醒、1:临期提醒)',
  6. send_module varchar(50) not null comment '发送模块(五大计划之一)',
  7. plan_id bigint default 1 not null comment '计划id',
  8. plan_name varchar(125) default '' not null comment '计划名称',
  9. compare_time_type int null comment '对比时间类型,0:计划开始时间,1:计划结束时间',
  10. time_unit varchar(25) null comment '时间单位',
  11. reminder_time int null comment '提醒时间',
  12. enabled tinyint(1) default 1 not null comment '是否启用该提醒配置'
  13. )
  14. comment '短信提醒配置表';
  15. -- auto-generated definition
  16. create table if not exists core_reminder_configuration_role(
  17. config_id bigint not null,
  18. target_role_id bigint not null,
  19. target_role_name varchar(125) not null,
  20. primary key (config_id, target_role_id)
  21. )
  22. comment '短信提醒配置角色关联表';
  23. create table if not exists core_reminder_configuration_org(
  24. config_id bigint not null comment '配置id',
  25. target_org_id bigint not null comment '发送目标机构id',
  26. target_org_name varchar(125) not null comment '发送目标机构名称',
  27. target_org_type int not null comment '发送目标机构类型',
  28. target_org_path varchar(125) not null comment '发送目标机构路径',
  29. primary key (config_id, target_org_id)
  30. )
  31. comment '短信提醒配置机构关联表';
  32. -- auto-generated definition
  33. create table if not exists core_reminder_log(
  34. log_id bigint not null comment '日志ID'
  35. primary key,
  36. schedule_id bigint not null comment '关联的提醒任务ID',
  37. recipient_id bigint not null comment '目标接收者id',
  38. recipient_name varchar(50) not null comment '目标接收者',
  39. message_content text not null comment '实际发送的短信内容',
  40. send_time datetime not null comment '发送时间',
  41. result_code varchar(50) null comment '发送结果代码',
  42. result_description text null comment '发送结果描述'
  43. )
  44. comment '短信提醒事件日志表';
  45. -- auto-generated definition
  46. create table if not exists core_reminder_schedule(
  47. schedule_id bigint not null comment '任务ID'
  48. primary key,
  49. config_id bigint not null comment '关联的提醒配置ID',
  50. reminder_type int null comment '提醒类型(0:逾期提醒、1:临期提醒)',
  51. send_module varchar(36) null comment '发送模块',
  52. org_id bigint(0) null comment '机构id',
  53. org_guid varchar(125) null comment '机构guid',
  54. task_id varchar(125) null comment '任务id',
  55. task_name varchar(225) null comment '任务名称',
  56. recipient varchar(50) null comment '目标接收者(手机号码或用户ID)',
  57. recipient_id varchar(50) not null comment '目标接收者id',
  58. recipient_name varchar(125) not null comment '目标接收者名称',
  59. scheduled_time datetime null comment '计划发送时间',
  60. status varchar(20) not null comment '任务状态(未发送、已发送、发送失败等)',
  61. sent_time datetime null comment '实际发送时间(若已发送)',
  62. retry_count int default 0 null comment '重试次数(用于处理发送失败情况)'
  63. )
  64. comment '短信提醒事件(任务)表';
  65. -- auto-generated definition
  66. create table if not exists core_reminder_template(
  67. template_id bigint not null comment '模板ID'
  68. primary key,
  69. reminder_type int not null comment '提醒类型(与 core_reminder_configuration 关联)',
  70. template_name varchar(100) not null comment '模板名称',
  71. template_content text not null comment '提醒短信具体内容(支持变量替换)',
  72. language varchar(20) not null comment '模板语言'
  73. )
  74. comment '短信提醒内容模板表';
  75. drop table if exists core_compensate_log;
  76. create table core_compensate_log
  77. (
  78. id int auto_increment
  79. primary key,
  80. business_type varchar(36) null comment '计划类型',
  81. plan_id bigint null comment '计划id',
  82. plan_name varchar(125) null comment '计划名称',
  83. org_id bigint null comment '机构id',
  84. org_name varchar(125) null comment '机构名称',
  85. org_path varchar(225) null comment '机构路径',
  86. time datetime null,
  87. res tinyint null comment '执行结果',
  88. error_msg varchar(225) null comment '错误消息'
  89. )
  90. comment '业务数据补偿记录表';
  91. -- 新增短信提醒配置菜单
  92. delete from sys_menu where id in (1778733750137446402,1780414461203460097,1780414537732730882,1780414574810378241,1780414761414963201,1780414968466780162);
  93. DELETE from sys_role_menu WHERE menu_id in (1778733750137446402,1780414461203460097,1780414537732730882,1780414574810378241,1780414761414963201,1780414968466780162);
  94. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1778733750137446402,'短信提醒配置', 1, 50, 'reminder', 'core/reminder/index', null, 1, 0, 'C', '0', '0', 'system:reminder:list', '1', 'email', null, null, now(), null, now(), null);
  95. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1780414461203460097, '查询短信提醒配置', 1778733750137446402, 0, '', null, null, 1, 0, 'F', '0', '0', 'core:reminder:list', '1', null, null, '超级管理员', '2024-04-17 09:55:07', '', null, '');
  96. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1780414537732730882, '新增短信提醒配置', 1778733750137446402, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:reminder:edit', '1', null, null, '超级管理员', '2024-04-17 09:55:26', '', null, '');
  97. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1780414574810378241, '编辑短信提醒配置', 1778733750137446402, 2, '', null, null, 1, 0, 'F', '0', '0', 'core:reminder:edit', '1', null, null, '超级管理员', '2024-04-17 09:55:35', '', null, '');
  98. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1780414761414963201, '查看短信提醒配置', 1778733750137446402, 3, '', null, null, 1, 0, 'F', '0', '0', 'core:reminder:detail', '1', null, null, '超级管理员', '2024-04-17 09:56:19', '', null, '');
  99. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1780414968466780162, '删除短信提醒配置', 1778733750137446402, 4, '', null, null, 1, 0, 'F', '0', '0', 'core:reminder:remove', '1', null, null, '超级管理员', '2024-04-17 09:57:08', '', null, '');
  100. INSERT into sys_role_menu SELECT id ,1778733750137446402 from sys_role WHERE sys_role.org_type in(1,3);
  101. INSERT into sys_role_menu SELECT id ,1780414461203460097 from sys_role WHERE sys_role.org_type in(1,3);
  102. INSERT into sys_role_menu SELECT id ,1780414537732730882 from sys_role WHERE sys_role.org_type in(1,3);
  103. INSERT into sys_role_menu SELECT id ,1780414574810378241 from sys_role WHERE sys_role.org_type in(1,3);
  104. INSERT into sys_role_menu SELECT id ,1780414761414963201 from sys_role WHERE sys_role.org_type in(1,3);
  105. INSERT into sys_role_menu SELECT id ,1780414968466780162 from sys_role WHERE sys_role.org_type in(1,3);
  106. -- 新增提醒类型字典
  107. delete from sys_dict_type where dict_type = 'reminder_type';
  108. delete from sys_dict_data where dict_type = 'reminder_type';
  109. INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('提醒类型', 'reminder_type', '0', '超级管理员', '2024-04-12 18:02:23', '', null, null);
  110. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '逾期提醒', '0', 'reminder_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  111. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '临期提醒', '1', 'reminder_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  112. -- 新增提醒业务类型字典
  113. delete from sys_dict_type where dict_type = 'reminder_business_type';
  114. delete from sys_dict_data where dict_type = 'reminder_business_type';
  115. INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('提醒业务类型', 'reminder_business_type', '0', null, now(), null, null, null);
  116. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '安保履职', 'resumption', 'reminder_business_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  117. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (1, '安全检查', 'safetyCheck', 'reminder_business_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  118. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (2, '教育培训', 'eduTraining', 'reminder_business_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  119. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (3, '预案演练', 'drill', 'reminder_business_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  120. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (4, '监控调阅', 'monitoringRetrieval', 'reminder_business_type', null, 'default', 'N', '0', '超级管理员', now(), null, null, null);
  121. DROP TABLE IF EXISTS `core_safety_work_summary`;
  122. CREATE TABLE `core_safety_work_summary` (
  123. `id` bigint NOT NULL,
  124. `title` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工作主题',
  125. `date` datetime DEFAULT NULL COMMENT '记录日期',
  126. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '内容',
  127. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  128. `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  129. `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  130. `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  131. `images` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '照片',
  132. `org_id` bigint DEFAULT NULL COMMENT '机构id',
  133. `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件种类',
  134. `year` int DEFAULT NULL COMMENT '工作年度',
  135. `files` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '总结文件',
  136. PRIMARY KEY (`id`) USING BTREE
  137. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全保卫部年度工作总结';
  138. DROP TABLE IF EXISTS `sys_user_account_mapper`;
  139. CREATE TABLE `sys_user_account_mapper` (
  140. `master_user_id` bigint NOT NULL COMMENT '主账号用户Id',
  141. `sub_user_id` bigint NOT NULL COMMENT '可切换子账号用户Id',
  142. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  143. `create_by` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
  144. `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  145. `update_by` bigint DEFAULT NULL COMMENT '修改人',
  146. PRIMARY KEY (`master_user_id`,`sub_user_id`) USING BTREE
  147. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='主账号与子账号对应关系表';
  148. -- 新增菜单 年度工作总结
  149. DELETE from `sys_menu` where id in(01774689203604049922,01774690857464254465,01774691065061330945,01774691126533050369,01774691223434055681);
  150. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01774689203604049922, '年度工作总结', 1711912586825461761, 4, 'worksummary', 'safetyBook/workSummary/index', NULL, 1, 0, 'C', '0', '0', 'core:worksummary:query', '1', 'documentation', NULL, '超级管理员', '2024-04-01 14:44:12', '超级管理员', '2024-04-01 14:51:17', '');
  151. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01774690857464254465, '查询', 1774689203604049922, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:worksummary:query', '1', NULL, NULL, '超级管理员', '2024-04-01 14:50:47', '', NULL, '');
  152. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01774691065061330945, '新增', 1774689203604049922, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:worksummary:add', '1', NULL, NULL, '超级管理员', '2024-04-01 14:51:36', '', NULL, '');
  153. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01774691126533050369, '编辑', 1774689203604049922, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:worksummary:edit', '1', NULL, NULL, '超级管理员', '2024-04-01 14:51:51', '', NULL, '');
  154. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01774691223434055681, '删除', 1774689203604049922, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:worksummary:delete', '1', NULL, NULL, '超级管理员', '2024-04-01 14:52:14', '', NULL, '');
  155. DELETE from `sys_menu` where id in(01780130457928527874);
  156. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01780130457928527874, '关联账号', 100, 124, '', NULL, NULL, 1, 0, 'F', '0', '0', 'system:user:mapperUser', '1', NULL, NULL, '超级管理员', '2024-04-16 15:06:56', '', NULL, '');
  157. DROP TABLE IF EXISTS `sys_version`;
  158. CREATE TABLE `sys_version` (
  159. `id` bigint NOT NULL AUTO_INCREMENT,
  160. `version` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '版本',
  161. `note` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '说明',
  162. `path` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '下载地址',
  163. `is_use` int DEFAULT NULL COMMENT '是否使用【0.否 1.是】',
  164. `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人名称',
  165. `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  166. `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人名称',
  167. `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  168. `is_force` int DEFAULT '0' COMMENT '是否强制更新',
  169. `type` int DEFAULT '0' COMMENT '版本类型',
  170. `package_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名称',
  171. `file_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件code',
  172. PRIMARY KEY (`id`) USING BTREE
  173. ) ENGINE=InnoDB AUTO_INCREMENT=1780128836060065795 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
  174. DROP TABLE IF EXISTS `core_drill_dictionary_branch`;
  175. CREATE TABLE `core_drill_dictionary_branch` (
  176. `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  177. `org_id` bigint DEFAULT NULL COMMENT '机构id',
  178. `org_name` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构名称',
  179. `org_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构路径',
  180. `drill_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '演练项目,字典表关联取值',
  181. `drill_type_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '演练项目名称',
  182. `drill_category` int DEFAULT NULL COMMENT '演练类型,字典表取值',
  183. `drill_category_name` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '演练类型名称',
  184. `drill_projects` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '解决方案',
  185. `default_cause` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '预设案由',
  186. `deleted` tinyint(1) DEFAULT NULL COMMENT '删除标志 0:未删除,1:已删除',
  187. `create_by` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
  188. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  189. `update_by` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
  190. `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  191. PRIMARY KEY (`id`) USING BTREE
  192. ) ENGINE=InnoDB AUTO_INCREMENT=433799229 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='网点预案演练库';
  193. -- 新增 版本升级管理菜单
  194. DELETE from `sys_menu` where id in(01779819587002064898);
  195. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779819587002064898, '版本升级管理', 2, 3, '/version', 'system/version/index', NULL, 1, 0, 'C', '0', '0', 'system:version:list', '1', 'upload', NULL, '超级管理员', '2024-04-15 18:32:07', '', NULL, '');
  196. -- 新增 网点预案管理菜单
  197. DELETE from `sys_menu` where id in(01779818750506852354,01779818971940937730,01779819101465239553,01779819175758946305,01779819248928579585,01779819323872403457);
  198. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779818750506852354, '网点预案管理', 2319, 4, '/drillDictionaryBranch', 'core/drill/drillDictionaryBranch/index', NULL, 1, 0, 'C', '0', '0', 'core:drillDictionaryBranch:list', '1', 'row', NULL, '超级管理员', '2024-04-15 18:28:48', '超级管理员', '2024-04-15 18:33:09', '');
  199. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779818971940937730, '网点预案查询', 1779818750506852354, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:drillDictionaryBranch:list', '1', NULL, NULL, '超级管理员', '2024-04-15 18:29:40', '', NULL, '');
  200. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779819101465239553, '网点预案添加', 1779818750506852354, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:drillDictionaryBranch:add', '1', NULL, NULL, '超级管理员', '2024-04-15 18:30:11', '', NULL, '');
  201. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779819175758946305, '网点预案编辑', 1779818750506852354, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:drillDictionaryBranch:edit', '1', NULL, NULL, '超级管理员', '2024-04-15 18:30:29', '', NULL, '');
  202. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779819248928579585, '网点预案详情', 1779818750506852354, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:drillDictionaryBranch:detail', '1', NULL, NULL, '超级管理员', '2024-04-15 18:30:46', '', NULL, '');
  203. INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01779819323872403457, '网点预案删除', 1779818750506852354, 5, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:drillDictionaryBranch:remove', '1', NULL, NULL, '超级管理员', '2024-04-15 18:31:04', '', NULL, '');
  204. -- 新增 升级包平台类型字典
  205. DELETE from `sys_dict_type` where dict_type = 'sys_version_type';
  206. INSERT INTO `sys_dict_type`(`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '升级包平台类型', 'sys_version_type', '0', '超级管理员', '2024-04-17 09:26:55', '', NULL, NULL);
  207. DELETE from `sys_dict_data` where dict_type = 'sys_version_type';
  208. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '安卓', '0', 'sys_version_type', NULL, 'default', 'N', '0', '超级管理员', '2024-04-17 09:27:51', '', NULL, NULL);
  209. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 'PC', '1', 'sys_version_type', NULL, 'default', 'N', '0', '超级管理员', '2024-04-17 09:28:06', '', NULL, NULL);
  210. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '挂墙终端', '2', 'sys_version_type', NULL, 'default', 'N', '0', '超级管理员', '2024-04-17 09:28:23', '', NULL, NULL);
  211. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, 'IOS', '3', 'sys_version_type', NULL, 'default', 'N', '0', '超级管理员', '2024-04-17 09:28:33', '', NULL, NULL);
  212. -- 网点作息配置
  213. DELETE from `sys_menu` where id in(01780503915975847938);
  214. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01780503915975847938, '网点作息配置', 1, 11, 'work-time-banking-office', 'system/workTimeBankingOffice', NULL, 1, 0, 'C', '0', '0', 'system:time:list', '1', 'time', NULL, '超级管理员', '2024-04-17 15:50:55', '超级管理员', '2024-04-17 15:52:47', '');
  215. -- 修改系统参数表 参数值字段长度
  216. alter table sys_config modify config_value longtext default null null comment '参数键值';
  217. -- 登记簿类型字典值丢失 补充
  218. delete from sys_dict_data where dict_type='register_book_type' and dict_label='离行式自助银行巡检登记簿';
  219. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (6, '离行式自助银行巡检登记簿', '6', 'register_book_type', null, 'default', 'N', '0', '超级管理员', '2024-02-23 14:39:09', '超级管理员', '2024-02-23 14:39:18', null);
  220. -- sys_org_extend 添加 cash_adding_room_control_count 和 remote_control_count 字段
  221. DELIMITER ??
  222. DROP PROCEDURE IF EXISTS schema_change ??
  223. CREATE PROCEDURE schema_change () BEGIN
  224. IF NOT EXISTS(SELECT *
  225. FROM information_schema.columns
  226. WHERE table_schema = DATABASE()
  227. AND table_name = 'sys_org_extend'
  228. AND column_name = 'cash_adding_room_control_count') THEN
  229. ALTER TABLE `sys_org_extend`
  230. ADD COLUMN `cash_adding_room_control_count` int DEFAULT NULL COMMENT '可远程控制和实时授权出入口数量(离行式)' AFTER `total_camera_count`;
  231. END IF;
  232. IF NOT EXISTS(SELECT *
  233. FROM information_schema.columns
  234. WHERE table_schema = DATABASE()
  235. AND table_name = 'sys_org_extend'
  236. AND column_name = 'remote_control_count') THEN
  237. ALTER TABLE `sys_org_extend`
  238. ADD COLUMN `remote_control_count` int DEFAULT NULL COMMENT '可远程控制和实时授权出入口数量(业务库)' AFTER `cash_adding_room_control_count`;
  239. END IF;
  240. END ??
  241. DELIMITER ;
  242. CALL schema_change ();
  243. update sys_org_extend set remote_count = 0 , cash_adding_room = 0;
  244. -- 温湿度告警规则字段对应表 单位错位 刷新
  245. UPDATE `iot_alarm_system_field`
  246. SET `unit` = '°C'
  247. WHERE
  248. `sys_field_code` = '4183_1';
  249. UPDATE `iot_alarm_system_field`
  250. SET `unit` = '%RH'
  251. WHERE
  252. `sys_field_code` = '4183_2';
  253. UPDATE iot_alarm_data
  254. SET alarm_value = REPLACE ( alarm_value, '°C', '%RH' )
  255. WHERE
  256. alarm_value IS NOT NULL
  257. AND `field_code` = '4183_2';
  258. UPDATE iot_alarm_data
  259. SET alarm_value = REPLACE ( alarm_value, '%RH', '°C' )
  260. WHERE
  261. alarm_value IS NOT NULL
  262. AND `field_code` = '4183_1';
  263. -- 新增计划任务补偿运维界面
  264. DELETE from `sys_menu` where id in(1782245721165127681);
  265. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1782245721165127681, '任务数据补偿', 2, 5, 'compensate', 'system/compensate/index', null, 1, 0, 'C', '0', '0', null, '1', 'edit', null, '超级管理员', '2024-04-22 11:11:54', '', null, '');