Forráskód Böngészése

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

jiawuxian 2 éve
szülő
commit
6855a26fda
14 módosított fájl, 154 hozzáadás és 47 törlés
  1. 6 3
      project_data/sql/0.0.2/soc/soc.sql
  2. 53 6
      project_data/sql/0.0.3/soc/soc.sql
  3. 2 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/Constants.java
  4. 9 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetyDeductData.java
  5. 8 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetyExceptionData.java
  6. 4 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetySourceData.java
  7. 2 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java
  8. 1 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  9. 4 6
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/panel/service/impl/PanelServiceImpl.java
  10. 13 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/job/SafetyCheckJobBusiness.java
  11. 44 21
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafetyExceptionDataServiceImpl.java
  12. 2 0
      soc-modules/soc-modules-core/src/main/resources/mapper/question/QuestionMapper.xml
  13. 2 0
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionMapper.xml
  14. 4 0
      soc-modules/soc-modules-core/src/main/resources/mapper/retrieval/CoreMonitoringRetrievalTaskMapper.xml

+ 6 - 3
project_data/sql/0.0.2/soc/soc.sql

@@ -1533,7 +1533,8 @@ delete from sys_menu where menu_name in ('预案演练管理','演练','预案
 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 (2319, '预案演练管理', 0, 6, '/drill', null, null, 1, 0, 'M', '0', '0', null, '1', 'dashboard', 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 (2311, '演练', 0, 12, '/', null, null, 1, 0, 'M', '0', '0', null, '0', '#', null, '超级管理员', now(), '', null, '');
 
-delete from sys_menu where menu_name in ('演练库管理','演练库新增','演练库查询','演练库编辑','演练库详情','演练库删除');
+delete from sys_menu where id  =2320;
+delete from sys_menu where parent_id  =2320;
 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 (2320, '演练库管理', 2319, 1, '/dictionary', 'core/drill/drillDictionary/index', null, 1, 0, 'C', '0', '0', 'core:drillDictionary:list', '1', 'component', null, '超级管理员', now(), '超级管理员', 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 (2220, '演练库新增', 2320, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:drillDictionary:add', '1', '#', 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 (2221, '演练库查询', 2320, 2, '', null, null, 1, 0, 'F', '0', '0', 'core:drillDictionary:list', '1', '#', null, '超级管理员', now(), '', null, '');
@@ -1542,8 +1543,8 @@ INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, quer
 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 (2224, '演练库删除', 2320, 5, '', null, null, 1, 0, 'F', '0', '0', 'core:drillDictionary:remove', '1', '#', null, '超级管理员', now(), '', null, '');
 
 -- Web演练计划按钮及权限
-delete from sys_menu where menu_name in ('演练计划管理','演练计划新增','演练计划列表','演练计划下发','演练计划编辑','演练计划删除','演练计划详情');
-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 (2321, '演练计划管理', 2319, 2, '/drillPlan', 'core/drill/plan/index', null, 1, 0, 'C', '0', '0', 'core:drillPlan:list', '1', 'documentation', null, '超级管理员', now(), '超级管理员', now(), '');
+delete from sys_menu where id  =2321;
+delete from sys_menu where parent_id  =2321;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 (2321, '演练计划管理', 2319, 2, '/drillPlan', 'core/drill/plan/index', null, 1, 0, 'C', '0', '0', 'core:drillPlan:list', '1', 'documentation', null, '超级管理员', now(), '超级管理员', 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 (2225, '演练计划新增', 2321, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:drillPlan:add', '1', null, null, '超级管理员', now(), '超级管理员', 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 (2226, '演练计划列表', 2321, 2, '', null, null, 1, 0, 'F', '0', '0', 'core:drillPlan:list', '1', 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 (2227, '演练计划下发', 2321, 3, '', null, null, 1, 0, 'F', '0', '0', 'core:drillPlan:publish', '1', null, null, '超级管理员', now(), '超级管理员', now(), '');
@@ -1577,6 +1578,8 @@ INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `com
 
 
 -- Web演练任务按钮及权限
+delete from sys_menu where id  =2322;
+delete from sys_menu where parent_id  =2322;
 delete from sys_menu where menu_name in ('演练任务管理','演练任务登记','演练任务详情','演练任务签名','演练任务评价');
 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 (2322, '演练任务管理', 2319, 3, '/drillTask', 'core/drill/task/index', null, 1, 0, 'C', '0', '0', 'core:drillTask:list', '1', 'druid', null, '超级管理员', now(), '超级管理员', 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 (2215, '演练任务登记', 2322, 1, '', null, null, 1, 0, 'F', '0', '0', 'core:drillTask:edit', '1', '#', null, '超级管理员', now(), '', null, '');

+ 53 - 6
project_data/sql/0.0.3/soc/soc.sql

@@ -447,18 +447,54 @@ DROP PROCEDURE IF EXISTS schema_change ??
         alter table core_safe_month_score
             add org_name varchar(125) null comment '机构名称' after org_id;
     END IF;
-    -- 调阅计划加所属机构
+
+    -- 安全指数机构扣分细项表增加机构名称字段
     IF NOT EXISTS(SELECT *
                   FROM information_schema.columns
                   WHERE table_schema = DATABASE()
-                    AND table_name = 'core_monitoring_retrieval_plan'
-                    AND column_name = 'organization') THEN
-    alter table core_monitoring_retrieval_plan
-    add organization varchar(255) DEFAULT NULL COMMENT '所属机构';
+                    AND table_name = 'core_safety_source_data'
+                    AND column_name = 'org_name') THEN
+
+        alter table core_safety_source_data
+            add org_name varchar(225) null comment '机构名称' after org_id;
+
+        alter table core_safety_source_data
+            add org_path varchar(225) null comment '机构path' after org_name;
+
     END IF;
 
-    -- 安全指数机构分数表增加机构名称字段
+    -- 安全指数扣分表增加机构名称字段
+    IF NOT EXISTS(SELECT *
+                  FROM information_schema.columns
+                  WHERE table_schema = DATABASE()
+                    AND table_name = 'core_safety_deduct_data'
+                    AND column_name = 'org_name') THEN
+
+        alter table core_safety_deduct_data
+            add org_name varchar(225) null comment '机构名称' after org_id;
+
+        alter table core_safety_deduct_data
+            add org_path varchar(225) null comment '机构path' after org_name;
+
+    END IF;
+
+    -- 安全指数异常数据表增加机构名称字段
     IF NOT EXISTS(SELECT *
+                  FROM information_schema.columns
+                  WHERE table_schema = DATABASE()
+                    AND table_name = 'core_safety_exception_data'
+                    AND column_name = 'org_name') THEN
+
+        alter table core_safety_exception_data
+            add org_name varchar(225) null comment '机构名称' after org_id;
+
+        alter table core_safety_exception_data
+            add org_path varchar(225) null comment '机构path' after org_name;
+
+    END IF;
+
+    -- 安全指数机构分数表增加索引
+    IF EXISTS(SELECT *
                   FROM information_schema.STATISTICS
                   WHERE table_schema = DATABASE()
                     AND table_name = 'core_safe_month_score'
@@ -470,6 +506,17 @@ DROP PROCEDURE IF EXISTS schema_change ??
     END IF;
 
 
+    -- 调阅计划加所属机构
+    IF NOT EXISTS(SELECT *
+                  FROM information_schema.columns
+                  WHERE table_schema = DATABASE()
+                    AND table_name = 'core_monitoring_retrieval_plan'
+                    AND column_name = 'organization') THEN
+    alter table core_monitoring_retrieval_plan
+    add organization varchar(255) DEFAULT NULL COMMENT '所属机构';
+    END IF;
+
+
     END ??
 DELIMITER;
 CALL schema_change ();

+ 2 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/Constants.java

@@ -149,4 +149,6 @@ public class Constants {
 
 
     public static final String DAILY_FORMAT = "yyyy-MM-dd";
+
+    public static final String HMS_FORMAT = "yyyy-MM-dd HH:mm:ss";
 }

+ 9 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetyDeductData.java

@@ -35,6 +35,15 @@ public class CoreSafetyDeductData{
     @ApiModelProperty(value = "机构id")
     private Long orgId;
 
+    @TableField(value = "org_name")
+    @ApiModelProperty(value = "机构id")
+    private String orgName;
+
+    @TableField(value = "org_path")
+    @ApiModelProperty(value = "机构path")
+    private String orgPath;
+
+
     @TableField(value  = "data_year")
     @ApiModelProperty(value = "数据所在年")
     private Integer dataYear;

+ 8 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetyExceptionData.java

@@ -39,6 +39,14 @@ public class CoreSafetyExceptionData{
     @ApiModelProperty(value = "机构id")
     private Long orgId;
 
+    @TableField(value = "org_name")
+    @ApiModelProperty(value = "机构id")
+    private String orgName;
+
+    @TableField(value = "org_path")
+    @ApiModelProperty(value = "机构path")
+    private String orgPath;
+
     @TableField(value = "data_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "数据产生日期")

+ 4 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/domain/CoreSafetySourceData.java

@@ -45,6 +45,10 @@ public class CoreSafetySourceData extends BaseEntity {
     @ApiModelProperty(value = "机构id")
     private String orgName;
 
+    @TableField(value = "org_path")
+    @ApiModelProperty(value = "机构id")
+    private String orgPath;
+
     @TableField(value = "data_year")
     @ApiModelProperty(value = "数据所在年")
     private Integer dataYear;

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

@@ -912,8 +912,7 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             List<PanelListVo> waitEvaluateTaskList = coreDrillTaskMapper.selectWaitEvaluateTaskList(panelListDto);
             list.addAll(waitEvaluateTaskList);
         }
-        Date now = new Date();
-        list.removeIf(item -> now.before(item.getStartTime()) || now.after(item.getEndTime()));
+        list.removeIf(item -> DateUtil.date().before(item.getStartTime()) || DateUtil.date().after(item.getEndTime()));
         list.forEach(item -> {
             item.setType(PanelTypeEnums.DRILL.getCode());
         });
@@ -941,8 +940,7 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
                 }
             });
         }
-        Date now = new Date();
-        waitRecTaskList.removeIf(item -> now.before(item.getStartTime()) || now.after(item.getEndTime()));
+        waitRecTaskList.removeIf(item -> DateUtil.date().before(item.getStartTime()) || DateUtil.date().after(item.getEndTime()));
         waitRecTaskList.forEach(item -> {
             item.setType(PanelTypeEnums.DRILL_REC.getCode());
         });

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

@@ -832,8 +832,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         }
         //处理签名数据
         dealEduTrainingSign(list);
-        Date now = new Date();
-        list.removeIf(item->now.before(item.getStartTime()) || now.after(item.getEndTime()));
+        list.removeIf(item->DateUtil.date().before(item.getStartTime()) || DateUtil.date().after(item.getEndTime()));
         list.forEach(item -> {
             item.setType(PanelTypeEnums.EDU_TRAINING.getCode());
         });

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

@@ -1,16 +1,14 @@
 package com.xunmei.core.panel.service.impl;
 
-import cn.hutool.core.collection.ListUtil;
-import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.date.DateUtil;
+import com.xunmei.common.core.constant.Constants;
 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.domain.panel.adapter.PanelAdapter;
 import com.xunmei.common.core.domain.panel.dto.PanelListDto;
 import com.xunmei.common.core.domain.panel.enums.PanelTypeEnums;
 import com.xunmei.common.core.domain.panel.vo.PanelListVo;
 import com.xunmei.common.core.domain.panel.vo.PanelResultVo;
-import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.drill.service.ICoreDrillTaskService;
 import com.xunmei.core.edu.service.ICoreEduTrainingTaskService;
@@ -21,9 +19,7 @@ import com.xunmei.core.retrieval.service.ICoreMonitoringRetrievalTaskService;
 import com.xunmei.core.safetyCheck.service.ICoreSafetyTaskService;
 import com.xunmei.core.thread.ThreadPoolConfig;
 import com.xunmei.system.api.RemoteRoleService;
-import com.xunmei.system.api.RemoteUserService;
 import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
-import com.xunmei.system.api.model.LoginUser;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -67,6 +63,8 @@ public class PanelServiceImpl implements PanelService {
     @Override
     public List<PanelResultVo> selectPage() throws ExecutionException, InterruptedException, TimeoutException {
 
+        log.info("App工作台任务查询,当前时间:{}", DateUtil.format(DateUtil.date(), Constants.HMS_FORMAT));
+
         List<Long> roles = RemoteCallHandlerExecutor.executeRemoteCall(
                 () -> roleService.getUserRoleId(SecurityUtils.getUserId(), SecurityConstants.FROM_SOURCE),
                 ErrorMsgConstants.QUERY_USER_ROLE_ERROR);

+ 13 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/job/SafetyCheckJobBusiness.java

@@ -121,7 +121,7 @@ public class SafetyCheckJobBusiness extends TaskCreatingServiceImplBase<CoreSafe
         map.put("workendTime", DateUtil.format(workendTime, "yyyy-MM-dd"));
         map.put("orgId", orgId);
         return workTimeService.getWorkTime(map, SecurityConstants.INNER);
-}
+    }
 
     /**
      * 有周期计划生成任务
@@ -382,9 +382,17 @@ public class SafetyCheckJobBusiness extends TaskCreatingServiceImplBase<CoreSafe
             DateTime datetime = new DateTime();
             datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
             DateHelper dateHelper = new DateHelper(datetime);
-            Map<String, Date> map = DateHelper.getStartAndEnd(dateHelper, Math.toIntExact(plan.getPlanCycle()));
+            int cy = Math.toIntExact(plan.getPlanCycle());
+            Map<String, Date> map = new HashMap<>();
+            if (cy == 6) {
+                map.put("start", plan.getStartDate());
+                map.put("end", plan.getEndDate());
+            } else {
+                map = DateHelper.getStartAndEnd(dateHelper, cy);
+            }
+
             //获取当前受检机构当前周期营业中的作息
-            List<SysWorkTime> workTimes = getWorkTime(map.get("start"), map.get("end"),org.getId());
+            List<SysWorkTime> workTimes = getWorkTime(map.get("start"), map.get("end"), org.getId());
             //配合履职次数为short类型
             short coun = Short.parseShort(plan.getCount().toString());
             //划分时间
@@ -405,10 +413,10 @@ public class SafetyCheckJobBusiness extends TaskCreatingServiceImplBase<CoreSafe
                 vo.setCount((int) i);
                 vo.setPlanCycle(Math.toIntExact(plan.getPlanCycle()));
                 //任务名称去除为1
-                if (i == 1) {
+                if (coun == 1 && i == 1) {
                     vo.setPlanName(plan.getPlanName());
                 } else {
-                    vo.setPlanName(plan.getPlanName() + "第" + i  + "次");
+                    vo.setPlanName(plan.getPlanName() + "第" + i + "次");
                 }
                 list.add(vo);
             }

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

@@ -25,6 +25,7 @@ import com.xunmei.core.thread.ThreadPoolConfig;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.vo.SysOrgVO;
+import io.netty.util.internal.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@@ -89,6 +90,9 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
     @Autowired
     @Qualifier(ThreadPoolConfig.SOC_EXECUTOR)
     private ThreadPoolTaskExecutor threadPoolTaskExecutor;
+
+    public static final List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void countExceptionData(String date) {
@@ -100,17 +104,17 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         CompletableFuture.runAsync(() -> {
             //获取安保履职的数据
             doResumptionExceptionData(time);
-        },threadPoolTaskExecutor);
+        }, threadPoolTaskExecutor);
 
         CompletableFuture.runAsync(() -> {
             //获取问题整改的异常数据
             doQuestionExceptionData(null, time);
-        },threadPoolTaskExecutor);
+        }, threadPoolTaskExecutor);
 
         CompletableFuture.runAsync(() -> {
             //获取监控调阅的异常数据
             doMonitorExceptionData(time);
-        },threadPoolTaskExecutor);
+        }, threadPoolTaskExecutor);
     }
 
 
@@ -143,7 +147,7 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         //删除已有的计算数据
         deleteOldData(year, month, null);
 
-        List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
+        // List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
         //计算安保履职
         calculateResumptionData(resumptionIndexList, resumptionExceptionDataList, year, month, orgList);
 
@@ -184,17 +188,17 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         //删除已有的计算数据
         deleteOldData(year, month, orgIds);
 
-        List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
+        // List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
 
-        orgList = orgList.stream().filter(org -> orgIds.contains(org.getId())).collect(Collectors.toList());
+        List<SysOrgVO> orgListData = orgList.stream().filter(org -> orgIds.contains(org.getId())).collect(Collectors.toList());
         //计算安保履职
-        calculateResumptionData(resumptionIndexList, resumptionExceptionDataList, year, month, orgList);
+        calculateResumptionData(resumptionIndexList, resumptionExceptionDataList, year, month, orgListData);
 
         //计算问题整改
-        calculateQuestionData(questionIndexList, questionExceptionDataList, year, month, orgList);
+        calculateQuestionData(questionIndexList, questionExceptionDataList, year, month, orgListData);
 
         //计算监控调阅
-        calculateMonitoringData(monitoringIndexList, monitoringExceptionDataList, year, month, orgList);
+        calculateMonitoringData(monitoringIndexList, monitoringExceptionDataList, year, month, orgListData);
 
 
         reCalculateAll(year, month, orgIds);
@@ -256,7 +260,7 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         List<CoreSafetyDeductData> list = safetyDeductDataService.list(new LambdaQueryWrapper<CoreSafetyDeductData>()
                 .eq(CoreSafetyDeductData::getDataYear, year)
                 .eq(CoreSafetyDeductData::getDataMonth, month));
-        List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
+        //List<SysOrgVO> orgList = RedisUtils.getCacheList(CacheConstants.ORG_CACHE_LIST_KEY);
         List<SysOrgVO> orgLista = orgList.stream()
                 .filter(r -> ObjectUtil.isNotEmpty(r.getType()))
                 .filter(r -> ObjectUtil.equal(OrgTypeEnum.YINGYE_WANGDIAN.getCode(), r.getType()))
@@ -369,18 +373,17 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
                 //如果两个元素下标相减等于1,说明两个元素相邻,也就是连续逾期未登
                 if (nextDataIndex - curDataIndex == 1) {
                     continuousNum++;
-                    continue;
-                }
-                if (continuousNum >= indicatorDays) {
-                    //说明已经达到了连续数的要求
-                    double deductScore = continuousNum * monitoringContinuousNum.getItemValue();
-                    //计算连续数
-                    CoreSafetySourceData safeSourceData = doNewSafetySourceData(monitoringContinuousNum, orgId, deductScore, year, month, continuousNum);
-                    sourceDataList.add(safeSourceData);
-                    continuousNum = 1;
-                    usedConfigList.add(monitoringContinuousNum);
-                    break;
+                    if (continuousNum >= indicatorDays) {
+                        //说明已经达到了连续数的要求
+                        double deductScore = continuousNum * monitoringContinuousNum.getItemValue();
+                        //计算连续数
+                        CoreSafetySourceData safeSourceData = doNewSafetySourceData(monitoringContinuousNum, orgId, deductScore, year, month, continuousNum);
+                        sourceDataList.add(safeSourceData);
+                        continuousNum = 1;
+                        usedConfigList.add(monitoringContinuousNum);
+                    }
                 }
+
             }
         }
         return sourceDataList;
@@ -653,6 +656,8 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         safeSourceData.setRuleId(indexConfigCountVo.getRuleId());
         safeSourceData.setItemId(indexConfigCountVo.getItemId());
         safeSourceData.setOrgId(orgId);
+        safeSourceData.setOrgName(getOrgName(orgId));
+        safeSourceData.setOrgPath(getOrgPath(orgId));
         safeSourceData.setTimes(time);
         safeSourceData.setScore(deductScore);
         safeSourceData.setDataYear(year);
@@ -778,6 +783,8 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
         safeDeductData.setId(IdWorker.getId());
         safeDeductData.setRuleId(sourceData.getRuleId());
         safeDeductData.setOrgId(sourceData.getOrgId());
+        safeDeductData.setOrgName(getOrgName(sourceData.getOrgId()));
+        safeDeductData.setOrgPath(getOrgPath(sourceData.getOrgId()));
         safeDeductData.setScore(total);
         if (total > indexConfigCountVo.getScore()) {
             safeDeductData.setScoreReal((double) indexConfigCountVo.getScore());
@@ -822,4 +829,20 @@ public class CoreSafetyExceptionDataServiceImpl extends ServiceImpl<CoreSafetyEx
     }
 
 
+    private String getOrgName(Long orgId){
+        Optional<SysOrgVO> optional = orgList.stream().filter(org -> ObjectUtil.equal(org.getId(), orgId)).findFirst();
+        if (optional.isPresent()){
+            return optional.get().getShortName();
+        }
+        return StringUtil.EMPTY_STRING;
+    }
+
+    private String getOrgPath(Long orgId){
+        Optional<SysOrgVO> optional = orgList.stream().filter(org -> ObjectUtil.equal(org.getId(), orgId)).findFirst();
+        if (optional.isPresent()){
+            return optional.get().getPath();
+        }
+        return StringUtil.EMPTY_STRING;
+    }
+
 }

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

@@ -282,6 +282,8 @@
         a.src_task_id as extraField1,
         a.confirm_status as extraField2,
         a.submit_time as dataTime,
+        a.org_name as orgName,
+        a.org_path as orgPath,
         'core_question' as dataSource,
         now() as createTime
         FROM core_question a

+ 2 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionMapper.xml

@@ -273,6 +273,8 @@
         r.plan_id as extraField1,
         p.plan_cycle as extraField2,
         r.ymd_date as dataTime,
+        r.org_name as orgName,
+        r.org_path as orgPath,
         'core_resumption' as dataSource,
         now() as createTime
         FROM core_resumption r

+ 4 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/retrieval/CoreMonitoringRetrievalTaskMapper.xml

@@ -687,6 +687,8 @@
         date_format(t.plan_start_time,'%Y-%m-%d') as dataTime,
         'core_monitoring_retrieval_task' as dataSource,
         now() as createTime,
+        t.org_name as orgName,
+        t.org_path as orgPath,
         t.status as extraField1,
         t.plan_id as extraField2
 
@@ -701,6 +703,8 @@
             resultType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyExceptionData">
         SELECT t.id as dataId,
         t.org_id as orgId,
+        t.org_name as orgName,
+        t.org_path as orgPath,
         date_format(t.plan_start_time,'%Y-%m-%d') as dataTime,
         'core_monitoring_retrieval_task' as dataSource,
         now() as createTime,