refactor(测试计划): 模块树count统计
This commit is contained in:
parent
d24611260c
commit
0164319960
|
@ -85,9 +85,9 @@
|
|||
</select>
|
||||
|
||||
<select id="selectIdByProjectIdAndTestPlanId" resultType="java.lang.String">
|
||||
SELECT tpm.id, tpm.project_id
|
||||
FROM test_plan_module tpm
|
||||
WHERE tpm.id IN
|
||||
SELECT fcm.id, fcm.project_id
|
||||
FROM functional_case_module fcm
|
||||
WHERE fcm.id IN
|
||||
(SELECT fc.module_id FROM functional_case fc LEFT JOIN test_plan_functional_case tpfc ON tpfc.functional_case_id = fc.id WHERE tpfc.test_plan_id = #{testPlanId} AND fc.deleted = false and fc.project_id = #{projectId})
|
||||
</select>
|
||||
</mapper>
|
|
@ -299,14 +299,14 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
|||
List<BaseTreeNode> treeNodeList = this.getTreeOnlyIdsAndResourceCount(projectId, testPlanId, moduleCountDTOList);
|
||||
|
||||
//通过广度遍历的方式构建返回值
|
||||
return testPlanModuleService.getIdCountMapByBreadth(treeNodeList);
|
||||
return functionalCaseModuleService.getIdCountMapByBreadth(treeNodeList);
|
||||
}
|
||||
|
||||
public List<BaseTreeNode> getTreeOnlyIdsAndResourceCount(String projectId, String testPlanId, List<ModuleCountDTO> moduleCountDTOList) {
|
||||
//节点内容只有Id和parentId
|
||||
List<String> moduleIds = extTestPlanModuleMapper.selectIdByProjectIdAndTestPlanId(projectId, testPlanId);
|
||||
List<BaseTreeNode> nodeByNodeIds = testPlanModuleService.getNodeByNodeIds(moduleIds);
|
||||
return testPlanModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("functional_case.module.default.name"));
|
||||
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds);
|
||||
return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("functional_case.module.default.name"));
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue