diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java index 3bf4536104..182a474b5e 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java @@ -5,6 +5,8 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; /** * @author: LAN @@ -66,5 +68,9 @@ public class TaskCenterDTO implements Serializable { @Schema(description = "执行历史是否被清理") private boolean historyDeleted = false; + @Schema(description = "计划组ID") + private String parentId; + @Schema(description = "计划组子任务") + private List children = new ArrayList<>(); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.java index 0da2d3a182..ae77a7164d 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.java @@ -47,6 +47,8 @@ public interface ExtTestPlanReportMapper { List taskCenterlist(@Param("request") TaskCenterPageRequest request, @Param("projectIds") List projectIds, @Param("startTime") long startTime, @Param("endTime") long endTime); + List getChildTaskCenter(@Param("ids") List groupReportIds); + List getPlanReportListById(@Param("request") TestPlanReportDetailPageRequest request); List getReports(@Param("request") TaskCenterBatchRequest request, @Param("projectIds") List projectIds, diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.xml index dc0b7dc379..ded8ce65b1 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportMapper.xml @@ -70,8 +70,8 @@ tpr.create_user AS operationName, tpr.trigger_mode, tpr.start_time, + '' as parentId, project.organization_id, - tp.num AS resourceNum, tp.name AS resourceName, tp.id AS resourceId @@ -81,6 +81,8 @@ left join project on tpr.project_id = project.id where tpr.start_time BETWEEN #{startTime} AND #{endTime} + + and tpr.id = tpr.parent_id and tpr.project_id IN @@ -96,6 +98,37 @@ + + +