fix(用例管理): 修复脑图移动节点相关问题
--bug=1045175 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045175 --bug=1045166 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045166
This commit is contained in:
parent
b8135f444a
commit
8fb6230632
|
@ -11,6 +11,7 @@ permission.case_review.end_time=评审周期结束时间不得早于当前时间
|
|||
|
||||
#module:FunctionalCase
|
||||
functional_case.module.default.name=未规划用例
|
||||
functional_case.module.default.name.add_error=未规划用例模块下不支持新增模块
|
||||
review.module.default.name=未规划评审
|
||||
functional_case.id.not_blank=ID不能为空
|
||||
functional_case.num.not_blank=业务ID不能为空
|
||||
|
|
|
@ -11,6 +11,7 @@ permission.case_review.endTime=The review cycle end time cannot be earlier than
|
|||
|
||||
#module:FunctionalCase
|
||||
functional_case.module.default.name=Unplanned case
|
||||
functional_case.module.default.name.add_error=New modules are not supported under unplanned use case modules.
|
||||
review.module.default.name=Unplanned review
|
||||
functional_case.id.not_blank=ID cannot be empty
|
||||
functional_case.num.not_blank=Business ID cannot be empty
|
||||
|
|
|
@ -10,6 +10,7 @@ permission.case_review.start_time=评审周期开始时间不得早于当前时
|
|||
permission.case_review.end_time=评审周期结束时间不得早于当前时间
|
||||
#module:FunctionalCase
|
||||
functional_case.module.default.name=未规划用例
|
||||
functional_case.module.default.name.add_error=未规划用例模块下不支持新增模块
|
||||
review.module.default.name=未规划评审
|
||||
functional_case.id.not_blank=ID不能为空
|
||||
functional_case.num.not_blank=业务ID不能为空
|
||||
|
|
|
@ -11,6 +11,7 @@ permission.case_review.end_time=評審週期結束時間不得早於目前時間
|
|||
|
||||
#module:FunctionalCase
|
||||
functional_case.module.default.name=未規劃用例
|
||||
functional_case.module.default.name.add_error=未規劃用例模組下不支援新增模組
|
||||
review.module.default.name=未規劃評審
|
||||
functional_case.id.not_blank=ID不能為空
|
||||
functional_case.num.not_blank=业务ID不能為空
|
||||
|
|
|
@ -814,6 +814,13 @@ public class FunctionalCaseMinderService {
|
|||
//查出已存在同层级的节点
|
||||
Map<String, List<FunctionalCaseModule>> parentIdInDBMap = getParentIdInDBMap(addList,request.getProjectId());
|
||||
for (FunctionalCaseModuleEditRequest functionalCaseModuleEditRequest : addList) {
|
||||
//加限制
|
||||
if (StringUtils.equalsIgnoreCase(functionalCaseModuleEditRequest.getParentId(), "root")) {
|
||||
throw new MSException(Translator.get("functional_case.module.default.name.add_error"));
|
||||
}
|
||||
if(StringUtils.equalsIgnoreCase(functionalCaseModuleEditRequest.getName(),Translator.get("functional_case.module.default.name")) && StringUtils.equalsIgnoreCase(functionalCaseModuleEditRequest.getParentId(), "NONE")){
|
||||
throw new MSException(Translator.get("node.name.repeat"));
|
||||
}
|
||||
FunctionalCaseModule functionalCaseModule = buildModule(request, userId, functionalCaseModuleEditRequest);
|
||||
modules.add(functionalCaseModule);
|
||||
sourceIdAndInsertIdMap.put(functionalCaseModuleEditRequest.getId(), functionalCaseModule.getId());
|
||||
|
@ -833,6 +840,10 @@ public class FunctionalCaseMinderService {
|
|||
List<FunctionalCaseModule> modules = new ArrayList<>();
|
||||
Map<String, List<FunctionalCaseModule>> parentIdInDBMap = getParentIdInDBMap(updateList, request.getProjectId());
|
||||
for (FunctionalCaseModuleEditRequest functionalCaseModuleEditRequest : updateList) {
|
||||
//加限制
|
||||
if (StringUtils.equalsIgnoreCase(functionalCaseModuleEditRequest.getParentId(), "root")) {
|
||||
throw new MSException(Translator.get("functional_case.module.default.name.add_error"));
|
||||
}
|
||||
FunctionalCaseModule updateModule = updateModule(userId, functionalCaseModuleEditRequest);
|
||||
modules.add(updateModule);
|
||||
updateTargetIdsMap(functionalCaseModuleEditRequest.getId(), functionalCaseModuleEditRequest.getTargetId(), sourceIdAndTargetIdsMap);
|
||||
|
|
Loading…
Reference in New Issue