From c99485b9a71e22fbc5a0cd78ef091f60301e4027 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 26 Nov 2024 11:15:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E8=AE=A1=E5=88=92=E7=AD=9B=E9=80=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/plan/service/TestPlanManagementService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java index 4adc0d2d7e..a04bcd5a43 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java @@ -364,6 +364,9 @@ public class TestPlanManagementService { childPlans = testPlanMapper.selectByExample(example); } calculateIds.addAll(childPlans.stream().map(TestPlan::getId).toList()); + if (CollectionUtils.isEmpty(calculateIds)) { + return null; + } List calcPlans = testPlanStatisticsService.calculateRate(calculateIds); calcPlans.forEach(plan -> { // 筛选出已完成的计划 && 子计划且通过率达到阈值