Explorar el Código

Merge remote-tracking branch 'origin/V0.0.2' into V0.0.2

ouyang hace 2 años
padre
commit
777b87cdfe
Se han modificado 30 ficheros con 884 adiciones y 399 borrados
  1. 164 209
      project_data/sql/0.0.2/soc/soc.sql
  2. 4 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteWorkTimeService.java
  3. 1 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteWorkTimesFallbackFactory.java
  4. 1 1
      soc-auth/src/main/java/com/xunmei/auth/service/FJNXLoginService.java
  5. 12 10
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/config/MybatisPlusConfig.java
  6. 296 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/interceptor/EscapeLikeSqlInterceptor.java
  7. 1 1
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/utils/file/MimeTypeUtils.java
  8. 4 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/domain/CoreMonitoringTaskRegistrationMonitor.java
  9. 3 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/domain/TMonitoringRetrievalPlan.java
  10. 15 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/CoreMonitoringTaskMonitorInfoServiceImpl.java
  11. 80 6
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java
  12. 0 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/vo/CoreMonitoringTaskRegistrationMonitorVO.java
  13. 130 95
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  14. 10 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java
  15. 3 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/AppPlanService.java
  16. 43 34
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java
  17. 9 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/controller/CoreMonitoringRetrievalTaskController.java
  18. 7 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/mapper/CoreMonitoringRetrievalTaskMapper.java
  19. 5 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/ICoreMonitoringRetrievalTaskService.java
  20. 11 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/impl/CoreMonitoringRetrievalTaskServiceImpl.java
  21. 13 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java
  22. 4 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/ICoreSafecheckPlanService.java
  23. 42 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafecheckPlanServiceImpl.java
  24. 9 9
      soc-modules/soc-modules-core/src/main/resources/mapper/access/CoreMonitoringTaskRegistrationMonitorMapper.xml
  25. 2 5
      soc-modules/soc-modules-core/src/main/resources/mapper/edu/CoreEduTrainingTaskMapper.xml
  26. 6 1
      soc-modules/soc-modules-core/src/main/resources/mapper/retrieval/CoreMonitoringRetrievalTaskMapper.xml
  27. 2 2
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysWorkTimeController.java
  28. 1 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysWorkTimeService.java
  29. 3 2
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeServiceImpl.java
  30. 3 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 164 - 209
project_data/sql/0.0.2/soc/soc.sql

@@ -981,7 +981,7 @@ IF
 		
 	END IF;
 	IF
-		EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'soc.sys_area_check' AND COLUMN_NAME = 'area_id' ) THEN
+		EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sys_area_check' AND COLUMN_NAME = 'area_id' ) THEN
 			ALTER TABLE sys_area_check DROP COLUMN area_id;
 		
 	END IF;
@@ -1031,7 +1031,19 @@ IF
 	-- 调阅计划是否立即生成任务
     IF
 NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'core_monitoring_retrieval_plan' AND COLUMN_NAME = 'immediately' ) THEN
-ALTER TABLE `core_monitoring_retrieval_plan` ADD COLUMN `immediately` VARCHAR ( 2 ) DEFAULT NULL COMMENT '是否立即生成任务1是2否';
+ALTER TABLE `core_monitoring_retrieval_plan` ADD COLUMN `immediately` bit(1) NULL DEFAULT NULL COMMENT '立即生成任务';
+
+END IF;
+-- 调阅任务绑定硬盘录像机
+  IF
+NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'core_monitoring_task_registration_monitor' AND COLUMN_NAME = 'host_name' ) THEN
+ALTER TABLE `core_monitoring_task_registration_monitor` ADD COLUMN `host_name` VARCHAR ( 255 ) DEFAULT NULL COMMENT '硬盘录像机';
+
+END IF;
+-- 调阅任务绑定摄像机
+  IF
+NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'core_monitoring_task_registration_monitor' AND COLUMN_NAME = 'video_channel_name' ) THEN
+ALTER TABLE `core_monitoring_task_registration_monitor` ADD COLUMN `video_channel_name` VARCHAR ( 255 ) DEFAULT NULL COMMENT '摄像机';
 
 END IF;
 	-- 履职计划是否下发标识
@@ -1648,6 +1660,10 @@ DELETE from `sys_dict_data` WHERE dict_type='resumption_plan_status';
 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', 'resumption_plan_status', NULL, 'default', 'N', '0', '何悦', '2023-08-29 10:25:18', '省联社账号', '2023-10-16 18:19:52', 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, '草稿', '0', 'resumption_plan_status', NULL, 'default', 'N', '0', '何悦', '2023-08-29 10:25:29', '省联社账号', '2023-10-16 18:19:59', 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, '停用', '2', 'resumption_plan_status', NULL, 'default', 'N', '0', '省联社账号', '2023-10-16 18:20:15', '', NULL, NULL);
+DELETE FROM `sys_dict_data` WHERE `dict_type`='check_status';
+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', 'check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-12 09:36:04', '省联社账号', '2023-10-17 10:19:11', 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', 'check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-12 09:36:12', '省联社账号', '2023-10-17 10:19:47', 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, '草稿', '0', 'check_status', NULL, 'default', 'N', '0', '省联社账号', '2023-10-17 10:20:01', '', NULL, NULL);
 
 
 
@@ -1792,209 +1808,121 @@ delete from `sys_dict_data` where dict_label ='无周期' and dict_type='check_c
 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 (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);
+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_dict (id, code, parent_code, name) VALUES (65, '100602', '1006', '监控调阅-任务连续逾期');
+INSERT INTO core_safety_dict (id, code, parent_code, name) VALUES (66, '10060201', '100602', '未在规定时间内完成监控调阅任务');
+
+
+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, null, null, '2023-10-17 15:41:41', 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, null, '', '2023-10-17 15:43:52', null, 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, create_time, create_by, update_time, update_by) VALUES (1714182049401733122, '1006', '100602', '10060201', 2, 10, '', 4, 0, null, '', '2023-10-17 15:30:23', null, 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, create_time, create_by, update_time, update_by) VALUES (1714172822255894529, '1006', '100601', '10060101', 2, 10, '', 4, 0, null, '', '2023-10-17 14:53:43', null, '2023-10-17 14:54:33', 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, null, null, '2023-10-17 15:38:59', 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 (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, null, null, 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, 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, null, null, 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, 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, null, null, 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, 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, null, null, 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, 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, null, null, 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, 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, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846742989668352, '1004', '100401', '10040101', 2, 8, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于8,取分值8。
+K为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 1, 0, null, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846744220073984, '1004', '100401', '10040102', 2, 8, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于8,取分值8。
+K为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 3, 1, 0, null, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846748579233792, '1004', '100401', '10040101', 2, 10, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于10,取分值10。
+K为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 1, 0, null, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846749870702592, '1004', '100401', '10040102', 2, 10, '扣分=补登天数*K+补登连续3天*K1+补登连续5天*K2+补登连续10天*K3;得分大于10,取分值10。
+K为调节系数,可变更,建议测试期间K=0.1;K1=1;K2=2;K3=3。', 5, 1, 0, null, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846751521619968, '1004', '100402', '10040201', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。
+K为调节系数,可变更,建议测试期间K=0.5;K1=2;K2=3;K3=5。', 5, 1, 0, null, null, null, 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, create_time, create_by, update_time, update_by) VALUES (3846752731185152, '1004', '100402', '10040202', 2, 20, '扣分=未登天数*K+未登连续3天*K1+未登连续5天*K2+未登连续10天*K3;得分大于20,取分值20。
+K为调节系数,可变更,建议测试期间K=0.5;K1=2;K2=3;K3=5。', 5, 1, 0, null, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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 (1714172822285254657, 1714172822255894529, '异常通道数:1', 1, null, null, 3, 0, null, null, '2023-10-17 14:54:33', '1');
+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 (1714173030498893826, 1714172822255894529, '异常通道数:3', 1, null, null, 4, 0, '2023-10-17 14:54:33', '1', '2023-10-17 14:54:33', '1');
+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 (1714173030503088129, 1714172822255894529, '异常通道数:5', 1, null, null, 5, 0, '2023-10-17 14:54:33', '1', '2023-10-17 14:54:33', '1');
+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, null, null, null, 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, null, null, null, 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, '2023-10-17 15:41:41', '1', '2023-10-17 15:41:41', '1');
+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, '2023-10-17 15:43:52', '1', null, '1');
+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, null, null, '2023-10-17 15:38:59', '1');
+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, null, null, null, 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, null, null, '2023-10-17 15:38:59', '1');
+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, null, null, null, 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, null, null, '2023-10-17 15:38:59', '1');
+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, null, null, null, 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, null, null, null, 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, '2023-10-09 14:54:25', '1', '2023-10-09 15:05:25', '1');
+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, null, null, '2023-10-17 15:38:59', '1');
+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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, '2023-10-17 15:41:41', '1', '2023-10-17 15:41:41', '1');
+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, '2023-10-17 15:43:52', '1', null, '1');
+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, '2023-10-17 15:41:41', '1', '2023-10-17 15:41:41', '1');
+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, '2023-10-17 15:43:52', '1', null, '1');
+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, '2023-10-17 15:43:52', '1', null, '1');
+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, '2023-10-17 15:41:41', '1', '2023-10-17 15:41:41', '1');
+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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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 (1714182049414316033, 1714182049401733122, '连续逾期一天', 2, 1, null, 1, 0, '2023-10-17 15:30:23', '1', null, '1');
+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 (1714182049494007809, 1714182049401733122, '连续逾期三天', 2, 3, null, 3, 0, '2023-10-17 15:30:23', '1', null, '1');
+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 (1714182049498202113, 1714182049401733122, '连续逾期五天', 2, 5, null, 5, 0, '2023-10-17 15:30:23', '1', null, '1');
+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 (1714182049502396417, 1714182049401733122, '连续逾期十天', 2, 10, null, 10, 0, '2023-10-17 15:30:23', '1', null, '1');
+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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, '2023-10-09 14:54:25', '1', '2023-10-09 15:05:25', '1');
+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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, 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, null, null, null, null);
 
 -- 新增教育培训资料类型字典
 delete from sys_dict_type where dict_type='edu_materials_type';
@@ -2019,6 +1947,24 @@ 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 (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 role_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 '%省联社安全保卫管理人员%';
 -- -------------------------------------------------------
 -- ----------新增数据 end  ----------------------------
 -- -------------------------------------------------------
@@ -2047,10 +1993,19 @@ UPDATE sys_dict_data t SET t.dict_sort = 4 WHERE t.dict_code = 294 and t.dict_ty
 UPDATE sys_dict_data t SET t.dict_label = '待培训' WHERE t.dict_code = 292 and t.dict_type = 'edu_training_do_status' and t.dict_value=0;
 
 -- 教育培训周期字典新增 每日 每周
-UPDATE soc.sys_dict_data t SET t.dict_sort = 3 WHERE dict_type='edu_plan_cycle' and dict_value=3;
-UPDATE soc.sys_dict_data t SET t.dict_sort = 5 WHERE dict_type='edu_plan_cycle' and dict_value=5;
-UPDATE soc.sys_dict_data t SET t.dict_sort = 6 WHERE dict_type='edu_plan_cycle' and dict_value=6;
-UPDATE soc.sys_dict_data t SET t.dict_sort = 4 WHERE dict_type='edu_plan_cycle' and dict_value=4;
+UPDATE sys_dict_data t SET t.dict_sort = 3 WHERE dict_type='edu_plan_cycle' and dict_value=3;
+UPDATE sys_dict_data t SET t.dict_sort = 5 WHERE dict_type='edu_plan_cycle' and dict_value=5;
+UPDATE sys_dict_data t SET t.dict_sort = 6 WHERE dict_type='edu_plan_cycle' and dict_value=6;
+UPDATE sys_dict_data t SET t.dict_sort = 4 WHERE dict_type='edu_plan_cycle' and dict_value=4;
+
+DELETE FROM `sys_dict_type` WHERE  `dict_type`='safety_check_status';
+DELETE FROM `sys_dict_data` WHERE  `dict_type`='safety_check_status';
+INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('安全检查状态', 'safety_check_status', '0', '超级管理员', '2023-09-21 10:40:03', '', 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', 'safety_check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-21 10:44:18', '', 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 ( 2, '进行中', '2', 'safety_check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-21 10:44:29', '', 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 ( 3, '完成', '3', 'safety_check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-21 10:44:36', '', 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 ( 4, '已逾期', '4', 'safety_check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-21 10:44:43', '', NULL, NULL);
+
 
 UPDATE `sys_dict_data` SET `dict_label` = '已逾期' WHERE `dict_type` = 'resumption_status' and `dict_value` = '4';
 UPDATE `sys_menu` SET `menu_name` = '布撤防状态监管' WHERE `menu_name` = '防区信息管理' and `platform_type` = '1';

+ 4 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteWorkTimeService.java

@@ -28,6 +28,9 @@ public interface RemoteWorkTimeService {
 
 
     @PostMapping("/work/time/findFutureWorkTime")
-    List<SysWorkTime> findFutureWorkTime(@RequestBody List<Long> orgId, @RequestParam(value = "time") String time, @RequestHeader(SecurityConstants.INNER) String source);
+    List<SysWorkTime> findFutureWorkTime(@RequestBody List<Long> orgId,
+                                         @RequestParam(value = "startTime") String startTime,
+                                         @RequestParam(value = "ednTime") String ednTime,
+                                         @RequestHeader(SecurityConstants.INNER) String source);
 
 }

+ 1 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteWorkTimesFallbackFactory.java

@@ -42,7 +42,7 @@ public class RemoteWorkTimesFallbackFactory implements FallbackFactory<RemoteWor
             }
 
             @Override
-            public List<SysWorkTime> findFutureWorkTime(List<Long> orgId, String time, String source) {
+            public List<SysWorkTime> findFutureWorkTime(List<Long> orgId, String startTime,String endTime, String source) {
                 return null;
             }
         };

+ 1 - 1
soc-auth/src/main/java/com/xunmei/auth/service/FJNXLoginService.java

@@ -175,7 +175,7 @@ public class FJNXLoginService{
      */
     public String getUserByAppToken(String token){
 
-        String account_url = MessageFormat.format(accountUrl,appCode,token);
+        String account_url = MessageFormat.format(accountUrl,appHost,token);
 
         String accountInfo = HttpUtil.post(account_url,new HashMap<>());
 

+ 12 - 10
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/config/MybatisPlusConfig.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import com.xunmei.common.core.interceptor.EscapeLikeSqlInterceptor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -16,12 +17,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
  */
 @EnableTransactionManagement(proxyTargetClass = true)
 @Configuration
-public class MybatisPlusConfig
-{
+public class MybatisPlusConfig {
     @Bean
-    public MybatisPlusInterceptor mybatisPlusInterceptor()
-    {
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
         MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+
+        interceptor.addInnerInterceptor(escapeLikeSqlInterceptor());
         // 分页插件
         interceptor.addInnerInterceptor(paginationInnerInterceptor());
         // 乐观锁插件
@@ -34,8 +35,7 @@ public class MybatisPlusConfig
     /**
      * 分页插件,自动识别数据库类型 https://baomidou.com/guide/interceptor-pagination.html
      */
-    public PaginationInnerInterceptor paginationInnerInterceptor()
-    {
+    public PaginationInnerInterceptor paginationInnerInterceptor() {
         PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
         // 设置数据库类型为mysql
         paginationInnerInterceptor.setDbType(DbType.MYSQL);
@@ -47,16 +47,18 @@ public class MybatisPlusConfig
     /**
      * 乐观锁插件 https://baomidou.com/guide/interceptor-optimistic-locker.html
      */
-    public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor()
-    {
+    public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor() {
         return new OptimisticLockerInnerInterceptor();
     }
 
     /**
      * 如果是对全表的删除或更新操作,就会终止该操作 https://baomidou.com/guide/interceptor-block-attack.html
      */
-    public BlockAttackInnerInterceptor blockAttackInnerInterceptor()
-    {
+    public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
         return new BlockAttackInnerInterceptor();
     }
+
+    public EscapeLikeSqlInterceptor escapeLikeSqlInterceptor() {
+        return new EscapeLikeSqlInterceptor();
+    }
 }

+ 296 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/interceptor/EscapeLikeSqlInterceptor.java

@@ -0,0 +1,296 @@
+package com.xunmei.common.core.interceptor;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.lang.Filter;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
+import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+
+import java.sql.SQLException;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 自定义mybatis-plus拦截器, 用于转义模糊查询参数中的特殊字符
+ *
+ * @author wangjingyang
+ * @date 2021/6/24 10:33
+ */
+public class EscapeLikeSqlInterceptor implements InnerInterceptor {
+    /**
+     * 点
+     */
+    public static final String DOT = ".";
+
+    /**
+     * 按?分割字符串表达式
+     */
+    public static final String PLACEHOLDER_REGEX = "\\?";
+
+    /**
+     * 按.分割字符串表达式
+     */
+    public static final String DOT_REGEX = "\\.";
+
+    /**
+     * like操作通配符
+     */
+    public static final char LIKE_WILDCARD_CHARACTER = '%';
+
+    /**
+     * like操作通常会存在的占位符形式
+     */
+    public static final String PLACEHOLDER = " ?";
+
+    /**
+     * 条件构造器生成sql特有的参数名前缀
+     */
+    public static final String WRAPPER_PARAMETER_PROPERTY = "ew.paramNameValuePairs.";
+
+    /**
+     * like语句在sql中的字符串
+     */
+    private final String LIKE_SQL = " like ";
+
+    private static final String SQL_SPECIAL_CHARACTER = "_%*@|&()[]\"'\\";
+
+    /**
+     * 不应用此拦截器的参数名,方法参数中有此名称的参数则不应用此拦截器
+     */
+    private final String IGNORE = "EscapeLikeSqlIgnore";
+
+    @Override
+    public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
+        if (parameter instanceof Map) {
+            Map<?, ?> parameterMap = (Map<?, ?>) parameter;
+            if (parameterMap.containsKey(IGNORE)){
+                return;
+            }
+        }
+
+        if (!needEscape(boundSql.getSql())) {
+            return;
+        }
+        escapeSql(boundSql);
+    }
+
+    @Override
+    public void beforeUpdate(Executor executor, MappedStatement ms, Object parameter) throws SQLException {
+        if (parameter instanceof Map) {
+            Map<?, ?> parameterMap = (Map<?, ?>) parameter;
+            if (parameterMap.containsKey(IGNORE)){
+                return;
+            }
+        }
+
+        BoundSql boundSql = ms.getBoundSql(parameter);
+        if (!needEscape(boundSql.getSql())) {
+            return;
+        }
+        escapeSql(boundSql);
+    }
+
+    /**
+     * sql是否需要转义
+     *
+     * @param sql
+     * @return
+     */
+    private boolean needEscape(String sql) {
+        return containLike(sql) && containPlaceholder(sql);
+    }
+
+    /**
+     * sql是否包含like语句
+     *
+     * @param sql
+     * @return
+     */
+    private boolean containLike(String sql) {
+        return StrUtil.containsIgnoreCase(sql, LIKE_SQL);
+    }
+
+    /**
+     * sql是否包含占位符
+     *
+     * @param sql
+     * @return
+     */
+    private boolean containPlaceholder(String sql) {
+        return StrUtil.contains(sql, PLACEHOLDER);
+    }
+
+    /**
+     * 参数名是否是条件构造器生成
+     *
+     * @param property
+     * @return
+     */
+    private boolean containWrapper(String property) {
+        return StrUtil.contains(property, WRAPPER_PARAMETER_PROPERTY);
+    }
+
+    /**
+     * 参数名是否是对象的嵌套表达式
+     *
+     * @param property
+     * @return
+     */
+    private boolean cascadeParameter(String property) {
+        return StrUtil.contains(property, DOT);
+    }
+
+    /**
+     * 转义sql语句中的特殊字符
+     *
+     * @param boundSql
+     */
+    @SuppressWarnings("unchecked")
+    private void escapeSql(BoundSql boundSql) {
+        String[] split = boundSql.getSql().split(PLACEHOLDER_REGEX);
+        Object parameter = boundSql.getParameterObject();
+        Set<String> processedProperty = new HashSet<>();
+        for (int i = 0; i < split.length; i++) {
+            // like 通常在末尾
+            if (StrUtil.lastIndexOfIgnoreCase(split[i], LIKE_SQL) > -1) {
+                if (parameter instanceof Map) {
+                    // 拿到此位置的"?"对应的参数名
+                    String property = boundSql.getParameterMappings().get(i).getProperty();
+                    // 防止重复转义
+                    if (processedProperty.contains(property)){
+                        continue;
+                    }
+                    Map<Object, Object> parameterMap = (Map<Object, Object>) parameter;
+                    if (containWrapper(property)) {
+                        // 条件构造器构造sql方式
+                        handlerWrapperEscape(property, parameterMap);
+                    } else {
+                        // 自主写sql方式
+                        handlerOriginalSqlEscape(property, parameterMap);
+                    }
+                    processedProperty.add(property);
+                } else if (parameter instanceof String) {
+                    // 单条件&&不通过条件构造器&&直接写sql&&mapper不写@Param注解,会导致parameter直接为参数值而不是map
+//                    BeanUtil.setFieldValue(boundSql, "parameterObject", SqlUtil.addSalashes((String) parameter));
+                    // 强行反射设置属性,暂不清楚为什么更改parameterObject无效
+                    BeanUtil.setFieldValue(boundSql.getParameterObject(), "value", addSalashes(((String) parameter)).toCharArray());
+                }
+            }
+        }
+    }
+
+    /**
+     * 处理通过条件构造器构造sql的转义
+     *
+     * @param property        参数名
+     * @param parameterObject 此条sql的参数map
+     */
+    private void handlerWrapperEscape(String property, Map<?, ?> parameterObject) {
+        String[] keys = property.split(DOT_REGEX);
+        Object ew = parameterObject.get(keys[0]);
+        if (ew instanceof AbstractWrapper) {
+            Map<String, Object> paramNameValuePairs = ((AbstractWrapper<?, ?, ?>) ew).getParamNameValuePairs();
+            // 拿到参数值
+            Object paramValue = paramNameValuePairs.get(keys[2]);
+            if (paramValue instanceof String) {
+                // 去除首尾%并转义后再拼上%
+                paramNameValuePairs.put(keys[2], String.format("%%%s%%", addSalashes((String) paramValue, LIKE_WILDCARD_CHARACTER)));
+            }
+        }
+    }
+
+    /**
+     * 处理自己写sql的转义
+     *
+     * @param property        参数名
+     * @param parameterObject 此条sql的参数map
+     */
+    private void handlerOriginalSqlEscape(String property, Map<Object, Object> parameterObject) {
+        if (cascadeParameter(property)) {
+            // 级联形式的参数,比如参数是对象中的某个字段的值:filter.name
+            String[] keys = property.split(DOT_REGEX, 2);
+            Object parameterBean = parameterObject.get(keys[0]);
+            Object parameterValue = BeanUtil.getProperty(parameterBean, keys[1]);
+            if (parameterValue instanceof String) {
+                BeanUtil.setProperty(parameterBean, keys[1], addSalashes((CharSequence) parameterValue));
+            }
+        } else {
+            // 普通参数名
+            parameterObject.computeIfPresent(property, (key, value) -> {
+                if (value instanceof String) {
+                    return addSalashes((CharSequence) value);
+                }
+                return value;
+            });
+        }
+    }
+
+    private static String addSalashes(CharSequence content, Filter<Character> filter){
+        if (StrUtil.isEmpty(content)) {
+            return StrUtil.str(content);
+        }
+
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < content.length(); i++) {
+            char c = content.charAt(i);
+            if (filter.accept(c)) {
+                sb.append('\\');
+            }
+            sb.append(c);
+        }
+
+        return sb.toString();
+    }
+
+    private static String addSalashes(CharSequence content, CharSequence applyCharacters){
+        if (StrUtil.isEmpty(content)) {
+            return StrUtil.str(content);
+        }
+
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < content.length(); i++) {
+            char c = content.charAt(i);
+            if (StrUtil.contains(applyCharacters, c)) {
+                sb.append('\\');
+            }
+            sb.append(c);
+        }
+
+        return sb.toString();
+    }
+
+    private static String addSalashes(CharSequence content){
+        if (StrUtil.isEmpty(content)) {
+            return StrUtil.str(content);
+        }
+
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < content.length(); i++) {
+            char c = content.charAt(i);
+            if (StrUtil.contains(SQL_SPECIAL_CHARACTER, c)) {
+                sb.append('\\');
+            }
+            sb.append(c);
+        }
+
+        return sb.toString();
+    }
+
+    private static String addSalashes(CharSequence content, char trimFix){
+        if (content.charAt(0) == trimFix){
+            content = content.subSequence(1,content.length());
+        }
+        if (content.charAt(content.length() - 1) == trimFix){
+            content = content.subSequence(0,content.length() - 1);
+        }
+
+        return addSalashes(content);
+    }
+}
+

+ 1 - 1
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/utils/file/MimeTypeUtils.java

@@ -32,7 +32,7 @@ public class MimeTypeUtils
             // word excel powerpoint
             "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt","et","zip",
             // 压缩文件
-            "rar", "zip", "gz", "bz2",
+            "rar", "zip", "gz", "bz2","7z",
             // 视频格式
             "mp4", "avi", "rmvb",
             // pdf

+ 4 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/domain/CoreMonitoringTaskRegistrationMonitor.java

@@ -49,7 +49,10 @@ public class CoreMonitoringTaskRegistrationMonitor extends BaseEntity {
     @ApiModelProperty(value = "监控主机id")
     @JsonSerialize(using = ToStringSerializer.class)
     private Long host;
-
+    @ApiModelProperty(value = "监控主机名")
+    private String hostName;
+    @ApiModelProperty(value = "视频通道名")
+    private String videoChannelName;
     /**
      * 视频通道
      */

+ 3 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/domain/TMonitoringRetrievalPlan.java

@@ -51,8 +51,9 @@ public class TMonitoringRetrievalPlan extends BaseEntity {
     private String planName;
     @ApiModelProperty(value = "是否显示下发")
     private String isDistribute;
-    @ApiModelProperty(value = "是否立即下发")
-    private String immediately;
+    @ApiModelProperty(value = "是否立即生效", notes = "0:否,1:是")
+    private Boolean immediately = Boolean.FALSE;
+
     /**
      * 计划归属机构
      */

+ 15 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/CoreMonitoringTaskMonitorInfoServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.alibaba.nacos.common.utils.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.access.domain.CoreMonitoringTaskMonitorInfo;
@@ -13,6 +14,8 @@ import com.xunmei.core.access.dto.CoreMonitoringTaskRegistrationMonitorDTO;
 import com.xunmei.core.access.mapper.CoreMonitoringTaskMonitorInfoMapper;
 import com.xunmei.core.access.mapper.CoreMonitoringTaskRegistrationMonitorMapper;
 import com.xunmei.core.access.service.ICoreMonitoringTaskMonitorInfoService;
+import com.xunmei.system.api.RemoteDeviceService;
+import com.xunmei.system.api.domain.SysDevice;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -21,6 +24,8 @@ import java.util.Arrays;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
+
 
 /**
  * 调阅任务登记检查情况Service业务层处理
@@ -35,7 +40,8 @@ public class CoreMonitoringTaskMonitorInfoServiceImpl extends ServiceImpl<CoreMo
     private CoreMonitoringTaskMonitorInfoMapper coreMonitoringTaskMonitorInfoMapper;
     @Autowired
     private CoreMonitoringTaskRegistrationMonitorMapper coreMonitoringTaskRegistrationMonitorMapper;
-
+@Resource
+private RemoteDeviceService remoteDeviceService;
 
     /**
      * 查询调阅任务登记检查情况
@@ -76,6 +82,10 @@ public class CoreMonitoringTaskMonitorInfoServiceImpl extends ServiceImpl<CoreMo
         coreMonitoringTaskMonitorInfo.setCreateTime(DateUtils.getNowDate());
         coreMonitoringTaskMonitorInfo.setCreateBy(SecurityUtils.getUsername());
         coreMonitoringTaskMonitorInfo.setId(IdWorker.getId());
+        SysDevice sysDevice = remoteDeviceService.getInfoById(coreMonitoringTaskRegistrationMonitorDTO.getHost(), SecurityConstants.INNER);
+        SysDevice sysDevice1 = remoteDeviceService.getInfoById(coreMonitoringTaskRegistrationMonitorDTO.getVideoChannel(), SecurityConstants.INNER);
+        coreMonitoringTaskMonitorInfo.setHostName(sysDevice.getDeviceName());
+        coreMonitoringTaskMonitorInfo.setVideoChannelName(sysDevice1.getDeviceName());
         int i = 0;
         i = coreMonitoringTaskRegistrationMonitorMapper.insert(coreMonitoringTaskMonitorInfo);
         //新增项目
@@ -143,6 +153,10 @@ public class CoreMonitoringTaskMonitorInfoServiceImpl extends ServiceImpl<CoreMo
           coreMonitoringTaskMonitorInfo1.setCreateBy(SecurityUtils.getUsername());
           coreMonitoringTaskMonitorInfo1.setId(IdWorker.getId());
           coreMonitoringTaskMonitorInfo1.setTaskRegistrationId(coreMonitoringTaskRegistrationMonitorDTO.getTaskRegistrationId());
+          SysDevice sysDevice = remoteDeviceService.getInfoById(coreMonitoringTaskRegistrationMonitorDTO.getHost(), SecurityConstants.INNER);
+          SysDevice sysDevice1 = remoteDeviceService.getInfoById(coreMonitoringTaskRegistrationMonitorDTO.getVideoChannel(), SecurityConstants.INNER);
+          coreMonitoringTaskMonitorInfo1.setHostName(sysDevice.getDeviceName());
+          coreMonitoringTaskMonitorInfo1.setVideoChannelName(sysDevice1.getDeviceName());
           i = coreMonitoringTaskRegistrationMonitorMapper.insert(coreMonitoringTaskMonitorInfo1);
           //新增项目
           List<CoreMonitoringTaskMonitorInfo> coreMonitoringTaskMonitorInfoList = coreMonitoringTaskRegistrationMonitorDTO.getCoreMonitoringTaskMonitorInfoList();

+ 80 - 6
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -172,7 +172,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
             i = insertTMonitoringRetrievalPlan(tMonitoringRetrievalPlan1);
             if (tMonitoringRetrievalPlan.getOrgType().equals("3")) {
                 if (!tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString()) &&
-                        tMonitoringRetrievalPlan.getImmediately().equals("1")) {
+                        tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE)) {
                     tMonitoringRetrievalPlan1.setStartTime(new Date());
                     int amount = 0;
                     LocalDate lastDayOfMonth;
@@ -232,7 +232,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                     plan.setParentId(tMonitoringRetrievalPlan.getId());
                     plan.setIsDistribute("1");
                     if (!tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString()) &&
-                            tMonitoringRetrievalPlan.getImmediately().equals("1")) {
+                            tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE)) {
                         plan.setStartTime(new Date());
                         int amount = 0;
                         LocalDate lastDayOfMonth;
@@ -268,7 +268,8 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 }
             }
         }
-        if ((tMonitoringRetrievalPlan.getImmediately().equals("1") || tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString())) && CollectionUtils.isNotEmpty(tMonitoringRetrievalPlans)) {
+        SysOrg sysOrg1 = remoteOrgService.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
+        if (sysOrg1.getType() == 1 && (tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE) || tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString())) && CollectionUtils.isNotEmpty(tMonitoringRetrievalPlans)) {
             try {
                 iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
             } catch (Exception e) {
@@ -369,7 +370,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 plan.setParentId(tMonitoringRetrievalPlan.getId());
                 plan.setIsDistribute("1");
                 if (!tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString()) &&
-                        tMonitoringRetrievalPlan.getImmediately().equals("1")) {
+                        tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE)) {
                     plan.setStartTime(new Date());
                     int amount = 0;
                     LocalDate lastDayOfMonth;
@@ -403,7 +404,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 }
                 tMonitoringRetrievalPlans.add(plan);
             }
-            if ((tMonitoringRetrievalPlan.getImmediately().equals("1") || tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString())) && CollectionUtils.isNotEmpty(tMonitoringRetrievalPlans)) {
+            if ((tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE) || tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString())) && CollectionUtils.isNotEmpty(tMonitoringRetrievalPlans)) {
                 try {
                     iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
                 } catch (Exception e) {
@@ -446,7 +447,80 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
             QueryWrapper queryWrapper = new QueryWrapper();
             queryWrapper.eq("parent_id", plan.getId());
             baseMapper.delete(queryWrapper);
-            distribute(plan.getId());
+            SysOrg sysOrg1 = remoteOrgService.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
+            List<TMonitoringRetrievalPlan> tMonitoringRetrievalPlans = new ArrayList<>();
+            if (sysOrg1.getType() == 1) {
+                distribute(plan.getId());
+            } else {
+                SysOrg sysOrg = new SysOrg();
+                sysOrg.setPath(plan.getOrgPath());
+                sysOrg.setType(Integer.valueOf(tMonitoringRetrievalPlan.getOrgType()));
+                List<SysOrg> sysOrgs = remoteOrgService.listByParentIdAndType(sysOrg, SecurityConstants.INNER);
+                for (SysOrg s : sysOrgs) {
+                    TMonitoringRetrievalPlan plan1 = new TMonitoringRetrievalPlan();
+                    BeanUtils.copyProperties(tMonitoringRetrievalPlan, plan1);
+                    plan1.setPlanName(tMonitoringRetrievalPlan.getPlanName());
+                    plan1.setOrgId(s.getId());
+                    plan1.setOrgName(s.getShortName());
+                    plan1.setRoleId(tMonitoringRetrievalPlan.getRoleId());
+                    plan1.setRoleName(tMonitoringRetrievalPlan.getRoleName());
+                    plan1.setOrgPath(s.getPath());
+                    plan1.setOrgType(tMonitoringRetrievalPlan.getOrgType());
+                    plan1.setPlanCycle(tMonitoringRetrievalPlan.getPlanCycle());
+                    plan1.setPlanFrequency(tMonitoringRetrievalPlan.getPlanFrequency());
+                    plan1.setPlanStatus(ZERO);
+                    plan1.setCreateBy(SecurityUtils.getUsername());
+                    plan1.setUpdateTime(DateUtils.getNowDate());
+                    plan1.setUpdateBy(SecurityUtils.getUsername());
+                    plan1.setCreateTime(DateUtils.getNowDate());
+                    plan1.setDescription(tMonitoringRetrievalPlan.getDescription());
+                    plan1.setCreateType(1);
+                    plan1.setParentId(tMonitoringRetrievalPlan.getId());
+                    plan1.setIsDistribute("1");
+                    if (!tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString()) &&
+                            tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE)) {
+                        plan1.setStartTime(new Date());
+                        int amount = 0;
+                        LocalDate lastDayOfMonth;
+                        switch (tMonitoringRetrievalPlan.getPlanCycle()) {
+                            case "1":
+                                amount = 1;
+                                break;
+                            case "2":
+                                amount = 7;
+                                break;
+                            case "3":
+                                LocalDate currentDate = LocalDate.now();
+                                lastDayOfMonth = currentDate.withDayOfMonth(currentDate.lengthOfMonth());
+                                amount = lastDayOfMonth.getDayOfMonth() - currentDate.getDayOfMonth();
+                                break;
+                            case "4":
+                                amount = getDayNum(3);
+                                break;
+                            case "5":
+                                amount = getDayNum(6);
+                                break;
+                            case "6":
+                                amount = getDayNum(12);
+                                break;
+                        }
+                        Calendar cal = Calendar.getInstance();
+                        cal.setTime(new Date());
+                        cal.add(Calendar.DATE, amount);
+                        Date time = cal.getTime();
+                        plan1.setEndTime(time);
+                    }
+                    tMonitoringRetrievalPlans.add(plan1);
+                }
+                if ((tMonitoringRetrievalPlan.getImmediately().equals(Boolean.TRUE) || tMonitoringRetrievalPlan.getPlanCycle().equals(ZERO.toString())) && CollectionUtils.isNotEmpty(tMonitoringRetrievalPlans)) {
+                    try {
+                        iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
+                    } catch (Exception e) {
+                        throw new ServiceException("下发任务异常,请联系管理员");
+                    }
+                }
+            }
+
         } catch (Exception e) {
             e.getMessage();
         }

+ 0 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/vo/CoreMonitoringTaskRegistrationMonitorVO.java

@@ -15,11 +15,6 @@ import java.util.List;
  */
 @Data
 public class CoreMonitoringTaskRegistrationMonitorVO extends CoreMonitoringTaskRegistrationMonitor {
-    @ApiModelProperty(value = "主机名")
-    private String hostName;
-    @ApiModelProperty(value = "监控通道名")
-    private String videoChannelName;
-
     @ApiModelProperty(value = "nfcId")
     @JsonSerialize(using = ToStringSerializer.class)
     private Long registrationId;

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

@@ -751,29 +751,32 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
     @Override
     public void taskChangeForTimeWorkChange(WorkTimeChangeEvent event) {
         String date = LocalDate.now().format(DateTimeFormatter.ofPattern(Constants.DAILY_FORMAT));
-        List<SysWorkTime> futureWorkTime = workTimeService.findFutureWorkTime(event.getOrgIds(), date, SecurityConstants.INNER);
+        Date now = new Date();
         for (EduTrainingPlanCycleEnum value : EduTrainingPlanCycleEnum.values()) {
             switch (value) {
                 case DAILY:
-                    List<SysWorkTime> timeList = futureWorkTime.stream()
-                            .filter(time -> ObjectUtil.equal(time.getYmdDate(), date))
-                            .collect(Collectors.toList());
-                    dealTimeWorkChangeForDaily(event, date, timeList);
+                    List<SysWorkTime> dailyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.DAILY.getCode(), event);
+                    dealTimeWorkChangeForDaily(event, date, dailyFutureWorkTime);
                     break;
                 case WEEKLY:
-                    dealTimeWorkChangeForWeekly(event, date, futureWorkTime);
+                    List<SysWorkTime> weeklyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.WEEKLY.getCode(), event);
+                    dealTimeWorkChangeForWeekly(event, date, weeklyFutureWorkTime);
                     break;
                 case MONTHLY:
-                    dealTimeWorkChangeForMonthly(event, date, futureWorkTime);
+                    List<SysWorkTime> monthlyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.MONTHLY.getCode(), event);
+                    dealTimeWorkChangeForMonthly(event, date, monthlyFutureWorkTime);
                     break;
                 case QUARTERLY:
-                    dealTimeWorkChangeForQuarterly(event, date, futureWorkTime);
+                    List<SysWorkTime> quarterlyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.QUARTERLY.getCode(), event);
+                    dealTimeWorkChangeForQuarterly(event, date, quarterlyFutureWorkTime);
                     break;
                 case HALF_YEARLY:
-                    dealTimeWorkChangeForHalfYearly(event, date, futureWorkTime);
+                    List<SysWorkTime> halfYearlyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode(), event);
+                    dealTimeWorkChangeForHalfYearly(event, date, halfYearlyFutureWorkTime);
                     break;
                 case YEARLY:
-                    dealTimeWorkChangeForYearly(event, date, futureWorkTime);
+                    List<SysWorkTime> yearlyFutureWorkTime = selectWorkTimeList(now, EduTrainingPlanCycleEnum.YEARLY.getCode(), event);
+                    dealTimeWorkChangeForYearly(event, date, yearlyFutureWorkTime);
                     break;
                 default:
                     break;
@@ -793,7 +796,8 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .eq(CoreEduTrainingTask::getPlanCycle, EduTrainingPlanCycleEnum.DAILY.getCode())
                 .like(CoreEduTrainingTask::getStartDate, todayStr)
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
-                .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
+                .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId,
+                        CoreEduTrainingTask::getPlanCycle, CoreEduTrainingTask::getStatus)
                 .list();
         //根据营业歇业分组
         Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
@@ -808,14 +812,12 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
         //删除任务
         delTaskByIdList(delTaskIdList);
+
+
         //营业的数据
         List<SysWorkTime> workTimeList = listMap.get(WORK);
         //营业的机构id
         List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         //每日的情况需要考虑到特殊日子,比如每月一号 一月一号等多周期重合的情况
         List<Integer> cycleList = DateUtils.checkDate(today);
@@ -824,7 +826,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .in(CoreEduTrainingPlan::getPlanCycle, cycleList)
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
@@ -843,30 +845,35 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
                 .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
                 .list();
-
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-
-        //根据营业歇业分组
-        Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
+        Map<Long, List<SysWorkTime>> orgWorkTimeMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getOrgId));
+        List<Long> workOrgIdList = new ArrayList<>();
         //歇业的数据
-        List<SysWorkTime> unWorkTimeList = listMap.get(UN_WORK);
-        List<Long> unWorkOrgIdList = unWorkTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        List<Long> delTaskIdList = taskList.stream().filter(task -> unWorkOrgIdList.contains(task.getOrgId())).map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        List<Long> unWorkOrgIdList = new ArrayList<>();
+        for (Map.Entry<Long, List<SysWorkTime>> entry : orgWorkTimeMap.entrySet()) {
+            List<SysWorkTime> weeklyWorkTimeList = entry.getValue();
+            //如果有任何一天营业,那么就应该生成该周期的任务
+            boolean match = weeklyWorkTimeList.stream().anyMatch(time -> ObjectUtil.equal(time.getIsEnable(), WORK));
+            if (match) {
+                workOrgIdList.add(entry.getKey());
+                continue;
+            }
+            unWorkOrgIdList.add(entry.getKey());
+        }
+        //删除已经歇业且未执行的任务
+        List<Long> delTaskIdList = taskList.stream()
+                .filter(task -> unWorkOrgIdList.contains(task.getOrgId()))
+                .filter(task -> task.getStatus().equals(EduTrainingDoStatus.WAIT_RECORDED.getCode()))
+                .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        //删除任务
         delTaskByIdList(delTaskIdList);
 
-        //营业的数据
-        List<SysWorkTime> workTimeList = listMap.get(WORK);
-        List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
                 .eq(CoreEduTrainingPlan::getStandard, 0)
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.WEEKLY.getCode())
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
@@ -876,7 +883,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         List<Long> orgIds = event.getOrgIds();
         DateTime today = DateUtil.parse(todayStr, Constants.DAILY_FORMAT);
         DateRange dateRange = DateUtils.getStartAndEnd(today, EduTrainingPlanCycleEnum.MONTHLY.getCode());
-        //查询机构当是否存在任务
+        //查询机构当是否存在任务
         List<CoreEduTrainingTask> taskList = lambdaQuery()
                 .eq(CoreEduTrainingTask::getPlanCycle, EduTrainingPlanCycleEnum.MONTHLY.getCode())
                 .ge(CoreEduTrainingTask::getStartDate, dateRange.getStartTime())
@@ -884,30 +891,35 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
                 .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
                 .list();
-
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-
-        //根据营业歇业分组
-        Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
+        Map<Long, List<SysWorkTime>> orgWorkTimeMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getOrgId));
+        List<Long> workOrgIdList = new ArrayList<>();
         //歇业的数据
-        List<SysWorkTime> unWorkTimeList = listMap.get(UN_WORK);
-        List<Long> unWorkOrgIdList = unWorkTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        List<Long> delTaskIdList = taskList.stream().filter(task -> unWorkOrgIdList.contains(task.getOrgId())).map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        List<Long> unWorkOrgIdList = new ArrayList<>();
+        for (Map.Entry<Long, List<SysWorkTime>> entry : orgWorkTimeMap.entrySet()) {
+            List<SysWorkTime> weeklyWorkTimeList = entry.getValue();
+            //如果有任何一天营业,那么就应该生成该周期的任务
+            boolean match = weeklyWorkTimeList.stream().anyMatch(time -> ObjectUtil.equal(time.getIsEnable(), WORK));
+            if (match) {
+                workOrgIdList.add(entry.getKey());
+                continue;
+            }
+            unWorkOrgIdList.add(entry.getKey());
+        }
+        //删除已经歇业且未执行的任务
+        List<Long> delTaskIdList = taskList.stream()
+                .filter(task -> unWorkOrgIdList.contains(task.getOrgId()))
+                .filter(task -> task.getStatus().equals(EduTrainingDoStatus.WAIT_RECORDED.getCode()))
+                .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        //删除任务
         delTaskByIdList(delTaskIdList);
 
-        //营业的数据
-        List<SysWorkTime> workTimeList = listMap.get(WORK);
-        List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
                 .eq(CoreEduTrainingPlan::getStandard, 0)
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.MONTHLY.getCode())
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
@@ -917,7 +929,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         List<Long> orgIds = event.getOrgIds();
         DateTime today = DateUtil.parse(todayStr, Constants.DAILY_FORMAT);
         DateRange dateRange = DateUtils.getStartAndEnd(today, EduTrainingPlanCycleEnum.QUARTERLY.getCode());
-        //查询机构当季度是否存在任务
+        //查询机构当是否存在任务
         List<CoreEduTrainingTask> taskList = lambdaQuery()
                 .eq(CoreEduTrainingTask::getPlanCycle, EduTrainingPlanCycleEnum.QUARTERLY.getCode())
                 .ge(CoreEduTrainingTask::getStartDate, dateRange.getStartTime())
@@ -925,30 +937,35 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
                 .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
                 .list();
-
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-
-        //根据营业歇业分组
-        Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
+        Map<Long, List<SysWorkTime>> orgWorkTimeMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getOrgId));
+        List<Long> workOrgIdList = new ArrayList<>();
         //歇业的数据
-        List<SysWorkTime> unWorkTimeList = listMap.get(UN_WORK);
-        List<Long> unWorkOrgIdList = unWorkTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        List<Long> delTaskIdList = taskList.stream().filter(task -> unWorkOrgIdList.contains(task.getOrgId())).map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        List<Long> unWorkOrgIdList = new ArrayList<>();
+        for (Map.Entry<Long, List<SysWorkTime>> entry : orgWorkTimeMap.entrySet()) {
+            List<SysWorkTime> weeklyWorkTimeList = entry.getValue();
+            //如果有任何一天营业,那么就应该生成该周期的任务
+            boolean match = weeklyWorkTimeList.stream().anyMatch(time -> ObjectUtil.equal(time.getIsEnable(), WORK));
+            if (match) {
+                workOrgIdList.add(entry.getKey());
+                continue;
+            }
+            unWorkOrgIdList.add(entry.getKey());
+        }
+        //删除已经歇业且未执行的任务
+        List<Long> delTaskIdList = taskList.stream()
+                .filter(task -> unWorkOrgIdList.contains(task.getOrgId()))
+                .filter(task -> task.getStatus().equals(EduTrainingDoStatus.WAIT_RECORDED.getCode()))
+                .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        //删除任务
         delTaskByIdList(delTaskIdList);
 
-        //营业的数据
-        List<SysWorkTime> workTimeList = listMap.get(WORK);
-        List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
                 .eq(CoreEduTrainingPlan::getStandard, 0)
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.QUARTERLY.getCode())
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
@@ -958,7 +975,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         List<Long> orgIds = event.getOrgIds();
         DateTime today = DateUtil.parse(todayStr, Constants.DAILY_FORMAT);
         DateRange dateRange = DateUtils.getStartAndEnd(today, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode());
-        //查询机构当半年度是否存在任务
+        //查询机构当是否存在任务
         List<CoreEduTrainingTask> taskList = lambdaQuery()
                 .eq(CoreEduTrainingTask::getPlanCycle, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode())
                 .ge(CoreEduTrainingTask::getStartDate, dateRange.getStartTime())
@@ -966,30 +983,35 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
                 .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
                 .list();
-
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-
-        //根据营业歇业分组
-        Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
+        Map<Long, List<SysWorkTime>> orgWorkTimeMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getOrgId));
+        List<Long> workOrgIdList = new ArrayList<>();
         //歇业的数据
-        List<SysWorkTime> unWorkTimeList = listMap.get(UN_WORK);
-        List<Long> unWorkOrgIdList = unWorkTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        List<Long> delTaskIdList = taskList.stream().filter(task -> unWorkOrgIdList.contains(task.getOrgId())).map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        List<Long> unWorkOrgIdList = new ArrayList<>();
+        for (Map.Entry<Long, List<SysWorkTime>> entry : orgWorkTimeMap.entrySet()) {
+            List<SysWorkTime> weeklyWorkTimeList = entry.getValue();
+            //如果有任何一天营业,那么就应该生成该周期的任务
+            boolean match = weeklyWorkTimeList.stream().anyMatch(time -> ObjectUtil.equal(time.getIsEnable(), WORK));
+            if (match) {
+                workOrgIdList.add(entry.getKey());
+                continue;
+            }
+            unWorkOrgIdList.add(entry.getKey());
+        }
+        //删除已经歇业且未执行的任务
+        List<Long> delTaskIdList = taskList.stream()
+                .filter(task -> unWorkOrgIdList.contains(task.getOrgId()))
+                .filter(task -> task.getStatus().equals(EduTrainingDoStatus.WAIT_RECORDED.getCode()))
+                .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        //删除任务
         delTaskByIdList(delTaskIdList);
 
-        //营业的数据
-        List<SysWorkTime> workTimeList = listMap.get(WORK);
-        List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
                 .eq(CoreEduTrainingPlan::getStandard, 0)
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode())
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
@@ -1000,7 +1022,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         List<Long> orgIds = event.getOrgIds();
         DateTime today = DateUtil.parse(todayStr, Constants.DAILY_FORMAT);
         DateRange dateRange = DateUtils.getStartAndEnd(today, EduTrainingPlanCycleEnum.YEARLY.getCode());
-        //查询机构当半年度是否存在任务
+        //查询机构当是否存在任务
         List<CoreEduTrainingTask> taskList = lambdaQuery()
                 .eq(CoreEduTrainingTask::getPlanCycle, EduTrainingPlanCycleEnum.YEARLY.getCode())
                 .ge(CoreEduTrainingTask::getStartDate, dateRange.getStartTime())
@@ -1008,34 +1030,47 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 .in(CoreEduTrainingTask::getOrgId, orgIds)
                 .select(CoreEduTrainingTask::getId, CoreEduTrainingTask::getOrgId, CoreEduTrainingTask::getStatus)
                 .list();
-
-        //获取任务中存在的机构id
-        List<Long> taskOrgIdList = taskList.stream().map(CoreEduTrainingTask::getOrgId).distinct().collect(Collectors.toList());
-
-        //根据营业歇业分组
-        Map<Long, List<SysWorkTime>> listMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getIsEnable));
+        Map<Long, List<SysWorkTime>> orgWorkTimeMap = futureWorkTime.stream().collect(Collectors.groupingBy(SysWorkTime::getOrgId));
+        List<Long> workOrgIdList = new ArrayList<>();
         //歇业的数据
-        List<SysWorkTime> unWorkTimeList = listMap.get(UN_WORK);
-        List<Long> unWorkOrgIdList = unWorkTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        List<Long> delTaskIdList = taskList.stream().filter(task -> unWorkOrgIdList.contains(task.getOrgId())).map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        List<Long> unWorkOrgIdList = new ArrayList<>();
+        for (Map.Entry<Long, List<SysWorkTime>> entry : orgWorkTimeMap.entrySet()) {
+            List<SysWorkTime> weeklyWorkTimeList = entry.getValue();
+            //如果有任何一天营业,那么就应该生成该周期的任务
+            boolean match = weeklyWorkTimeList.stream().anyMatch(time -> ObjectUtil.equal(time.getIsEnable(), WORK));
+            if (match) {
+                workOrgIdList.add(entry.getKey());
+                continue;
+            }
+            unWorkOrgIdList.add(entry.getKey());
+        }
+        //删除已经歇业且未执行的任务
+        List<Long> delTaskIdList = taskList.stream()
+                .filter(task -> unWorkOrgIdList.contains(task.getOrgId()))
+                .filter(task -> task.getStatus().equals(EduTrainingDoStatus.WAIT_RECORDED.getCode()))
+                .map(CoreEduTrainingTask::getId).collect(Collectors.toList());
+        //删除任务
         delTaskByIdList(delTaskIdList);
 
-        //营业的数据
-        List<SysWorkTime> workTimeList = listMap.get(WORK);
-        List<Long> workOrgIdList = workTimeList.stream().map(SysWorkTime::getOrgId).collect(Collectors.toList());
-        //查询在任务表中不存在的营业机构id,即需要生成任务的机构
-        List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
         //查询需要生成任务的机构的计划
         List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
                 .eq(CoreEduTrainingPlan::getStandard, 0)
                 .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
                 .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.YEARLY.getCode())
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
+                .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
                 .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
         //此list中Plan对象仅id与planCycle字段有值,
         buildTaskByPlan(planList, today);
     }
+
+
+    private List<SysWorkTime> selectWorkTimeList(Date now, Integer cycle, WorkTimeChangeEvent event) {
+        DateRange range = DateUtils.getStartAndEnd(now, cycle);
+        String startTime = DateUtil.format(range.getStartTime(), Constants.DAILY_FORMAT);
+        String endTime = DateUtil.format(range.getEndTime(), Constants.DAILY_FORMAT);
+        return workTimeService.findFutureWorkTime(event.getOrgIds(), startTime, endTime, SecurityConstants.INNER);
+    }
 }
 
 

+ 10 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -115,7 +115,7 @@ public class ApiPlanController {
         try {
             appPlanService.saveOrUpdatePlan(info);
             //立即执行
-            if (info.isBuildTaskNow()) {
+            if (info.getOrgType()==3&&info.isBuildTaskNow()) {
                 DateTime datetime = new DateTime();
                 datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
                 //当有周期存在时保持原有接口不变(doTask),否则按照新的接口创建
@@ -167,10 +167,16 @@ public class ApiPlanController {
 
     @ApiOperation(value = "撤回")
     @GetMapping(value = "/cheHui/{id}")
-    @RequiresPermissions("core:plan:findById")
+//    @RequiresPermissions("core:plan:findById")
     public AjaxResult cheHui(@PathVariable Long id) {
-
-        return AjaxResult.success(appPlanService.cheHui(id));
+        appPlanService.cheHui(id);
+        return AjaxResult.success();
+    }
+    @ApiOperation(value = "撤回后下发")
+    @GetMapping(value = "/distributeCheHui/{id}")
+//    @RequiresPermissions("core:plan:findById")
+    public AjaxResult distributeCheHui(@PathVariable Long id) {
+        return AjaxResult.success(appPlanService.distributeCheHui(id));
     }
 
     @ApiOperation(value = "获取详情")

+ 3 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/AppPlanService.java

@@ -83,5 +83,7 @@ public interface AppPlanService extends IService<AppPlan> {
 
     void distributeToOrg(DistributeDto dto);
 
-    int cheHui(Long id);
+    void cheHui(Long id);
+
+    int distributeCheHui(Long id);
 }

+ 43 - 34
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java

@@ -184,41 +184,46 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
     }
 
     @Override
-    public int cheHui(Long id) {
+    public void cheHui(Long id) {
         AppPlan plan = baseMapper.selectById(id);
-
         //修改所有子计划
         List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, id));
         for (AppPlan ap :
                 appPlans) {
 //修改计划状态为停用
-            //如果是已经撤回的计划
-            if("2".equals(plan.getDistribute())){
-                //修改计划状态到进行中,下发状态到1
-                plan.setDistribute("1");
-                plan.setPlanStatus(1);
-            }else {
-                ap.setPlanStatus(2);
-            }
+            ap.setPlanStatus(2);
             baseMapper.updateById(ap);
         }
-        //如果是已经撤回的计划
-        if("2".equals(plan.getDistribute())){
-            //修改计划状态到进行中,下发状态到1
-            plan.setDistribute("3");
-            plan.setPlanStatus(1);
-            baseMapper.updateById(plan);
-            return 2;
-        }else{
-            plan.setDistribute("2");
-            plan.setPlanStatus(0);
-            baseMapper.updateById(plan);
-            return 1;
-        }
+        //设置下发状态为未下发
+        plan.setDistribute("0");
+        plan.setPlanStatus(0);
+        baseMapper.updateById(plan);
 
 
     }
 
+    @Override
+    public int distributeCheHui(Long id) {
+        AppPlan plan = baseMapper.selectById(id);
+        //修改所有子计划
+        List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, id));
+        //如果不存在子计划直接返回
+        if (appPlans == null || appPlans.size() == 0) {
+            return 0;
+        }
+        for (AppPlan ap :
+                appPlans) {
+//修改计划状态为停用
+            ap.setPlanStatus(1);
+            baseMapper.updateById(ap);
+        }
+        //设置下发状态为下发
+        plan.setDistribute("1");
+        plan.setPlanStatus(1);
+        baseMapper.updateById(plan);
+        return 1;
+    }
+
     /**
      * 获取检查要点分页
      *
@@ -267,15 +272,20 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             plan.setPlanOfOrgName(app.getPlanCreateOrgName());
             //验证名称是否重复
             QueryWrapper<AppPlan> qw = new QueryWrapper<>();
-            qw.lambda().eq(AppPlan::getPlanName, app.getPlanName()).eq(AppPlan::getDeleted,0);
+            qw.lambda().eq(AppPlan::getPlanName, app.getPlanName()).eq(AppPlan::getDeleted, 0);
 
             Long size = baseMapper.selectCount(qw);
 
             if (size > 0) {
                 throw new RuntimeException("计划名称重复,请确认!");
             }
-
-
+            //如果计划为行社并且勾选立即生效
+            if (app.getOrgType()==3&&app.isBuildTaskNow()) {
+                plan.setPlanStatus(1);
+            } else {
+                plan.setPlanStatus(0);
+            }
+            plan.setDistribute("0");
             baseMapper.insert(plan);
             Long id = plan.getId();
 
@@ -305,7 +315,6 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             }
 
 
-
 //            Integer orgId = app.getExecOrgType();
 //            if (orgId != null) {
 //                AppPlanToCheckOrg checkOrg = new AppPlanToCheckOrg();
@@ -331,10 +340,10 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             }
 
             //获取计划对应的已完成任务数量
-            Long num = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", app.getId()).eq("status",3));
+            Long num = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", app.getId()).eq("status", 3));
             if (num > 0) {
                 //如果状态为已禁用
-                if(app.getPlanStatus()==0){
+                if (app.getPlanStatus() == 0) {
                     throw new RuntimeException("计划已生成任务,不能禁用!");
                 }
 
@@ -344,7 +353,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()));
             for (AppPlan ap :
                     appPlans) {
-                Long nums = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", ap.getId()).eq("status",3));
+                Long nums = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", ap.getId()).eq("status", 3));
                 if (nums > 0) {
                     if (app.getPlanStatus() == 0) {
                         throw new RuntimeException("计划已生成任务,不能禁用!");
@@ -450,7 +459,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
                 appPlanToExecOrgMapper.insert(execOrg);
             }
             //更新任务的名称
-            resumptionMapper.updateNameByPlanId(app.getPlanName(),app.getId());
+            resumptionMapper.updateNameByPlanId(app.getPlanName(), app.getId());
 
             //最后处理本计划
             plan.setUpdateTime(new Date());
@@ -519,17 +528,17 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
         /**
          * 验证计划是否被应用
          */
-        Long num = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", id).eq("status",3));
+        Long num = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", id).eq("status", 3));
         if (num > 0) {
             throw new RuntimeException("计划已生成任务,不能删除!");
         }
         //查找子计划
-        List<AppPlan> childrens = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId,id));
+        List<AppPlan> childrens = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, id));
 
         //删除子计划
         for (AppPlan ap :
                 childrens) {
-            Long nums = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", ap.getId()).eq("status",3));
+            Long nums = resumptionMapper.selectCount(new QueryWrapper<Resumption>().eq("plan_id", ap.getId()).eq("status", 3));
             if (nums > 0) {
                 throw new RuntimeException("子计划已生成任务,不能删除!");
             }

+ 9 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/controller/CoreMonitoringRetrievalTaskController.java

@@ -15,6 +15,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.time.LocalDate;
@@ -47,7 +48,7 @@ public class CoreMonitoringRetrievalTaskController extends BaseController {
      * 查询监控调阅任务列表app
      */
     @ApiOperation(value = "app查询调阅任务列表")
-  //  @RequiresPermissions("core:task:list")
+    //  @RequiresPermissions("core:task:list")
     @GetMapping("/selectListApp")
     public TableDataInfo<CoreMonitoringRetrievalTask> selectListApp(CoreMonitoringTaskRegistrationDTO coreMonitoringTaskRegistrationDTO) {
         return coreMonitoringRetrievalTaskService.selectListApp(coreMonitoringTaskRegistrationDTO);
@@ -75,6 +76,13 @@ public class CoreMonitoringRetrievalTaskController extends BaseController {
         return success(coreMonitoringRetrievalTaskService.selectCoreMonitoringRetrievalTaskOneVoById(id));
     }
 
+    @ApiOperation(value = "手动初始化")
+    @RequiresPermissions("core:task:edit")
+    @GetMapping(value = "initialization/{id}")
+    public AjaxResult initialization(@PathVariable("id") Long id) {
+        return success(coreMonitoringRetrievalTaskService.initializationTask(id));
+    }
+
     /**
      * 新增监控调阅任务
      */

+ 7 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/mapper/CoreMonitoringRetrievalTaskMapper.java

@@ -87,19 +87,25 @@ public interface CoreMonitoringRetrievalTaskMapper extends BaseMapper<CoreMonito
 
     /**
      * 初始化任务
+     *
      * @param dateTime
      */
     void initializationTask(String dateTime);
 
+    int initializationTaskByHand(Long id);
+
     /**
      * 查询当天未完成任务
+     *
      * @param dateTime
      * @return
      */
-    List<Long>selectTaskByTime(String dateTime);
+    List<Long> selectTaskByTime(String dateTime);
+
     void deleteTaskByPlanId(@Param("planId") Long planId);
 
     List<CoreMonitoringRetrievalTask> selectCompleteByPlanId(Long planId);
+
     void deleteWaitTaskByPlanId(@Param("planId") Long planId);
 
     void updateDeleteTaskByPlanId(@Param("planId") Long planId, @Param("isDeleted") Integer isDeleted);

+ 5 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/ICoreMonitoringRetrievalTaskService.java

@@ -34,10 +34,12 @@ public interface ICoreMonitoringRetrievalTaskService extends IService<CoreMonito
 
     /**
      * 根据计划id查询已完成任务
+     *
      * @param planId
      * @return
      */
-    public List<CoreMonitoringRetrievalTask>selectComplete(Long planId);
+    public List<CoreMonitoringRetrievalTask> selectComplete(Long planId);
+
     /**
      * 查询监控调阅任务列表
      *
@@ -102,6 +104,8 @@ public interface ICoreMonitoringRetrievalTaskService extends IService<CoreMonito
 
     void initializationTask();
 
+    int initializationTask(Long id);
+
     void deleteTaskByPlanId(Long planId);
 
     void deleteWaitTaskByPlanId(Long planId);

+ 11 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/impl/CoreMonitoringRetrievalTaskServiceImpl.java

@@ -375,6 +375,14 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
     }
 
     @Override
+    public int initializationTask(Long id) {
+        int i = 0;
+        i = coreMonitoringRetrievalTaskMapper.initializationTaskByHand(id);
+        i = coreMonitoringTaskRegistrationMapper.deleteByTaskId(id);
+        return i;
+    }
+
+    @Override
     public void deleteTaskByPlanId(Long planId) {
         coreMonitoringRetrievalTaskMapper.deleteTaskByPlanId(planId);
     }
@@ -502,10 +510,10 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
         }*/
         CoreMonitoringRetrievalTask task = new CoreMonitoringRetrievalTask();
         task.setId(IdWorker.getId());
-        if (frequency>1){
+        if (frequency > 1) {
             task.setTaskName(plan.getPlanName() + "第" + frequency + "次调阅");
-        }else {
-            task.setTaskName(plan.getPlanName() +"调阅任务");
+        } else {
+            task.setTaskName(plan.getPlanName() + "调阅任务");
         }
         task.setCycle(plan.getPlanCycle());
         task.setOrgId(sysOrg.getId());

+ 13 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java

@@ -45,7 +45,19 @@ public class CoreSafecheckPlanController extends BaseController {
     @Autowired
     private SafetyCheckJobBusiness jobBusiness;
 
-
+    @ApiOperation(value = "撤回")
+    @GetMapping(value = "/cheHui/{id}")
+//    @RequiresPermissions("core:plan:findById")
+    public AjaxResult cheHui(@PathVariable Long id) {
+        coreSafecheckPlanService.cheHui(id);
+        return AjaxResult.success();
+    }
+    @ApiOperation(value = "撤回后下发")
+    @GetMapping(value = "/distributeCheHui/{id}")
+//    @RequiresPermissions("core:plan:findById")
+    public AjaxResult distributeCheHui(@PathVariable Long id) {
+        return AjaxResult.success(coreSafecheckPlanService.distributeCheHui(id));
+    }
     /**
      * 查询常规安全检查计划列表
      */

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/ICoreSafecheckPlanService.java

@@ -74,4 +74,8 @@ public interface ICoreSafecheckPlanService extends IService<CoreSafecheckPlan> {
     List<String> selectItemIdsByPlanId(Long id);
 
     void distributeToOrg(DistributeDto dto);
+
+    void cheHui(Long id);
+
+    int distributeCheHui(Long id);
 }

+ 42 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafecheckPlanServiceImpl.java

@@ -164,9 +164,49 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
         CoreSafecheckPlan coreSafecheckPlan = new CoreSafecheckPlan();
         coreSafecheckPlan.setId(dto.getId());
         coreSafecheckPlan.setDistribute("1");
+        coreSafecheckPlan.setPlanStatus(1L);
         coreSafecheckPlanMapper.updateById(coreSafecheckPlan);
     }
 
+    @Override
+    public void cheHui(Long id) {
+        CoreSafecheckPlan plan = baseMapper.selectById(id);
+        //修改所有子计划
+        List<CoreSafecheckPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<CoreSafecheckPlan>().eq(CoreSafecheckPlan::getParentId, id));
+        for (CoreSafecheckPlan ap :
+                appPlans) {
+//修改计划状态为停用
+            ap.setPlanStatus(2L);
+            baseMapper.updateById(ap);
+        }
+        //设置下发状态为未下发
+        plan.setDistribute("0");
+        plan.setPlanStatus(0L);
+        baseMapper.updateById(plan);
+    }
+
+    @Override
+    public int distributeCheHui(Long id) {
+        CoreSafecheckPlan plan = baseMapper.selectById(id);
+        //修改所有子计划
+        List<CoreSafecheckPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<CoreSafecheckPlan>().eq(CoreSafecheckPlan::getParentId, id));
+        //如果不存在子计划直接返回
+        if(appPlans==null||appPlans.size()==0){
+            return 0;
+        }
+        for (CoreSafecheckPlan ap :
+                appPlans) {
+//修改计划状态为停用
+            ap.setPlanStatus(1L);
+            baseMapper.updateById(ap);
+        }
+        //设置下发状态为下发
+        plan.setDistribute("1");
+        plan.setPlanStatus(1L);
+        baseMapper.updateById(plan);
+        return 1;
+    }
+
 
     /**
      * 查询常规安全检查计划
@@ -209,11 +249,13 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
             coreSafecheckPlan.setIsDeleted("0");
             coreSafecheckPlan.setCreateTime(DateUtils.getNowDate());
             coreSafecheckPlan.setModifiedBy(SecurityUtils.getUserId());
+            coreSafecheckPlan.setDistribute("0");
             coreSafecheckPlanMapper.insert(coreSafecheckPlan);
 
         } else {
             coreSafecheckPlan.setUpdateTime(DateUtils.getNowDate());
             coreSafecheckPlan.setModifiedBy(SecurityUtils.getUserId());
+            coreSafecheckPlan.setPlanStatus(null);
             coreSafecheckPlanMapper.updateById(coreSafecheckPlan);
         }
 

+ 9 - 9
soc-modules/soc-modules-core/src/main/resources/mapper/access/CoreMonitoringTaskRegistrationMonitorMapper.xml

@@ -65,15 +65,15 @@
     </select>
     <select id="selectMonitorByTaskRegistrationId"
             resultType="com.xunmei.core.access.vo.CoreMonitoringTaskRegistrationMonitorVO">
-        SELECT cmtrm.id            AS id,
-               cmtrm.`host`        AS `host`,
-               cmtrm.video_channel AS videoChannel,
-        sd.device_name	AS videoChannelName,
-               sd1.device_name     AS hostName
-        FROM core_monitoring_task_registration_monitor cmtrm
-                 LEFT JOIN sys_device sd ON sd.id = cmtrm.video_channel
-                 LEFT JOIN sys_device sd1 ON sd1.id = sd.host_id
-        WHERE cmtrm.task_registration_id = #{taskRegistrationId}
+SELECT
+    id AS id,
+    `host` AS `host`,
+    video_channel AS videoChannel,
+    video_channel_name AS videoChannelName,
+    host_name AS hostName
+FROM
+    core_monitoring_task_registration_monitor
+WHERE task_registration_id = #{taskRegistrationId}
     </select>
     <select id="selectMonitorById"
             resultType="com.xunmei.core.access.vo.CoreMonitoringTaskRegistrationMonitorVO">

+ 2 - 5
soc-modules/soc-modules-core/src/main/resources/mapper/edu/CoreEduTrainingTaskMapper.xml

@@ -191,11 +191,8 @@
 
     <select id="selectCurUserTaskList" resultType="com.xunmei.common.core.domain.panel.vo.PanelListVo">
         select distinct t.id as id, title as taskName,t.start_date startTime,t.end_date as endTime,t.status
-        from core_edu_training_task t inner join core_edu_training_task_to_role tr on t.id=tr.edu_training_task_id
-        where t.org_id =#{request.orgId} and  tr.role_id in
-        <foreach collection="request.roleIdList" item="roleId" open="(" separator="," close=")">
-            #{roleId}
-        </foreach>
+        from core_edu_training_task t
+        where t.org_id =#{request.orgId}
         and t.status in (0,1,4)
             and (
             (

+ 6 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/retrieval/CoreMonitoringRetrievalTaskMapper.xml

@@ -145,7 +145,8 @@
         <if test="request.moth !=null">
             and ymd_date like concat('%', #{request.moth}, '%')
         </if>
-        ORDER BY create_time DESC ,status
+        ORDER BY FIELD(`status`,'1','0','2','3'),
+        create_time DESC
     </select>
     <select id="selectTaskDataVoListByRetrievalTaskId"
             resultType="com.xunmei.common.core.domain.retrieval.vo.TaskDataVo">
@@ -425,6 +426,7 @@
           and status in (0, 3)
     </delete>
 
+
     <update id="updateDeleteTaskByPlanId">
         update core_monitoring_retrieval_task
         set is_deleted = #{isDeleted}
@@ -433,6 +435,9 @@
     <update id="initializationTask">
         update core_monitoring_retrieval_task SET `status`=0, start_time=null WHERE `status`=1 AND start_time LIKE  concat(#{dateTime}, '%')
     </update>
+    <update id="initializationTaskByHand">
+        update core_monitoring_retrieval_task SET `status`=0, start_time=null WHERE `status`=1 AND id=#{id}
+    </update>
 
     <select id="selectCurUserTaskList" resultType="com.xunmei.common.core.domain.panel.vo.PanelListVo">
      select distinct t.id as id, task_name as taskName,t.plan_start_time as startTime,t.plan_end_time as endTime,t.status

+ 2 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysWorkTimeController.java

@@ -147,8 +147,8 @@ public class SysWorkTimeController extends BaseController {
     @ApiOperation(value = "查询未来作息时间")
     @InnerAuth
     @PostMapping("/work/time/findFutureWorkTime")
-    List<SysWorkTime> findFutureWorkTime(@RequestBody List<Long> orgId,String time){
-       return sysWorkTimeService.findFutureWorkTime(orgId,time);
+    List<SysWorkTime> findFutureWorkTime(@RequestBody List<Long> orgId,String startTime,String ednTime){
+        return sysWorkTimeService.findFutureWorkTime(orgId,startTime,ednTime);
     }
 
 }

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysWorkTimeService.java

@@ -95,5 +95,5 @@ public interface ISysWorkTimeService extends IService<SysWorkTime> {
 
     List<String> findWorkTimeByDateRangeAndOrgId(Date startTime, Date endTime, Long orgId);
 
-    List<SysWorkTime> findFutureWorkTime(List<Long> orgId, String time);
+    List<SysWorkTime> findFutureWorkTime(List<Long> orgId,String startTime,String ednTime);
 }

+ 3 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeServiceImpl.java

@@ -454,9 +454,10 @@ public class SysWorkTimeServiceImpl extends ServiceImpl<SysWorkTimeMapper, SysWo
     }
 
     @Override
-    public List<SysWorkTime> findFutureWorkTime(List<Long> orgId, String time) {
+    public List<SysWorkTime> findFutureWorkTime(List<Long> orgId,String startTime,String ednTime) {
         return lambdaQuery()
-                .ge(SysWorkTime::getYmdDate, time)
+                .ge(SysWorkTime::getYmdDate, startTime)
+                .le(SysWorkTime::getYmdDate, ednTime)
                 .in(SysWorkTime::getOrgId, orgId)
                 .select(SysWorkTime::getId, SysWorkTime::getIsEnable, SysWorkTime::getYmdDate, SysWorkTime::getOrgId)
                 .list();

+ 3 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -677,6 +677,9 @@
         <if test="info.name != null and info.name != ''">
             AND u.name like concat('%', #{info.name}, '%')
         </if>
+        <if test="info.roleId != null and info.roleId != ''">
+            AND sr.id =#{info.roleId}
+        </if>
         <if test="info.params.beginTime != null and info.params.beginTime != ''">
             <!-- 开始时间检索 -->
             AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{info.params.beginTime},'%y%m%d')