parent
04b57cb679
commit
ed30e4e74f
|
@ -133,7 +133,16 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
|||
if(isUseCustomId){
|
||||
checkResult = testCaseService.checkCustomIdExist(data.getCustomNum().toString(), projectId);
|
||||
}else {
|
||||
checkResult = testCaseService.checkIdExist(Integer.parseInt(data.getCustomNum()), projectId);
|
||||
int customNumId = -1;
|
||||
try{
|
||||
customNumId = Integer.parseInt(data.getCustomNum());
|
||||
}catch (Exception e){
|
||||
}
|
||||
if(customNumId < 0){
|
||||
stringBuilder.append(Translator.get("id_not_rightful") + "["+data.getCustomNum()+"]; ");
|
||||
}else {
|
||||
checkResult = testCaseService.checkIdExist(customNumId, projectId);
|
||||
}
|
||||
}
|
||||
if (null != checkResult) { //该ID在当前项目中存在
|
||||
//如果前面所经过的校验都没报错
|
||||
|
|
|
@ -68,3 +68,4 @@ id_required=
|
|||
id_repeat_in_table=
|
||||
template_already=
|
||||
expect_name_exists=
|
||||
id_not_rightful=
|
||||
|
|
|
@ -262,4 +262,6 @@ auth_title=Auth
|
|||
# track home
|
||||
api_case=API
|
||||
performance_case=PERFORMANCE
|
||||
scenario_case=SCENARIO
|
||||
scenario_case=SCENARIO
|
||||
|
||||
id_not_rightful=ID is not rightful
|
|
@ -261,4 +261,6 @@ auth_title=系统认证
|
|||
# track home
|
||||
api_case=接口用例
|
||||
performance_case=性能用例
|
||||
scenario_case=场景用例
|
||||
scenario_case=场景用例
|
||||
|
||||
id_not_rightful=ID 不合法
|
|
@ -261,4 +261,6 @@ auth_title=系统认证
|
|||
# track home
|
||||
api_case=接口用例
|
||||
performance_case=性能用例
|
||||
scenario_case=場景用例
|
||||
scenario_case=場景用例
|
||||
|
||||
id_not_rightful=ID 不合法
|
Loading…
Reference in New Issue