diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanTableRequest.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanTableRequest.java index c739547dbd..4b8ec90875 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanTableRequest.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanTableRequest.java @@ -29,6 +29,7 @@ public class TestPlanTableRequest extends BasePageRequest { @Schema(description = "通过其他条件查询出来的,必须要包含的测试计划ID") private List innerIds; private List combineInnerIds; + private String combineOperator; @Schema(description = "是否我的待办, 默认查询全部") private boolean myTodo = false; diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml index e737a5b30a..c4c9c84ee8 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml @@ -137,7 +137,13 @@ --> - and t.id in + and t.id + + in + + + not in + #{id} @@ -214,44 +220,50 @@ - - - - - - or t.id in - ( - SELECT group_id - FROM test_plan - WHERE project_id = #{request.projectId} - AND - - - - - ) - - - - - - - - - - or t.id in - ( - SELECT group_id - FROM test_plan - WHERE project_id = #{request.projectId} - AND + - + - ) + + + or t.id in + ( + SELECT group_id + FROM test_plan + WHERE project_id = #{request.projectId} + AND + + + + + ) + - + + + + + + + + + + + or t.id in + ( + SELECT group_id + FROM test_plan + WHERE project_id = #{request.projectId} + AND + + + + + ) + + + @@ -278,31 +290,35 @@ - - - - - - or t.id in - ( - SELECT group_id - FROM test_plan - WHERE project_id = #{request.projectId} - AND + - + - ) - + + + or t.id in + ( + SELECT group_id + FROM test_plan + WHERE project_id = #{request.projectId} + AND + + + + + ) + + + - - - - + status in + + #{v} + @@ -976,18 +992,20 @@ - - or t.id in - ( - SELECT group_id - FROM test_plan - WHERE project_id = #{request.projectId} - AND - - - - - ) + + + or t.id in + ( + SELECT group_id + FROM test_plan + WHERE project_id = #{request.projectId} + AND + + + + + ) + @@ -1040,18 +1058,20 @@ - - or t.id in - ( - SELECT group_id - FROM test_plan - WHERE project_id = #{request.projectId} - AND - - - - - ) + + + or t.id in + ( + SELECT group_id + FROM test_plan + WHERE project_id = #{request.projectId} + AND + + + + + ) + diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java index 83665bfc2d..6e86d1a5bb 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java @@ -202,6 +202,7 @@ public class TestPlanManagementService { //目前未归档的测试计划只有3中类型。所以这里判断如果是3个的话等于直接查询未归档 if (statusList.size() < 3) { request.setCombineInnerIds(this.selectTestPlanIdByProjectIdAndStatus(request.getProjectId(), statusList)); + request.setCombineOperator(item.getOperator()); } } });