refactor(用例管理):用例评审详情计算生成默认模块
This commit is contained in:
parent
b3822a3607
commit
85cf4dad20
|
@ -618,9 +618,9 @@ public class CaseReviewFunctionalCaseService {
|
||||||
returnList.add(projectNode);
|
returnList.add(projectNode);
|
||||||
List<String> projectModuleIds = moduleList.stream().map(FunctionalCaseModule::getId).toList();
|
List<String> projectModuleIds = moduleList.stream().map(FunctionalCaseModule::getId).toList();
|
||||||
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(projectModuleIds);
|
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(projectModuleIds);
|
||||||
List<BaseTreeNode> list = nodeByNodeIds.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getId(), ModuleConstants.DEFAULT_NODE_ID.toString())).toList();
|
List<BaseTreeNode> list = nodeByNodeIds.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getId(), ModuleConstants.DEFAULT_NODE_ID)).toList();
|
||||||
boolean haveVirtualRootNode = list.isEmpty();
|
boolean haveVirtualRootNode = list.isEmpty();
|
||||||
List<BaseTreeNode> baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, haveVirtualRootNode, Translator.get("default.module"));
|
List<BaseTreeNode> baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, !haveVirtualRootNode, Translator.get("default.module"));
|
||||||
for (BaseTreeNode baseTreeNode : baseTreeNodes) {
|
for (BaseTreeNode baseTreeNode : baseTreeNodes) {
|
||||||
projectNode.addChild(baseTreeNode);
|
projectNode.addChild(baseTreeNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue