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 80a5a61..759524d 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 @@ -588,8 +588,11 @@ public class CockpitStatsStatisticsTask { private Integer computeLagging(List projects) { List projectCodes = projects.stream().map(Project::getProjectCode).collect(Collectors.toList()); Map map = projects.stream().collect(Collectors.toMap(p -> p.getProjectCode(), p -> p)); - List records = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) - .in(WflowEarlyWarningRecords::getProjectCode, projectCodes)); + List records = Lists.newArrayList(); + if(CollUtil.isNotEmpty(projectCodes)){ + records = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) + .in(WflowEarlyWarningRecords::getProjectCode, projectCodes)); + } return records.stream().mapToInt(r -> { if(!map.containsKey(r.getProjectCode())){ return 0;