fix(测试计划): 修复默认模块的测试计划不显示模块的缺陷

This commit is contained in:
wxg0103 2024-06-19 10:30:40 +08:00 committed by Craftsman
parent 61ff20b5ac
commit 30ae2bc8da
1 changed files with 11 additions and 8 deletions

View File

@ -485,6 +485,8 @@ public class TestPlanService extends TestPlanBaseUtilsService {
TestPlanModule module = testPlanModuleMapper.selectByPrimaryKey(testPlan.getModuleId()); TestPlanModule module = testPlanModuleMapper.selectByPrimaryKey(testPlan.getModuleId());
moduleName = module == null ? Translator.get("unplanned.plan") : module.getName(); moduleName = module == null ? Translator.get("unplanned.plan") : module.getName();
response.setModuleId(module == null ? ModuleConstants.DEFAULT_NODE_ID : module.getId()); response.setModuleId(module == null ? ModuleConstants.DEFAULT_NODE_ID : module.getId());
} else {
response.setModuleId(ModuleConstants.DEFAULT_NODE_ID);
} }
//计划组只有几个参数 //计划组只有几个参数
@ -527,6 +529,7 @@ public class TestPlanService extends TestPlanBaseUtilsService {
/** /**
* 关联的资源初始化默认测试集 * 关联的资源初始化默认测试集
*
* @param planId 计划ID * @param planId 计划ID
* @param allCollections 测试集 * @param allCollections 测试集
*/ */
@ -953,7 +956,7 @@ public class TestPlanService extends TestPlanBaseUtilsService {
BeanUtils.copyBean(childCollectionDTO, childCollection); BeanUtils.copyBean(childCollectionDTO, childCollection);
parentCollectionDTO.setChildren(List.of(childCollectionDTO)); parentCollectionDTO.setChildren(List.of(childCollectionDTO));
// 更新pos // 更新pos
initPos ++; initPos++;
collectionDTOS.add(parentCollectionDTO); collectionDTOS.add(parentCollectionDTO);
} }