Bläddra i källkod

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

jiawuxian 2 år sedan
förälder
incheckning
3d86931cc3
27 ändrade filer med 259 tillägg och 94 borttagningar
  1. 75 1
      project_data/sql/0.0.3/soc/soc.sql
  2. 5 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/SystemParameterConstant.java
  3. 2 2
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillTaskDetailVo.java
  4. 2 2
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/CoreEduTrainingTaskDetailVo.java
  5. 1 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/vo/CoreSafeMonthScoreDetailPageVo.java
  6. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java
  7. 13 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluatePlanController.java
  8. 6 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluateTaskController.java
  9. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/mapper/CoreEvaluatePlanMapper.java
  10. 6 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/mapper/CoreEvaluateTaskMapper.java
  11. 1 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluatePlanService.java
  12. 2 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluateTaskService.java
  13. 5 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java
  14. 5 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluateTaskServiceImpl.java
  15. 21 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/controller/MonitorAccessReportController.java
  16. 1 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/MonitorAccessReportService.java
  17. 62 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java
  18. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java
  19. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java
  20. 6 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafecheckPlanServiceImpl.java
  21. 5 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafeMonthScoreServiceImpl.java
  22. 9 17
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafetyExceptionDataServiceImpl.java
  23. 3 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java
  24. 1 1
      soc-modules/soc-modules-core/src/main/resources/mapper/drill/CoreDrillTaskMapper.xml
  25. 3 0
      soc-modules/soc-modules-core/src/main/resources/mapper/evaluate/CoreEvaluatePlanMapper.xml
  26. 18 37
      soc-modules/soc-modules-core/src/main/resources/mapper/evaluate/CoreEvaluateTaskMapper.xml
  27. 1 1
      soc-modules/soc-modules-core/src/main/resources/mapper/question/QuestionMapper.xml

+ 75 - 1
project_data/sql/0.0.3/soc/soc.sql

@@ -384,7 +384,8 @@ ALTER TABLE  core_safetycheck_rule MODIFY COLUMN id bigint auto_increment NOT NU
 ALTER TABLE  core_safetycheck_rule MODIFY COLUMN create_time datetime NULL COMMENT '创建时间';
 ALTER TABLE  core_safetycheck_rule MODIFY COLUMN update_time datetime NULL COMMENT '更新时间';
 ALTER TABLE  core_safetycheck_rule MODIFY COLUMN create_by varchar(255) CHARACTER SET utf8mb4;
-
+-- 修改演练任务表状态字段释义
+alter table core_drill_task  modify status int default 0 null comment '任务状态:0:待登记,5:待提交,1:待签名,2待评价,3:已完成,4:已逾期';
 
 
 DELIMITER ??
@@ -463,6 +464,12 @@ update sys_menu set menu_name='调阅情况跟踪' where menu_name='监控调阅
 -- 教育培训菜单名称变更
 update sys_menu set menu_name='教育培训' where menu_name='教育培训管理' limit 1;
 update sys_menu set menu_name='培训任务下发' where menu_name='培训计划管理' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务新增' WHERE t.menu_name = '教育培训计划新增' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务修改' WHERE t.menu_name = '教育培训计划修改' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务删除' WHERE t.menu_name = '教育培训计划删除' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务下发' WHERE t.menu_name = '教育培训计划下发' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务查询' WHERE t.menu_name = '教育培训计划查询' limit 1;
+UPDATE sys_menu t SET t.menu_name = '教育培训任务导出' WHERE t.menu_name = '教育培训计划导出' limit 1;
 update sys_menu set menu_name='培训登记跟踪' where menu_name='培训任务管理' limit 1;
 update sys_menu set `menu_name`='履职情况跟踪' WHERE  `menu_name`='履职情况查询';
 update sys_menu set `menu_name`='布撤防情况跟踪',parent_id=2000 WHERE  `menu_name`='布撤防状态监管';
@@ -479,6 +486,12 @@ DELETE FROM `sys_menu` WHERE id in (1719662219582926849,1719663201104588802,2355
 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 (01719662219582926849, '整改情况跟踪', 2350, 2, 'reform', 'question/reform/index', NULL, 1, 0, 'C', '0', '0', 'question:reform', '1', 'post', NULL, 'jwx', '2023-11-01 18:27:01', '', 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 (01719663201104588802, '查询', 1719662219582926849, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'question:reform:query', '1', NULL, NULL, '超级管理员', '2023-11-01 18:30:55', '', 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 (00000000000000002355, '整改', 1719662219582926849, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'question:reform:reform', '1', '#', NULL, '超级管理员', '2023-09-23 16:30:16', '超级管理员', '2023-11-01 18:31:21', '');
+-- 安全检查字典变更
+DELETE FROM `sys_dict_data` WHERE `dict_type`='safety_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', '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', '省联社账号', '2023-11-03 10:53: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 ( 4, '已逾期', '4', 'safety_check_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-21 10:44:43', '', NULL, NULL);
 
 
 
@@ -525,3 +538,64 @@ UPDATE sys_dict_data set dict_label ='待登记' WHERE dict_label ='待演练' A
 -- 报警控制器
 ALTER TABLE `core_protection_log`
 MODIFY COLUMN `status_updator_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上报人姓名' AFTER `status_updator_id`;
+-- 修改安全指数机构分数表机构path字段长度
+alter table core_safe_month_score modify org_path varchar(225) null comment '机构path';
+DELETE FROM sys_menu WHERE id IN(01719287834364436482,01719288533101928450,01719892877586239490);
+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 (01719287834364436482, '统计报表', 0, 1, 'reportForms', NULL, NULL, 1, 0, 'M', '0', '0', 'core:send:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+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 (01719288533101928450, '安全检查统计报表', 1719287834364436482, 1, 'core/reportForms', 'core/reportForms/safetyInspectReport', NULL, 1, 1, 'C', '0', '0', 'core:safetyInspectReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+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 (01719892877586239490, '外包履职评价统计表', 1719287834364436482, 1, 'evaluateTable', 'evaluateTable/index', NULL, 1, 1, 'C', '0', '0', 'core:safetyInspectReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+delete from sys_role_menu where menu_id IN(01719287834364436482,01719288533101928450,01719892877586239490);
+
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01719287834364436482);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01719287834364436482);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01719287834364436482);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (122, 01719287834364436482);
+
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01719288533101928450);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01719288533101928450);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01719288533101928450);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (122, 01719288533101928450);
+
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01719892877586239490);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01719892877586239490);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01719892877586239490);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (122, 01719892877586239490);
+-- 新增省联社角色
+delete from sys_role where role_name IN('省联社部门管理层');
+INSERT INTO `sys_role` VALUES (114, '1', '省联社部门管理层', 'default', 0, 1, 1, 1, '0', 0, '超级管理员', '2023-09-04 09:39:13', '超级管理员', '2023-09-16 23:57:16', NULL);
+
+-- 同步机构 特殊机构移动配置数据
+DELETE FROM `sync_fjnx_org_move` WHERE id IN (1,2,3,4);
+INSERT INTO `sync_fjnx_org_move` (`id`, `org_code`, `org_type`) VALUES (1, '910020000', 1);
+INSERT INTO `sync_fjnx_org_move` (`id`, `org_code`, `org_type`) VALUES (2, '910040000', 1);
+INSERT INTO `sync_fjnx_org_move` (`id`, `org_code`, `org_type`) VALUES (3, '910060000', 1);
+INSERT INTO `sync_fjnx_org_move` (`id`, `org_code`, `org_type`) VALUES (4, '910030000', 1);
+
+-- 同步机构 业务机构层级配置数据
+DELETE FROM `sync_fjnx_org_business_relation` WHERE id <=19;
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (1, 'M39000000', 'M31000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (2, 'M42000000', 'M33000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (3, 'M43000000', 'M34000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (5, 'M45000000', 'M36000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (6, 'M46000000', 'M37000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (7, 'M47000000', 'M38000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (8, '900000000', 'C900000000', 'C900000000', 1, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (9, 'M40000000', '900000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (10, 'M44000000', '900000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (11, 'M31000000', NULL, NULL, 2, 'M39000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (12, 'M32000000', NULL, NULL, 2, 'M41000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (13, 'M33000000', NULL, NULL, 2, 'M42000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (14, 'M34000000', NULL, NULL, 2, 'M43000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (15, 'M35000000', NULL, NULL, 2, 'M39000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (16, 'M36000000', NULL, NULL, 2, 'M45000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (17, 'M37000000', NULL, NULL, 2, 'M46000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (18, 'M38000000', NULL, NULL, 2, 'M47000000', NULL, NULL, NULL, NULL);
+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (19, 'M41000000', 'M32000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL);
+-- 天气接口配置
+delete from sys_config where config_key='WEATHER_URL';
+INSERT INTO sys_config (config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) VALUES (191, '天气接口', 'WEATHER_URL', 'https://ali-weather.showapi.com', 'Y', NULL, now(), NULL, now(), NULL);
+
+

+ 5 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/SystemParameterConstant.java

@@ -117,4 +117,9 @@ public class SystemParameterConstant {
      */
     public static final String FORCE_DELETE_PLAN_DATA = "FORCE_DELETE_PLAN_DATA";
 
+    /**
+     * 天气接口参数key
+     */
+    public static final String WEATHER_URL = "WEATHER_URL";
+
 }

+ 2 - 2
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillTaskDetailVo.java

@@ -65,11 +65,11 @@ public class CoreDrillTaskDetailVo {
     @ApiModelProperty(value = "计划任务截止日期")
     private LocalDateTime endDate;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     @ApiModelProperty(value = "演练时间")
     private LocalDateTime drillStartTime;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     @ApiModelProperty(value = "演练时间")
     private LocalDateTime drillEndTime;
 

+ 2 - 2
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/CoreEduTrainingTaskDetailVo.java

@@ -65,11 +65,11 @@ public class CoreEduTrainingTaskDetailVo {
     @ApiModelProperty(value = "计划任务截止日期")
     private LocalDateTime endDate;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     @ApiModelProperty(value = "培训开始时间")
     private LocalDateTime trainingStartDateTime;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     @ApiModelProperty(value = "培训截止时间")
     private LocalDateTime trainingEndDateTime;
 

+ 1 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/vo/CoreSafeMonthScoreDetailPageVo.java

@@ -14,6 +14,7 @@ public class CoreSafeMonthScoreDetailPageVo {
     private String orgName;
 
     private Integer orgType;
+    private String orgTypeText;
 
     //该机构月度得分
     private Double orgScore;

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

@@ -126,7 +126,7 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             for (CoreDrillTaskPageVo record : records) {
                 dealData(record, records, null);
             }
-            records.sort(getComparator());
+           // records.sort(getComparator());
         }
         //抓换为TableDataInfo适配前端
         return TableDataInfo.build(pageData);

+ 13 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluatePlanController.java

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * 外包评价计划Controller
@@ -35,13 +36,19 @@ public class CoreEvaluatePlanController extends BaseController {
     /**
      * 查询外包评价计划列表
      */
-    @ApiOperation(value = "查询CoreEvaluatePlan列表")
+    @ApiOperation(value = "查询CoreEvaluatePlan列表分页")
     @RequiresPermissions("core:evaluatePlan:list")
     @GetMapping("/list")
     public TableDataInfo list(EvaluateQueryDTO coreEvaluatePlan) {
         return coreEvaluatePlanService.selectPage(coreEvaluatePlan);
     }
 
+    @ApiOperation(value = "查询CoreEvaluatePlan列表全部")
+    @RequiresPermissions("core:evaluatePlan:list")
+    @GetMapping("/allList")
+    public List<CoreEvaluatePlan> allList() {
+        return coreEvaluatePlanService.allList();
+    }
 
     /**
      * 获取外包评价计划详细信息
@@ -70,8 +77,10 @@ public class CoreEvaluatePlanController extends BaseController {
     public AjaxResult add(@RequestBody CoreEvaluatePlanDTO coreEvaluatePlan) {
         return toAjax(coreEvaluatePlanService.insertCoreEvaluatePlan(coreEvaluatePlan));
     }
+
     /**
      * 每季度生成
+     *
      * @param cycle
      * @return
      */
@@ -86,6 +95,7 @@ public class CoreEvaluatePlanController extends BaseController {
             return AjaxResult.error("任务生成失败" + e.getMessage());
         }
     }
+
     /**
      * 修改外包评价计划
      */
@@ -106,12 +116,14 @@ public class CoreEvaluatePlanController extends BaseController {
     public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id) {
         return toAjax(coreEvaluatePlanService.distribute(id));
     }
+
     @ApiOperation(value = "取消下发")
     @RequiresPermissions("core:evaluatePlan:remove")
     @GetMapping(value = "/withdraw/{id}")
     public AjaxResult withdraw(@PathVariable(value = "id", required = false) Long id) {
         return toAjax(coreEvaluatePlanService.withdraw(id));
     }
+
     /**
      * 删除外包评价计划
      */

+ 6 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluateTaskController.java

@@ -43,6 +43,7 @@ public class CoreEvaluateTaskController extends BaseController {
     public TableDataInfo<CoreEvaluateTaskVO> list(EvaluateTaskDTO coreEvaluateTask) {
         return coreEvaluateTaskService.selectPage(coreEvaluateTask);
     }
+
     /**
      * 查询外包评价任务列表app
      */
@@ -52,11 +53,12 @@ public class CoreEvaluateTaskController extends BaseController {
     public TableDataInfo<CoreEvaluateTaskVO> appList(EvaluateTaskDTO coreEvaluateTask) {
         return coreEvaluateTaskService.selectAPPPage(coreEvaluateTask);
     }
+
     @ApiOperation(value = "统计")
     @RequiresPermissions("core:evaluateTask:list")
     @GetMapping("/statistics")
-    public List<Map> statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
-        return coreEvaluateTaskService.statistics(evaluateTaskStatisticsDTO);
+    public AjaxResult statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
+        return success(coreEvaluateTaskService.statistics(evaluateTaskStatisticsDTO));
     }
 
     /**
@@ -68,6 +70,7 @@ public class CoreEvaluateTaskController extends BaseController {
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(coreEvaluateTaskService.selectCoreEvaluateTaskContentById(id));
     }
+
     /**
      * 获取外包评价任务详细信息
      */
@@ -77,6 +80,7 @@ public class CoreEvaluateTaskController extends BaseController {
     public AjaxResult details(@PathVariable("id") Long id) {
         return success(coreEvaluateTaskService.selectCoreEvaluateTaskById(id));
     }
+
     /**
      * 新增外包评价任务
      */

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/mapper/CoreEvaluatePlanMapper.java

@@ -76,4 +76,6 @@ public interface CoreEvaluatePlanMapper extends BaseMapper<CoreEvaluatePlan> {
      * @return
      */
     List<CoreEvaluatePlan>selectPlanByCycle(String cycle);
+
+    List<CoreEvaluatePlan>allList();
 }

+ 6 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/mapper/CoreEvaluateTaskMapper.java

@@ -11,6 +11,7 @@ import com.xunmei.core.evaluate.vo.CoreEvaluatePlanListVO;
 import com.xunmei.core.evaluate.vo.CoreEvaluateTaskVO;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -70,8 +71,12 @@ public interface CoreEvaluateTaskMapper extends BaseMapper<CoreEvaluateTask> {
     int deleteCoreEvaluateTaskByIds(Long[] ids);
 
     Page<CoreEvaluateTaskVO> selectPageList(@Param("page") Page<CoreEvaluateTaskVO> page, @Param("request") EvaluateTaskDTO request);
+
     Page<CoreEvaluateTaskVO> selectAppPageList(@Param("page") Page<CoreEvaluateTaskVO> page, @Param("request") EvaluateTaskDTO request);
+
     Page<Map> statistics(@Param("page") Page<Map> page, @Param("request") EvaluateTaskStatisticsDTO request);
-List<Map>statisticsAll(@Param("request") EvaluateTaskStatisticsDTO request);
+
+    List<LinkedHashMap> statisticsAll(@Param("request") EvaluateTaskStatisticsDTO request);
+
     List<Map> getContentByTaskId(@Param("id") Long id);
 }

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluatePlanService.java

@@ -89,4 +89,5 @@ int withdraw(Long id);
      * @return Page
      */
     TableDataInfo<CoreEvaluatePlanListVO> selectPage(EvaluateQueryDTO evaluateQueryDTO);
+    List<CoreEvaluatePlan>allList();
 }

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluateTaskService.java

@@ -9,6 +9,7 @@ import com.xunmei.core.evaluate.dto.EvaluateTaskDTO;
 import com.xunmei.core.evaluate.dto.EvaluateTaskStatisticsDTO;
 import com.xunmei.core.evaluate.vo.CoreEvaluateTaskVO;
 
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -95,5 +96,5 @@ public interface ICoreEvaluateTaskService extends IService<CoreEvaluateTask> {
      * @param evaluateTaskDTO
      * @return
      */
-    List<Map> statistics(EvaluateTaskStatisticsDTO evaluateTaskDTO);
+    List<LinkedHashMap> statistics(EvaluateTaskStatisticsDTO evaluateTaskDTO);
 }

+ 5 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java

@@ -248,9 +248,6 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
             coreEvaluatePlanContent.setEvaluateId(coreEvaluatePlanDTO.getId());
             coreEvaluatePlanContentMapper.insert(coreEvaluatePlanContent);
         });
-      /*  if (coreEvaluatePlanDTO.getBuildTaskNow()) {
-            this.distribute(coreEvaluatePlanDTO.getId());
-        }*/
         return i;
     }
 
@@ -402,4 +399,9 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
         //抓换为TableDataInfo适配前端
         return TableDataInfo.build(page);
     }
+
+    @Override
+    public List<CoreEvaluatePlan> allList() {
+        return baseMapper.allList();
+    }
 }

+ 5 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluateTaskServiceImpl.java

@@ -107,7 +107,7 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
     }
 
     @Override
-    public List<Map> statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
+    public List<LinkedHashMap> statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
         Page<Map> page;
         //分页
         if (evaluateTaskStatisticsDTO.getPageNum() != null && evaluateTaskStatisticsDTO.getPageSize() != null) {
@@ -117,10 +117,13 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
         }
         SysOrg sysOrg = remoteOrgService.selectSysOrgById(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
         evaluateTaskStatisticsDTO.setOrgPath(sysOrg.getPath());
-        List<Map> rows = baseMapper.statisticsAll(evaluateTaskStatisticsDTO);
+        evaluateTaskStatisticsDTO.setOrgId(null);
+        evaluateTaskStatisticsDTO.setOrgPath(null);
+        List<LinkedHashMap> rows = baseMapper.statisticsAll(evaluateTaskStatisticsDTO);
 
         for (int i = 0; i < rows.size(); i++) {
             Object id = rows.get(i).get("id");
+            rows.get(i).remove("id");
             List<Map> contentByTaskId = baseMapper.getContentByTaskId((Long) id);
             if (CollectionUtils.isNotEmpty(contentByTaskId)) {
                 int total = 0;

+ 21 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/controller/MonitorAccessReportController.java

@@ -1,10 +1,16 @@
 package com.xunmei.core.reportForms.monitor.controller;
+import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.log.annotation.Log;
 import com.xunmei.common.log.enums.BusinessType;
 import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
+import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
+import com.xunmei.system.api.RemoteOrgService;
+import com.xunmei.system.api.domain.SysOrg;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,8 +18,11 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.time.LocalDate;
 
 /**
  * @author :LuoWei
@@ -25,12 +34,21 @@ import java.io.IOException;
 public class MonitorAccessReportController {
     @Autowired
     private MonitorAccessReportService monitorAccessReportService;
-
+    @Resource
+    private RemoteOrgService remoteOrgService;
     @ApiOperation(value = "监控调阅报表")
     @RequiresPermissions("core:monitorAccessReport:list")
     @GetMapping("/list")
-    public TableDataInfo list(MonitoringAccessDTO monitoringAccessDTO) {
-        return monitorAccessReportService.report(monitoringAccessDTO);
+    public AjaxResult list(MonitoringAccessDTO monitoringAccessDTO) {
+        if (null==monitoringAccessDTO.getCycle()){
+            monitoringAccessDTO.setCycle("2");
+        }
+        AjaxResult ajax = AjaxResult.success();
+        TableDataInfo<MonitoringAccessVO> report = monitorAccessReportService.report(monitoringAccessDTO);
+        ajax.put(AjaxResult.DATA_TAG,report);
+        String title = monitorAccessReportService.getTitle(monitoringAccessDTO);
+        ajax.put("title",title);
+        return ajax;
     }
     /**
      * 导出excel

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/MonitorAccessReportService.java

@@ -17,4 +17,5 @@ public interface MonitorAccessReportService {
     TableDataInfo<MonitoringAccessVO> report(MonitoringAccessDTO monitoringAccessDTO);
     List<MonitoringAccessVO>selectAll(MonitoringAccessDTO monitoringAccessDTO);
     void export(MonitoringAccessDTO monitoringAccessDTO, HttpServletResponse response) throws IOException;
+    String getTitle(MonitoringAccessDTO monitoringAccessDTO);
 }

+ 62 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java

@@ -7,6 +7,7 @@ import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.retrieval.vo.CoreMonitoringRetrievalTaskExcelVo;
 import com.xunmei.common.core.utils.DateHelper;
 import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.mapper.MonitorAccessReportMapper;
@@ -23,6 +24,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -36,6 +40,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
     private MonitorAccessReportMapper monitorAccessReportMapper;
     @Resource
     private RemoteOrgService remoteOrgService;
+
     @Override
     public TableDataInfo<MonitoringAccessVO> report(MonitoringAccessDTO monitoringAccessDTO) {
         Page<MonitoringAccessVO> page;
@@ -44,7 +49,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
         } else {
             page = new Page<>();
         }
-        if (null!=monitoringAccessDTO.getOrgId()){
+        if (null != monitoringAccessDTO.getOrgId()) {
             SysOrg sysOrg = remoteOrgService.selectSysOrgById(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
             monitoringAccessDTO.setOrgPath(sysOrg.getPath());
         }
@@ -60,7 +65,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
     public List<MonitoringAccessVO> selectAll(MonitoringAccessDTO monitoringAccessDTO) {
 
         List<MonitoringAccessVO> monitoringAccessVOS = monitorAccessReportMapper.selectAll(monitoringAccessDTO);
-        monitoringAccessVOS.forEach(m->{
+        monitoringAccessVOS.forEach(m -> {
             Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(m.getPath());
             m.setNetworkNumber(integer);
         });
@@ -70,10 +75,10 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
     @Override
     public void export(MonitoringAccessDTO monitoringAccessDTO, HttpServletResponse response) throws IOException {
         String orgName = null;
-        if (null!=monitoringAccessDTO.getOrgId()){
+        if (null != monitoringAccessDTO.getOrgId()) {
             SysOrg sysOrg = remoteOrgService.selectSysOrgById(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
             monitoringAccessDTO.setOrgPath(sysOrg.getPath());
-            orgName=sysOrg.getName();
+            orgName = sysOrg.getName();
         }
         List<MonitoringAccessVO> monitoringAccessVOS = this.selectAll(monitoringAccessDTO);
         if (ObjectUtil.isEmpty(monitoringAccessVOS)) {
@@ -93,4 +98,57 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
         // 调用EasyExcel的导出方法
         EasyExcel.write(response.getOutputStream(), MonitoringAccessVO.class).sheet("Sheet1").doWrite(monitoringAccessVOS);
     }
+
+    @Override
+    public String getTitle(MonitoringAccessDTO monitoringAccessDTO) {
+        if (null == monitoringAccessDTO.getOrgId()) {
+            monitoringAccessDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
+        }
+        SysOrg sysOrg = remoteOrgService.selectSysOrgById(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
+        String timeUnit = "年";
+        int amount = 0;
+        LocalDate lastDayOfMonth;
+        switch (monitoringAccessDTO.getCycle()) {
+            case "2":
+                amount = 7;
+                timeUnit = "周";
+                break;
+            case "3":
+                LocalDate currentDate = LocalDate.now();
+                lastDayOfMonth = currentDate.withDayOfMonth(currentDate.lengthOfMonth());
+                amount = lastDayOfMonth.getDayOfMonth() - currentDate.getDayOfMonth();
+                timeUnit = "月";
+                break;
+            default:
+                amount = getDayNum(12);
+                break;
+        }
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(new Date());
+        cal.add(Calendar.DATE, -amount);
+        Date time = cal.getTime();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String title = sysOrg.getShortName() + "监控调阅" + timeUnit + "报(" + sdf.format(time) + "~" + sdf.format(new Date()) + ")";
+        return title;
+    }
+
+    private int getDayNum(int monthsToAdd) {
+        LocalDate lastDayOfMonth;
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        LocalDate localDate = LocalDate.now();
+        LocalDate nextMonthFirstDay = null;
+        nextMonthFirstDay = localDate.plusMonths(monthsToAdd).withDayOfMonth(1);
+        lastDayOfMonth = nextMonthFirstDay.minusDays(1);
+        int dayNum = 0;
+        try {
+            Date d1 = sdf.parse(lastDayOfMonth.toString());
+            Date d2 = sdf.parse(localDate.toString());
+            long date_interval = Math.abs(d1.getTime() - d2.getTime());//绝对值
+            long day = 1000 * 24 * 60 * 60;//1000*24*60*60毫秒是一天
+            dayNum = new Long(date_interval / day).intValue();
+        } catch (Exception e) {
+            e.getMessage();
+        }
+        return dayNum;
+    }
 }

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

@@ -215,7 +215,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             baseMapper.updateById(ap);
             //撤回需要删除本周期所有任务
             DateRange dateRange = DateUtils.getStartAndEnd(new Date(), plan.getPlanCycle());
-            resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, ap.getId()).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+            resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, ap.getId()).in(Resumption::getStatus,1,2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
         }
         //设置下发状态为未下发
@@ -225,7 +225,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 
 //撤回需要删除本周期所有任务
         DateRange dateRange = DateUtils.getStartAndEnd(new Date(), plan.getPlanCycle());
-        resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, plan.getId()).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+        resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, plan.getId()).in(Resumption::getStatus,1,2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
     }
 

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

@@ -136,7 +136,7 @@ public class CoreSafecheckPlanController extends BaseController {
             //获取父计划下面所有父id相等并且未删除并且已启用的计划
             List<CoreSafecheckPlan> plans = coreSafecheckPlanService.list(new LambdaQueryWrapper<CoreSafecheckPlan>().eq(CoreSafecheckPlan::getParentId, plan.getId()).eq(CoreSafecheckPlan::getIsDeleted, 0).eq(CoreSafecheckPlan::getDistribute, 1));
             plans.add(plan);
-            jobBusiness.createTaskByPlans(plans);
+//            jobBusiness.createTaskByPlans(plans);
         }
 //        if (isEditAll) {
 //            CoreSafecheckPlan plan = coreSafecheckPlanService.getById(returnId);

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

@@ -204,7 +204,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
 
             //撤回需要删除本周期所有任务
             DateRange dateRange = DateUtils.getStartAndEnd(new Date(), Math.toIntExact(plan.getPlanCycle()));
-            coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, ap.getId()).between(CoreSafetyTask::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+            coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, ap.getId()).in(CoreSafetyTask::getStatus,1,2).between(CoreSafetyTask::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
         }
         //设置下发状态为未下发
@@ -213,7 +213,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
         baseMapper.updateById(plan);
         //撤回需要删除本周期所有任务
         DateRange dateRange = DateUtils.getStartAndEnd(new Date(), Math.toIntExact(plan.getPlanCycle()));
-        coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, plan.getId()).between(CoreSafetyTask::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+        coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, plan.getId()).in(CoreSafetyTask::getStatus,1,2).between(CoreSafetyTask::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
     }
 
@@ -223,7 +223,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
         plan.setPlanStatus(1L);
 
         //行社下发
-        if (plan.getPlanOfOrgType() == 3 && "0".equals(plan.getDistribute())) {
+        if ((plan.getPlanOfOrgType() == 3 && "0".equals(plan.getDistribute()))||(plan.getExecOrgType()==1||plan.getExecOrgType()==2)) {
             plan.setDistribute("1");
         } else {
             plan.setDistribute("0");
@@ -379,7 +379,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
                 p.setDescription(coreSafecheckPlan.getDescription());
                 p.setExecOrgType(coreSafecheckPlan.getExecOrgType());
                 p.setPlanCycle(coreSafecheckPlan.getPlanCycle());
-                p.setPlanStatus(coreSafecheckPlan.getPlanStatus());
+//                p.setPlanStatus(coreSafecheckPlan.getPlanStatus());
                 p.setSourceType(coreSafecheckPlan.getSourceType());
                 baseMapper.updateById(p);
 
@@ -504,7 +504,9 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
                 coreSafecheckPlanToExecOrgMapper.deleteCoreSafecheckPlanToExecOrgByPlanId(plan.getId());
                 coreSafecheckPlanToCheckOrgMapper.deleteCoreSafecheckPlanToCheckOrgByPlanId(plan.getId());
                 coreSafecheckPlanToPointMapper.deleteCoreSafecheckPlanToPointByPlanId(plan.getId());
+                coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, plan.getId()));
             }
+            coreSafetyTaskMapper.delete(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getPlanId, l));
         }
         //清理关联数据
         coreSafecheckPlanToRoleMapper.deleteCoreSafecheckPlanToRoleByPlanIds(ids);

+ 5 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafeMonthScoreServiceImpl.java

@@ -64,11 +64,9 @@ public class CoreSafeMonthScoreServiceImpl extends ServiceImpl<CoreSafeMonthScor
     @Override
     public TableDataInfo<CoreSafeMonthScoreDetailPageVo> selectDetailPageData(CoreSafeMonthScoreDetailPageDto request) {
         SysOrg sysOrg = orgService.selectOrgById(request.getOrgId(), SecurityConstants.INNER);
-        List<SysOrg> childrenIds = this.orgService.selectByOrgPathAndOrgType(sysOrg.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode(), SecurityConstants.INNER);
-        List<Long> idList = childrenIds.stream().map(SysOrg::getId).collect(Collectors.toList());
-        idList.add(request.getOrgId());
+
         LambdaQueryWrapper<CoreSafeMonthScore> wrapper = Wrappers.lambdaQuery();
-        wrapper.in(CoreSafeMonthScore::getOrgId, idList);
+        wrapper.likeRight(CoreSafeMonthScore::getOrgPath, sysOrg.getPath());
         if (request.getDate() != null) {
             wrapper.eq(CoreSafeMonthScore::getDataMonth, request.getDataMonth())
                     .eq(CoreSafeMonthScore::getDataYear, request.getDataYear());
@@ -77,7 +75,8 @@ public class CoreSafeMonthScoreServiceImpl extends ServiceImpl<CoreSafeMonthScor
         if (null != levelId) {
             wrapper.eq(CoreSafeMonthScore::getLevelId, levelId);
         }
-        Page<CoreSafeMonthScore> page = baseMapper.selectPage(request.getPageRequest(), wrapper);
+        Page<CoreSafeMonthScore> pageRequest = request.getPageRequest();
+        Page<CoreSafeMonthScore> page = baseMapper.selectPage(pageRequest, wrapper);
         if (page.getRecords().size() > 0) {
             IPage<CoreSafeMonthScoreDetailPageVo> page1 = page.convert(this::getSafeMonthScoreDetailPageVo);
             return TableDataInfo.build(page1);
@@ -95,6 +94,7 @@ public class CoreSafeMonthScoreServiceImpl extends ServiceImpl<CoreSafeMonthScor
         SysOrg org = this.orgService.selectOrgById(orgId, SecurityConstants.INNER);
         vo.setOrgName(org.getName());
         vo.setOrgType(org.getType());
+        vo.setOrgTypeText(OrgTypeEnum.getName(org.getType()));
         vo.setOrgId(org.getId());
         return vo;
     }

+ 9 - 17
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafetyExceptionDataServiceImpl.java

@@ -89,7 +89,7 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         DateTime time = dealTimeParam(date);
 
         //清空本月的异常数据
-        this.deleteExceptionData(new Date());
+        this.deleteExceptionData(time);
         //获取安保履职的数据
         doResumptionExceptionData(time);
         //获取问题整改的异常数据
@@ -106,7 +106,7 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
 
         DateTime time = dealTimeParam(date);
         int year = time.year();
-        int month = time.month();
+        int month = time.month()+1;
         //获取指标配置
         List<SafeIndexRuleCountVo> safeIndexConfigVoList = ruleService.findSafeIndexRuleVoList();
         //履职的指标配置
@@ -487,7 +487,7 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         List<CoreSafetySourceData> sourceDataList = new ArrayList<>();
         //获取累计数的配置,并根据配置的连续数日期进行排序
         resumptionUndoIndexList.stream()
-                .filter(r -> r.getCalculateType().equals(Constants.TWO))
+                .filter(r -> r.getCalculateType().equals(Constants.ONE))
                 .findFirst()
                 .ifPresent(config -> {
                     double deductScore = dataList.size() * config.getItemValue();
@@ -728,25 +728,17 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         //删除上个月所有的数据
         LambdaQueryWrapper<CoreSafetyExceptionData> queryWrapper = new LambdaQueryWrapper<>();
         //大于等于第一天
-        queryWrapper.ge(CoreSafetyExceptionData::getDataTime, DateUtil.beginOfDay(date));
+        queryWrapper.ge(CoreSafetyExceptionData::getDataTime, DateUtil.beginOfMonth(date));
         //小于等于最后一天
-        queryWrapper.le(CoreSafetyExceptionData::getDataTime, DateUtil.endOfDay(date));
+        queryWrapper.le(CoreSafetyExceptionData::getDataTime, DateUtil.endOfMonth(date));
         coreSafetyExceptionDataMapper.delete(queryWrapper);
     }
 
     private DateTime dealTimeParam(String date) {
-        int year = Integer.parseInt(date.split("-")[0]);
-        int month = Integer.parseInt(date.split("-")[1]);
-        DateTime time = new DateTime();
-        time.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
-        time.setField(DateField.YEAR, year);
-        time.setField(DateField.MONTH, month - 1);
-        time.setField(DateField.DAY_OF_MONTH, 1);
-        time.setField(DateField.HOUR_OF_DAY, 0);
-        time.setField(DateField.MINUTE, 0);
-        time.setField(DateField.SECOND, 0);
-        time.setField(DateField.MILLISECOND, 0);
-        return time;
+        DateTime parse = DateUtil.beginOfMonth(DateUtil.parse(date));
+        parse.setField(DateField.MONTH, DateUtil.offsetMonth(parse,-1).month());
+
+        return parse;
     }
 
     /**

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java

@@ -1,6 +1,5 @@
 package com.xunmei.core.weather.service.impl;
 
-import cn.hutool.core.date.DateField;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -12,7 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.ErrorMsgConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
-import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.constant.SystemParameterConstant;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
 import com.xunmei.common.core.domain.weather.vo.CityInfoVo;
@@ -152,7 +151,8 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
     }
 
     private  String getWeathDatafromApi(String areaId,String appCode){
-        String host = "https://ali-weather.showapi.com";
+
+        String host = systemParameService.findSysConfigByCode(SystemParameterConstant.WEATHER_URL, SecurityConstants.INNER).getConfigValue();
         String path = "/area-to-weather";
         String method = "GET";
         //String appcode = "6d7d4fa382234e36893f4226f9dd3379";

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/drill/CoreDrillTaskMapper.xml

@@ -89,7 +89,7 @@
             </if>
             <include refid="timeRangeSql"/>
         </where>
-        order by t.update_time desc
+        order by field(t.status,0,5,1,2,3,4),t.update_time desc
     </select>
 
     <select id="selectReport" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillTaskReportVo">

+ 3 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/evaluate/CoreEvaluatePlanMapper.xml

@@ -110,6 +110,9 @@
           AND
             evaluate_cycle = #{cycle}
     </select>
+    <select id="allList" resultType="com.xunmei.core.evaluate.domain.CoreEvaluatePlan">
+        SELECT * FROM core_evaluate_plan
+    </select>
 
     <insert id="insertCoreEvaluatePlan" parameterType="com.xunmei.core.evaluate.domain.CoreEvaluatePlan">
         insert into core_evaluate_plan

+ 18 - 37
soc-modules/soc-modules-core/src/main/resources/mapper/evaluate/CoreEvaluateTaskMapper.xml

@@ -184,43 +184,24 @@
         </if>
         GROUP BY a.id
     </select>
-    <select id="statisticsAll" resultType="java.util.Map">
-        SELECT
-        a.id,
-        a.org_name,
-        GROUP_CONCAT( c.role_name ) as roleName,
-        a.evaluate_name,
-        a.start_time,
-        a.end_time,
-        a.evaluate_by,
-        a.complete_time,
-        a.`status`,
-        IFNULL( SUM( d.score )/ COUNT( d.id ), 0 )  AS averageScore
-        FROM
-        core_evaluate_task a
-        LEFT JOIN core_evaluate_role b ON b.evaluate_id = a.plan_id
-        LEFT JOIN sys_role c ON c.id = b.role_id
-        LEFT JOIN core_evaluate_task_user e ON e.task_id=a.id
-        LEFT JOIN core_evaluate_task_user_content d on d.task_user_id=e.id
-        WHERE
-        a. is_deleted =0
-        <if test="request.orgId != null ">
-            and a.org_id = #{request.orgId}
-        </if>
-        <if test="request.orgPath != null  and request.orgPath != ''">
-            and a.org_path like concat( #{request.orgPath}, '%')
-        </if>
-        <if test="request.evaluateName != null  and request.evaluateName != ''">
-            and a.evaluate_name like concat('%', #{request.evaluateName}, '%')
-        </if>
-
-        <if test="request.status != null and '' neq request.status">
-            and a.status = #{request.status}
-        </if>
-        <if test="request.date != null and request.date != ''">
-            and e.complete_time like concat( #{request.date}, '%')
-        </if>
-        GROUP BY a.id
+    <select id="statisticsAll" resultType="java.util.LinkedHashMap">
+            SELECT
+            c.id AS id,
+            a.org_name AS '评价机构',
+            d.score AS '被评价机构名称'
+            FROM
+            core_evaluate_task_user_content d LEFT JOIN
+            core_evaluate_task_user c ON d.task_user_id=c.id AND d.code=1 LEFT JOIN
+            core_evaluate_task a ON a.id=c.task_id
+            LEFT JOIN core_evaluate_plan b ON a.plan_id = b.id
+            WHERE
+            a.`status` = 2
+            <if test="request.orgPath != null  and request.orgPath != ''">
+                AND a.org_path like concat(#{request.orgPath}, '%')
+            </if>
+            <if test="request.planId != null">
+                AND b.id = #{request.planId}
+            </if>
     </select>
 
 

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/question/QuestionMapper.xml

@@ -287,7 +287,7 @@
         FROM core_question a
         where submit_time >= #{startTime}
         and submit_time <![CDATA[<=]]> #{endTime}
-        and reform_deadline <![CDATA[<]]> now()
+        and reform_deadline <![CDATA[<]]> #{endTime}
         and (confirm_status = 0 or (confirm_status = 2 and reform_status = 10))
         <if test="orgIds !=null and orgIds.size>0">
             and org_id in