feat(测试计划): 聚合报告生成功能

This commit is contained in:
song-cc-rock 2024-06-13 16:47:07 +08:00 committed by 刘瑞斌
parent 7dc0598cc7
commit 275b63a1be
22 changed files with 1075 additions and 237 deletions

View File

@ -24,6 +24,14 @@ public class TestPlanReportApiCase implements Serializable {
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_report_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanReportId; private String testPlanReportId;
@Schema(description = "测试集ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_api_case.test_plan_collection_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_collection_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanCollectionId;
@Schema(description = "环境ID")
private String environmentId;
@Schema(description = "测试计划接口用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "测试计划接口用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_api_case.test_plan_api_case_id.not_blank}", groups = {Created.class}) @NotBlank(message = "{test_plan_report_api_case.test_plan_api_case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_api_case_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_api_case_id.length_range}", groups = {Created.class, Updated.class})
@ -52,16 +60,19 @@ public class TestPlanReportApiCase implements Serializable {
@Schema(description = "接口用例执行人") @Schema(description = "接口用例执行人")
private String apiCaseExecuteUser; private String apiCaseExecuteUser;
@Schema(description = "接口用例执行结果", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "接口用例执行结果")
@NotBlank(message = "{test_plan_report_api_case.api_case_execute_result.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.api_case_execute_result.length_range}", groups = {Created.class, Updated.class})
private String apiCaseExecuteResult; private String apiCaseExecuteResult;
@Schema(description = "接口用例执行报告ID")
private String apiCaseExecuteReportId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public enum Column { public enum Column {
id("id", "id", "VARCHAR", false), id("id", "id", "VARCHAR", false),
testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false), testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false),
testPlanCollectionId("test_plan_collection_id", "testPlanCollectionId", "VARCHAR", false),
environmentId("environment_id", "environmentId", "VARCHAR", false),
testPlanApiCaseId("test_plan_api_case_id", "testPlanApiCaseId", "VARCHAR", false), testPlanApiCaseId("test_plan_api_case_id", "testPlanApiCaseId", "VARCHAR", false),
apiCaseId("api_case_id", "apiCaseId", "VARCHAR", false), apiCaseId("api_case_id", "apiCaseId", "VARCHAR", false),
apiCaseNum("api_case_num", "apiCaseNum", "BIGINT", false), apiCaseNum("api_case_num", "apiCaseNum", "BIGINT", false),
@ -69,7 +80,8 @@ public class TestPlanReportApiCase implements Serializable {
apiCaseModule("api_case_module", "apiCaseModule", "VARCHAR", false), apiCaseModule("api_case_module", "apiCaseModule", "VARCHAR", false),
apiCasePriority("api_case_priority", "apiCasePriority", "VARCHAR", false), apiCasePriority("api_case_priority", "apiCasePriority", "VARCHAR", false),
apiCaseExecuteUser("api_case_execute_user", "apiCaseExecuteUser", "VARCHAR", false), apiCaseExecuteUser("api_case_execute_user", "apiCaseExecuteUser", "VARCHAR", false),
apiCaseExecuteResult("api_case_execute_result", "apiCaseExecuteResult", "VARCHAR", false); apiCaseExecuteResult("api_case_execute_result", "apiCaseExecuteResult", "VARCHAR", false),
apiCaseExecuteReportId("api_case_execute_report_id", "apiCaseExecuteReportId", "VARCHAR", false);
private static final String BEGINNING_DELIMITER = "`"; private static final String BEGINNING_DELIMITER = "`";

View File

@ -244,6 +244,146 @@ public class TestPlanReportApiCaseExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestPlanCollectionIdIsNull() {
addCriterion("test_plan_collection_id is null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIsNotNull() {
addCriterion("test_plan_collection_id is not null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdEqualTo(String value) {
addCriterion("test_plan_collection_id =", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotEqualTo(String value) {
addCriterion("test_plan_collection_id <>", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThan(String value) {
addCriterion("test_plan_collection_id >", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id >=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThan(String value) {
addCriterion("test_plan_collection_id <", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id <=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLike(String value) {
addCriterion("test_plan_collection_id like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotLike(String value) {
addCriterion("test_plan_collection_id not like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIn(List<String> values) {
addCriterion("test_plan_collection_id in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotIn(List<String> values) {
addCriterion("test_plan_collection_id not in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdBetween(String value1, String value2) {
addCriterion("test_plan_collection_id between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotBetween(String value1, String value2) {
addCriterion("test_plan_collection_id not between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andEnvironmentIdIsNull() {
addCriterion("environment_id is null");
return (Criteria) this;
}
public Criteria andEnvironmentIdIsNotNull() {
addCriterion("environment_id is not null");
return (Criteria) this;
}
public Criteria andEnvironmentIdEqualTo(String value) {
addCriterion("environment_id =", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotEqualTo(String value) {
addCriterion("environment_id <>", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdGreaterThan(String value) {
addCriterion("environment_id >", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
addCriterion("environment_id >=", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLessThan(String value) {
addCriterion("environment_id <", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
addCriterion("environment_id <=", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLike(String value) {
addCriterion("environment_id like", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotLike(String value) {
addCriterion("environment_id not like", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdIn(List<String> values) {
addCriterion("environment_id in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotIn(List<String> values) {
addCriterion("environment_id not in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdBetween(String value1, String value2) {
addCriterion("environment_id between", value1, value2, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
addCriterion("environment_id not between", value1, value2, "environmentId");
return (Criteria) this;
}
public Criteria andTestPlanApiCaseIdIsNull() { public Criteria andTestPlanApiCaseIdIsNull() {
addCriterion("test_plan_api_case_id is null"); addCriterion("test_plan_api_case_id is null");
return (Criteria) this; return (Criteria) this;
@ -793,6 +933,76 @@ public class TestPlanReportApiCaseExample {
addCriterion("api_case_execute_result not between", value1, value2, "apiCaseExecuteResult"); addCriterion("api_case_execute_result not between", value1, value2, "apiCaseExecuteResult");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andApiCaseExecuteReportIdIsNull() {
addCriterion("api_case_execute_report_id is null");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdIsNotNull() {
addCriterion("api_case_execute_report_id is not null");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdEqualTo(String value) {
addCriterion("api_case_execute_report_id =", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdNotEqualTo(String value) {
addCriterion("api_case_execute_report_id <>", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdGreaterThan(String value) {
addCriterion("api_case_execute_report_id >", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdGreaterThanOrEqualTo(String value) {
addCriterion("api_case_execute_report_id >=", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdLessThan(String value) {
addCriterion("api_case_execute_report_id <", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdLessThanOrEqualTo(String value) {
addCriterion("api_case_execute_report_id <=", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdLike(String value) {
addCriterion("api_case_execute_report_id like", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdNotLike(String value) {
addCriterion("api_case_execute_report_id not like", value, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdIn(List<String> values) {
addCriterion("api_case_execute_report_id in", values, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdNotIn(List<String> values) {
addCriterion("api_case_execute_report_id not in", values, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdBetween(String value1, String value2) {
addCriterion("api_case_execute_report_id between", value1, value2, "apiCaseExecuteReportId");
return (Criteria) this;
}
public Criteria andApiCaseExecuteReportIdNotBetween(String value1, String value2) {
addCriterion("api_case_execute_report_id not between", value1, value2, "apiCaseExecuteReportId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

View File

@ -24,6 +24,17 @@ public class TestPlanReportApiScenario implements Serializable {
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_report_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanReportId; private String testPlanReportId;
@Schema(description = "测试集ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_api_scenario.test_plan_collection_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_collection_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanCollectionId;
@Schema(description = "是否环境组")
private Boolean grouped;
@Schema(description = "环境ID")
private String environmentId;
@Schema(description = "测试计划场景用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "测试计划场景用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.not_blank}", groups = {Created.class}) @NotBlank(message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.length_range}", groups = {Created.class, Updated.class})
@ -52,16 +63,20 @@ public class TestPlanReportApiScenario implements Serializable {
@Schema(description = "场景用例执行人") @Schema(description = "场景用例执行人")
private String apiScenarioExecuteUser; private String apiScenarioExecuteUser;
@Schema(description = "场景用例执行结果", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "场景用例执行结果")
@NotBlank(message = "{test_plan_report_api_scenario.api_scenario_execute_result.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.api_scenario_execute_result.length_range}", groups = {Created.class, Updated.class})
private String apiScenarioExecuteResult; private String apiScenarioExecuteResult;
@Schema(description = "场景用例执行报告ID")
private String apiScenarioExecuteReportId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public enum Column { public enum Column {
id("id", "id", "VARCHAR", false), id("id", "id", "VARCHAR", false),
testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false), testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false),
testPlanCollectionId("test_plan_collection_id", "testPlanCollectionId", "VARCHAR", false),
grouped("grouped", "grouped", "BIT", false),
environmentId("environment_id", "environmentId", "VARCHAR", false),
testPlanApiScenarioId("test_plan_api_scenario_id", "testPlanApiScenarioId", "VARCHAR", false), testPlanApiScenarioId("test_plan_api_scenario_id", "testPlanApiScenarioId", "VARCHAR", false),
apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false), apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false),
apiScenarioNum("api_scenario_num", "apiScenarioNum", "BIGINT", false), apiScenarioNum("api_scenario_num", "apiScenarioNum", "BIGINT", false),
@ -69,7 +84,8 @@ public class TestPlanReportApiScenario implements Serializable {
apiScenarioModule("api_scenario_module", "apiScenarioModule", "VARCHAR", false), apiScenarioModule("api_scenario_module", "apiScenarioModule", "VARCHAR", false),
apiScenarioPriority("api_scenario_priority", "apiScenarioPriority", "VARCHAR", false), apiScenarioPriority("api_scenario_priority", "apiScenarioPriority", "VARCHAR", false),
apiScenarioExecuteUser("api_scenario_execute_user", "apiScenarioExecuteUser", "VARCHAR", false), apiScenarioExecuteUser("api_scenario_execute_user", "apiScenarioExecuteUser", "VARCHAR", false),
apiScenarioExecuteResult("api_scenario_execute_result", "apiScenarioExecuteResult", "VARCHAR", false); apiScenarioExecuteResult("api_scenario_execute_result", "apiScenarioExecuteResult", "VARCHAR", false),
apiScenarioExecuteReportId("api_scenario_execute_report_id", "apiScenarioExecuteReportId", "VARCHAR", false);
private static final String BEGINNING_DELIMITER = "`"; private static final String BEGINNING_DELIMITER = "`";

View File

@ -244,6 +244,206 @@ public class TestPlanReportApiScenarioExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestPlanCollectionIdIsNull() {
addCriterion("test_plan_collection_id is null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIsNotNull() {
addCriterion("test_plan_collection_id is not null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdEqualTo(String value) {
addCriterion("test_plan_collection_id =", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotEqualTo(String value) {
addCriterion("test_plan_collection_id <>", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThan(String value) {
addCriterion("test_plan_collection_id >", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id >=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThan(String value) {
addCriterion("test_plan_collection_id <", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id <=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLike(String value) {
addCriterion("test_plan_collection_id like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotLike(String value) {
addCriterion("test_plan_collection_id not like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIn(List<String> values) {
addCriterion("test_plan_collection_id in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotIn(List<String> values) {
addCriterion("test_plan_collection_id not in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdBetween(String value1, String value2) {
addCriterion("test_plan_collection_id between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotBetween(String value1, String value2) {
addCriterion("test_plan_collection_id not between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andGroupedIsNull() {
addCriterion("grouped is null");
return (Criteria) this;
}
public Criteria andGroupedIsNotNull() {
addCriterion("grouped is not null");
return (Criteria) this;
}
public Criteria andGroupedEqualTo(Boolean value) {
addCriterion("grouped =", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedNotEqualTo(Boolean value) {
addCriterion("grouped <>", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedGreaterThan(Boolean value) {
addCriterion("grouped >", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedGreaterThanOrEqualTo(Boolean value) {
addCriterion("grouped >=", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedLessThan(Boolean value) {
addCriterion("grouped <", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedLessThanOrEqualTo(Boolean value) {
addCriterion("grouped <=", value, "grouped");
return (Criteria) this;
}
public Criteria andGroupedIn(List<Boolean> values) {
addCriterion("grouped in", values, "grouped");
return (Criteria) this;
}
public Criteria andGroupedNotIn(List<Boolean> values) {
addCriterion("grouped not in", values, "grouped");
return (Criteria) this;
}
public Criteria andGroupedBetween(Boolean value1, Boolean value2) {
addCriterion("grouped between", value1, value2, "grouped");
return (Criteria) this;
}
public Criteria andGroupedNotBetween(Boolean value1, Boolean value2) {
addCriterion("grouped not between", value1, value2, "grouped");
return (Criteria) this;
}
public Criteria andEnvironmentIdIsNull() {
addCriterion("environment_id is null");
return (Criteria) this;
}
public Criteria andEnvironmentIdIsNotNull() {
addCriterion("environment_id is not null");
return (Criteria) this;
}
public Criteria andEnvironmentIdEqualTo(String value) {
addCriterion("environment_id =", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotEqualTo(String value) {
addCriterion("environment_id <>", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdGreaterThan(String value) {
addCriterion("environment_id >", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
addCriterion("environment_id >=", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLessThan(String value) {
addCriterion("environment_id <", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
addCriterion("environment_id <=", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdLike(String value) {
addCriterion("environment_id like", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotLike(String value) {
addCriterion("environment_id not like", value, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdIn(List<String> values) {
addCriterion("environment_id in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotIn(List<String> values) {
addCriterion("environment_id not in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdBetween(String value1, String value2) {
addCriterion("environment_id between", value1, value2, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
addCriterion("environment_id not between", value1, value2, "environmentId");
return (Criteria) this;
}
public Criteria andTestPlanApiScenarioIdIsNull() { public Criteria andTestPlanApiScenarioIdIsNull() {
addCriterion("test_plan_api_scenario_id is null"); addCriterion("test_plan_api_scenario_id is null");
return (Criteria) this; return (Criteria) this;
@ -793,6 +993,76 @@ public class TestPlanReportApiScenarioExample {
addCriterion("api_scenario_execute_result not between", value1, value2, "apiScenarioExecuteResult"); addCriterion("api_scenario_execute_result not between", value1, value2, "apiScenarioExecuteResult");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andApiScenarioExecuteReportIdIsNull() {
addCriterion("api_scenario_execute_report_id is null");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdIsNotNull() {
addCriterion("api_scenario_execute_report_id is not null");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdEqualTo(String value) {
addCriterion("api_scenario_execute_report_id =", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdNotEqualTo(String value) {
addCriterion("api_scenario_execute_report_id <>", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdGreaterThan(String value) {
addCriterion("api_scenario_execute_report_id >", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdGreaterThanOrEqualTo(String value) {
addCriterion("api_scenario_execute_report_id >=", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdLessThan(String value) {
addCriterion("api_scenario_execute_report_id <", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdLessThanOrEqualTo(String value) {
addCriterion("api_scenario_execute_report_id <=", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdLike(String value) {
addCriterion("api_scenario_execute_report_id like", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdNotLike(String value) {
addCriterion("api_scenario_execute_report_id not like", value, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdIn(List<String> values) {
addCriterion("api_scenario_execute_report_id in", values, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdNotIn(List<String> values) {
addCriterion("api_scenario_execute_report_id not in", values, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdBetween(String value1, String value2) {
addCriterion("api_scenario_execute_report_id between", value1, value2, "apiScenarioExecuteReportId");
return (Criteria) this;
}
public Criteria andApiScenarioExecuteReportIdNotBetween(String value1, String value2) {
addCriterion("api_scenario_execute_report_id not between", value1, value2, "apiScenarioExecuteReportId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

View File

@ -24,7 +24,7 @@ public class TestPlanReportFunctionCase implements Serializable {
@Size(min = 1, max = 50, message = "{test_plan_report_function_case.test_plan_report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_function_case.test_plan_report_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanReportId; private String testPlanReportId;
@Schema(description = "测试计划功能用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "测试计划功能用例关联ID(同一计划下可重复关联, 暂时保留)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_function_case.test_plan_function_case_id.not_blank}", groups = {Created.class}) @NotBlank(message = "{test_plan_report_function_case.test_plan_function_case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_function_case.test_plan_function_case_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_function_case.test_plan_function_case_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanFunctionCaseId; private String testPlanFunctionCaseId;
@ -60,6 +60,11 @@ public class TestPlanReportFunctionCase implements Serializable {
@Size(min = 1, max = 50, message = "{test_plan_report_function_case.function_case_execute_result.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{test_plan_report_function_case.function_case_execute_result.length_range}", groups = {Created.class, Updated.class})
private String functionCaseExecuteResult; private String functionCaseExecuteResult;
@Schema(description = "测试集ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_report_function_case.test_plan_collection_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{test_plan_report_function_case.test_plan_collection_id.length_range}", groups = {Created.class, Updated.class})
private String testPlanCollectionId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public enum Column { public enum Column {
@ -73,7 +78,8 @@ public class TestPlanReportFunctionCase implements Serializable {
functionCasePriority("function_case_priority", "functionCasePriority", "VARCHAR", false), functionCasePriority("function_case_priority", "functionCasePriority", "VARCHAR", false),
functionCaseExecuteUser("function_case_execute_user", "functionCaseExecuteUser", "VARCHAR", false), functionCaseExecuteUser("function_case_execute_user", "functionCaseExecuteUser", "VARCHAR", false),
functionCaseBugCount("function_case_bug_count", "functionCaseBugCount", "BIGINT", false), functionCaseBugCount("function_case_bug_count", "functionCaseBugCount", "BIGINT", false),
functionCaseExecuteResult("function_case_execute_result", "functionCaseExecuteResult", "VARCHAR", false); functionCaseExecuteResult("function_case_execute_result", "functionCaseExecuteResult", "VARCHAR", false),
testPlanCollectionId("test_plan_collection_id", "testPlanCollectionId", "VARCHAR", false);
private static final String BEGINNING_DELIMITER = "`"; private static final String BEGINNING_DELIMITER = "`";

View File

@ -853,6 +853,76 @@ public class TestPlanReportFunctionCaseExample {
addCriterion("function_case_execute_result not between", value1, value2, "functionCaseExecuteResult"); addCriterion("function_case_execute_result not between", value1, value2, "functionCaseExecuteResult");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestPlanCollectionIdIsNull() {
addCriterion("test_plan_collection_id is null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIsNotNull() {
addCriterion("test_plan_collection_id is not null");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdEqualTo(String value) {
addCriterion("test_plan_collection_id =", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotEqualTo(String value) {
addCriterion("test_plan_collection_id <>", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThan(String value) {
addCriterion("test_plan_collection_id >", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdGreaterThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id >=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThan(String value) {
addCriterion("test_plan_collection_id <", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLessThanOrEqualTo(String value) {
addCriterion("test_plan_collection_id <=", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdLike(String value) {
addCriterion("test_plan_collection_id like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotLike(String value) {
addCriterion("test_plan_collection_id not like", value, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdIn(List<String> values) {
addCriterion("test_plan_collection_id in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotIn(List<String> values) {
addCriterion("test_plan_collection_id not in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdBetween(String value1, String value2) {
addCriterion("test_plan_collection_id between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotBetween(String value1, String value2) {
addCriterion("test_plan_collection_id not between", value1, value2, "testPlanCollectionId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

View File

@ -4,6 +4,8 @@
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiCase"> <resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiCase">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" /> <result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
<result column="test_plan_collection_id" jdbcType="VARCHAR" property="testPlanCollectionId" />
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
<result column="test_plan_api_case_id" jdbcType="VARCHAR" property="testPlanApiCaseId" /> <result column="test_plan_api_case_id" jdbcType="VARCHAR" property="testPlanApiCaseId" />
<result column="api_case_id" jdbcType="VARCHAR" property="apiCaseId" /> <result column="api_case_id" jdbcType="VARCHAR" property="apiCaseId" />
<result column="api_case_num" jdbcType="BIGINT" property="apiCaseNum" /> <result column="api_case_num" jdbcType="BIGINT" property="apiCaseNum" />
@ -12,6 +14,7 @@
<result column="api_case_priority" jdbcType="VARCHAR" property="apiCasePriority" /> <result column="api_case_priority" jdbcType="VARCHAR" property="apiCasePriority" />
<result column="api_case_execute_user" jdbcType="VARCHAR" property="apiCaseExecuteUser" /> <result column="api_case_execute_user" jdbcType="VARCHAR" property="apiCaseExecuteUser" />
<result column="api_case_execute_result" jdbcType="VARCHAR" property="apiCaseExecuteResult" /> <result column="api_case_execute_result" jdbcType="VARCHAR" property="apiCaseExecuteResult" />
<result column="api_case_execute_report_id" jdbcType="VARCHAR" property="apiCaseExecuteReportId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -72,8 +75,9 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, test_plan_report_id, test_plan_api_case_id, api_case_id, api_case_num, api_case_name, id, test_plan_report_id, test_plan_collection_id, environment_id, test_plan_api_case_id,
api_case_module, api_case_priority, api_case_execute_user, api_case_execute_result api_case_id, api_case_num, api_case_name, api_case_module, api_case_priority, api_case_execute_user,
api_case_execute_result, api_case_execute_report_id
</sql> </sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultMap="BaseResultMap">
select select
@ -106,14 +110,16 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase"> <insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
insert into test_plan_report_api_case (id, test_plan_report_id, test_plan_api_case_id, insert into test_plan_report_api_case (id, test_plan_report_id, test_plan_collection_id,
api_case_id, api_case_num, api_case_name, environment_id, test_plan_api_case_id, api_case_id,
api_case_module, api_case_priority, api_case_execute_user, api_case_num, api_case_name, api_case_module,
api_case_execute_result) api_case_priority, api_case_execute_user, api_case_execute_result,
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanApiCaseId,jdbcType=VARCHAR}, api_case_execute_report_id)
#{apiCaseId,jdbcType=VARCHAR}, #{apiCaseNum,jdbcType=BIGINT}, #{apiCaseName,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanCollectionId,jdbcType=VARCHAR},
#{apiCaseModule,jdbcType=VARCHAR}, #{apiCasePriority,jdbcType=VARCHAR}, #{apiCaseExecuteUser,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{testPlanApiCaseId,jdbcType=VARCHAR}, #{apiCaseId,jdbcType=VARCHAR},
#{apiCaseExecuteResult,jdbcType=VARCHAR}) #{apiCaseNum,jdbcType=BIGINT}, #{apiCaseName,jdbcType=VARCHAR}, #{apiCaseModule,jdbcType=VARCHAR},
#{apiCasePriority,jdbcType=VARCHAR}, #{apiCaseExecuteUser,jdbcType=VARCHAR}, #{apiCaseExecuteResult,jdbcType=VARCHAR},
#{apiCaseExecuteReportId,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase"> <insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
insert into test_plan_report_api_case insert into test_plan_report_api_case
@ -124,6 +130,12 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
test_plan_report_id, test_plan_report_id,
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id,
</if>
<if test="environmentId != null">
environment_id,
</if>
<if test="testPlanApiCaseId != null"> <if test="testPlanApiCaseId != null">
test_plan_api_case_id, test_plan_api_case_id,
</if> </if>
@ -148,6 +160,9 @@
<if test="apiCaseExecuteResult != null"> <if test="apiCaseExecuteResult != null">
api_case_execute_result, api_case_execute_result,
</if> </if>
<if test="apiCaseExecuteReportId != null">
api_case_execute_report_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -156,6 +171,12 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
#{testPlanReportId,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
#{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=VARCHAR},
</if>
<if test="testPlanApiCaseId != null"> <if test="testPlanApiCaseId != null">
#{testPlanApiCaseId,jdbcType=VARCHAR}, #{testPlanApiCaseId,jdbcType=VARCHAR},
</if> </if>
@ -180,6 +201,9 @@
<if test="apiCaseExecuteResult != null"> <if test="apiCaseExecuteResult != null">
#{apiCaseExecuteResult,jdbcType=VARCHAR}, #{apiCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="apiCaseExecuteReportId != null">
#{apiCaseExecuteReportId,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultType="java.lang.Long">
@ -197,6 +221,12 @@
<if test="record.testPlanReportId != null"> <if test="record.testPlanReportId != null">
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="record.testPlanCollectionId != null">
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=VARCHAR},
</if>
<if test="record.testPlanApiCaseId != null"> <if test="record.testPlanApiCaseId != null">
test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR}, test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR},
</if> </if>
@ -221,6 +251,9 @@
<if test="record.apiCaseExecuteResult != null"> <if test="record.apiCaseExecuteResult != null">
api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR}, api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="record.apiCaseExecuteReportId != null">
api_case_execute_report_id = #{record.apiCaseExecuteReportId,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -230,6 +263,8 @@
update test_plan_report_api_case update test_plan_report_api_case
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
environment_id = #{record.environmentId,jdbcType=VARCHAR},
test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR}, test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR},
api_case_id = #{record.apiCaseId,jdbcType=VARCHAR}, api_case_id = #{record.apiCaseId,jdbcType=VARCHAR},
api_case_num = #{record.apiCaseNum,jdbcType=BIGINT}, api_case_num = #{record.apiCaseNum,jdbcType=BIGINT},
@ -237,7 +272,8 @@
api_case_module = #{record.apiCaseModule,jdbcType=VARCHAR}, api_case_module = #{record.apiCaseModule,jdbcType=VARCHAR},
api_case_priority = #{record.apiCasePriority,jdbcType=VARCHAR}, api_case_priority = #{record.apiCasePriority,jdbcType=VARCHAR},
api_case_execute_user = #{record.apiCaseExecuteUser,jdbcType=VARCHAR}, api_case_execute_user = #{record.apiCaseExecuteUser,jdbcType=VARCHAR},
api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR} api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR},
api_case_execute_report_id = #{record.apiCaseExecuteReportId,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -248,6 +284,12 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=VARCHAR},
</if>
<if test="testPlanApiCaseId != null"> <if test="testPlanApiCaseId != null">
test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR}, test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR},
</if> </if>
@ -272,12 +314,17 @@
<if test="apiCaseExecuteResult != null"> <if test="apiCaseExecuteResult != null">
api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR}, api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="apiCaseExecuteReportId != null">
api_case_execute_report_id = #{apiCaseExecuteReportId,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase"> <update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
update test_plan_report_api_case update test_plan_report_api_case
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
environment_id = #{environmentId,jdbcType=VARCHAR},
test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR}, test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR},
api_case_id = #{apiCaseId,jdbcType=VARCHAR}, api_case_id = #{apiCaseId,jdbcType=VARCHAR},
api_case_num = #{apiCaseNum,jdbcType=BIGINT}, api_case_num = #{apiCaseNum,jdbcType=BIGINT},
@ -285,21 +332,23 @@
api_case_module = #{apiCaseModule,jdbcType=VARCHAR}, api_case_module = #{apiCaseModule,jdbcType=VARCHAR},
api_case_priority = #{apiCasePriority,jdbcType=VARCHAR}, api_case_priority = #{apiCasePriority,jdbcType=VARCHAR},
api_case_execute_user = #{apiCaseExecuteUser,jdbcType=VARCHAR}, api_case_execute_user = #{apiCaseExecuteUser,jdbcType=VARCHAR},
api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR} api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR},
api_case_execute_report_id = #{apiCaseExecuteReportId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
insert into test_plan_report_api_case insert into test_plan_report_api_case
(id, test_plan_report_id, test_plan_api_case_id, api_case_id, api_case_num, api_case_name, (id, test_plan_report_id, test_plan_collection_id, environment_id, test_plan_api_case_id,
api_case_module, api_case_priority, api_case_execute_user, api_case_execute_result api_case_id, api_case_num, api_case_name, api_case_module, api_case_priority, api_case_execute_user,
) api_case_execute_result, api_case_execute_report_id)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanApiCaseId,jdbcType=VARCHAR}, (#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanCollectionId,jdbcType=VARCHAR},
#{item.environmentId,jdbcType=VARCHAR}, #{item.testPlanApiCaseId,jdbcType=VARCHAR},
#{item.apiCaseId,jdbcType=VARCHAR}, #{item.apiCaseNum,jdbcType=BIGINT}, #{item.apiCaseName,jdbcType=VARCHAR}, #{item.apiCaseId,jdbcType=VARCHAR}, #{item.apiCaseNum,jdbcType=BIGINT}, #{item.apiCaseName,jdbcType=VARCHAR},
#{item.apiCaseModule,jdbcType=VARCHAR}, #{item.apiCasePriority,jdbcType=VARCHAR}, #{item.apiCaseModule,jdbcType=VARCHAR}, #{item.apiCasePriority,jdbcType=VARCHAR},
#{item.apiCaseExecuteUser,jdbcType=VARCHAR}, #{item.apiCaseExecuteResult,jdbcType=VARCHAR} #{item.apiCaseExecuteUser,jdbcType=VARCHAR}, #{item.apiCaseExecuteResult,jdbcType=VARCHAR},
) #{item.apiCaseExecuteReportId,jdbcType=VARCHAR})
</foreach> </foreach>
</insert> </insert>
<insert id="batchInsertSelective" parameterType="map"> <insert id="batchInsertSelective" parameterType="map">
@ -318,6 +367,12 @@
<if test="'test_plan_report_id'.toString() == column.value"> <if test="'test_plan_report_id'.toString() == column.value">
#{item.testPlanReportId,jdbcType=VARCHAR} #{item.testPlanReportId,jdbcType=VARCHAR}
</if> </if>
<if test="'test_plan_collection_id'.toString() == column.value">
#{item.testPlanCollectionId,jdbcType=VARCHAR}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=VARCHAR}
</if>
<if test="'test_plan_api_case_id'.toString() == column.value"> <if test="'test_plan_api_case_id'.toString() == column.value">
#{item.testPlanApiCaseId,jdbcType=VARCHAR} #{item.testPlanApiCaseId,jdbcType=VARCHAR}
</if> </if>
@ -342,6 +397,9 @@
<if test="'api_case_execute_result'.toString() == column.value"> <if test="'api_case_execute_result'.toString() == column.value">
#{item.apiCaseExecuteResult,jdbcType=VARCHAR} #{item.apiCaseExecuteResult,jdbcType=VARCHAR}
</if> </if>
<if test="'api_case_execute_report_id'.toString() == column.value">
#{item.apiCaseExecuteReportId,jdbcType=VARCHAR}
</if>
</foreach> </foreach>
) )
</foreach> </foreach>

View File

@ -4,6 +4,9 @@
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiScenario"> <resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiScenario">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" /> <result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
<result column="test_plan_collection_id" jdbcType="VARCHAR" property="testPlanCollectionId" />
<result column="grouped" jdbcType="BIT" property="grouped" />
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
<result column="test_plan_api_scenario_id" jdbcType="VARCHAR" property="testPlanApiScenarioId" /> <result column="test_plan_api_scenario_id" jdbcType="VARCHAR" property="testPlanApiScenarioId" />
<result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId" /> <result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId" />
<result column="api_scenario_num" jdbcType="BIGINT" property="apiScenarioNum" /> <result column="api_scenario_num" jdbcType="BIGINT" property="apiScenarioNum" />
@ -12,6 +15,7 @@
<result column="api_scenario_priority" jdbcType="VARCHAR" property="apiScenarioPriority" /> <result column="api_scenario_priority" jdbcType="VARCHAR" property="apiScenarioPriority" />
<result column="api_scenario_execute_user" jdbcType="VARCHAR" property="apiScenarioExecuteUser" /> <result column="api_scenario_execute_user" jdbcType="VARCHAR" property="apiScenarioExecuteUser" />
<result column="api_scenario_execute_result" jdbcType="VARCHAR" property="apiScenarioExecuteResult" /> <result column="api_scenario_execute_result" jdbcType="VARCHAR" property="apiScenarioExecuteResult" />
<result column="api_scenario_execute_report_id" jdbcType="VARCHAR" property="apiScenarioExecuteReportId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -72,9 +76,9 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, test_plan_report_id, test_plan_api_scenario_id, api_scenario_id, api_scenario_num, id, test_plan_report_id, test_plan_collection_id, grouped, environment_id, test_plan_api_scenario_id,
api_scenario_name, api_scenario_module, api_scenario_priority, api_scenario_execute_user, api_scenario_id, api_scenario_num, api_scenario_name, api_scenario_module, api_scenario_priority,
api_scenario_execute_result api_scenario_execute_user, api_scenario_execute_result, api_scenario_execute_report_id
</sql> </sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultMap="BaseResultMap">
select select
@ -107,16 +111,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario"> <insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
insert into test_plan_report_api_scenario (id, test_plan_report_id, test_plan_api_scenario_id, insert into test_plan_report_api_scenario (id, test_plan_report_id, test_plan_collection_id,
grouped, environment_id, test_plan_api_scenario_id,
api_scenario_id, api_scenario_num, api_scenario_name, api_scenario_id, api_scenario_num, api_scenario_name,
api_scenario_module, api_scenario_priority, api_scenario_module, api_scenario_priority,
api_scenario_execute_user, api_scenario_execute_result api_scenario_execute_user, api_scenario_execute_result,
) api_scenario_execute_report_id)
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanApiScenarioId,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanCollectionId,jdbcType=VARCHAR},
#{grouped,jdbcType=BIT}, #{environmentId,jdbcType=VARCHAR}, #{testPlanApiScenarioId,jdbcType=VARCHAR},
#{apiScenarioId,jdbcType=VARCHAR}, #{apiScenarioNum,jdbcType=BIGINT}, #{apiScenarioName,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, #{apiScenarioNum,jdbcType=BIGINT}, #{apiScenarioName,jdbcType=VARCHAR},
#{apiScenarioModule,jdbcType=VARCHAR}, #{apiScenarioPriority,jdbcType=VARCHAR}, #{apiScenarioModule,jdbcType=VARCHAR}, #{apiScenarioPriority,jdbcType=VARCHAR},
#{apiScenarioExecuteUser,jdbcType=VARCHAR}, #{apiScenarioExecuteResult,jdbcType=VARCHAR} #{apiScenarioExecuteUser,jdbcType=VARCHAR}, #{apiScenarioExecuteResult,jdbcType=VARCHAR},
) #{apiScenarioExecuteReportId,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario"> <insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
insert into test_plan_report_api_scenario insert into test_plan_report_api_scenario
@ -127,6 +133,15 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
test_plan_report_id, test_plan_report_id,
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id,
</if>
<if test="grouped != null">
grouped,
</if>
<if test="environmentId != null">
environment_id,
</if>
<if test="testPlanApiScenarioId != null"> <if test="testPlanApiScenarioId != null">
test_plan_api_scenario_id, test_plan_api_scenario_id,
</if> </if>
@ -151,6 +166,9 @@
<if test="apiScenarioExecuteResult != null"> <if test="apiScenarioExecuteResult != null">
api_scenario_execute_result, api_scenario_execute_result,
</if> </if>
<if test="apiScenarioExecuteReportId != null">
api_scenario_execute_report_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -159,6 +177,15 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
#{testPlanReportId,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
#{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
#{grouped,jdbcType=BIT},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=VARCHAR},
</if>
<if test="testPlanApiScenarioId != null"> <if test="testPlanApiScenarioId != null">
#{testPlanApiScenarioId,jdbcType=VARCHAR}, #{testPlanApiScenarioId,jdbcType=VARCHAR},
</if> </if>
@ -183,6 +210,9 @@
<if test="apiScenarioExecuteResult != null"> <if test="apiScenarioExecuteResult != null">
#{apiScenarioExecuteResult,jdbcType=VARCHAR}, #{apiScenarioExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="apiScenarioExecuteReportId != null">
#{apiScenarioExecuteReportId,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultType="java.lang.Long">
@ -200,6 +230,15 @@
<if test="record.testPlanReportId != null"> <if test="record.testPlanReportId != null">
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="record.testPlanCollectionId != null">
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="record.grouped != null">
grouped = #{record.grouped,jdbcType=BIT},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=VARCHAR},
</if>
<if test="record.testPlanApiScenarioId != null"> <if test="record.testPlanApiScenarioId != null">
test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR}, test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR},
</if> </if>
@ -224,6 +263,9 @@
<if test="record.apiScenarioExecuteResult != null"> <if test="record.apiScenarioExecuteResult != null">
api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR}, api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="record.apiScenarioExecuteReportId != null">
api_scenario_execute_report_id = #{record.apiScenarioExecuteReportId,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -233,6 +275,9 @@
update test_plan_report_api_scenario update test_plan_report_api_scenario
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
grouped = #{record.grouped,jdbcType=BIT},
environment_id = #{record.environmentId,jdbcType=VARCHAR},
test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR}, test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR},
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
api_scenario_num = #{record.apiScenarioNum,jdbcType=BIGINT}, api_scenario_num = #{record.apiScenarioNum,jdbcType=BIGINT},
@ -240,7 +285,8 @@
api_scenario_module = #{record.apiScenarioModule,jdbcType=VARCHAR}, api_scenario_module = #{record.apiScenarioModule,jdbcType=VARCHAR},
api_scenario_priority = #{record.apiScenarioPriority,jdbcType=VARCHAR}, api_scenario_priority = #{record.apiScenarioPriority,jdbcType=VARCHAR},
api_scenario_execute_user = #{record.apiScenarioExecuteUser,jdbcType=VARCHAR}, api_scenario_execute_user = #{record.apiScenarioExecuteUser,jdbcType=VARCHAR},
api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR} api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR},
api_scenario_execute_report_id = #{record.apiScenarioExecuteReportId,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -251,6 +297,15 @@
<if test="testPlanReportId != null"> <if test="testPlanReportId != null">
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
grouped = #{grouped,jdbcType=BIT},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=VARCHAR},
</if>
<if test="testPlanApiScenarioId != null"> <if test="testPlanApiScenarioId != null">
test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR}, test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR},
</if> </if>
@ -275,12 +330,18 @@
<if test="apiScenarioExecuteResult != null"> <if test="apiScenarioExecuteResult != null">
api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR}, api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="apiScenarioExecuteReportId != null">
api_scenario_execute_report_id = #{apiScenarioExecuteReportId,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario"> <update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
update test_plan_report_api_scenario update test_plan_report_api_scenario
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
grouped = #{grouped,jdbcType=BIT},
environment_id = #{environmentId,jdbcType=VARCHAR},
test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR}, test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR},
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
api_scenario_num = #{apiScenarioNum,jdbcType=BIGINT}, api_scenario_num = #{apiScenarioNum,jdbcType=BIGINT},
@ -288,21 +349,25 @@
api_scenario_module = #{apiScenarioModule,jdbcType=VARCHAR}, api_scenario_module = #{apiScenarioModule,jdbcType=VARCHAR},
api_scenario_priority = #{apiScenarioPriority,jdbcType=VARCHAR}, api_scenario_priority = #{apiScenarioPriority,jdbcType=VARCHAR},
api_scenario_execute_user = #{apiScenarioExecuteUser,jdbcType=VARCHAR}, api_scenario_execute_user = #{apiScenarioExecuteUser,jdbcType=VARCHAR},
api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR} api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR},
api_scenario_execute_report_id = #{apiScenarioExecuteReportId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
insert into test_plan_report_api_scenario insert into test_plan_report_api_scenario
(id, test_plan_report_id, test_plan_api_scenario_id, api_scenario_id, api_scenario_num, (id, test_plan_report_id, test_plan_collection_id, grouped, environment_id, test_plan_api_scenario_id,
api_scenario_name, api_scenario_module, api_scenario_priority, api_scenario_execute_user, api_scenario_id, api_scenario_num, api_scenario_name, api_scenario_module, api_scenario_priority,
api_scenario_execute_result) api_scenario_execute_user, api_scenario_execute_result, api_scenario_execute_report_id
)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanApiScenarioId,jdbcType=VARCHAR}, (#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanCollectionId,jdbcType=VARCHAR},
#{item.grouped,jdbcType=BIT}, #{item.environmentId,jdbcType=VARCHAR}, #{item.testPlanApiScenarioId,jdbcType=VARCHAR},
#{item.apiScenarioId,jdbcType=VARCHAR}, #{item.apiScenarioNum,jdbcType=BIGINT}, #{item.apiScenarioId,jdbcType=VARCHAR}, #{item.apiScenarioNum,jdbcType=BIGINT},
#{item.apiScenarioName,jdbcType=VARCHAR}, #{item.apiScenarioModule,jdbcType=VARCHAR}, #{item.apiScenarioName,jdbcType=VARCHAR}, #{item.apiScenarioModule,jdbcType=VARCHAR},
#{item.apiScenarioPriority,jdbcType=VARCHAR}, #{item.apiScenarioExecuteUser,jdbcType=VARCHAR}, #{item.apiScenarioPriority,jdbcType=VARCHAR}, #{item.apiScenarioExecuteUser,jdbcType=VARCHAR},
#{item.apiScenarioExecuteResult,jdbcType=VARCHAR}) #{item.apiScenarioExecuteResult,jdbcType=VARCHAR}, #{item.apiScenarioExecuteReportId,jdbcType=VARCHAR}
)
</foreach> </foreach>
</insert> </insert>
<insert id="batchInsertSelective" parameterType="map"> <insert id="batchInsertSelective" parameterType="map">
@ -321,6 +386,15 @@
<if test="'test_plan_report_id'.toString() == column.value"> <if test="'test_plan_report_id'.toString() == column.value">
#{item.testPlanReportId,jdbcType=VARCHAR} #{item.testPlanReportId,jdbcType=VARCHAR}
</if> </if>
<if test="'test_plan_collection_id'.toString() == column.value">
#{item.testPlanCollectionId,jdbcType=VARCHAR}
</if>
<if test="'grouped'.toString() == column.value">
#{item.grouped,jdbcType=BIT}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=VARCHAR}
</if>
<if test="'test_plan_api_scenario_id'.toString() == column.value"> <if test="'test_plan_api_scenario_id'.toString() == column.value">
#{item.testPlanApiScenarioId,jdbcType=VARCHAR} #{item.testPlanApiScenarioId,jdbcType=VARCHAR}
</if> </if>
@ -345,6 +419,9 @@
<if test="'api_scenario_execute_result'.toString() == column.value"> <if test="'api_scenario_execute_result'.toString() == column.value">
#{item.apiScenarioExecuteResult,jdbcType=VARCHAR} #{item.apiScenarioExecuteResult,jdbcType=VARCHAR}
</if> </if>
<if test="'api_scenario_execute_report_id'.toString() == column.value">
#{item.apiScenarioExecuteReportId,jdbcType=VARCHAR}
</if>
</foreach> </foreach>
) )
</foreach> </foreach>

View File

@ -13,6 +13,7 @@
<result column="function_case_execute_user" jdbcType="VARCHAR" property="functionCaseExecuteUser" /> <result column="function_case_execute_user" jdbcType="VARCHAR" property="functionCaseExecuteUser" />
<result column="function_case_bug_count" jdbcType="BIGINT" property="functionCaseBugCount" /> <result column="function_case_bug_count" jdbcType="BIGINT" property="functionCaseBugCount" />
<result column="function_case_execute_result" jdbcType="VARCHAR" property="functionCaseExecuteResult" /> <result column="function_case_execute_result" jdbcType="VARCHAR" property="functionCaseExecuteResult" />
<result column="test_plan_collection_id" jdbcType="VARCHAR" property="testPlanCollectionId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -75,7 +76,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, test_plan_report_id, test_plan_function_case_id, function_case_id, function_case_num, id, test_plan_report_id, test_plan_function_case_id, function_case_id, function_case_num,
function_case_name, function_case_module, function_case_priority, function_case_execute_user, function_case_name, function_case_module, function_case_priority, function_case_execute_user,
function_case_bug_count, function_case_execute_result function_case_bug_count, function_case_execute_result, test_plan_collection_id
</sql> </sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCaseExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCaseExample" resultMap="BaseResultMap">
select select
@ -112,12 +113,14 @@
function_case_id, function_case_num, function_case_name, function_case_id, function_case_num, function_case_name,
function_case_module, function_case_priority, function_case_module, function_case_priority,
function_case_execute_user, function_case_bug_count, function_case_execute_user, function_case_bug_count,
function_case_execute_result) function_case_execute_result, test_plan_collection_id
)
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanFunctionCaseId,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanFunctionCaseId,jdbcType=VARCHAR},
#{functionCaseId,jdbcType=VARCHAR}, #{functionCaseNum,jdbcType=BIGINT}, #{functionCaseName,jdbcType=VARCHAR}, #{functionCaseId,jdbcType=VARCHAR}, #{functionCaseNum,jdbcType=BIGINT}, #{functionCaseName,jdbcType=VARCHAR},
#{functionCaseModule,jdbcType=VARCHAR}, #{functionCasePriority,jdbcType=VARCHAR}, #{functionCaseModule,jdbcType=VARCHAR}, #{functionCasePriority,jdbcType=VARCHAR},
#{functionCaseExecuteUser,jdbcType=VARCHAR}, #{functionCaseBugCount,jdbcType=BIGINT}, #{functionCaseExecuteUser,jdbcType=VARCHAR}, #{functionCaseBugCount,jdbcType=BIGINT},
#{functionCaseExecuteResult,jdbcType=VARCHAR}) #{functionCaseExecuteResult,jdbcType=VARCHAR}, #{testPlanCollectionId,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCase"> <insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCase">
insert into test_plan_report_function_case insert into test_plan_report_function_case
@ -155,6 +158,9 @@
<if test="functionCaseExecuteResult != null"> <if test="functionCaseExecuteResult != null">
function_case_execute_result, function_case_execute_result,
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -190,6 +196,9 @@
<if test="functionCaseExecuteResult != null"> <if test="functionCaseExecuteResult != null">
#{functionCaseExecuteResult,jdbcType=VARCHAR}, #{functionCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
#{testPlanCollectionId,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCaseExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportFunctionCaseExample" resultType="java.lang.Long">
@ -234,6 +243,9 @@
<if test="record.functionCaseExecuteResult != null"> <if test="record.functionCaseExecuteResult != null">
function_case_execute_result = #{record.functionCaseExecuteResult,jdbcType=VARCHAR}, function_case_execute_result = #{record.functionCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="record.testPlanCollectionId != null">
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -251,7 +263,8 @@
function_case_priority = #{record.functionCasePriority,jdbcType=VARCHAR}, function_case_priority = #{record.functionCasePriority,jdbcType=VARCHAR},
function_case_execute_user = #{record.functionCaseExecuteUser,jdbcType=VARCHAR}, function_case_execute_user = #{record.functionCaseExecuteUser,jdbcType=VARCHAR},
function_case_bug_count = #{record.functionCaseBugCount,jdbcType=BIGINT}, function_case_bug_count = #{record.functionCaseBugCount,jdbcType=BIGINT},
function_case_execute_result = #{record.functionCaseExecuteResult,jdbcType=VARCHAR} function_case_execute_result = #{record.functionCaseExecuteResult,jdbcType=VARCHAR},
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -289,6 +302,9 @@
<if test="functionCaseExecuteResult != null"> <if test="functionCaseExecuteResult != null">
function_case_execute_result = #{functionCaseExecuteResult,jdbcType=VARCHAR}, function_case_execute_result = #{functionCaseExecuteResult,jdbcType=VARCHAR},
</if> </if>
<if test="testPlanCollectionId != null">
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
@ -303,22 +319,23 @@
function_case_priority = #{functionCasePriority,jdbcType=VARCHAR}, function_case_priority = #{functionCasePriority,jdbcType=VARCHAR},
function_case_execute_user = #{functionCaseExecuteUser,jdbcType=VARCHAR}, function_case_execute_user = #{functionCaseExecuteUser,jdbcType=VARCHAR},
function_case_bug_count = #{functionCaseBugCount,jdbcType=BIGINT}, function_case_bug_count = #{functionCaseBugCount,jdbcType=BIGINT},
function_case_execute_result = #{functionCaseExecuteResult,jdbcType=VARCHAR} function_case_execute_result = #{functionCaseExecuteResult,jdbcType=VARCHAR},
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
insert into test_plan_report_function_case insert into test_plan_report_function_case
(id, test_plan_report_id, test_plan_function_case_id, function_case_id, function_case_num, (id, test_plan_report_id, test_plan_function_case_id, function_case_id, function_case_num,
function_case_name, function_case_module, function_case_priority, function_case_execute_user, function_case_name, function_case_module, function_case_priority, function_case_execute_user,
function_case_bug_count, function_case_execute_result) function_case_bug_count, function_case_execute_result, test_plan_collection_id)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanFunctionCaseId,jdbcType=VARCHAR}, (#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanFunctionCaseId,jdbcType=VARCHAR},
#{item.functionCaseId,jdbcType=VARCHAR}, #{item.functionCaseNum,jdbcType=BIGINT}, #{item.functionCaseId,jdbcType=VARCHAR}, #{item.functionCaseNum,jdbcType=BIGINT},
#{item.functionCaseName,jdbcType=VARCHAR}, #{item.functionCaseModule,jdbcType=VARCHAR}, #{item.functionCaseName,jdbcType=VARCHAR}, #{item.functionCaseModule,jdbcType=VARCHAR},
#{item.functionCasePriority,jdbcType=VARCHAR}, #{item.functionCaseExecuteUser,jdbcType=VARCHAR}, #{item.functionCasePriority,jdbcType=VARCHAR}, #{item.functionCaseExecuteUser,jdbcType=VARCHAR},
#{item.functionCaseBugCount,jdbcType=BIGINT}, #{item.functionCaseExecuteResult,jdbcType=VARCHAR} #{item.functionCaseBugCount,jdbcType=BIGINT}, #{item.functionCaseExecuteResult,jdbcType=VARCHAR},
) #{item.testPlanCollectionId,jdbcType=VARCHAR})
</foreach> </foreach>
</insert> </insert>
<insert id="batchInsertSelective" parameterType="map"> <insert id="batchInsertSelective" parameterType="map">
@ -364,6 +381,9 @@
<if test="'function_case_execute_result'.toString() == column.value"> <if test="'function_case_execute_result'.toString() == column.value">
#{item.functionCaseExecuteResult,jdbcType=VARCHAR} #{item.functionCaseExecuteResult,jdbcType=VARCHAR}
</if> </if>
<if test="'test_plan_collection_id'.toString() == column.value">
#{item.testPlanCollectionId,jdbcType=VARCHAR}
</if>
</foreach> </foreach>
) )
</foreach> </foreach>

View File

@ -179,6 +179,8 @@ ALTER TABLE `user`
CREATE TABLE IF NOT EXISTS test_plan_report_api_case( CREATE TABLE IF NOT EXISTS test_plan_report_api_case(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' , `test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' ,
`test_plan_collection_id` VARCHAR(50) NOT NULL COMMENT '测试集ID' ,
`environment_id` VARCHAR(50) COMMENT '环境ID' ,
`test_plan_api_case_id` VARCHAR(50) NOT NULL COMMENT '测试计划接口用例关联ID' , `test_plan_api_case_id` VARCHAR(50) NOT NULL COMMENT '测试计划接口用例关联ID' ,
`api_case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID' , `api_case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID' ,
`api_case_num` BIGINT NOT NULL COMMENT '接口用例业务ID' , `api_case_num` BIGINT NOT NULL COMMENT '接口用例业务ID' ,
@ -186,15 +188,20 @@ CREATE TABLE IF NOT EXISTS test_plan_report_api_case(
`api_case_module` VARCHAR(255) COMMENT '接口用例所属模块' , `api_case_module` VARCHAR(255) COMMENT '接口用例所属模块' ,
`api_case_priority` VARCHAR(255) COMMENT '接口用例等级' , `api_case_priority` VARCHAR(255) COMMENT '接口用例等级' ,
`api_case_execute_user` VARCHAR(50) COMMENT '接口用例执行人' , `api_case_execute_user` VARCHAR(50) COMMENT '接口用例执行人' ,
`api_case_execute_result` VARCHAR(50) NOT NULL COMMENT '接口用例执行结果' , `api_case_execute_result` VARCHAR(50) COMMENT '接口用例执行结果' ,
`api_case_execute_report_id` VARCHAR(50) COMMENT '接口用例执行报告ID' ,
PRIMARY KEY (id) PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口用例部分'; ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口用例部分';
CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_case(test_plan_report_id); CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_case(test_plan_report_id);
CREATE INDEX idx_test_plan_collection_id ON test_plan_report_api_case(test_plan_collection_id);
-- 测试计划报告场景详情部分 -- 测试计划报告场景详情部分
CREATE TABLE IF NOT EXISTS test_plan_report_api_scenario( CREATE TABLE IF NOT EXISTS test_plan_report_api_scenario(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' , `test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' ,
`test_plan_collection_id` VARCHAR(50) NOT NULL COMMENT '测试集ID' ,
`grouped` BIT(1) COMMENT '是否环境组' ,
`environment_id` VARCHAR(50) COMMENT '环境ID' ,
`test_plan_api_scenario_id` VARCHAR(50) NOT NULL COMMENT '测试计划场景用例关联ID' , `test_plan_api_scenario_id` VARCHAR(50) NOT NULL COMMENT '测试计划场景用例关联ID' ,
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景用例ID' , `api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景用例ID' ,
`api_scenario_num` BIGINT NOT NULL COMMENT '场景用例业务ID' , `api_scenario_num` BIGINT NOT NULL COMMENT '场景用例业务ID' ,
@ -202,15 +209,21 @@ CREATE TABLE IF NOT EXISTS test_plan_report_api_scenario(
`api_scenario_module` VARCHAR(255) COMMENT '场景用例所属模块' , `api_scenario_module` VARCHAR(255) COMMENT '场景用例所属模块' ,
`api_scenario_priority` VARCHAR(255) COMMENT '场景用例等级' , `api_scenario_priority` VARCHAR(255) COMMENT '场景用例等级' ,
`api_scenario_execute_user` VARCHAR(50) COMMENT '场景用例执行人' , `api_scenario_execute_user` VARCHAR(50) COMMENT '场景用例执行人' ,
`api_scenario_execute_result` VARCHAR(50) NOT NULL COMMENT '场景用例执行结果' , `api_scenario_execute_result` VARCHAR(50) COMMENT '场景用例执行结果' ,
`api_scenario_execute_report_id` VARCHAR(50) COMMENT '场景用例执行报告ID' ,
PRIMARY KEY (id) PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口场景部分'; ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口场景部分';
CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_scenario(test_plan_report_id); CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_scenario(test_plan_report_id);
CREATE INDEX idx_test_plan_collection_id ON test_plan_report_api_scenario(test_plan_collection_id);
-- 测试计划报告 -- 测试计划报告
ALTER TABLE test_plan_report ADD `execute_rate` DECIMAL(10, 4) COMMENT '执行率'; ALTER TABLE test_plan_report ADD `execute_rate` DECIMAL(10, 4) COMMENT '执行率';
ALTER TABLE test_plan_report ADD `parent_id` VARCHAR(50) COMMENT '独立报告的父级ID'; ALTER TABLE test_plan_report ADD `parent_id` VARCHAR(50) COMMENT '独立报告的父级ID';
-- 计划报告功能用例明细表
ALTER TABLE test_plan_report_function_case ADD `test_plan_collection_id` VARCHAR(50) NOT NULL COMMENT '测试集ID';
CREATE INDEX idx_test_plan_collection_id ON test_plan_report_function_case(test_plan_collection_id);
-- set innodb lock wait timeout to default -- set innodb lock wait timeout to default
SET SESSION innodb_lock_wait_timeout = DEFAULT; SET SESSION innodb_lock_wait_timeout = DEFAULT;

View File

@ -122,7 +122,7 @@ public class TestPlanReportController {
@PostMapping("/detail/bug/page") @PostMapping("/detail/bug/page")
@Operation(summary = "测试计划-报告-详情-缺陷分页查询") @Operation(summary = "测试计划-报告-详情-缺陷分页查询")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ) @RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report") @CheckOwner(resourceId = "#request.getReportId()", resourceType = "test_plan_report")
public Pager<List<BugDTO>> pageBug(@Validated @RequestBody TestPlanReportDetailPageRequest request) { public Pager<List<BugDTO>> pageBug(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num, tprb.id desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num, tprb.id desc");
@ -132,7 +132,7 @@ public class TestPlanReportController {
@PostMapping("/detail/functional/case/page") @PostMapping("/detail/functional/case/page")
@Operation(summary = "测试计划-报告-详情-功能用例分页查询") @Operation(summary = "测试计划-报告-详情-功能用例分页查询")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ) @RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report") @CheckOwner(resourceId = "#request.getReportId()", resourceType = "test_plan_report")
public Pager<List<ReportDetailCasePageDTO>> pageFunctionalCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) { public Pager<List<ReportDetailCasePageDTO>> pageFunctionalCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc");
@ -142,7 +142,7 @@ public class TestPlanReportController {
@PostMapping("/detail/api/case/page") @PostMapping("/detail/api/case/page")
@Operation(summary = "测试计划-报告-详情-接口用例分页查询") @Operation(summary = "测试计划-报告-详情-接口用例分页查询")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ) @RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report") @CheckOwner(resourceId = "#request.getReportId()", resourceType = "test_plan_report")
public Pager<List<ReportDetailCasePageDTO>> pageApiCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) { public Pager<List<ReportDetailCasePageDTO>> pageApiCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.api_case_num, tprac.id desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.api_case_num, tprac.id desc");
@ -152,7 +152,7 @@ public class TestPlanReportController {
@PostMapping("/detail/scenario/case/page") @PostMapping("/detail/scenario/case/page")
@Operation(summary = "测试计划-报告-详情-场景用例分页查询") @Operation(summary = "测试计划-报告-详情-场景用例分页查询")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ) @RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report") @CheckOwner(resourceId = "#request.getReportId()", resourceType = "test_plan_report")
public Pager<List<ReportDetailCasePageDTO>> pageScenarioCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) { public Pager<List<ReportDetailCasePageDTO>> pageScenarioCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.api_scenario_num, tpras.id desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.api_scenario_num, tpras.id desc");

View File

@ -1,5 +1,6 @@
package io.metersphere.plan.dto; package io.metersphere.plan.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
/** /**
@ -9,38 +10,22 @@ import lombok.Data;
@Data @Data
public class ReportDetailCasePageDTO { public class ReportDetailCasePageDTO {
// ID用例名称所属模块用例等级执行人执行结果缺陷数 @Schema(description = "用例ID")
/**
* 用例ID
*/
private String id; private String id;
/** @Schema(description = "用例业务ID")
* 用例业务ID
*/
private Long num; private Long num;
/** @Schema(description = "用例名称")
* 用例名称
*/
private String name; private String name;
/** @Schema(description = "所属模块")
* 所属模块
*/
private String moduleName; private String moduleName;
/** @Schema(description = "用例等级")
* 用例等级
*/
private String priority; private String priority;
/** @Schema(description = "执行结果")
* 执行结果
*/
private String executeResult; private String executeResult;
/** @Schema(description = "执行人")
* 执行人
*/
private String executeUser; private String executeUser;
/** @Schema(description = "缺陷数")
* 缺陷数
*/
private Long bugCount; private Long bugCount;
@Schema(description = "报告详情ID")
private String reportId;
} }

View File

@ -1,8 +1,11 @@
package io.metersphere.plan.dto; package io.metersphere.plan.dto;
import io.metersphere.plan.domain.TestPlan;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class TestPlanReportGenPreParam { public class TestPlanReportGenPreParam {
@ -30,8 +33,8 @@ public class TestPlanReportGenPreParam {
@Schema(description = "是否集成报告") @Schema(description = "是否集成报告")
private Boolean integrated; private Boolean integrated;
@Schema(description = "计划数量, 集成报告需要") @Schema(description = "计划, 集成报告需要")
private Long planCount; private List<TestPlan> childPlans;
@Schema(description = "计划组报告ID, 独立报告需要") @Schema(description = "计划组报告ID, 独立报告需要")
private String groupReportId; private String groupReportId;

View File

@ -25,6 +25,13 @@ public interface ExtTestPlanReportApiCaseMapper {
*/ */
List<TestPlanReportApiCase> getPlanExecuteCases(@Param("id") String planId); List<TestPlanReportApiCase> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的接口用例
* @param planIds 计划ID集合
* @return 接口用例列表
*/
List<TestPlanReportApiCase> getGroupExecuteCases(@Param("ids") List<String> planIds);
/** /**
* 获取项目下接口用例所属模块集合 * 获取项目下接口用例所属模块集合
* @param projectId 计划ID * @param projectId 计划ID

View File

@ -9,6 +9,7 @@
<select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiCase"> <select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiCase">
select tpac.id as testPlanApiCaseId, atc.id as apiCaseId, atc.num as apiCaseNum, atc.name as apiCaseName, atc.priority as apiCasePriority, select tpac.id as testPlanApiCaseId, atc.id as apiCaseId, atc.num as apiCaseNum, atc.name as apiCaseName, atc.priority as apiCasePriority,
tpac.test_plan_collection_id testPlanCollectionId, tpac.environment_id as environmentId,
if(ad.module_id = 'root','未规划用例', ad.module_id) as apiCaseModule, tpac.execute_user as apiCaseExecuteUser, if(ad.module_id = 'root','未规划用例', ad.module_id) as apiCaseModule, tpac.execute_user as apiCaseExecuteUser,
ifnull(tpac.last_exec_result, 'PENDING') as apiCaseExecuteResult ifnull(tpac.last_exec_result, 'PENDING') as apiCaseExecuteResult
from test_plan_api_case tpac join api_test_case atc on atc.id = tpac.api_case_id from test_plan_api_case tpac join api_test_case atc on atc.id = tpac.api_case_id
@ -18,6 +19,20 @@
group by tpac.id group by tpac.id
</select> </select>
<select id="getGroupExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiCase">
select tpac.id as testPlanApiCaseId, atc.id as apiCaseId, atc.num as apiCaseNum, atc.name as apiCaseName, atc.priority as apiCasePriority,
if(ad.module_id = 'root','未规划用例', ad.module_id) as apiCaseModule, tpac.execute_user as apiCaseExecuteUser,
ifnull(tpac.last_exec_result, 'PENDING') as apiCaseExecuteResult
from test_plan_api_case tpac join api_test_case atc on atc.id = tpac.api_case_id
left join api_definition ad on atc.api_definition_id = ad.id
left join api_definition_module adm on ad.module_id = adm.id
where atc.deleted = false and tpac.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpac.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule"> <select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select adm.id, adm.name, adm.parent_id as parentId from api_definition_module adm select adm.id, adm.name, adm.parent_id as parentId from api_definition_module adm
where adm.project_id = #{id} where adm.project_id = #{id}
@ -26,7 +41,7 @@
<select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO"> <select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO">
<!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 --> <!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 -->
select distinct tprac.api_case_id as id, tprac.api_case_num as num, tprac.api_case_name as name, select distinct tprac.api_case_id as id, tprac.api_case_num as num, tprac.api_case_name as name,
tprac.api_case_module as moduleName, tprac.api_case_priority as priority, tprac.api_case_module as moduleName, tprac.api_case_priority as priority, tprac.api_case_execute_report_id reportId,
tprac.api_case_execute_result as executeResult, tprac.api_case_execute_user as executeUser tprac.api_case_execute_result as executeResult, tprac.api_case_execute_user as executeUser
from test_plan_report_api_case tprac from test_plan_report_api_case tprac
where tprac.test_plan_report_id = #{request.reportId} where tprac.test_plan_report_id = #{request.reportId}

View File

@ -25,6 +25,13 @@ public interface ExtTestPlanReportApiScenarioMapper {
*/ */
List<TestPlanReportApiScenario> getPlanExecuteCases(@Param("id") String planId); List<TestPlanReportApiScenario> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的场景用例
* @param planIds 计划ID集合
* @return 场景用例列表
*/
List<TestPlanReportApiScenario> getGroupExecuteCases(@Param("ids") List<String> planIds);
/** /**
* 获取项目下场景用例所属模块集合 * 获取项目下场景用例所属模块集合
* @param projectId 计划ID * @param projectId 计划ID

View File

@ -9,6 +9,7 @@
<select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiScenario"> <select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiScenario">
select tpas.id as testPlanApiScenarioId, aso.id as apiScenarioId, aso.num as apiScenarioNum, aso.name as apiScenarioName, aso.priority as apiScenarioPriority, select tpas.id as testPlanApiScenarioId, aso.id as apiScenarioId, aso.num as apiScenarioNum, aso.name as apiScenarioName, aso.priority as apiScenarioPriority,
tpas.test_plan_collection_id testPlanCollectionId, tpas.grouped grouped, tpas.environment_id environmentId,
if(aso.module_id = 'root','未规划用例', aso.module_id) as apiScenarioModule, tpas.execute_user as apiScenarioExecuteUser, if(aso.module_id = 'root','未规划用例', aso.module_id) as apiScenarioModule, tpas.execute_user as apiScenarioExecuteUser,
ifnull(tpas.last_exec_result, 'PENDING') as apiScenarioExecuteResult ifnull(tpas.last_exec_result, 'PENDING') as apiScenarioExecuteResult
from test_plan_api_scenario tpas join api_scenario aso on aso.id = tpas.api_scenario_id from test_plan_api_scenario tpas join api_scenario aso on aso.id = tpas.api_scenario_id
@ -17,6 +18,20 @@
group by tpas.id group by tpas.id
</select> </select>
<select id="getGroupExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiScenario">
select tpas.id as testPlanApiScenarioId, aso.id as apiScenarioId, aso.num as apiScenarioNum, aso.name as apiScenarioName, aso.priority as apiScenarioPriority,
tpas.test_plan_collection_id testPlanCollectionId, tpas.grouped grouped, tpas.environment_id environmentId,
if(aso.module_id = 'root','未规划用例', aso.module_id) as apiScenarioModule, tpas.execute_user as apiScenarioExecuteUser,
ifnull(tpas.last_exec_result, 'PENDING') as apiScenarioExecuteResult
from test_plan_api_scenario tpas join api_scenario aso on aso.id = tpas.api_scenario_id
left join api_scenario_module asm on aso.module_id = asm.id
where aso.deleted = false and tpas.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpas.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule"> <select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select asm.id, asm.name, asm.parent_id as parentId from api_scenario_module asm select asm.id, asm.name, asm.parent_id as parentId from api_scenario_module asm
where asm.project_id = #{id} where asm.project_id = #{id}
@ -25,7 +40,7 @@
<select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO"> <select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO">
<!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 --> <!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 -->
select distinct tpras.api_scenario_id as id, tpras.api_scenario_num as num, tpras.api_scenario_name as name, select distinct tpras.api_scenario_id as id, tpras.api_scenario_num as num, tpras.api_scenario_name as name,
tpras.api_scenario_module as moduleName, tpras.api_scenario_priority as priority, tpras.api_scenario_module as moduleName, tpras.api_scenario_priority as priority, tpras.api_scenario_execute_report_id reportId,
tpras.api_scenario_execute_result as executeResult, tpras.api_scenario_execute_user as executeUser tpras.api_scenario_execute_result as executeResult, tpras.api_scenario_execute_user as executeUser
from test_plan_report_api_scenario tpras from test_plan_report_api_scenario tpras
where tpras.test_plan_report_id = #{request.reportId} where tpras.test_plan_report_id = #{request.reportId}

View File

@ -16,6 +16,13 @@ public interface ExtTestPlanReportBugMapper {
*/ */
List<TestPlanReportBug> getPlanBugs(@Param("id") String planId); List<TestPlanReportBug> getPlanBugs(@Param("id") String planId);
/**
* 获取计划的缺陷集合
* @param planIds 计划ID集合
* @return 缺陷集合
*/
List<TestPlanReportBug> getGroupBugs(@Param("ids") List<String> planIds);
/** /**
* 分页查询报告关联的缺陷 * 分页查询报告关联的缺陷
* @param request 请求参数 * @param request 请求参数

View File

@ -10,6 +10,17 @@
group by brc.bug_id group by brc.bug_id
</select> </select>
<select id="getGroupBugs" resultType="io.metersphere.plan.domain.TestPlanReportBug">
select distinct brc.bug_id as bugId, b.num as bugNum, b.title as bugTitle, b.status bugStatus,
b.handle_user bugHandleUser, count(brc.id) bugCaseCount
from bug_relation_case brc join bug b on brc.bug_id = b.id
where brc.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by brc.bug_id
</select>
<select id="list" resultType="io.metersphere.bug.dto.response.BugDTO"> <select id="list" resultType="io.metersphere.bug.dto.response.BugDTO">
select distinct tprb.bug_id as id, tprb.bug_num as num, tprb.bug_title as title, tprb.bug_status as status, tprb.bug_handle_user as handleUserName, select distinct tprb.bug_id as id, tprb.bug_num as num, tprb.bug_title as title, tprb.bug_status as status, tprb.bug_handle_user as handleUserName,
ifnull(tprb.bug_case_count, 0) as relationCaseCount ifnull(tprb.bug_case_count, 0) as relationCaseCount

View File

@ -19,6 +19,13 @@ public interface ExtTestPlanReportFunctionalCaseMapper {
*/ */
List<TestPlanReportFunctionCase> getPlanExecuteCases(@Param("id") String planId); List<TestPlanReportFunctionCase> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的功能用例
* @param planIds 计划ID集合
* @return 功能用例列表
*/
List<TestPlanReportFunctionCase> getGroupPlanExecuteCases(@Param("ids") List<String> planIds);
/** /**
* 获取项目下功能用例所属模块集合 * 获取项目下功能用例所属模块集合
* @param projectId 计划ID * @param projectId 计划ID

View File

@ -3,7 +3,7 @@
<mapper namespace="io.metersphere.plan.mapper.ExtTestPlanReportFunctionalCaseMapper"> <mapper namespace="io.metersphere.plan.mapper.ExtTestPlanReportFunctionalCaseMapper">
<select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportFunctionCase"> <select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportFunctionCase">
select tpfc.id as testPlanFunctionCaseId, fc.id as functionCaseId, fc.num as functionCaseNum, fc.name as functionCaseName, select tpfc.id as testPlanFunctionCaseId, fc.id as functionCaseId, fc.num as functionCaseNum, fc.name as functionCaseName, tpfc.test_plan_collection_id testPlanCollectionId,
if(fc.module_id = 'root','未规划用例', fc.module_id) as functionCaseModule, tpfc.execute_user as functionCaseExecuteUser, if(fc.module_id = 'root','未规划用例', fc.module_id) as functionCaseModule, tpfc.execute_user as functionCaseExecuteUser,
count(brc.id) as functionCaseBugCount, ifnull(tpfc.last_exec_result, 'PENDING') as functionCaseExecuteResult count(brc.id) as functionCaseBugCount, ifnull(tpfc.last_exec_result, 'PENDING') as functionCaseExecuteResult
from test_plan_functional_case tpfc join functional_case fc on tpfc.functional_case_id = fc.id from test_plan_functional_case tpfc join functional_case fc on tpfc.functional_case_id = fc.id
@ -13,6 +13,20 @@
group by tpfc.id group by tpfc.id
</select> </select>
<select id="getGroupPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportFunctionCase">
select tpfc.id as testPlanFunctionCaseId, fc.id as functionCaseId, fc.num as functionCaseNum, fc.name as functionCaseName, tpfc.test_plan_collection_id testPlanCollectionId,
if(fc.module_id = 'root','未规划用例', fc.module_id) as functionCaseModule, tpfc.execute_user as functionCaseExecuteUser,
count(brc.id) as functionCaseBugCount, ifnull(tpfc.last_exec_result, 'PENDING') as functionCaseExecuteResult
from test_plan_functional_case tpfc join functional_case fc on tpfc.functional_case_id = fc.id
left join functional_case_module fcm on fcm.id = fc.module_id
left join bug_relation_case brc on brc.test_plan_case_id = tpfc.id
where fc.deleted = false and tpfc.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpfc.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule"> <select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select fcm.id, fcm.name, fcm.parent_id as parentId from functional_case_module fcm select fcm.id, fcm.name, fcm.parent_id as parentId from functional_case_module fcm
where fcm.project_id = #{id} where fcm.project_id = #{id}

View File

@ -230,12 +230,12 @@ public class TestPlanReportService {
* 3. 汇总报告数据 {执行时跳过} * 3. 汇总报告数据 {执行时跳过}
* 3. 报告后置处理 (计算通过率, 执行率, 执行状态...) {执行时跳过} * 3. 报告后置处理 (计算通过率, 执行率, 执行状态...) {执行时跳过}
*/ */
final Long groupPlanCount = (long) (plans.size() - 1); List<String> childPlanIds = plans.stream().filter(plan -> StringUtils.equals(plan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN)).map(TestPlan::getId).toList();
AtomicReference<String> groupReportId = new AtomicReference<>(); AtomicReference<String> groupReportId = new AtomicReference<>();
plans.forEach(plan -> { plans.forEach(plan -> {
request.setTestPlanId(plan.getId()); request.setTestPlanId(plan.getId());
TestPlanReportGenPreParam genPreParam = buildReportGenParam(request, plan, groupPlanCount, groupReportId.get() != null ? groupReportId.get() : null); TestPlanReportGenPreParam genPreParam = buildReportGenParam(request, plan, groupReportId.get());
TestPlanReport preReport = preGenReport(genPreParam, currentUser, logPath, moduleParam); TestPlanReport preReport = preGenReport(genPreParam, currentUser, logPath, moduleParam, childPlanIds);
if (genPreParam.getIntegrated()) { if (genPreParam.getIntegrated()) {
// 如果是计划组的报告, 初始化组的报告ID // 如果是计划组的报告, 初始化组的报告ID
groupReportId.set(preReport.getId()); groupReportId.set(preReport.getId());
@ -259,10 +259,9 @@ public class TestPlanReportService {
/** /**
* 预生成报告内容(汇总前调用) * 预生成报告内容(汇总前调用)
*
* @return 报告 * @return 报告
*/ */
public TestPlanReport preGenReport(TestPlanReportGenPreParam genParam, String currentUser, String logPath, TestPlanReportModuleParam moduleParam) { public TestPlanReport preGenReport(TestPlanReportGenPreParam genParam, String currentUser, String logPath, TestPlanReportModuleParam moduleParam, List<String> childPlanIds) {
// 计划配置 // 计划配置
TestPlanConfig config = testPlanConfigMapper.selectByPrimaryKey(genParam.getTestPlanId()); TestPlanConfig config = testPlanConfigMapper.selectByPrimaryKey(genParam.getTestPlanId());
@ -283,7 +282,7 @@ public class TestPlanReportService {
testPlanReportMapper.insertSelective(report); testPlanReportMapper.insertSelective(report);
// 报告关联数据 // 报告关联数据
TestPlanReportDetailCaseDTO reportCaseDetail = genReportDetail(genParam, moduleParam, report); TestPlanReportDetailCaseDTO reportCaseDetail = genReportDetail(genParam, moduleParam, report, childPlanIds);
// 报告统计内容 // 报告统计内容
TestPlanReportSummary reportSummary = new TestPlanReportSummary(); TestPlanReportSummary reportSummary = new TestPlanReportSummary();
reportSummary.setId(IDGenerator.nextStr()); reportSummary.setId(IDGenerator.nextStr());
@ -292,7 +291,7 @@ public class TestPlanReportService {
reportSummary.setApiCaseCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiCases()) ? 0 : reportCaseDetail.getApiCases().size())); reportSummary.setApiCaseCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiCases()) ? 0 : reportCaseDetail.getApiCases().size()));
reportSummary.setApiScenarioCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiScenarios()) ? 0 : reportCaseDetail.getApiScenarios().size())); reportSummary.setApiScenarioCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiScenarios()) ? 0 : reportCaseDetail.getApiScenarios().size()));
reportSummary.setBugCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getBugs()) ? 0 : reportCaseDetail.getBugs().size())); reportSummary.setBugCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getBugs()) ? 0 : reportCaseDetail.getBugs().size()));
reportSummary.setPlanCount(genParam.getIntegrated() ? genParam.getPlanCount() : 0); reportSummary.setPlanCount(genParam.getIntegrated() ? (long) childPlanIds.size() : 0);
testPlanReportSummaryMapper.insertSelective(reportSummary); testPlanReportSummaryMapper.insertSelective(reportSummary);
// 报告日志 // 报告日志
@ -302,15 +301,19 @@ public class TestPlanReportService {
/** /**
* 生成报告的关联数据 * 生成报告的关联数据
*
* @param genParam 报告生成的参数 * @param genParam 报告生成的参数
* @param moduleParam 模块参数 * @param moduleParam 模块参数
* @param report 报告 * @param report 报告
*/ */
private TestPlanReportDetailCaseDTO genReportDetail(TestPlanReportGenPreParam genParam, TestPlanReportModuleParam moduleParam, TestPlanReport report) { private TestPlanReportDetailCaseDTO genReportDetail(TestPlanReportGenPreParam genParam, TestPlanReportModuleParam moduleParam, TestPlanReport report, List<String> childPlanIds) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
// 功能用例 // 功能用例
List<TestPlanReportFunctionCase> reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId()); List<TestPlanReportFunctionCase> reportFunctionCases;
if (genParam.getIntegrated()) {
reportFunctionCases = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportFunctionalCaseMapper.getGroupPlanExecuteCases(childPlanIds);
} else {
reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
if (CollectionUtils.isNotEmpty(reportFunctionCases)) { if (CollectionUtils.isNotEmpty(reportFunctionCases)) {
// 用例等级 // 用例等级
List<String> ids = reportFunctionCases.stream().map(TestPlanReportFunctionCase::getFunctionCaseId).distinct().toList(); List<String> ids = reportFunctionCases.stream().map(TestPlanReportFunctionCase::getFunctionCaseId).distinct().toList();
@ -329,7 +332,12 @@ public class TestPlanReportService {
} }
// 接口用例 // 接口用例
List<TestPlanReportApiCase> reportApiCases = extTestPlanReportApiCaseMapper.getPlanExecuteCases(genParam.getTestPlanId()); List<TestPlanReportApiCase> reportApiCases;
if (genParam.getIntegrated()) {
reportApiCases = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportApiCaseMapper.getGroupExecuteCases(childPlanIds);
} else {
reportApiCases = extTestPlanReportApiCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
if (CollectionUtils.isNotEmpty(reportApiCases)) { if (CollectionUtils.isNotEmpty(reportApiCases)) {
reportApiCases.forEach(reportApiCase -> { reportApiCases.forEach(reportApiCase -> {
reportApiCase.setId(IDGenerator.nextStr()); reportApiCase.setId(IDGenerator.nextStr());
@ -343,7 +351,12 @@ public class TestPlanReportService {
} }
// 场景用例 // 场景用例
List<TestPlanReportApiScenario> reportApiScenarios = extTestPlanReportApiScenarioMapper.getPlanExecuteCases(genParam.getTestPlanId()); List<TestPlanReportApiScenario> reportApiScenarios;
if (genParam.getIntegrated()) {
reportApiScenarios = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportApiScenarioMapper.getGroupExecuteCases(childPlanIds);
} else {
reportApiScenarios = extTestPlanReportApiScenarioMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
if (CollectionUtils.isNotEmpty(reportApiScenarios)) { if (CollectionUtils.isNotEmpty(reportApiScenarios)) {
reportApiScenarios.forEach(reportApiScenario -> { reportApiScenarios.forEach(reportApiScenario -> {
reportApiScenario.setId(IDGenerator.nextStr()); reportApiScenario.setId(IDGenerator.nextStr());
@ -357,7 +370,12 @@ public class TestPlanReportService {
} }
// 计划报告缺陷内容 // 计划报告缺陷内容
List<TestPlanReportBug> reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId()); List<TestPlanReportBug> reportBugs;
if (genParam.getIntegrated()) {
reportBugs = extTestPlanReportBugMapper.getGroupBugs(childPlanIds);
} else {
reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId());;
}
// MS处理人会与第三方的值冲突, 分开查询 // MS处理人会与第三方的值冲突, 分开查询
List<SelectOption> headerOptions = bugCommonService.getHeaderHandlerOption(genParam.getProjectId()); List<SelectOption> headerOptions = bugCommonService.getHeaderHandlerOption(genParam.getProjectId());
Map<String, String> headerHandleUserMap = headerOptions.stream().collect(Collectors.toMap(SelectOption::getValue, SelectOption::getText)); Map<String, String> headerHandleUserMap = headerOptions.stream().collect(Collectors.toMap(SelectOption::getValue, SelectOption::getText));
@ -471,12 +489,11 @@ public class TestPlanReportService {
/** /**
* 分页查询报告详情-用例分页数据 * 分页查询报告详情-用例分页数据
*
* @param request 请求参数 * @param request 请求参数
* @return 用例分页数据 * @return 用例分页数据
*/ */
public List<ReportDetailCasePageDTO> listReportDetailCases(TestPlanReportDetailPageRequest request, String caseType) { public List<ReportDetailCasePageDTO> listReportDetailCases(TestPlanReportDetailPageRequest request, String caseType) {
List<ReportDetailCasePageDTO> detailCases = new ArrayList<>(); List<ReportDetailCasePageDTO> detailCases;
switch (caseType) { switch (caseType) {
case AssociateCaseType.FUNCTIONAL -> detailCases = extTestPlanReportFunctionalCaseMapper.list(request); case AssociateCaseType.FUNCTIONAL -> detailCases = extTestPlanReportFunctionalCaseMapper.list(request);
case AssociateCaseType.API_CASE -> detailCases = extTestPlanReportApiCaseMapper.list(request); case AssociateCaseType.API_CASE -> detailCases = extTestPlanReportApiCaseMapper.list(request);
@ -687,11 +704,10 @@ public class TestPlanReportService {
/** /**
* 构建预生成报告的参数 * 构建预生成报告的参数
*
* @param genRequest 报告请求参数 * @param genRequest 报告请求参数
* @return 预生成报告参数 * @return 预生成报告参数
*/ */
private TestPlanReportGenPreParam buildReportGenParam(TestPlanReportGenRequest genRequest, TestPlan testPlan, Long groupPlanCount, String groupReportId) { private TestPlanReportGenPreParam buildReportGenParam(TestPlanReportGenRequest genRequest, TestPlan testPlan, String groupReportId) {
TestPlanReportGenPreParam genPreParam = new TestPlanReportGenPreParam(); TestPlanReportGenPreParam genPreParam = new TestPlanReportGenPreParam();
BeanUtils.copyBean(genPreParam, genRequest); BeanUtils.copyBean(genPreParam, genRequest);
genPreParam.setTestPlanName(testPlan.getName()); genPreParam.setTestPlanName(testPlan.getName());
@ -701,7 +717,6 @@ public class TestPlanReportService {
genPreParam.setResultStatus("-"); genPreParam.setResultStatus("-");
// 是否集成报告(计划组报告), 目前根据是否计划组来区分 // 是否集成报告(计划组报告), 目前根据是否计划组来区分
genPreParam.setIntegrated(StringUtils.equals(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP)); genPreParam.setIntegrated(StringUtils.equals(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP));
genPreParam.setPlanCount(groupPlanCount);
genPreParam.setGroupReportId(groupReportId); genPreParam.setGroupReportId(groupReportId);
return genPreParam; return genPreParam;
} }