Prechádzať zdrojové kódy

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc into V0.0.2

jiawuxian 2 rokov pred
rodič
commit
782f931df9

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

@@ -739,6 +739,48 @@ CREATE TABLE `core_safetycheck_rule_point` (
 	PRIMARY KEY ( `id` ) USING BTREE 
 ) 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 NOT NULL DEFAULT '0',
+    `type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '指标分类code',
+    `project_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '指标项目code',
+    `point_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '指标要点code',
+    `deduction_type` int DEFAULT NULL COMMENT '扣分方式 1:直接扣分,2最高扣分',
+    `score` int DEFAULT NULL COMMENT '分值',
+    `formula` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扣分规则描述',
+    `org_type` int DEFAULT NULL COMMENT '机构类型',
+    `deleted` int DEFAULT '0' COMMENT '是否删除 0否1是',
+    `cycle` int DEFAULT NULL COMMENT '周期,只有在指标分类为安保履职时使用',
+    `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
+    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 NOT NULL DEFAULT '0',
+     `rule_id` bigint DEFAULT NULL COMMENT '安全指标主键',
+     `indicator_note` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '细化指数描述',
+     `calculate_type` int DEFAULT NULL COMMENT '计算类型 1累计数,2连续数,3 分类,4 固化值',
+     `indicator_days` int DEFAULT NULL COMMENT '连续数,连续多少天',
+     `item_type` int DEFAULT NULL COMMENT 'calculate_type为3是用来存具体分类',
+     `item_value` double(5,2) DEFAULT NULL COMMENT '扣分系数',
+     `order_num` int DEFAULT NULL COMMENT '排序',
+     PRIMARY KEY (`id`) USING BTREE,
+     KEY `rule_id` (`rule_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='安全指标指数细化表';
 -- -------------------------------------------------------
 -- ----------新增表脚本 end ----------------------------
 -- -------------------------------------------------------
@@ -822,7 +864,7 @@ IF
 	IF
 		NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'core_protection' AND COLUMN_NAME = 'alarm_host_id' ) THEN
 			ALTER TABLE `core_protection` CHANGE COLUMN `alarm_host_code` `alarm_host_id` BIGINT NULL DEFAULT NULL COMMENT '报警主机id' AFTER `org_name`;
-		ALTER TABLE `soc`.`core_protection_log` CHANGE COLUMN `alarm_host_code` `alarm_host_id` BIGINT NULL DEFAULT NULL COMMENT '报警主机id' AFTER `code`;
+		ALTER TABLE `core_protection_log` CHANGE COLUMN `alarm_host_code` `alarm_host_id` BIGINT NULL DEFAULT NULL COMMENT '报警主机id' AFTER `code`;
 		
 	END IF;
 	-- 安全检查是否下发标识
@@ -946,6 +988,7 @@ INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_paren
 delete from sys_dict_type where dict_type='drill_task_rec_status';
 delete from sys_dict_data where dict_type='drill_task_rec_status';
 delete from sys_dict_data where dict_type='science_protection';
+delete  from sys_dict_data where  dict_label in ('淋浴式灭火器','防毒面具');
 INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ( '演练任务推荐状态', 'drill_task_rec_status', '0', '超级管理员', now(), '', null, 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', 'drill_task_rec_status', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', 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, '行社优秀案例', '1', 'drill_task_rec_status', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', now(), null);
@@ -1370,13 +1413,15 @@ INSERT INTO sys_config (config_name, config_key, config_value, config_type, crea
 DELETE from `sys_dict_type` WHERE dict_type='question_confirm_status' or dict_type='question_reform_status';
 INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '问题确认状态', 'question_confirm_status', '0', '超级管理员', '2023-09-13 18:14:59', '', NULL, NULL);
 INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '问题整改状态', 'question_reform_status', '0', '超级管理员', '2023-09-13 18:15:18', '', NULL, NULL);
-delete  from sys_dict_type WHERE dict_type='send_time_type' or dict_type='message_type' or dict_type ='send_status';
+delete  from sys_dict_type WHERE dict_type in ('send_time_type' ,'message_type' ,'send_status' ,'evaluate_cycle');
 INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
 VALUES ( '发送时间类型', 'send_time_type', '0', '超级管理员', '2023-09-13 18:14:59', '', NULL, NULL);
 INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
 VALUES ( '消息类型', 'message_type', '0', '超级管理员', '2023-09-13 18:14:59', '', NULL, NULL);
 INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
 VALUES ( '发送状态', 'send_status', '0', '超级管理员', '2023-09-13 18:14:59', '', NULL, NULL);
+INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES ( '评价周期', 'evaluate_cycle', '0', '超级管理员', '2023-09-13 18:14:59', '', NULL, NULL);
 
 DELETE from `sys_dict_data` WHERE dict_type in ('post_no_pass','question_confirm_status','question_reform_status','send_status','message_type','send_time_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 ( 0, '待确认', '0', 'question_confirm_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 18:15:44', '', NULL, NULL);
@@ -1492,6 +1537,211 @@ 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, 'GA38-2015', '2', 'org_extend_detached_standard', NULL, 'default', 'N', '0', '超级管理员', '2023-09-14 16:58:37', '超级管理员', '2023-10-07 15:18:27', 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', 'org_extend_detached_standard', NULL, 'default', 'N', '0', '超级管理员', '2023-09-14 16:58:41', '超级管理员', '2023-10-07 15:18:35', NULL);
 
+-- 新增安全指数字典表
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('1001', '-1', '安全固化值');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100101', '1001', '位置信息');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10010101', '100101', '营业网点类型');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10010102', '100101', '金库类型');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10010103', '100101', '离行自助布放位置');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('1002', '-1', '报警管理');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100201', '1002', 'VMNS报警数据');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020101', '100201', '联动门');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020102', '100201', '加钞门磁');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020103', '100201', '振动');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020104', '100201', '入侵');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020105', '100201', '非法开门');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10020106', '100201', '110报警');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('1003', '-1', '监控中心');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100301', '1003', '指标项目');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10030101', '100301', '异地集中守库值守');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10030102', '100301', '报警主机异常数量');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('1004', '-1', '安保履职');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100402', '1004', '未登');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10040203', '100402', '网点安全员  (营业中)');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10040201', '100402', '网点安全员(营业前)');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10040202', '100402', '网点安全员(营业后)');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('1005', '-1', '问题整改');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100501', '1005', '问题数量');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10050101', '100501', '统计该机构被发现和登记的问题数');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('100502', '1005', '整改情况');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('10050201', '100502', '统计该机构对问题的整改情况');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('30000', '-1', '监控调阅');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('300010', '30000', '监控调阅-异常通道路数');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('300100', '300010', '异常通道路数-监控调阅时存在异常的通道数量');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('300020', '30000', '监控调阅-单次检查通道路数占比');
+INSERT INTO `core_safety_dict`( `code`, `parent_code`, `name`) VALUES ('300200', '300020', '单次检查通道路数占比-单次完成监控调阅任务时检查的通道数占该监控主机的通道总数');
+
+-- 新增安保综合评价规则表数据
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846668326289408, '1001', '100101', '10010101', 1, 1, '查询对应机构的“基本情况统计表”里面的字段“网点类型”,并根据“网点类型”,把类型编号写入该机构指数扣分数据源表中。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846672219586560, '1001', '100101', '10010102', 1, 1, '查询对应机构的“基本情况统计表”里面的字段“金库类型”,并根据“金库类型”,把类型编号写入该机构指数扣分数据源表中。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846676218052608, '1001', '100101', '10010103', 1, 1, '查询对应机构的“基本情况统计表”里面的字段“布放位置”,并根据“布放位置”,把位置编号写入该机构指数扣分数据源表中。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846680226758656, '1002', '100201', '10020101', 2, 8, '扣分=联动门双开报警数量*K+连续3天联动门双开报警数量次数*K1+连续5天联动门双开报警数量次数*K2+连续10天联动门双开报警数量次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846682265124864, '1002', '100201', '10020102', 2, 8, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.05;K1=1;K2=2;K3=3。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846683607908352, '1002', '100201', '10020102', 2, 8, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.05;K1=1;K2=2;K3=3。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846685447585792, '1002', '100201', '10020103', 2, 20, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.1;K1=2;K2=5;K3=10。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846686707646464, '1002', '100201', '10020103', 2, 20, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.1;K1=2;K2=5;K3=10。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846687946539008, '1002', '100201', '10020103', 2, 20, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.1;K1=2;K2=5;K3=10。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846689556873216, '1002', '100201', '10020104', 2, 25, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于25,取分值25。\nK为调节系数,可变更,建议测试期间K=0.2;K1=2;K2=5;K3=10。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846691054649344, '1002', '100201', '10020104', 2, 25, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于25,取分值25。\nK为调节系数,可变更,建议测试期间K=0.2;K1=2;K2=5;K3=10。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846693072814080, '1002', '100201', '10020104', 2, 25, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于25,取分值25。\nK为调节系数,可变更,建议测试期间K=0.2;K1=2;K2=5;K3=10。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846695059603456, '1002', '100201', '10020105', 2, 8, '扣分=各类报警数量*K+报警连续3天次数*K1+报警连续5天次数*K2+报警连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846696805957632, '1002', '100201', '10020106', 2, 5, '扣分=“110报警”条数*K+连续3天的“110报警”次数*K1+连续5天的“110报警”次数*K2+连续10天的“110报警”次数*K3;得分大于5,取分值5。\nK为调节系数,可变更,建议测试期间K=0.01;K1=1;K2=2;K3=3。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846698196025344, '1002', '100201', '10020106', 2, 5, '扣分=“110报警”条数*K+连续3天的“110报警”次数*K1+连续5天的“110报警”次数*K2+连续10天的“110报警”次数*K3;得分大于5,取分值5。\nK为调节系数,可变更,建议测试期间K=0.01;K1=1;K2=2;K3=3。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846700143771648, '1002', '100201', '10020106', 2, 5, '扣分=“110报警”条数*K+连续3天的“110报警”次数*K1+连续5天的“110报警”次数*K2+连续10天的“110报警”次数*K3;得分大于5,取分值5。\nK为调节系数,可变更,建议测试期间K=0.01;K1=1;K2=2;K3=3。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846702577319936, '1003', '100301', '10030101', 2, 8, '扣分=问题记录数量*K,得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=1。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846703826108416, '1003', '100301', '10030102', 2, 8, '扣分=报警主机异常总次数*K+报警主机异常连续3天次数*K1+报警主机异常连续5天次数*K2+报警主机异常连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846704899145728, '1003', '100301', '10030102', 2, 8, '扣分=报警主机异常总次数*K+报警主机异常连续3天次数*K1+报警主机异常连续5天次数*K2+报警主机异常连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846706034688000, '1003', '100301', '10030102', 2, 8, '扣分=报警主机异常总次数*K+报警主机异常连续3天次数*K1+报警主机异常连续5天次数*K2+报警主机异常连续10天次数*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846713285328896, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846715519614976, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846717305962496, '1005', '100501', '10050101', 2, 10, '扣分=问题数量*K+风险等级为“重大”的问题数量*K1+风险等级为“关注”的问题数量*K2+风险等级为“一般”的问题数量*K3+风险等级为“轻微”的问题数量*K4;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=0.05;K1=0.05;K2=0.15;K3=0.2;K4=0.25。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846720300892160, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 3, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846721706754048, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 4, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846723149234176, '1005', '100502', '10050201', 2, 10, '扣分=两次整改问题数*K+三次或三次以上整改问题数*K1+超期整改问题数*K2+超期未整改问题数量*K3;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=3;K1=5;K2=0.6;K3=1。', 5, 0, NULL, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846742989668352, '1004', '100401', '10040101', 2, 8, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846744220073984, '1004', '100401', '10040102', 2, 8, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于8,取分值8。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846745983598592, '1004', '100402', '10040201', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 3, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846747145125888, '1004', '100402', '10040202', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.5;K1=1.5;K2=3;K3=5。', 3, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846748579233792, '1004', '100401', '10040101', 2, 10, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846749870702592, '1004', '100401', '10040102', 2, 10, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于10,取分值10。\nK为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846751521619968, '1004', '100402', '10040201', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.5;K1=2;K2=3;K3=5。', 5, 0, 0, NULL);
+INSERT INTO `core_safety_index_calculate_rule`(`id`, `type_code`, `project_code`, `point_code`, `deduction_type`, `score`, `formula`, `org_type`, `deleted`, `cycle`, `remark`) VALUES (3846752731185152, '1004', '100402', '10040202', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。\nK为调节系数,可变更,建议测试期间K=0.5;K1=2;K2=3;K3=5。', 5, 0, 0, NULL);
+
+-- 新增安保综合评价规则项表数据
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846668326797312, 3846668326289408, '乡镇网点', 4, NULL, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846668326797313, 3846668326289408, '县城网点', 4, NULL, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846668326797314, 3846668326289408, '城区网点', 4, NULL, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846672220061696, 3846672219586560, '网点库', 4, NULL, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846672220061697, 3846672219586560, '支行库', 4, NULL, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846672220061698, 3846672219586560, '现金中心', 4, NULL, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846676218576896, 3846676218052608, '乡镇', 4, NULL, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846676218576897, 3846676218052608, '县城', 4, NULL, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846676218576898, 3846676218052608, '城区', 4, NULL, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846680227381248, 3846680226758656, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846680227381249, 3846680226758656, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846680227381250, 3846680226758656, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846680227381251, 3846680226758656, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846682265583616, 3846682265124864, '报警总数', 1, NULL, NULL, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846682265583617, 3846682265124864, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846682265583618, 3846682265124864, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846682265583619, 3846682265124864, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846683608776704, 3846683607908352, '报警总数', 1, NULL, NULL, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846683608776705, 3846683607908352, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846683608776706, 3846683607908352, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846683608776707, 3846683607908352, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846685447979008, 3846685447585792, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846685447979009, 3846685447585792, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846685447979010, 3846685447585792, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846685447979011, 3846685447585792, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846686708269056, 3846686707646464, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846686708269057, 3846686707646464, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846686708269058, 3846686707646464, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846686708269059, 3846686707646464, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846687947145216, 3846687946539008, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846687947145217, 3846687946539008, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846687947145218, 3846687946539008, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846687947145219, 3846687946539008, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846689557217280, 3846689556873216, '报警总数', 1, NULL, NULL, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846689557217281, 3846689556873216, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846689557217282, 3846689556873216, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846689557217283, 3846689556873216, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846691054895104, 3846691054649344, '报警总数', 1, NULL, NULL, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846691054895105, 3846691054649344, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846691054895106, 3846691054649344, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846691054895107, 3846691054649344, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846693073338368, 3846693072814080, '报警总数', 1, NULL, NULL, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846693073338369, 3846693072814080, '报警连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846693073338370, 3846693072814080, '报警连续五天', 2, 5, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846693073338371, 3846693072814080, '报警连续十天', 2, 10, NULL, 10.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846695060111360, 3846695059603456, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846695060111361, 3846695059603456, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846695060111362, 3846695059603456, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846695060111363, 3846695059603456, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846696807202816, 3846696805957632, '报警总数', 1, NULL, NULL, 0.01, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846696807202817, 3846696805957632, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846696807202818, 3846696805957632, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846696807202819, 3846696805957632, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846698196631552, 3846698196025344, '报警总数', 1, NULL, NULL, 0.01, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846698196631553, 3846698196025344, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846698196631554, 3846698196025344, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846698196631555, 3846698196025344, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846700144050176, 3846700143771648, ' 报警总数', 1, NULL, NULL, 0.01, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846700144050177, 3846700143771648, '报警连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846700144050178, 3846700143771648, '报警连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846700144050179, 3846700143771648, '报警连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846702578221056, 3846702577319936, '登记问题数量', 1, NULL, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846703826649088, 3846703826108416, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846703826649089, 3846703826108416, '连续报警三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846703826649090, 3846703826108416, '连续报警五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846703826649091, 3846703826108416, '连续报警十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846704899833856, 3846704899145728, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846704899833857, 3846704899145728, '编辑 连续报警三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846704899833858, 3846704899145728, '连续报警五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846704899833859, 3846704899145728, '连续报警十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846706034999296, 3846706034688000, '报警总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846706034999297, 3846706034688000, '连续报警三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846706034999298, 3846706034688000, '连续报警五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846706034999299, 3846706034688000, '连续报警十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846713285820416, 3846713285328896, '问题数量', 1, NULL, NULL, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846713285820417, 3846713285328896, '风险等级为轻微的问题数量', 3, NULL, 2, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846713285820418, 3846713285328896, '风险等级为关注的问题数量', 3, NULL, 1, 0.15, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846713285820419, 3846713285328896, '风险等级为一般的问题数量', 3, NULL, 3, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846713285820420, 3846713285328896, '风险等级为重大的问题数量', 3, NULL, 5, 0.25, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846715519942656, 3846715519614976, '问题数量', 1, NULL, NULL, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846715519942657, 3846715519614976, '风险等级为轻微的问题数量', 3, NULL, 2, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846715519942658, 3846715519614976, '风险等级为关注的问题数量', 3, NULL, 1, 0.15, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846715519942659, 3846715519614976, '风险等级为一般的问题数量', 3, NULL, 3, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846715519942660, 3846715519614976, '风险等级为重大的问题数量', 3, NULL, 5, 0.25, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846717306454016, 3846717305962496, '问题数量', 1, NULL, NULL, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846717306454017, 3846717305962496, '风险等级为轻微的问题数量', 3, NULL, 2, 0.05, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846717306454018, 3846717305962496, '风险等级为关注的问题数量', 3, NULL, 1, 0.15, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846717306454019, 3846717305962496, '风险等级为一般的问题数量', 3, NULL, 3, 0.20, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846717306454020, 3846717305962496, '风险等级为重大的问题数量', 3, NULL, 5, 0.25, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846720301350912, 3846720300892160, ' 超期未整改问题数量', 3, NULL, 2, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846720301350913, 3846720300892160, '两次整改问题数', 3, NULL, 3, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846720301350914, 3846720300892160, '三次或三次以上整改问题数', 3, NULL, 4, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846720301350915, 3846720300892160, '超期整改问题数', 3, NULL, 1, 0.60, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846721707180032, 3846721706754048, '超期整改问题数', 3, NULL, 1, 0.60, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846721707180033, 3846721706754048, '三次或三次以上整改问题数', 3, NULL, 4, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846721707180034, 3846721706754048, '超期未整改问题数量', 3, NULL, 2, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846721707180035, 3846721706754048, ' 两次整改问题数', 3, NULL, 3, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846723149578240, 3846723149234176, '超期整改问题数', 3, NULL, 1, 0.60, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846723149578241, 3846723149234176, '三次或三次以上整改问题数', 3, NULL, 4, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846723149578242, 3846723149234176, '超期未整改问题数量', 3, NULL, 2, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846723149578243, 3846723149234176, '两次整改问题数', 3, NULL, 3, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846742990225408, 3846742989668352, '补登天数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846742990225409, 3846742989668352, '补登连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846742990225410, 3846742989668352, '补登连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846742990225411, 3846742989668352, '补登连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846744220352512, 3846744220073984, '补登天数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846744220352513, 3846744220073984, '补登连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846744220352514, 3846744220073984, '补登连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846744220352515, 3846744220073984, '补登连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846745984024576, 3846745983598592, '未登总数', 1, NULL, NULL, 0.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846745984024577, 3846745983598592, '未登连续三天', 2, 3, NULL, 1.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846745984024578, 3846745983598592, '未登连续五天', 2, 5, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846745984024579, 3846745983598592, '未登连续十天', 2, 10, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846747145633792, 3846747145125888, '未登总数', 1, NULL, NULL, 0.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846747145633793, 3846747145125888, '未登连续三天', 2, 3, NULL, 1.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846747145633794, 3846747145125888, '未登连续五天', 2, 5, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846747145633795, 3846747145125888, '未登连续十天', 2, 10, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846748579627008, 3846748579233792, '补登总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846748579627009, 3846748579233792, '补登连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846748579627010, 3846748579233792, '补登连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846748579627011, 3846748579233792, '补登连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846749871144960, 3846749870702592, '补登总数', 1, NULL, NULL, 0.10, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846749871144961, 3846749870702592, '补登连续三天', 2, 3, NULL, 1.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846749871144962, 3846749870702592, '补登连续五天', 2, 5, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846749871144963, 3846749870702592, '补登连续十天', 2, 10, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846751521964032, 3846751521619968, '未登天数', 1, NULL, NULL, 0.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846751521964033, 3846751521619968, '未登连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846751521964034, 3846751521619968, '未登连续五天', 2, 5, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846751521964035, 3846751521619968, '未登连续十天', 2, 10, NULL, 5.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742208, 3846752731185152, '未登天数', 1, NULL, NULL, 0.50, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742209, 3846752731185152, '未登连续三天', 2, 3, NULL, 2.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742210, 3846752731185152, '未登连续五天', 2, 5, NULL, 3.00, NULL);
+INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742211, 3846752731185152, ' 未登连续十天', 2, 10, NULL, 5.00, NULL);
+
 -- -------------------------------------------------------
 -- ----------新增数据 end  ----------------------------
 -- -------------------------------------------------------

+ 9 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/controller/CoreMessageCenterController.java

@@ -52,7 +52,15 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(coreMessageCenterService.selectCoreMessageCenterById(id));
     }
-
+    /**
+     * 已读
+     */
+    @ApiOperation(value = "已读")
+    @RequiresPermissions("core:center:edit")
+    @GetMapping(value = "/isRead/{id}")
+    public AjaxResult isRead(@PathVariable("id") Long id) {
+        return success(coreMessageCenterService.isRead(id));
+    }
     /**
      * 新增消息中心
      */

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/service/ICoreMessageCenterService.java

@@ -23,6 +23,7 @@ public interface ICoreMessageCenterService extends IService<CoreMessageCenter> {
      * @return 消息中心
      */
      CoreMessageCenter selectCoreMessageCenterById(Long id);
+     int isRead(Long id);
 
     /**
      * 查询消息中心列表

+ 10 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/service/impl/CoreMessageCenterServiceImpl.java

@@ -40,6 +40,13 @@ public class CoreMessageCenterServiceImpl extends ServiceImpl<CoreMessageCenterM
         return coreMessageCenterMapper.selectById(id);
     }
 
+    @Override
+    public int isRead(Long id) {
+        CoreMessageCenter coreMessageCenter = coreMessageCenterMapper.selectById(id);
+        coreMessageCenter.setIsRead("1");
+        return coreMessageCenterMapper.updateById(coreMessageCenter);
+    }
+
     /**
      * 查询消息中心列表
      *
@@ -70,8 +77,8 @@ public class CoreMessageCenterServiceImpl extends ServiceImpl<CoreMessageCenterM
      */
     @Override
     public int insertCoreMessageCenter(CoreMessageCenter coreMessageCenter) {
-                coreMessageCenter.setCreateTime(DateUtils.getNowDate());
-            return coreMessageCenterMapper.insert(coreMessageCenter);
+        coreMessageCenter.setCreateTime(DateUtils.getNowDate());
+        return coreMessageCenterMapper.insert(coreMessageCenter);
     }
 
     /**
@@ -82,7 +89,7 @@ public class CoreMessageCenterServiceImpl extends ServiceImpl<CoreMessageCenterM
      */
     @Override
     public int updateCoreMessageCenter(CoreMessageCenter coreMessageCenter) {
-                coreMessageCenter.setUpdateTime(DateUtils.getNowDate());
+        coreMessageCenter.setUpdateTime(DateUtils.getNowDate());
         return coreMessageCenterMapper.updateById(coreMessageCenter);
     }
 

+ 2 - 5
soc-modules/soc-modules-gen/src/main/java/com/xunmei/gen/controller/GenController.java

@@ -45,11 +45,8 @@ public class GenController extends BaseController
     @GetMapping("/list")
     public TableDataInfo genList(GenTable genTable)
     {
-        List<GenTable> list = genTableService.selectGenTableList(genTable);
-        TableDataInfo info = new TableDataInfo();
-        info.setRows(list);
-        info.setTotal(list.size());
-        return info;
+        return genTableService.selectGenTableList(genTable);
+
 
     }
 

+ 4 - 0
soc-modules/soc-modules-gen/src/main/java/com/xunmei/gen/mapper/GenTableMapper.java

@@ -1,8 +1,10 @@
 package com.xunmei.gen.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.gen.domain.GenTable;
 import com.xunmei.system.api.domain.SysArea;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -83,4 +85,6 @@ public interface GenTableMapper extends BaseMapper<GenTable>
      * @return 结果
      */
     int deleteGenTableByIds(Long[] ids);
+
+    Page<GenTable> selectPageData(Page<GenTable> page, @Param("genTable") GenTable genTable);
 }

+ 11 - 2
soc-modules/soc-modules-gen/src/main/java/com/xunmei/gen/service/GenTableServiceImpl.java

@@ -2,12 +2,15 @@ package com.xunmei.gen.service;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.Constants;
 import com.xunmei.common.core.constant.GenConstants;
 import com.xunmei.common.core.exception.ServiceException;
 import com.xunmei.common.core.text.CharsetKit;
 import com.xunmei.common.core.utils.StringUtils;
+import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.gen.domain.GenTable;
 import com.xunmei.gen.domain.GenTableColumn;
@@ -76,9 +79,15 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
      * @return 业务集合
      */
     @Override
-    public List<GenTable> selectGenTableList(GenTable genTable)
+    public TableDataInfo<GenTable> selectGenTableList(GenTable genTable)
     {
-        return genTableMapper.selectGenTableList(genTable);
+        Page<GenTable>  page = new Page<>(genTable.getPageNum(), genTable.getPageSize());
+
+        final LambdaQueryWrapper<GenTable> wrapper = new LambdaQueryWrapper<>();
+        wrapper.like(StringUtils.isNotEmpty(genTable.getTableName()),GenTable::getTableName,genTable.getTableName());
+
+        final Page<GenTable> page1 = genTableMapper.selectPageData(page, genTable);
+        return TableDataInfo.build(page1);
     }
 
     /**

+ 2 - 1
soc-modules/soc-modules-gen/src/main/java/com/xunmei/gen/service/IGenTableService.java

@@ -1,6 +1,7 @@
 package com.xunmei.gen.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.gen.domain.GenTable;
 import com.xunmei.system.api.domain.SysArea;
 
@@ -20,7 +21,7 @@ public interface IGenTableService extends IService<GenTable>
      * @param genTable 业务信息
      * @return 业务集合
      */
-    List<GenTable> selectGenTableList(GenTable genTable);
+    TableDataInfo<GenTable> selectGenTableList(GenTable genTable);
 
     /**
      * 查询据库列表

+ 12 - 0
soc-modules/soc-modules-gen/src/main/resources/mapper/generator/GenTableMapper.xml

@@ -199,4 +199,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
+	<select id="selectPageData" resultMap="GenTableResult">
+		select * from gen_table
+		<where>
+			<if test="genTable.tableName != null and genTable.tableName != ''">
+				AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%'))
+			</if>
+			<if test="genTable.tableComment != null and genTable.tableComment != ''">
+				AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%'))
+			</if>
+
+		</where>
+    </select>
 </mapper>

+ 41 - 29
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java

@@ -92,8 +92,8 @@ public class SysUserController extends BaseController {
         ajax.put("data", sysUserTableDataInfo);
         boolean admin = false;
         SysUser sysUser = userService.selectUserById(SecurityUtils.getUserId());
-        if (null!=sysUser&&"Y".equals(sysUser.getIsManage())){
-            admin=true;
+        if (null != sysUser && "Y".equals(sysUser.getIsManage())) {
+            admin = true;
         }
  /*       String s = roleService.selectRoleNameByUserId(SecurityUtils.getUserId());
         if (StringUtils.isNotEmpty(s)) {
@@ -221,11 +221,13 @@ public class SysUserController extends BaseController {
             sysUser.setRoles(roles);
             String sex = "-";
             String status = "禁用";
-            if (null != sysUser&&null!=sysUser.getGender()) {
-                if (sysUser.getGender().equals("1")) {
-                    sex = "女";
-                }else {
-                    sex="男";
+            if (null != sysUser) {
+                if (null != sysUser.getGender()) {
+                    if (sysUser.getGender().equals("1")) {
+                        sex = "女";
+                    } else {
+                        sex = "男";
+                    }
                 }
                 if (sysUser.getIsLock().equals("0")) {
                     status = "启用";
@@ -480,11 +482,17 @@ public class SysUserController extends BaseController {
      */
     @RequiresPermissions("system:user:export")
     @PostMapping("/export")
-    public void export(SysUser user, HttpServletResponse response)  {
-        List<UserExport> list=userService.down(user);
+    public void export(SysUser user, HttpServletResponse response) {
+        List<UserExport> list = userService.down(user);
         if (ObjectUtil.isEmpty(list)) {
             throw new RuntimeException("导出数据为空!");
         }
+        list.forEach(e->{
+            if (e.getIsManager()==null) {
+                e.setIsManager("N");
+            }
+        });
+
         if(list.size()>10000){
             throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
         }
@@ -503,18 +511,19 @@ public class SysUserController extends BaseController {
             response.setCharacterEncoding("utf-8");
         }
     }
+
     /**
      * 导出管理人员数据
      */
     @RequiresPermissions("system:user:exportManager")
     @PostMapping("/exportManager")
-    public void exportManager(SysUser user, HttpServletResponse response)  {
-        List<UserExport> list=userService.down(user);
+    public void exportManager(SysUser user, HttpServletResponse response) {
+        List<UserExport> list = userService.down(user);
         if (ObjectUtil.isEmpty(list)) {
             throw new RuntimeException("导出数据为空!");
         }
-        list=list.stream().filter(e -> "Y".equals(e.getIsManager())).collect(Collectors.toList());
-        if(list.size()>10000){
+        list = list.stream().filter(e -> "Y".equals(e.getIsManager())).collect(Collectors.toList());
+        if (list.size() > 10000) {
             throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
         }
         try {
@@ -532,6 +541,7 @@ public class SysUserController extends BaseController {
             response.setCharacterEncoding("utf-8");
         }
     }
+
     /**
      * 导入
      */
@@ -539,7 +549,7 @@ public class SysUserController extends BaseController {
     @ResponseBody
     @PostMapping("/importData")
     @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
-    public  AjaxResult importData(MultipartFile file, boolean updateSupport){
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) {
         List<UserExport> list = new ArrayList<>();
         // 读取excel
         EasyExcel.read(multipartFileToFile(file), UserExport.class, new AnalysisEventListener<UserExport>() {
@@ -549,25 +559,26 @@ public class SysUserController extends BaseController {
 //                System.out.println("解析数据为:" + user.toString());
                 list.add(user);
             }
+
             // 全部解析完成被调用
             @Override
             public void doAfterAllAnalysed(AnalysisContext analysisContext) {
 //                System.out.println("解析完成...");
-                List<String> names=list.stream().map(UserExport::getName).collect(Collectors.toList());
+                List<String> names = list.stream().map(UserExport::getName).collect(Collectors.toList());
                 List<String> exist = userService.selectCountByNames(names);
-                if (exist.size()>0){
-                    throw new RuntimeException("用户"+exist+"已存在");
+                if (exist.size() > 0) {
+                    throw new RuntimeException("用户" + exist + "已存在");
                 }
                 // 将解析的数据保存到数据库
-                for (UserExport u :list) {
+                for (UserExport u : list) {
                     //构建基础user对象
-                    SysUser user=new SysUser();
-                    BeanUtils.copyProperties(u,user);
+                    SysUser user = new SysUser();
+                    BeanUtils.copyProperties(u, user);
                     user.setDeleted(0);
-                    user.setIsLock("启用".equals(u.getIsLock())?"1":"0");
-                    SysOrg org= orgMapper.selectOne(new LambdaQueryWrapper<SysOrg>().eq(SysOrg::getName,u.getOrgName()).eq(SysOrg::getDeleted,0));
-                    if (org==null){
-                        throw new RuntimeException("机构"+u.getOrgName()+"不存在");
+                    user.setIsLock("启用".equals(u.getIsLock()) ? "1" : "0");
+                    SysOrg org = orgMapper.selectOne(new LambdaQueryWrapper<SysOrg>().eq(SysOrg::getName, u.getOrgName()).eq(SysOrg::getDeleted, 0));
+                    if (org == null) {
+                        throw new RuntimeException("机构" + u.getOrgName() + "不存在");
                     }
                     user.setOrgName(org.getName());
                     user.setOrgPath(org.getPath());
@@ -583,10 +594,10 @@ public class SysUserController extends BaseController {
                     user.setOriginalOrgId(user.getOrgId());
                     userService.insertUser(user);
                     //构建用户角色关联关系
-                    String [] roleNames = user.getRoleNames().split(",");
+                    String[] roleNames = user.getRoleNames().split(",");
                     List<SysRole> roles = roleService.list(new LambdaQueryWrapper<SysRole>().in(SysRole::getRoleName, roleNames));
-                    if (roles.size()!=roleNames.length){
-                        throw new RuntimeException("角色"+ Arrays.toString(roleNames) +"存在异常");
+                    if (roles.size() != roleNames.length) {
+                        throw new RuntimeException("角色" + Arrays.toString(roleNames) + "存在异常");
                     }
                     for (SysRole r :
                             roles) {
@@ -600,12 +611,13 @@ public class SysUserController extends BaseController {
         }).sheet().doRead();
         return success();
     }
+
     /***
      * 功能描述:
      * MultipartFile 转 File
      * @return: java.io.File
      */
-    public static File multipartFileToFile(MultipartFile multipartFile){
+    public static File multipartFileToFile(MultipartFile multipartFile) {
         // 获取文件名
         String fileName = multipartFile.getOriginalFilename();
         // 获取文件后缀
@@ -613,7 +625,7 @@ public class SysUserController extends BaseController {
         String suffix = fileName.substring(fileName.lastIndexOf("."));
         // 若需要防止临时文件重复,需要在文件名后加上UUID
         try {
-            File file = File.createTempFile(fileName.substring(0,fileName.lastIndexOf("."))+ UUID.randomUUID(),suffix);
+            File file = File.createTempFile(fileName.substring(0, fileName.lastIndexOf(".")) + UUID.randomUUID(), suffix);
             multipartFile.transferTo(file);
             return file;
         } catch (IOException e) {

+ 10 - 3
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserInformationServiceImpl.java

@@ -15,8 +15,7 @@ import com.xunmei.system.service.ISysUserInformationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 /**
  * 【请填写功能名称】Service业务层处理
@@ -82,12 +81,20 @@ public class SysUserInformationServiceImpl extends ServiceImpl<SysUserInformatio
     public SysUserInformation getInformationByUserId(Long id) {
         return sysUserInformationMapper.getInformationByUserId(id);
     }
-
+public Date getTime(Date time){
+    Calendar calendar=new GregorianCalendar();
+    calendar.setTime(time);
+    calendar.add(Calendar.DATE,1);
+    return calendar.getTime();
+}
     @Override
     public int extendUser(SysUserInformation sysUserInformation) {
         SysUserInformation informationByUserId = sysUserInformationMapper.getInformationByUserId(sysUserInformation.getUserId());
         int i = 0;
         LoginUser loginUser = SecurityUtils.getLoginUser();
+        sysUserInformation.setWorkTime(getTime(sysUserInformation.getWorkTime()));
+        sysUserInformation.setEntryTime(getTime(sysUserInformation.getEntryTime()));
+        sysUserInformation.setBornTime(getTime(sysUserInformation.getBornTime()));
         if (null != informationByUserId) {
             sysUserInformation.setUpdateTime(DateUtils.getNowDate());
             sysUserInformation.setUpdateBy(loginUser.getUsername());

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/UserManagerConverter.java

@@ -25,7 +25,7 @@ public class UserManagerConverter implements Converter<String> {
     @Override
     public CellData convertToExcelData(String s, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
         // 根据条件修改是否管理人员的值
-        if (s!=null) {
+        if ("Y".equals(s)) {
             return new CellData("是");
         } else {
             return new CellData("否");