From 5a88c4efd72486e7409f04b00a4836a3919ffb24 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 23 Oct 2024 17:28:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E7=94=9F=E6=88=90=E9=9B=86?= =?UTF-8?q?=E5=90=88=E6=8A=A5=E5=91=8A=E4=BB=BB=E5=8A=A1=E6=8A=A5=E5=91=8A?= =?UTF-8?q?ID=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047912 --user=宋昌昌 【项目任务中心】用例执行任务列表-场景批量执行生成集合报告任务-查看报告-抽屉展示报告列表 https://www.tapd.cn/55049933/s/1596721 --- .../io/metersphere/system/service/BaseTaskHubService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java index 1179711700..640ed7990f 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java @@ -193,8 +193,9 @@ public class BaseTaskHubService { * @param tasks 任务集合 */ private void setTaskReportId(List tasks) { - List reportTasks = tasks.stream().filter(task -> !StringUtils.equals(task.getTaskType(), ExecTaskType.API_SCENARIO_BATCH.name()) && !StringUtils.equals(task.getTaskType(), ExecTaskType.API_CASE_BATCH.name()) - && !StringUtils.equals(task.getTaskType(), ExecTaskType.TEST_PLAN_API_CASE_BATCH.name()) && !StringUtils.equals(task.getTaskType(), ExecTaskType.TEST_PLAN_API_SCENARIO_BATCH.name())).toList(); + // 集成报告, 独立报告(非批量任务&&非测试计划批量任务) + List reportTasks = tasks.stream().filter(task -> task.getIntegrated() || (!StringUtils.equals(task.getTaskType(), ExecTaskType.API_SCENARIO_BATCH.name()) && !StringUtils.equals(task.getTaskType(), ExecTaskType.API_CASE_BATCH.name()) + && !StringUtils.equals(task.getTaskType(), ExecTaskType.TEST_PLAN_API_CASE_BATCH.name()) && !StringUtils.equals(task.getTaskType(), ExecTaskType.TEST_PLAN_API_SCENARIO_BATCH.name()))).toList(); List integratedTaskIds = reportTasks.stream().filter(task -> StringUtils.equalsAny(task.getTaskType(), ExecTaskType.TEST_PLAN.name(), ExecTaskType.TEST_PLAN_GROUP.name()) || task.getIntegrated()).map(ExecTask::getId).toList(); List noIntegratedTasks = reportTasks.stream().map(ExecTask::getId).filter(id -> !integratedTaskIds.contains(id)).toList();