jingyuanchao 2 лет назад
Родитель
Сommit
a24992115e

+ 2 - 257
project_data/sql/0.0.2/soc/soc.sql

@@ -903,125 +903,6 @@ CREATE TABLE `core_safetycheck_rule_point` (
 ) ENGINE = INNODB AUTO_INCREMENT = 1705410983891484676 CHARACTER
 SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '安全检查内容库-检查内容' ROW_FORMAT = Dynamic;
 
-DROP TABLE IF EXISTS `core_safety_dict`;
-CREATE TABLE `core_safety_dict` (
-    `id` int NOT NULL AUTO_INCREMENT,
-    `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '指标分类code',
-    `parent_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '父级code',
-    `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '指标分类name',
-    PRIMARY KEY (`id`) USING BTREE,
-    UNIQUE KEY `code` (`code`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标配置字典表';
-
--- 新增安保综合评价规则表
-DROP TABLE IF EXISTS `core_safety_index_calculate_rule`;
-CREATE TABLE `core_safety_index_calculate_rule` (
-    id             bigint default 0 not null ,
-    type_code      varchar(50)      null comment '指标分类code',
-    project_code   varchar(50)      null comment '指标项目code',
-    point_code     varchar(50)      null comment '指标要点code',
-    deduction_type int              null comment '扣分方式 1:直接扣分,2最高扣分',
-    score          int              null comment '分值',
-    formula        varchar(500)     null comment '扣分规则描述',
-    org_type       int              null comment '机构类型',
-    deleted        int    default 0 null comment '是否删除 0否1是',
-    cycle          int              null comment '周期,只有在指标分类为安保履职时使用',
-    remark         varchar(500)     null comment '备注',
-    create_time    datetime         null,
-    create_by      varchar(125)     null,
-    update_time    datetime         null,
-    update_by      varchar(125)     null,
-    PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标配置表';
-
--- 新增安保综合评价规则项表
-DROP TABLE IF EXISTS `core_safety_index_calculate_rule_item`;
-CREATE TABLE `core_safety_index_calculate_rule_item` (
-     id             bigint default 0 not null ,
-     rule_id        bigint           null comment '安全指标主键',
-     indicator_note varchar(100)     null comment '细化指数描述',
-     calculate_type int              null comment '计算类型 1累计数,2连续数,3 分类,4 固化值',
-     indicator_days int              null comment '连续数,连续多少天',
-     item_type      int              null comment 'calculate_type为3是用来存具体分类',
-     item_value     double(5, 2)     null comment '扣分系数',
-     order_num      int              null comment '排序',
-     create_time    datetime         null,
-     create_by      varchar(125)     null,
-     update_time    datetime         null,
-     update_by      varchar(125)     null,
-     PRIMARY KEY (`id`) USING BTREE,
-     KEY `rule_id` (`rule_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标指数细化表';
-
--- 安全指数等级配置表
-drop table if exists core_safe_level;
-create table core_safe_level
-(
-    id          int auto_increment primary key,
-    level_name  varchar(50)  null comment '安全等级名称:L1,L2,L3,l4',
-    min_value   double(5, 2) null comment '最小值',
-    max_value   double(5, 2) null comment '最大值',
-    risk_level  int          null comment '等级风险:0:低,1:中,2:高,3: 极高',
-    description varchar(50)  null comment '安全等级描述:'
-) comment '安全等级配置表';
-
-drop table if exists core_safe_month_score;
-CREATE TABLE `core_safe_month_score` (
- `id` bigint NOT NULL COMMENT '主键id',
- `level_id` bigint DEFAULT NULL COMMENT '评分等级id',
- `org_id` bigint DEFAULT NULL COMMENT '机构id',
- `data_year` int DEFAULT NULL COMMENT '数据所在年',
- `data_month` int DEFAULT NULL COMMENT '数据所在月',
- `org_score` double(10,2) NOT NULL COMMENT '机构得分',
- `release_status` int DEFAULT NULL COMMENT '评分状态',
- `org_path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构path',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
- KEY `idx_orgId` (`org_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数机构月度得分表';
-
-drop table if exists core_safety_exception_data;
-CREATE TABLE `core_safety_exception_data` (
-  `id` bigint NOT NULL DEFAULT '0' COMMENT '主键',
-  `data_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '异常数据id',
-  `org_id` bigint DEFAULT NULL COMMENT '机构id',
-  `data_time` date DEFAULT NULL COMMENT '数据产生日期',
-  `data_source` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据来源表',
-  `extra_field1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
-  `extra_field2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
-  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标的异常数据';
-
-drop table if exists core_safety_source_data;
-CREATE TABLE `core_safety_source_data` (
-   `id` bigint NOT NULL COMMENT '主键id',
-   `rule_id` bigint DEFAULT NULL COMMENT '评价规则id',
-   `item_id` bigint DEFAULT NULL COMMENT '评价规则项id',
-   `org_id` bigint DEFAULT NULL COMMENT '机构id',
-   `data_year` int DEFAULT NULL COMMENT '数据所在年',
-   `data_month` int DEFAULT NULL COMMENT '数据所在月',
-   `times` int DEFAULT NULL COMMENT '出现次数',
-   `score` double(10,2) DEFAULT NULL COMMENT '扣分值',
-   `type_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '配置项',
-   PRIMARY KEY (`id`) USING BTREE,
-   KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
-   KEY `idx_orgId` (`org_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数机构扣分细项表';
-drop table if exists core_safety_deduct_data;
-CREATE TABLE `core_safety_deduct_data` (
-   `id` bigint NOT NULL COMMENT '主键id',
-   `rule_id` bigint DEFAULT NULL COMMENT '评价规则表',
-   `org_id` bigint DEFAULT NULL COMMENT '机构id',
-   `data_year` int DEFAULT NULL COMMENT '数据所在年',
-   `data_month` int DEFAULT NULL COMMENT '数据所在月',
-   `score` double(10,2) DEFAULT NULL COMMENT '合计每个子项后得出安全指标的分数',
-   `score_real` double(10,2) DEFAULT NULL COMMENT '真实扣分',
-   PRIMARY KEY (`id`) USING BTREE,
-   KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
-   KEY `idx_orgId` (`org_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数扣分表';
-
 
 
 -- 新增安全检查相关表
@@ -2190,95 +2071,7 @@ INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type
 delete from `sys_dict_data` where dict_label ='无周期' and dict_type='check_cycle';
 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', 'check_cycle', NULL, 'default', 'N', '0', '省联社账号', '2023-10-10 10:43:41', '', NULL, NULL);
 
--- 新增安全指数字典表
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (52, '1004', '-1', '安保履职');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (53, '100402', '1004', '未登');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (54, '10040203', '100402', '网点安全员 (营业中)');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (55, '10040201', '100402', '网点安全员(营业前)');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (56, '10040202', '100402', '网点安全员(营业后)');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (57, '1005', '-1', '问题整改');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (58, '100501', '1005', '问题数量');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (59, '10050101', '100501', '未在规定时间内确认');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (60, '100502', '1005', '整改情况');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (61, '10050201', '100502', '已确认但未在规定时间内完成整改');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (62, '1006', '-1', '监控调阅');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (63, '100601', '1006', '监控调阅-未登');
-INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (64, '10060101', '100601', '未登-网点负责人(每周)');
-
-
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846713285328896, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 3, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846715519614976, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 4, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846717305962496, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 5, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846720300892160, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 3, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846721706754048, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 4, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846723149234176, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 5, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846745983598592, '1004', '100402', '10040203', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846747145125888, '1004', '100402', '10040202', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (1714172822255894529, '1006', '100601', '10060101', 2, 10, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, null, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (1714185441062748161, '1004', '100402', '10040201', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
-
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846702578221056, 3846702577319936, '登记问题数量', 1, null, null, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649089, 3846703826108416, '连续报警三天', 2, 3, null, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649090, 3846703826108416, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649091, 3846703826108416, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846704899833858, 3846704899145728, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846704899833859, 3846704899145728, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999297, 3846706034688000, '连续报警三天', 2, 3, null, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999298, 3846706034688000, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999299, 3846706034688000, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820416, 3846713285328896, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820417, 3846713285328896, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820418, 3846713285328896, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820419, 3846713285328896, '风险等级为一般的问题数量', 3, null, 3, 0.2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820420, 3846713285328896, '风险等级为重大的问题数量', 3, null, 5, 0.25, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942656, 3846715519614976, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942657, 3846715519614976, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942658, 3846715519614976, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942659, 3846715519614976, '风险等级为一般的问题数量', 3, null, 3, 0.2, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942660, 3846715519614976, '风险等级为重大的问题数量', 3, null, 5, 0.25, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454016, 3846717305962496, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454017, 3846717305962496, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454018, 3846717305962496, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454019, 3846717305962496, '风险等级为一般的问题数量', 3, null, 3, 0.2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454020, 3846717305962496, '风险等级为重大的问题数量', 3, null, 5, 0.25, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350912, 3846720300892160, ' 超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350913, 3846720300892160, '两次整改问题数', 3, null, 3, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350914, 3846720300892160, '三次或三次以上整改问题数', 3, null, 4, 5, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350915, 3846720300892160, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180032, 3846721706754048, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180033, 3846721706754048, '三次或三次以上整改问题数', 3, null, 4, 5, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180034, 3846721706754048, '超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180035, 3846721706754048, ' 两次整改问题数', 3, null, 3, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578240, 3846723149234176, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578241, 3846723149234176, '三次或三次以上整改问题数', 3, null, 4, 5, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578242, 3846723149234176, '超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578243, 3846723149234176, '两次整改问题数', 3, null, 3, 3, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633792, 3846747145125888, '未登总数', 1, null, null, 0.5, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633793, 3846747145125888, '未登连续三天', 2, 3, null, 1.5, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633794, 3846747145125888, '未登连续五天', 2, 5, null, 3, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633795, 3846747145125888, '未登连续十天', 2, 10, null, 5, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964032, 3846751521619968, '未登天数', 1, null, null, 0.5, null,now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964033, 3846751521619968, '未登连续三天', 2, 3, null, 2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964034, 3846751521619968, '未登连续五天', 2, 5, null, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964035, 3846751521619968, '未登连续十天', 2, 10, null, 5, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742208, 3846752731185152, '未登天数', 1, null, null, 0.5, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742209, 3846752731185152, '未登连续三天', 2, 3, null, 2, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742210, 3846752731185152, '未登连续五天', 2, 5, null, 3, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742211, 3846752731185152, ' 未登连续十天', 2, 10, null, 5, null, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1711273894279716865, 1711273894451683330, '风险等级为轻微的问题数量', 3, 3, null, 0.05, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1711273894334242818, 1711273894451683330, '未登连续五天', 2, 5, null, 1.5, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891021721602, 3846745983598592, '未登总数', 1, null, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891030110210, 3846745983598592, '连续三天未登', 2, 3, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891034304513, 3846745983598592, '连续五天未登', 2, 5, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891038498818, 3846745983598592, '连续十天未登', 2, 10, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441075331073, 1714185441062748161, '未登总数', 1, null, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441083719682, 1714185441062748161, '连续三天未登', 2, 3, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441092108290, 1714185441062748161, '连续五天未登', 2, 5, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441096302594, 1714185441062748161, '连续十天未登', 2, 10, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345548406785, 1714172822255894529, '未登总数', 1, null, null, 10, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345560989697, 1714172822255894529, '连续三次未登', 2, 3, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345565184002, 1714172822255894529, '连续五次未登', 2, 5, null, 1, 0, now(), null, now(), null);
-INSERT INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345569378306, 1714172822255894529, '连续十次未登', 2, 10, null, 1, 0, now(), null, now(), null);
+
 delete from sys_dict_type where dict_type='evaluate_status';
 delete from sys_dict_data where dict_type='evaluate_status';
 INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('评价状态', 'evaluate_status', '0', 'slsjyc', now(), '', null, null);
@@ -2310,32 +2103,11 @@ INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_cla
 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, '使用中', '1', 'drill_plan_status', null, 'default', 'N', '0', null, now(), null, now(), null);
 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', 'drill_plan_status', null, 'default', 'N', '0', null, now(), '', null, null);
 
--- 新增安保综合评价规则目录、菜单、页面及页面权限
-delete from sys_menu where id in (1714247486990786561,1712277074707779586,1712278645189414914,1714187591810588674,1714187748136493058,1714187851295399937,1714188002965626881,1714188131026116609);
-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 (1712277074707779586, '安全综合管理评价', 0, 13, '/safetyindex', null, null, 1, 0, 'M', '0', '0', '', '1', 'clipboard', null, null, now(), null, now(), '');
-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 (1712278645189414914, '评价规则配置', 1712277074707779586, 1, 'evaluationRule', 'evaluationRule/index', null, 1, 1, 'C', '0', '0', null, '1', 'table', null, null, now(), '', null, '');
-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 (1714187591810588674, '综合评价规则新增', 1712278645189414914, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:add', '1', null, null, null, now(), '', null, '');
-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 (1714187748136493058, '综合评价规则编辑', 1712278645189414914, 2, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:edit', '1', null, null, null, now(), '', null, '');
-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 (1714187851295399937, '综合评价规则详情', 1712278645189414914, 3, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:query', '1', null, null, null, now(), '', null, '');
-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 (1714188002965626881, '综合评价规则列表查询', 1712278645189414914, 4, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:list', '1', null, null, null, now(), '', null, '');
-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 (1714188131026116609, '综合评价规则删除', 1712278645189414914, 5, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:remove', '1', null, null, null, now(), '', null, '');
-
-INSERT INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (1, 'L1', 90, 100, 0, '90分(不含)以上');
-INSERT INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (2, 'L2', 80, 90, 1, '80分(不含)与90分(含)之间 ');
-INSERT INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (3, 'L3', 70, 80, 2, '70分(不含)与80分(含)之间');
-INSERT INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (4, 'L4', 0, 70, 3, '70分及以下');
 
 
 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 (1714247486990786561, '撤回计划', 2052, 9, '', null, null, 1, 0, 'F', '0', '0', 'core:accessPlan:add', '1', null, null, null, now(), '', null, '');
-delete from sys_role_menu where menu_id in (1712277074707779586,1712278645189414914,1714187591810588674,1714187748136493058,1714187851295399937,1714188002965626881,1714188131026116609);
-insert into sys_role_menu select  id,1712277074707779586 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1712278645189414914 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1714187591810588674 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1714187748136493058 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1714187851295399937 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1714188002965626881 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1714188131026116609 from sys_role where role_name like '%省联社安全保卫管理人员%';
+
 
 delete from sys_dict_type where dict_type='materials_status';
 delete from sys_dict_data where dict_type='materials_status';
@@ -2350,33 +2122,6 @@ INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type
 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, '已完成', '3', 'resumption_status', NULL, 'default', 'N', '0', 'admin', '2023-08-11 09:21:09', '省联社账号', '2023-10-24 17:03:48', NULL);
 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, '已逾期', '4', 'resumption_status', NULL, 'default', 'N', '0', 'admin', '2023-08-11 09:21:09', '', NULL, NULL);
 
--- 新增风险等级字典
-delete from sys_dict_type where dict_type='risk_level';
-delete from sys_dict_data where dict_type='risk_level';
-INSERT INTO sys_dict_type ( dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('风险等级', 'risk_level', '0', null, now(), null, now(), null);
-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', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
-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, '中', '1', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
-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', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
-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, '极高', '3', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
-
-
--- 新增安全等级菜单及页面权限
-delete from sys_menu where id in (1717479664205783042,1717480807703076866,1717480976800636929,1717481080311865346,1717481175799390210,1717481251359776769);
-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 (1717479664205783042, '安全等级配置', 1712277074707779586, 1, '/level', 'core/safeLevel/index', null, 1, 0, 'C', '0', '0', '', '1', 'button', null, null, now(), null, now(), null);
-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 (1717480807703076866, '安全等级列表', 1717479664205783042, 1, '', null, null, 1, 0, 'F', '0', '0', 'core.safeIndex:safeLevel:list', '1', null, null, null, now(), null, now(), null);
-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 (1717480976800636929, '安全等级详情', 1717479664205783042, 2, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:query', '1', null, null, null, now(), null, now(), null);
-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 (1717481080311865346, '安全等级新增', 1717479664205783042, 3, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:add', '1', null, null, null, now(), null, now(), null);
-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 (1717481175799390210, '安全等级编辑', 1717479664205783042, 4, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:edit', '1', null, null,  null, now(), null, now(), null);
-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 (1717481251359776769, '安全等级删除', 1717479664205783042, 5, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:remove', '1', null, null, null, now(), null, now(), null);
-
-delete from sys_role_menu where menu_id in (1717479664205783042,1717480807703076866,1717480976800636929,1717481080311865346,1717481175799390210,1717481251359776769);
-insert into sys_role_menu select  id,1717479664205783042 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1717480807703076866 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1717480976800636929 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1717481080311865346 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1717481175799390210 from sys_role where role_name like '%省联社安全保卫管理人员%';
-insert into sys_role_menu select  id,1717481251359776769 from sys_role where role_name like '%省联社安全保卫管理人员%';
-
 
 -- -------------------------------------------------------
 -- ----------新增数据 end  ----------------------------

+ 252 - 54
project_data/sql/0.0.3/soc/soc.sql

@@ -1,60 +1,266 @@
-CREATE TABLE if not exists `core_safe_month_score` (
-                                         `id` bigint NOT NULL COMMENT '主键id',
-                                         `level_id` bigint DEFAULT NULL COMMENT '评分等级id',
-                                         `org_id` bigint DEFAULT NULL COMMENT '机构id',
-                                         `data_year` int DEFAULT NULL COMMENT '数据所在年',
-                                         `data_month` int DEFAULT NULL COMMENT '数据所在月',
-                                         `org_score` double(10,2) NOT NULL COMMENT '机构得分',
- `release_status` int DEFAULT NULL COMMENT '评分状态',
- `org_path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构path',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
- KEY `idx_orgId` (`org_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数机构月度得分表';
 
+CREATE TABLE if not exists  `core_safety_dict` (
+   `id` int NOT NULL AUTO_INCREMENT,
+   `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '指标分类code',
+   `parent_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '父级code',
+   `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '指标分类name',
+   PRIMARY KEY (`id`) USING BTREE,
+   UNIQUE KEY `code` (`code`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标配置字典表';
+
+-- 新增安保综合评价规则表
+CREATE TABLE if not exists`core_safety_index_calculate_rule` (
+     id             bigint default 0 not null ,
+     type_code      varchar(50)      null comment '指标分类code',
+     project_code   varchar(50)      null comment '指标项目code',
+     point_code     varchar(50)      null comment '指标要点code',
+     deduction_type int              null comment '扣分方式 1:直接扣分,2最高扣分',
+     score          int              null comment '分值',
+     formula        varchar(500)     null comment '扣分规则描述',
+     org_type       int              null comment '机构类型',
+     deleted        int    default 0 null comment '是否删除 0否1是',
+     cycle          int              null comment '周期,只有在指标分类为安保履职时使用',
+     remark         varchar(500)     null comment '备注',
+     create_time    datetime         null,
+     create_by      varchar(125)     null,
+     update_time    datetime         null,
+     update_by      varchar(125)     null,
+     PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标配置表';
+
+
+CREATE TABLE if not exists `core_safety_index_calculate_rule_item` (
+   id             bigint default 0 not null ,
+   rule_id        bigint           null comment '安全指标主键',
+   indicator_note varchar(100)     null comment '细化指数描述',
+   calculate_type int              null comment '计算类型 1累计数,2连续数,3 分类,4 固化值',
+   indicator_days int              null comment '连续数,连续多少天',
+   item_type      int              null comment 'calculate_type为3是用来存具体分类',
+   item_value     double(5, 2)     null comment '扣分系数',
+   order_num      int              null comment '排序',
+   create_time    datetime         null,
+   create_by      varchar(125)     null,
+   update_time    datetime         null,
+   update_by      varchar(125)     null,
+   PRIMARY KEY (`id`) USING BTREE,
+   KEY `rule_id` (`rule_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标指数细化表';
 
 
-CREATE TABLE if not exists `core_safety_exception_data` (
-                                              `id` bigint NOT NULL DEFAULT '0' COMMENT '主键',
-                                              `data_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '异常数据id',
-                                              `org_id` bigint DEFAULT NULL COMMENT '机构id',
-                                              `data_time` date DEFAULT NULL COMMENT '数据产生日期',
-                                              `data_source` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据来源表',
-                                              `extra_field1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
-                                              `extra_field2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
-                                              `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-                                              PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标的异常数据';
+CREATE TABLE if not exists core_safe_level
+(
+id          int auto_increment primary key,
+level_name  varchar(50)  null comment '安全等级名称:L1,L2,L3,l4',
+min_value   double(5, 2) null comment '最小值',
+max_value   double(5, 2) null comment '最大值',
+risk_level  int          null comment '等级风险:0:低,1:中,2:高,3: 极高',
+description varchar(50)  null comment '安全等级描述:'
+) comment '安全等级配置表';
 
-CREATE TABLE if not exists `core_safety_source_data` (
-                                           `id` bigint NOT NULL COMMENT '主键id',
-                                           `rule_id` bigint DEFAULT NULL COMMENT '评价规则id',
-                                           `item_id` bigint DEFAULT NULL COMMENT '评价规则项id',
-                                           `org_id` bigint DEFAULT NULL COMMENT '机构id',
-                                           `data_year` int DEFAULT NULL COMMENT '数据所在年',
-                                           `data_month` int DEFAULT NULL COMMENT '数据所在月',
-                                           `times` int DEFAULT NULL COMMENT '出现次数',
-                                           `score` double(10,2) DEFAULT NULL COMMENT '扣分值',
-   `type_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '配置项',
+CREATE TABLE if not exists `core_safe_month_score` (
+   `id` bigint NOT NULL COMMENT '主键id',
+   `level_id` bigint DEFAULT NULL COMMENT '评分等级id',
+   `org_id` bigint DEFAULT NULL COMMENT '机构id',
+   `data_year` int DEFAULT NULL COMMENT '数据所在年',
+   `data_month` int DEFAULT NULL COMMENT '数据所在月',
+   `org_score` double(10,2) NOT NULL COMMENT '机构得分',
+   `release_status` int DEFAULT NULL COMMENT '评分状态',
+   `org_path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构path',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
    KEY `idx_orgId` (`org_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数机构月度得分表';
+
+CREATE TABLE if not exists `core_safety_exception_data` (
+    `id` bigint NOT NULL DEFAULT '0' COMMENT '主键',
+    `data_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '异常数据id',
+    `org_id` bigint DEFAULT NULL COMMENT '机构id',
+    `data_time` date DEFAULT NULL COMMENT '数据产生日期',
+    `data_source` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据来源表',
+    `extra_field1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
+    `extra_field2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展预留字段',
+    `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标的异常数据';
+
+CREATE TABLE if not exists`core_safety_source_data` (
+    `id` bigint NOT NULL COMMENT '主键id',
+    `rule_id` bigint DEFAULT NULL COMMENT '评价规则id',
+    `item_id` bigint DEFAULT NULL COMMENT '评价规则项id',
+    `org_id` bigint DEFAULT NULL COMMENT '机构id',
+    `data_year` int DEFAULT NULL COMMENT '数据所在年',
+    `data_month` int DEFAULT NULL COMMENT '数据所在月',
+    `times` int DEFAULT NULL COMMENT '出现次数',
+    `score` double(10,2) DEFAULT NULL COMMENT '扣分值',
+    `type_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '配置项',
+    PRIMARY KEY (`id`) USING BTREE,
+    KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
+    KEY `idx_orgId` (`org_id`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数机构扣分细项表';
 
 CREATE TABLE if not exists `core_safety_deduct_data` (
-                                           `id` bigint NOT NULL COMMENT '主键id',
-                                           `rule_id` bigint DEFAULT NULL COMMENT '评价规则表',
-                                           `org_id` bigint DEFAULT NULL COMMENT '机构id',
-                                           `data_year` int DEFAULT NULL COMMENT '数据所在年',
-                                           `data_month` int DEFAULT NULL COMMENT '数据所在月',
-                                           `score` double(10,2) DEFAULT NULL COMMENT '合计每个子项后得出安全指标的分数',
-   `score_real` double(10,2) DEFAULT NULL COMMENT '真实扣分',
-   PRIMARY KEY (`id`) USING BTREE,
-   KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
-   KEY `idx_orgId` (`org_id`) USING BTREE
+     `id` bigint NOT NULL COMMENT '主键id',
+     `rule_id` bigint DEFAULT NULL COMMENT '评价规则表',
+     `org_id` bigint DEFAULT NULL COMMENT '机构id',
+     `data_year` int DEFAULT NULL COMMENT '数据所在年',
+     `data_month` int DEFAULT NULL COMMENT '数据所在月',
+     `score` double(10,2) DEFAULT NULL COMMENT '合计每个子项后得出安全指标的分数',
+     `score_real` double(10,2) DEFAULT NULL COMMENT '真实扣分',
+     PRIMARY KEY (`id`) USING BTREE,
+     KEY `idx_year_month` (`data_year`,`data_month`) USING BTREE,
+     KEY `idx_orgId` (`org_id`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指数扣分表';
 
 
+-- 新增安全指数字典表
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (52, '1004', '-1', '安保履职');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (53, '100402', '1004', '未登');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (54, '10040203', '100402', '网点安全员 (营业中)');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (55, '10040201', '100402', '网点安全员(营业前)');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (56, '10040202', '100402', '网点安全员(营业后)');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (57, '1005', '-1', '问题整改');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (58, '100501', '1005', '问题数量');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (59, '10050101', '100501', '未在规定时间内确认');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (60, '100502', '1005', '整改情况');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (61, '10050201', '100502', '已确认但未在规定时间内完成整改');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (62, '1006', '-1', '监控调阅');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (63, '100601', '1006', '监控调阅-未登');
+INSERT ignore INTO core_safety_dict (id, code, parent_code, name) VALUES (64, '10060101', '100601', '未登-网点负责人(每周)');
+
+-- 新增安保综合评价规则初始化数据
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846713285328896, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 3, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846715519614976, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 4, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846717305962496, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 5, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846720300892160, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 3, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846721706754048, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 4, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846723149234176, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。K为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 5, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846745983598592, '1004', '100402', '10040203', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (3846747145125888, '1004', '100402', '10040202', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (1714172822255894529, '1006', '100601', '10060101', 2, 10, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, null, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule (id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark, create_time, create_by, update_time, update_by) VALUES (1714185441062748161, '1004', '100402', '10040201', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。K为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 4, 0, 0, null, now(), null, now(), null);
+-- 新增安 ignore保综合评价规则项初始化数据
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846702578221056, 3846702577319936, '登记问题数量', 1, null, null, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649089, 3846703826108416, '连续报警三天', 2, 3, null, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649090, 3846703826108416, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846703826649091, 3846703826108416, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846704899833858, 3846704899145728, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846704899833859, 3846704899145728, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999297, 3846706034688000, '连续报警三天', 2, 3, null, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999298, 3846706034688000, '连续报警五天', 2, 5, null, 2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846706034999299, 3846706034688000, '连续报警十天', 2, 10, null, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820416, 3846713285328896, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820417, 3846713285328896, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820418, 3846713285328896, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820419, 3846713285328896, '风险等级为一般的问题数量', 3, null, 3, 0.2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846713285820420, 3846713285328896, '风险等级为重大的问题数量', 3, null, 5, 0.25, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942656, 3846715519614976, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942657, 3846715519614976, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942658, 3846715519614976, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942659, 3846715519614976, '风险等级为一般的问题数量', 3, null, 3, 0.2, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846715519942660, 3846715519614976, '风险等级为重大的问题数量', 3, null, 5, 0.25, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454016, 3846717305962496, '问题数量', 1, null, null, 0.05, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454017, 3846717305962496, '风险等级为轻微的问题数量', 3, null, 2, 0.05, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454018, 3846717305962496, '风险等级为关注的问题数量', 3, null, 1, 0.15, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454019, 3846717305962496, '风险等级为一般的问题数量', 3, null, 3, 0.2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846717306454020, 3846717305962496, '风险等级为重大的问题数量', 3, null, 5, 0.25, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350912, 3846720300892160, ' 超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350913, 3846720300892160, '两次整改问题数', 3, null, 3, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350914, 3846720300892160, '三次或三次以上整改问题数', 3, null, 4, 5, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846720301350915, 3846720300892160, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180032, 3846721706754048, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180033, 3846721706754048, '三次或三次以上整改问题数', 3, null, 4, 5, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180034, 3846721706754048, '超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846721707180035, 3846721706754048, ' 两次整改问题数', 3, null, 3, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578240, 3846723149234176, '超期整改问题数', 3, null, 1, 0.6, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578241, 3846723149234176, '三次或三次以上整改问题数', 3, null, 4, 5, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578242, 3846723149234176, '超期未整改问题数量', 3, null, 2, 1, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846723149578243, 3846723149234176, '两次整改问题数', 3, null, 3, 3, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633792, 3846747145125888, '未登总数', 1, null, null, 0.5, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633793, 3846747145125888, '未登连续三天', 2, 3, null, 1.5, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633794, 3846747145125888, '未登连续五天', 2, 5, null, 3, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846747145633795, 3846747145125888, '未登连续十天', 2, 10, null, 5, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964032, 3846751521619968, '未登天数', 1, null, null, 0.5, null,now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964033, 3846751521619968, '未登连续三天', 2, 3, null, 2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964034, 3846751521619968, '未登连续五天', 2, 5, null, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846751521964035, 3846751521619968, '未登连续十天', 2, 10, null, 5, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742208, 3846752731185152, '未登天数', 1, null, null, 0.5, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742209, 3846752731185152, '未登连续三天', 2, 3, null, 2, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742210, 3846752731185152, '未登连续五天', 2, 5, null, 3, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (3846752731742211, 3846752731185152, ' 未登连续十天', 2, 10, null, 5, null, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1711273894279716865, 1711273894451683330, '风险等级为轻微的问题数量', 3, 3, null, 0.05, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1711273894334242818, 1711273894451683330, '未登连续五天', 2, 5, null, 1.5, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891021721602, 3846745983598592, '未登总数', 1, null, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891030110210, 3846745983598592, '连续三天未登', 2, 3, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891034304513, 3846745983598592, '连续五天未登', 2, 5, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714184891038498818, 3846745983598592, '连续十天未登', 2, 10, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441075331073, 1714185441062748161, '未登总数', 1, null, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441083719682, 1714185441062748161, '连续三天未登', 2, 3, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441092108290, 1714185441062748161, '连续五天未登', 2, 5, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1714185441096302594, 1714185441062748161, '连续十天未登', 2, 10, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345548406785, 1714172822255894529, '未登总数', 1, null, null, 10, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345560989697, 1714172822255894529, '连续三次未登', 2, 3, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345565184002, 1714172822255894529, '连续五次未登', 2, 5, null, 1, 0, now(), null, now(), null);
+INSERT ignore INTO core_safety_index_calculate_rule_item (id, rule_id, indicator_note, calculate_type, indicator_days, item_type, item_value, order_num, create_time, create_by, update_time, update_by) VALUES (1717123345569378306, 1714172822255894529, '连续十次未登', 2, 10, null, 1, 0, now(), null, now(), null);
+
+-- 新增安保综合评价规则目录、菜单、页面及页面权限
+delete from sys_menu where id in (1714247486990786561,1712277074707779586,1712278645189414914,1714187591810588674,1714187748136493058,1714187851295399937,1714188002965626881,1714188131026116609);
+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 (1712277074707779586, '安全综合管理评价', 0, 13, '/safetyindex', null, null, 1, 0, 'M', '0', '0', '', '1', 'clipboard', null, null, now(), null, now(), '');
+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 (1712278645189414914, '评价规则配置', 1712277074707779586, 1, 'evaluationRule', 'evaluationRule/index', null, 1, 1, 'C', '0', '0', null, '1', 'table', null, null, now(), '', null, '');
+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 (1714187591810588674, '综合评价规则新增', 1712278645189414914, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:add', '1', null, null, null, now(), '', null, '');
+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 (1714187748136493058, '综合评价规则编辑', 1712278645189414914, 2, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:edit', '1', null, null, null, now(), '', null, '');
+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 (1714187851295399937, '综合评价规则详情', 1712278645189414914, 3, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:query', '1', null, null, null, now(), '', null, '');
+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 (1714188002965626881, '综合评价规则列表查询', 1712278645189414914, 4, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:list', '1', null, null, null, now(), '', null, '');
+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 (1714188131026116609, '综合评价规则删除', 1712278645189414914, 5, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:remove', '1', null, null, null, now(), '', null, '');
+-- 新增安保综合评价规则页面权限
+delete from sys_role_menu where menu_id in (1712277074707779586,1712278645189414914,1714187591810588674,1714187748136493058,1714187851295399937,1714188002965626881,1714188131026116609);
+insert into sys_role_menu select  id,1712277074707779586 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1712278645189414914 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1714187591810588674 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1714187748136493058 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1714187851295399937 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1714188002965626881 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1714188131026116609 from sys_role where role_name like '%省联社安全保卫管理人员%';
+
+-- 新增风险等级字典
+delete from sys_dict_type where dict_type='risk_level';
+delete from sys_dict_data where dict_type='risk_level';
+INSERT INTO sys_dict_type ( dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('风险等级', 'risk_level', '0', null, now(), null, now(), null);
+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', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
+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, '中', '1', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
+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', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
+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, '极高', '3', 'risk_level', null, 'default', 'N', '0', null, now(), null, now(), null);
+
+-- 安全等级初始化数据
+INSERT ignore INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (1, 'L1', 90, 100, 0, '90分(不含)以上');
+INSERT ignore INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (2, 'L2', 80, 90, 1, '80分(不含)与90分(含)之间 ');
+INSERT ignore INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (3, 'L3', 70, 80, 2, '70分(不含)与80分(含)之间');
+INSERT ignore INTO core_safe_level (id, level_name, min_value, max_value, risk_level, description) VALUES (4, 'L4', 0, 70, 3, '70分及以下');
+
+-- 新增安全等级菜单及页面权限
+delete from sys_menu where id in (1717479664205783042,1717480807703076866,1717480976800636929,1717481080311865346,1717481175799390210,1717481251359776769);
+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 (1717479664205783042, '安全等级配置', 1712277074707779586, 1, '/level', 'core/safeLevel/index', null, 1, 0, 'C', '0', '0', '', '1', 'button', null, null, now(), null, now(), null);
+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 (1717480807703076866, '安全等级列表', 1717479664205783042, 1, '', null, null, 1, 0, 'F', '0', '0', 'core.safeIndex:safeLevel:list', '1', null, null, null, now(), null, now(), null);
+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 (1717480976800636929, '安全等级详情', 1717479664205783042, 2, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:query', '1', null, null, null, now(), null, now(), null);
+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 (1717481080311865346, '安全等级新增', 1717479664205783042, 3, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:add', '1', null, null, null, now(), null, now(), null);
+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 (1717481175799390210, '安全等级编辑', 1717479664205783042, 4, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:edit', '1', null, null,  null, now(), null, now(), null);
+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 (1717481251359776769, '安全等级删除', 1717479664205783042, 5, '', null, null, 1, 0, 'F', '0', '0', 'core.safetyIndex:safeLevel:remove', '1', null, null, null, now(), null, now(), null);
+-- 安全等级菜单权限
+delete from sys_role_menu where menu_id in (1717479664205783042,1717480807703076866,1717480976800636929,1717481080311865346,1717481175799390210,1717481251359776769);
+insert into sys_role_menu select  id,1717479664205783042 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1717480807703076866 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1717480976800636929 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1717481080311865346 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1717481175799390210 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1717481251359776769 from sys_role where role_name like '%省联社安全保卫管理人员%';
+
+-- 新增综合计算得分菜单及菜单权限
+delete from sys_menu where id in (1718909968666697730,1719970958288199682);
+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 (1718909968666697730, '计算综合得分', 1712277074707779586, 3, 'scorestatistics', 'scorestatistics/index', null, 1, 1, 'C', '0', '0', '', '1', 'system', null,  null, now(), null, now(), null);
+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 (1719970958288199682, '综合得分重新计算', 1718909968666697730, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyExceptionData:reCalculate', '1', null, null,  null, now(), null, now(), null);
+insert into sys_role_menu select  id,1718909968666697730 from sys_role where role_name like '%省联社安全保卫管理人员%';
+insert into sys_role_menu select  id,1719970958288199682 from sys_role where role_name like '%省联社安全保卫管理人员%';
+
+
 
 ALTER TABLE  core_protection MODIFY COLUMN id bigint NOT NULL COMMENT '主键';
 ALTER TABLE  core_protection MODIFY COLUMN create_by varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '创建人';
@@ -160,15 +366,6 @@ ALTER TABLE  core_safety_index_calculate_rule_item MODIFY COLUMN update_time dat
 ALTER TABLE  core_safety_index_calculate_rule_item MODIFY COLUMN update_by varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更新人';
 
 
-ALTER TABLE  core_safety_responsibility_book
-    COMMENT='安全责任书签订表';
-ALTER TABLE  core_safety_responsibility_book MODIFY COLUMN id bigint auto_increment NOT NULL COMMENT '主键';
-
-ALTER TABLE  core_safety_responsibility_task MODIFY COLUMN id bigint NOT NULL COMMENT '主键';
-
-
-ALTER TABLE  core_safety_responsibility_type MODIFY COLUMN id bigint auto_increment NOT NULL COMMENT '主键';
-
 ALTER TABLE  core_safety_task MODIFY COLUMN id bigint NOT NULL COMMENT '主键';
 ALTER TABLE  core_safety_task MODIFY COLUMN create_time datetime NULL COMMENT '创建时间';
 ALTER TABLE  core_safety_task MODIFY COLUMN update_time datetime NULL COMMENT '更新时间';
@@ -240,7 +437,8 @@ UPDATE sys_menu SET menu_name='监控调阅' WHERE id=2076;
 UPDATE sys_menu SET menu_name='调阅任务下发' WHERE id=2052;
 
 update sys_menu set menu_name='调阅情况跟踪' where menu_name='监控调阅任务管理';
--- 培训计划名称变更
+-- 教育培训菜单名称变更
+update sys_menu set menu_name='教育培训' where menu_name='教育培训管理' limit 1;
 update sys_menu set menu_name='培训任务下发' where menu_name='培训计划管理' limit 1;
 update sys_menu set menu_name='培训登记跟踪' where menu_name='培训任务管理' limit 1;
 update sys_menu set `menu_name`='履职情况跟踪' WHERE  `menu_name`='履职情况查询';

+ 8 - 5
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/dto/CoreSafeMonthScoreDetailPageDto.java

@@ -1,6 +1,7 @@
 package com.xunmei.common.core.domain.safetyindex.dto;
 
 import cn.hutool.core.date.DateUtil;
+import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.web.domain.PageRequest;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -15,7 +16,7 @@ import java.util.Date;
 @Data
 public class CoreSafeMonthScoreDetailPageDto extends PageRequest {
 
-    private Date date;
+    private String date;
 
     private Integer dataYear;
 
@@ -23,11 +24,13 @@ public class CoreSafeMonthScoreDetailPageDto extends PageRequest {
 
     private Long levelId;
 
-    public void setDate(Date date) {
+    public void setDate(String date) {
         this.date = date;
-        if (null != date){
-            this.dataYear = DateUtil.year(this.date);
-            this.dataMonth = DateUtil.month(this.date) + 1;
+        if (null != date) {
+            Date date1 = DateUtils.parseDate(date);
+
+            this.dataYear = DateUtil.year(date1);
+            this.dataMonth = DateUtil.month(date1) + 1;
         }
     }
 }

+ 8 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillPlanServiceImpl.java

@@ -305,11 +305,17 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
         } else {
             doUpdatePlan(plan, request);
             delAllByParentPlanId(plan.getId());
-            List<CoreDrillPlan> planList = buildPlanData(plan, null, false);
+            List<CoreDrillPlan> planList = null;
+            if (plan.getIssue() == 1) {
+                planList = buildPlanData(plan, null, false);
+            } else {
+                planList = ListUtil.list(true, plan);
+            }
+            List<CoreDrillPlan> finalPlanList = planList;
             TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
                 @Override
                 public void afterCommit() {
-                    for (CoreDrillPlan drillPlan : planList) {
+                    for (CoreDrillPlan drillPlan : finalPlanList) {
                         CompletableFuture.runAsync(() -> {
                             //如果不是省联社或者办事处,状态启用,并且是无周期或者立即生效
                             if ((ObjectUtil.equal(EduTrainingPlanStatus.USING.getCode(), plan.getPlanStatus())

+ 11 - 16
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java

@@ -19,8 +19,6 @@ import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.domain.drill.domain.*;
 import com.xunmei.common.core.domain.drill.dto.*;
 import com.xunmei.common.core.domain.drill.vo.*;
-import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTaskToUser;
-import com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskExportVo;
 import com.xunmei.common.core.domain.panel.dto.PanelListDto;
 import com.xunmei.common.core.domain.panel.enums.PanelTypeEnums;
 import com.xunmei.common.core.domain.panel.vo.PanelListVo;
@@ -30,7 +28,6 @@ import com.xunmei.common.core.enums.CycleCommonEnum;
 import com.xunmei.common.core.enums.ExportPdfType;
 import com.xunmei.common.core.enums.OrgTypeEnum;
 import com.xunmei.common.core.enums.drill.*;
-import com.xunmei.common.core.enums.edu.EduTrainingDoStatus;
 import com.xunmei.common.core.enums.edu.EduTrainingPlanCycleEnum;
 import com.xunmei.common.core.exception.SystemException;
 import com.xunmei.common.core.utils.DateUtils;
@@ -297,6 +294,8 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             coreDrillTask.setPlanCycle(DrillPlanCycleEnum.NONE.getCode());
             coreDrillTask.setCreateBy(SecurityUtils.getUserId().toString());
             coreDrillTask.setCreateTime(new Date());
+            coreDrillTask.setStartDate(DateUtils.toDate(request.getDrillStartTime()));
+            coreDrillTask.setEndDate(DateUtils.toDate(request.getDrillEndTime()));
 
         }
         taskToUserMapper.deleteByMap(MapUtil.of("drill_task_id", request.getId()));
@@ -928,9 +927,9 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             //查询待评价与待推优数据
             List<PanelListVo> waitEvaluateTaskList = coreDrillTaskMapper.selectWaitEvaluateTaskList(panelListDto);
             list.addAll(waitEvaluateTaskList);
-            list.removeIf(item -> DateUtil.compare(new Date(), item.getEndTime()) > 0);
         }
-
+        Date now = new Date();
+        list.removeIf(item->now.before(item.getStartTime()) || now.after(item.getEndTime()));
         list.forEach(item -> {
             item.setType(PanelTypeEnums.DRILL.getCode());
         });
@@ -957,9 +956,9 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
                     item.setStatus(10);
                 }
             });
-            waitRecTaskList.removeIf(item -> DateUtil.compare(new Date(), item.getEndTime()) > 0);
         }
-
+        Date now = new Date();
+        waitRecTaskList.removeIf(item->now.before(item.getStartTime()) || now.after(item.getEndTime()));
         waitRecTaskList.forEach(item -> {
             item.setType(PanelTypeEnums.DRILL_REC.getCode());
         });
@@ -971,21 +970,20 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
     public void export(CoreDrillTaskPageDto request, HttpServletResponse response) {
         dealParam(request);
         List<CoreDrillTaskExportVo> list = coreDrillTaskMapper.selectDrillTaskExportList(request);
-        if (ObjectUtil.isEmpty(list)){
+        if (ObjectUtil.isEmpty(list)) {
             throw new SystemException("未获取到数据");
         }
         Map<String, SysDictData> dicts = remoteDictDataService.selectDictByeType("core_drill_type", SecurityConstants.INNER)
                 .stream().collect(Collectors.toMap(SysDictData::getDictValue, v -> v));
         List<Long> taskIds = list.stream().map(x -> x.getId()).collect(Collectors.toList());
-        List<CoreDrillTaskToUser> allTaskUserList = taskToUserMapper.selectList(new LambdaQueryWrapper<CoreDrillTaskToUser>().in(CoreDrillTaskToUser::getDrillTaskId,taskIds));
+        List<CoreDrillTaskToUser> allTaskUserList = taskToUserMapper.selectList(new LambdaQueryWrapper<CoreDrillTaskToUser>().in(CoreDrillTaskToUser::getDrillTaskId, taskIds));
 
         for (CoreDrillTaskExportVo task : list) {
             task.setStatusText(DrillDoStatus.getName(task.getStatus()));
-            if(dicts.containsKey(task.getType()))
-            {
-                task.setTypeText( dicts.get(task.getType()).getDictLabel());
+            if (dicts.containsKey(task.getType())) {
+                task.setTypeText(dicts.get(task.getType()).getDictLabel());
             }
-            List<CoreDrillTaskToUser> userList = allTaskUserList.stream().filter(x->x.getDrillTaskId().equals(task.getId())).collect(Collectors.toList());
+            List<CoreDrillTaskToUser> userList = allTaskUserList.stream().filter(x -> x.getDrillTaskId().equals(task.getId())).collect(Collectors.toList());
             if (ObjectUtil.isNotEmpty(userList)) {
                 task.setTaskUserNames(getUserName(userList, 1));
                 task.setAbsenceNames(getUserName(userList, 2));
@@ -1019,9 +1017,6 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             return;
         }
         //如果当前时间大于任务的结束时间,将该数据移除
-        list.removeIf(item -> DateUtil.compare(new Date(), item.getEndTime()) > 0);
-        //筛选出待签名的数据
-        //List<PanelListVo> signList = list.stream().filter(item -> item.getStatus() == 1).collect(Collectors.toList());
         //如果用户不在某条数据的待签名范围中,将该数据移除
         list.removeIf(item -> {
             Long drillTaskId = item.getId();

+ 11 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingPlanServiceImpl.java

@@ -349,7 +349,7 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
                     orgService.selectOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
             //验证修改的字段是否符合要求
             String errorMsg = "有任务已执行或已过期,仅允许修改培训主题!";
-            validatePlanForStandard(request, plan, errorMsg,sysOrg.getType());
+            validatePlanForStandard(request, plan, errorMsg, sysOrg.getType());
             doUpdatePlan(plan, request);
             coreEduTrainingPlanMapper.updatePlanName(plan.getId(), plan.getPlanName());
             coreEduTrainingTaskMapper.updateTaskNameByParentPlanId(planId, plan.getPlanName(), range.getStartTime(), range.getEndTime());
@@ -357,11 +357,18 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
             doUpdatePlan(plan, request);
             delAllByParentPlanId(planId);
 
-            List<CoreEduTrainingPlan> planList = buildPlanData(plan, null, false);
+            List<CoreEduTrainingPlan> planList = null;
+            if (plan.getIssue() == 1) {
+                planList = buildPlanData(plan, null, false);
+            } else {
+                planList = ListUtil.list(true, plan);
+            }
+            //List<CoreEduTrainingPlan> planList = buildPlanData(plan, null, false);
+            List<CoreEduTrainingPlan> finalPlanList = planList;
             TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
                 @Override
                 public void afterCommit() {
-                    for (CoreEduTrainingPlan trainingPlan : planList) {
+                    for (CoreEduTrainingPlan trainingPlan : finalPlanList) {
                         CompletableFuture.runAsync(() -> {
                             //如果不是省联社或者办事处,状态启用,并且是无周期或者立即生效
                             if ((ObjectUtil.equal(EduTrainingPlanStatus.USING.getCode(), plan.getPlanStatus())
@@ -411,7 +418,7 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
 
     }
 
-    private void validatePlanForStandard(CoreEduTrainingPlanEditDto request, CoreEduTrainingPlan plan, String errorMsg,Integer type) {
+    private void validatePlanForStandard(CoreEduTrainingPlanEditDto request, CoreEduTrainingPlan plan, String errorMsg, Integer type) {
         validateFieldForStandard(request.getPlanCycle(), plan.getPlanCycle(), errorMsg);
         validateFieldForStandard(request.getExecOrgType(), plan.getExecOrgType(), errorMsg);
         List<Long> execOrgIdList = coreEduTrainingPlanToExecOrgMapper.selectOrgIdByPlanId(plan.getId());

+ 7 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -309,8 +309,10 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
             coreEduTrainingTask.setOrgName(sysOrg.getShortName());
             coreEduTrainingTask.setOrgPath(sysOrg.getPath());
             coreEduTrainingTask.setTitle(request.getTitle());
+            coreEduTrainingTask.setStartDate(DateUtils.toDate(request.getTrainingStartDateTime()));
+            coreEduTrainingTask.setEndDate(DateUtils.toDate(request.getTrainingEndDateTime()));
             coreEduTrainingTask.setTrainingStartDateTime(request.getTrainingStartDateTime());
-            coreEduTrainingTask.setTrainingEndDateTime(request.getTrainingStartDateTime());
+            coreEduTrainingTask.setTrainingEndDateTime(request.getTrainingEndDateTime());
             coreEduTrainingTask.setPlanCycle(EduTrainingPlanCycleEnum.NONE.getCode());
             coreEduTrainingTask.setCreateBy(SecurityUtils.getUserId().toString());
             coreEduTrainingTask.setCreateTime(new Date());
@@ -827,12 +829,13 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         if (ObjectUtil.isEmpty(list)) {
             return new ArrayList<>();
         }
-        list.removeIf(item -> DateUtil.compare(new Date(), item.getEndTime()) > 0);
+        //处理签名数据
+        dealEduTrainingSign(list);
+        Date now = new Date();
+        list.removeIf(item->now.before(item.getStartTime()) || now.after(item.getEndTime()));
         list.forEach(item -> {
             item.setType(PanelTypeEnums.EDU_TRAINING.getCode());
         });
-        //处理签名数据
-        dealEduTrainingSign(list);
         return list;
     }
 

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/controller/CoreSafetyExceptionDataController.java

@@ -3,6 +3,7 @@ package com.xunmei.core.safetyindex.controller;
 import com.xunmei.common.core.domain.safetyindex.dto.CoreSafetyIndexReCalculateDto;
 import com.xunmei.common.core.web.controller.BaseController;
 import com.xunmei.common.core.web.domain.AjaxResult;
+import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.core.safetyindex.service.ICoreSafetyExceptionDataService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -44,6 +45,7 @@ public class CoreSafetyExceptionDataController extends BaseController {
     }
 
     @ApiOperation(value = "重新计算")
+    @RequiresPermissions("core:safetyExceptionData:reCalculate")
     @PostMapping("/reCalculate")
     public AjaxResult reCalculate(@RequestBody CoreSafetyIndexReCalculateDto request) {