From 3883d6ba181b008a7d43083586df9329d11e12e2 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 9 Dec 2024 14:10:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=94=A8=E4=BE=8B=E6=9C=AA?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E4=B8=8D=E6=98=AF=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/dashboard/service/DashboardService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java index 6852518e04..6da57726b3 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java @@ -791,19 +791,19 @@ public class DashboardService { List testPlanFunctionalCases = caseUserMap.get(userId); if (CollectionUtils.isNotEmpty(testPlanFunctionalCases)) { count += testPlanFunctionalCases.size(); - List list = testPlanFunctionalCases.stream().filter(t -> StringUtils.isNotBlank(t.getLastExecResult())).toList(); + List list = testPlanFunctionalCases.stream().filter(t -> !StringUtils.equalsIgnoreCase(t.getLastExecResult(), ExecStatus.PENDING.name())).toList(); finishCount += list.size(); } List testPlanApiCases = apiCaseUserMap.get(userId); if (CollectionUtils.isNotEmpty(testPlanApiCases)) { count += testPlanApiCases.size(); - List list = testPlanApiCases.stream().filter(t -> StringUtils.isNotBlank(t.getLastExecResult())).toList(); + List list = testPlanApiCases.stream().filter(t -> !StringUtils.equalsIgnoreCase(t.getLastExecResult(), ExecStatus.PENDING.name())).toList(); finishCount += list.size(); } List testPlanApiScenarios = apiScenarioUserMap.get(userId); if (CollectionUtils.isNotEmpty(testPlanApiScenarios)) { count += testPlanApiScenarios.size(); - List list = testPlanApiScenarios.stream().filter(t -> StringUtils.isNotBlank(t.getLastExecResult())).toList(); + List list = testPlanApiScenarios.stream().filter(t -> !StringUtils.equalsIgnoreCase(t.getLastExecResult(), ExecStatus.PENDING.name())).toList(); finishCount += list.size(); } List testPlanBugPageResponses = bugUserMap.get(userId);