fix(工作台): 修复计划概览测试计划下拉数据包含归档数据问题

--bug=1050536 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050536
This commit is contained in:
guoyuqi 2024-12-17 15:31:51 +08:00 committed by Craftsman
parent 7bd422d0a5
commit 1619f01882
1 changed files with 1 additions and 1 deletions

View File

@ -1827,7 +1827,7 @@ public class DashboardService {
List<CascadeChildrenDTO> cascadeDTOList = new ArrayList<>();
List<TestPlanAndGroupInfoDTO> groupAndPlanInfo = extTestPlanMapper.getGroupAndPlanInfo(projectId);
TestPlanExample testPlanExample = new TestPlanExample();
testPlanExample.createCriteria().andProjectIdEqualTo(projectId).andTypeEqualTo(TestPlanConstants.TEST_PLAN_TYPE_PLAN).andGroupIdEqualTo(NONE);
testPlanExample.createCriteria().andProjectIdEqualTo(projectId).andTypeEqualTo(TestPlanConstants.TEST_PLAN_TYPE_PLAN).andGroupIdEqualTo(NONE).andStatusEqualTo(TestPlanConstants.TEST_PLAN_STATUS_NOT_ARCHIVED);
testPlanExample.setOrderByClause(" create_time DESC ");
List<TestPlan> testPlans = testPlanMapper.selectByExample(testPlanExample);
Map<String, List<TestPlanAndGroupInfoDTO>> groupMap = groupAndPlanInfo.stream().sorted(Comparator.comparing(TestPlanAndGroupInfoDTO::getGroupCreateTime).reversed()).collect(Collectors.groupingBy(TestPlanAndGroupInfoDTO::getGroupId));