diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java index 639f798..30b074d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java @@ -1113,14 +1113,21 @@ public class PerformanceAppraisalPlanManage { .eq(Project::getAreaCode, regionCode) .eq(Project::getNewest,Boolean.TRUE) .eq(Project::getStatus, ProjectStatusEnum.ACCEPTED.getCode())); + if (CollUtil.isEmpty(projectList)){ + return PageVo.empty(); + } List projectCodeList = projectList.stream().map(Project::getProjectCode).collect(Collectors.toList()); List projectVersionList = projectList.stream().map(Project::getVersion).collect(Collectors.toList()); wrapper.in(ProjectApplication::getProjectCode,projectCodeList); wrapper.in(ProjectApplication::getProjectVersion,projectVersionList); wrapper.orderByDesc(ProjectApplication::getUpdateOn); List appList = projectApplicationService.list(wrapper); + if (CollUtil.isEmpty(appList)){ + return PageVo.empty(); + } List applicationList = Lists.newArrayList(); + // 按项目编号+应用名称+IRS关联应用名称分组,获取最新版本的应用 Map> appMap = appList.stream().collect(Collectors.groupingBy(p -> p.getProjectCode() + p.getRelatedExistsApplication() + p.getApplicationName())); for (Map.Entry> entry : appMap.entrySet()) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java index 759524d..cfc008b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java @@ -327,7 +327,8 @@ public class CockpitStatsStatisticsTask { //3.顶部数据 //3.1 计划项目数(通过单位内部审核的项目) Integer planProjectNum = projects.stream().filter(p -> { - if(Objects.nonNull(p.getStatus()) && p.getStatus().compareTo(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()) >= 0){ + if(Objects.nonNull(p.getStatus()) && + p.getStatus().compareTo(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()) >= 0){ return Boolean.TRUE; } return Boolean.FALSE;