From 55e7ebba8eebb122d6cd183b34f601e9f99a5cfc Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 29 Sep 2021 18:33:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E8=B4=9F=E8=B4=A3=E4=BA=BA=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/domain/TestPlan.java | 6 +- .../base/domain/TestPlanExample.java | 190 ++++++------------ .../base/mapper/TestPlanMapper.xml | 77 +++---- .../base/mapper/ext/ExtTestPlanMapper.xml | 9 +- .../track/controller/TestPlanController.java | 5 - .../track/domain/ReportBaseInfoComponent.java | 31 ++- .../track/dto/TestPlanReportDTO.java | 1 + .../track/service/TestPlanReportService.java | 29 ++- .../track/service/TestPlanService.java | 12 -- .../db/migration/V97__v1.14_release.sql | 1 + .../home/components/RelatedTestPlanList.vue | 113 ----------- 11 files changed, 150 insertions(+), 324 deletions(-) create mode 100644 backend/src/main/resources/db/migration/V97__v1.14_release.sql delete mode 100644 frontend/src/business/components/track/home/components/RelatedTestPlanList.vue diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java index b4583a57a0..9e1bc7b35d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -19,8 +19,6 @@ public class TestPlan implements Serializable { private String stage; - private String principal; - private String testCaseMatchRule; private String executorMatchRule; @@ -29,14 +27,14 @@ public class TestPlan implements Serializable { private Long updateTime; + private Long actualEndTime; + private Long plannedStartTime; private Long plannedEndTime; private Long actualStartTime; - private Long actualEndTime; - private String creator; private String projectId; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java index 34eb96ce0f..84d6f7619b 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java @@ -594,76 +594,6 @@ public class TestPlanExample { return (Criteria) this; } - public Criteria andPrincipalIsNull() { - addCriterion("principal is null"); - return (Criteria) this; - } - - public Criteria andPrincipalIsNotNull() { - addCriterion("principal is not null"); - return (Criteria) this; - } - - public Criteria andPrincipalEqualTo(String value) { - addCriterion("principal =", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotEqualTo(String value) { - addCriterion("principal <>", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalGreaterThan(String value) { - addCriterion("principal >", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalGreaterThanOrEqualTo(String value) { - addCriterion("principal >=", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLessThan(String value) { - addCriterion("principal <", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLessThanOrEqualTo(String value) { - addCriterion("principal <=", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLike(String value) { - addCriterion("principal like", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotLike(String value) { - addCriterion("principal not like", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalIn(List values) { - addCriterion("principal in", values, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotIn(List values) { - addCriterion("principal not in", values, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalBetween(String value1, String value2) { - addCriterion("principal between", value1, value2, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotBetween(String value1, String value2) { - addCriterion("principal not between", value1, value2, "principal"); - return (Criteria) this; - } - public Criteria andTestCaseMatchRuleIsNull() { addCriterion("test_case_match_rule is null"); return (Criteria) this; @@ -924,6 +854,66 @@ public class TestPlanExample { return (Criteria) this; } + public Criteria andActualEndTimeIsNull() { + addCriterion("actual_end_time is null"); + return (Criteria) this; + } + + public Criteria andActualEndTimeIsNotNull() { + addCriterion("actual_end_time is not null"); + return (Criteria) this; + } + + public Criteria andActualEndTimeEqualTo(Long value) { + addCriterion("actual_end_time =", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeNotEqualTo(Long value) { + addCriterion("actual_end_time <>", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeGreaterThan(Long value) { + addCriterion("actual_end_time >", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("actual_end_time >=", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeLessThan(Long value) { + addCriterion("actual_end_time <", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeLessThanOrEqualTo(Long value) { + addCriterion("actual_end_time <=", value, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeIn(List values) { + addCriterion("actual_end_time in", values, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeNotIn(List values) { + addCriterion("actual_end_time not in", values, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeBetween(Long value1, Long value2) { + addCriterion("actual_end_time between", value1, value2, "actualEndTime"); + return (Criteria) this; + } + + public Criteria andActualEndTimeNotBetween(Long value1, Long value2) { + addCriterion("actual_end_time not between", value1, value2, "actualEndTime"); + return (Criteria) this; + } + public Criteria andPlannedStartTimeIsNull() { addCriterion("planned_start_time is null"); return (Criteria) this; @@ -1104,66 +1094,6 @@ public class TestPlanExample { return (Criteria) this; } - public Criteria andActualEndTimeIsNull() { - addCriterion("actual_end_time is null"); - return (Criteria) this; - } - - public Criteria andActualEndTimeIsNotNull() { - addCriterion("actual_end_time is not null"); - return (Criteria) this; - } - - public Criteria andActualEndTimeEqualTo(Long value) { - addCriterion("actual_end_time =", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeNotEqualTo(Long value) { - addCriterion("actual_end_time <>", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeGreaterThan(Long value) { - addCriterion("actual_end_time >", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeGreaterThanOrEqualTo(Long value) { - addCriterion("actual_end_time >=", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeLessThan(Long value) { - addCriterion("actual_end_time <", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeLessThanOrEqualTo(Long value) { - addCriterion("actual_end_time <=", value, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeIn(List values) { - addCriterion("actual_end_time in", values, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeNotIn(List values) { - addCriterion("actual_end_time not in", values, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeBetween(Long value1, Long value2) { - addCriterion("actual_end_time between", value1, value2, "actualEndTime"); - return (Criteria) this; - } - - public Criteria andActualEndTimeNotBetween(Long value1, Long value2) { - addCriterion("actual_end_time not between", value1, value2, "actualEndTime"); - return (Criteria) this; - } - public Criteria andCreatorIsNull() { addCriterion("creator is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml index 55f7ce6105..16ba93b94f 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml @@ -9,15 +9,14 @@ - + - @@ -87,9 +86,9 @@ - id, workspace_id, report_id, `name`, description, `status`, stage, principal, test_case_match_rule, - executor_match_rule, create_time, update_time, planned_start_time, planned_end_time, - actual_start_time, actual_end_time, creator, project_id, execution_times, automatic_status_update + id, workspace_id, report_id, `name`, description, `status`, stage, test_case_match_rule, + executor_match_rule, create_time, update_time, actual_end_time, planned_start_time, + planned_end_time, actual_start_time, creator, project_id, execution_times, automatic_status_update tags, report_summary, report_config @@ -145,20 +144,20 @@ insert into test_plan (id, workspace_id, report_id, `name`, description, `status`, - stage, principal, test_case_match_rule, - executor_match_rule, create_time, update_time, + stage, test_case_match_rule, executor_match_rule, + create_time, update_time, actual_end_time, planned_start_time, planned_end_time, actual_start_time, - actual_end_time, creator, project_id, - execution_times, automatic_status_update, tags, - report_summary, report_config) + creator, project_id, execution_times, + automatic_status_update, tags, report_summary, + report_config) values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, - #{stage,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR}, - #{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{stage,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR}, #{executorMatchRule,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{actualEndTime,jdbcType=BIGINT}, #{plannedStartTime,jdbcType=BIGINT}, #{plannedEndTime,jdbcType=BIGINT}, #{actualStartTime,jdbcType=BIGINT}, - #{actualEndTime,jdbcType=BIGINT}, #{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, - #{executionTimes,jdbcType=INTEGER}, #{automaticStatusUpdate,jdbcType=BIT}, #{tags,jdbcType=LONGVARCHAR}, - #{reportSummary,jdbcType=LONGVARCHAR}, #{reportConfig,jdbcType=LONGVARCHAR}) + #{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{executionTimes,jdbcType=INTEGER}, + #{automaticStatusUpdate,jdbcType=BIT}, #{tags,jdbcType=LONGVARCHAR}, #{reportSummary,jdbcType=LONGVARCHAR}, + #{reportConfig,jdbcType=LONGVARCHAR}) insert into test_plan @@ -184,9 +183,6 @@ stage, - - principal, - test_case_match_rule, @@ -199,6 +195,9 @@ update_time, + + actual_end_time, + planned_start_time, @@ -208,9 +207,6 @@ actual_start_time, - - actual_end_time, - creator, @@ -255,9 +251,6 @@ #{stage,jdbcType=VARCHAR}, - - #{principal,jdbcType=VARCHAR}, - #{testCaseMatchRule,jdbcType=VARCHAR}, @@ -270,6 +263,9 @@ #{updateTime,jdbcType=BIGINT}, + + #{actualEndTime,jdbcType=BIGINT}, + #{plannedStartTime,jdbcType=BIGINT}, @@ -279,9 +275,6 @@ #{actualStartTime,jdbcType=BIGINT}, - - #{actualEndTime,jdbcType=BIGINT}, - #{creator,jdbcType=VARCHAR}, @@ -335,9 +328,6 @@ stage = #{record.stage,jdbcType=VARCHAR}, - - principal = #{record.principal,jdbcType=VARCHAR}, - test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, @@ -350,6 +340,9 @@ update_time = #{record.updateTime,jdbcType=BIGINT}, + + actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, + planned_start_time = #{record.plannedStartTime,jdbcType=BIGINT}, @@ -359,9 +352,6 @@ actual_start_time = #{record.actualStartTime,jdbcType=BIGINT}, - - actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, - creator = #{record.creator,jdbcType=VARCHAR}, @@ -397,15 +387,14 @@ description = #{record.description,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, stage = #{record.stage,jdbcType=VARCHAR}, - principal = #{record.principal,jdbcType=VARCHAR}, test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, + actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, planned_start_time = #{record.plannedStartTime,jdbcType=BIGINT}, planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT}, actual_start_time = #{record.actualStartTime,jdbcType=BIGINT}, - actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, creator = #{record.creator,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR}, execution_times = #{record.executionTimes,jdbcType=INTEGER}, @@ -426,15 +415,14 @@ description = #{record.description,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, stage = #{record.stage,jdbcType=VARCHAR}, - principal = #{record.principal,jdbcType=VARCHAR}, test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, + actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, planned_start_time = #{record.plannedStartTime,jdbcType=BIGINT}, planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT}, actual_start_time = #{record.actualStartTime,jdbcType=BIGINT}, - actual_end_time = #{record.actualEndTime,jdbcType=BIGINT}, creator = #{record.creator,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR}, execution_times = #{record.executionTimes,jdbcType=INTEGER}, @@ -464,9 +452,6 @@ stage = #{stage,jdbcType=VARCHAR}, - - principal = #{principal,jdbcType=VARCHAR}, - test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, @@ -479,6 +464,9 @@ update_time = #{updateTime,jdbcType=BIGINT}, + + actual_end_time = #{actualEndTime,jdbcType=BIGINT}, + planned_start_time = #{plannedStartTime,jdbcType=BIGINT}, @@ -488,9 +476,6 @@ actual_start_time = #{actualStartTime,jdbcType=BIGINT}, - - actual_end_time = #{actualEndTime,jdbcType=BIGINT}, - creator = #{creator,jdbcType=VARCHAR}, @@ -523,15 +508,14 @@ description = #{description,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, stage = #{stage,jdbcType=VARCHAR}, - principal = #{principal,jdbcType=VARCHAR}, test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, + actual_end_time = #{actualEndTime,jdbcType=BIGINT}, planned_start_time = #{plannedStartTime,jdbcType=BIGINT}, planned_end_time = #{plannedEndTime,jdbcType=BIGINT}, actual_start_time = #{actualStartTime,jdbcType=BIGINT}, - actual_end_time = #{actualEndTime,jdbcType=BIGINT}, creator = #{creator,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR}, execution_times = #{executionTimes,jdbcType=INTEGER}, @@ -549,15 +533,14 @@ description = #{description,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, stage = #{stage,jdbcType=VARCHAR}, - principal = #{principal,jdbcType=VARCHAR}, test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, + actual_end_time = #{actualEndTime,jdbcType=BIGINT}, planned_start_time = #{plannedStartTime,jdbcType=BIGINT}, planned_end_time = #{plannedEndTime,jdbcType=BIGINT}, actual_start_time = #{actualStartTime,jdbcType=BIGINT}, - actual_end_time = #{actualEndTime,jdbcType=BIGINT}, creator = #{creator,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR}, execution_times = #{executionTimes,jdbcType=INTEGER}, diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml index c3d59eafa0..cce10ede57 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml @@ -64,12 +64,6 @@ - - and test_plan.principal - - - - and test_plan.create_time @@ -98,11 +92,10 @@