fix: 修复案例导入继续导入失败的问题;案例导入模板增加批注

修复案例导入继续导入失败的问题;案例导入模板增加批注
This commit is contained in:
song-tianyang 2021-05-26 18:26:40 +08:00 committed by fit2-zhao
parent 77e7d06b9f
commit 55d3661616
3 changed files with 8 additions and 6 deletions

View File

@ -90,10 +90,12 @@ public class TestResult {
if (StringUtils.isNotEmpty(subItem.getName()) && subItem.getName().indexOf(SEPARATOR) != -1) {
String array[] = subItem.getName().split(SEPARATOR);
subItem.setName(array[0]);
if (StringUtils.isNotEmpty(subItem.getScenario())) {
List<String> id_names = JSON.parseObject(subItem.getScenario(), List.class);
this.setStatus(id_names, subItem.getError() > 0);
}
try{
if (StringUtils.isNotEmpty(subItem.getScenario())) {
List<String> id_names = JSON.parseObject(subItem.getScenario(), List.class);
this.setStatus(id_names, subItem.getError() > 0);
}
}catch (Exception e){}
}
});
}

View File

@ -43,7 +43,7 @@ public class FunctionCaseTemplateWriteHandler extends AbstractRowHeightStyleStra
// 在第一行 第1列创建一个批注
Comment comment1 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, (short) 0, 0, (short) 3, 1));
// 输入批注信息
comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order")));
comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order")+""+Translator.get("id_required")));
// 在第一行 第3列创建一个批注
Comment comment2 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, (short) 2, 0, (short) 3, 1));

View File

@ -160,7 +160,7 @@ public class TestCaseController {
return testCaseService.testCaseImport(file, projectId, userId, importType,request);
}
@PostMapping("/importIgnoreError/{projectId}/{userId}")
@PostMapping("/importIgnoreError/{projectId}/{userId}/{importType}")
@MsAuditLog(module = "track_test_case", type = OperLogConstants.IMPORT, project = "#projectId")
public ExcelResponse testCaseImportIgnoreError(MultipartFile file, @PathVariable String projectId, @PathVariable String userId, @PathVariable String importType, HttpServletRequest request) {
checkPermissionService.checkProjectOwner(projectId);