From 037b1d818b6c978a4ba854eabffd61143c2c2bf9 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 24 Oct 2023 14:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E8=88=B1=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/scheduler/task/CockpitStatsStatisticsTask.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;