diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
index 0f97f67a8f..1f85d8cf5a 100644
--- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
+++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
@@ -187,7 +187,7 @@
#{lastStatus}
-
+
and b.handle_user = #{request.todoParam.platformUser}
)
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportController.java
index a6992a6950..128c6c1512 100644
--- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportController.java
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportController.java
@@ -8,10 +8,7 @@ import io.metersphere.plan.constants.TestPlanResourceConfig;
import io.metersphere.plan.domain.TestPlanReportComponent;
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
import io.metersphere.plan.dto.request.*;
-import io.metersphere.plan.dto.response.TestPlanCaseExecHistoryResponse;
-import io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse;
-import io.metersphere.plan.dto.response.TestPlanReportDetailResponse;
-import io.metersphere.plan.dto.response.TestPlanReportPageResponse;
+import io.metersphere.plan.dto.response.*;
import io.metersphere.plan.service.*;
import io.metersphere.sdk.constants.PermissionConstants;
import io.metersphere.system.log.annotation.Log;
@@ -129,6 +126,14 @@ public class TestPlanReportController {
return testPlanReportService.getReport(reportId);
}
+ @GetMapping("/get-task/{taskId}")
+ @Operation(summary = "测试计划|组-任务-执行结果")
+ @RequiresPermissions(value = {PermissionConstants.TEST_PLAN_REPORT_READ, PermissionConstants.TEST_PLAN_READ_EXECUTE}, logical = Logical.OR)
+ @CheckOwner(resourceId = "#taskId", resourceType = "exec_task")
+ public TestPlanTaskReportResponse getTaskDetail(@PathVariable String taskId) {
+ return testPlanReportService.getTaskDetail(taskId);
+ }
+
@GetMapping("/get-layout/{reportId}")
@Operation(summary = "测试计划-报告-组件布局")
@RequiresPermissions(value = {PermissionConstants.TEST_PLAN_REPORT_READ, PermissionConstants.TEST_PLAN_READ_EXECUTE}, logical = Logical.OR)
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/CaseCount.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/CaseCount.java
index d2f19a449d..4a28bed646 100644
--- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/CaseCount.java
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/CaseCount.java
@@ -30,4 +30,8 @@ public class CaseCount {
@Schema(description = "未执行用例数量")
@Builder.Default
private Integer pending = 0;
+
+ public Integer sum() {
+ return success + error + fakeError + block + pending;
+ }
}
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java
index 5ed4101c27..cdb754e9d6 100644
--- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java
@@ -9,6 +9,9 @@ import lombok.Data;
import java.util.List;
+/**
+ * @author song-cc-rock
+ */
@Data
public class TestPlanReportDetailResponse {
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanTaskReportResponse.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanTaskReportResponse.java
new file mode 100644
index 0000000000..03b57cfbe1
--- /dev/null
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanTaskReportResponse.java
@@ -0,0 +1,33 @@
+package io.metersphere.plan.dto.response;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import io.metersphere.plan.dto.CaseCount;
+import io.metersphere.system.serializer.CustomRateSerializer;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author song-cc-rock
+ */
+@Data
+public class TestPlanTaskReportResponse {
+
+ @Schema(description = "执行结果")
+ private String result;
+ @Schema(description = "执行状态")
+ private String status;
+ @Schema(description = "操作人")
+ private String createUser;
+ @Schema(description = "任务发起时间")
+ private Long createTime;
+ @Schema(description = "任务开始起时间")
+ private Long startTime;
+ @Schema(description = "任务结束时间")
+ private Long endTime;
+ @Schema(description = "执行用例统计(实时)")
+ private CaseCount executeCaseCount;
+ @Schema(description = "执行完成率(实时)")
+ @JsonSerialize(using = CustomRateSerializer.class)
+ private Double executeRate;
+
+}
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml
index f498038de2..9a148d15ae 100644
--- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml
@@ -642,10 +642,11 @@
+
+
+
+
+
+
+ and et.trigger_mode in
+
+
+
+
+ and et.result in
+
+
+
+
+
+
+
+