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 -> { // 筛选出已完成的计划 && 子计划且通过率达到阈值