|
@ -50,7 +50,7 @@ public class TestReportController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 分页查询 |
|
|
|
|
|
|
|
|
* 测试数据-分页查询 |
|
|
* @param |
|
|
* @param |
|
|
* @param |
|
|
* @param |
|
|
* @return |
|
|
* @return |
|
@ -116,35 +116,33 @@ public class TestReportController { |
|
|
return dataInfo; |
|
|
return dataInfo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// /** |
|
|
|
|
|
// * 上传测试报告文件 |
|
|
|
|
|
// * |
|
|
|
|
|
// */ |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 后台管理-上传测试报告文件 |
|
|
|
|
|
* |
|
|
|
|
|
*/ |
|
|
@Log(title = "测试报告管理", businessType = BusinessType.INSERT) |
|
|
@Log(title = "测试报告管理", businessType = BusinessType.INSERT) |
|
|
@PostMapping(value = "/uploadReport", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
|
|
@PostMapping(value = "/uploadReport", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
|
|
public R upload( @RequestPart("file") MultipartFile file, |
|
|
public R upload( @RequestPart("file") MultipartFile file, |
|
|
@RequestPart("reportName") String reportName) { |
|
|
|
|
|
|
|
|
@RequestPart("id") Long id) { |
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(reportName)) { |
|
|
|
|
|
return R.fail("报告名称不能为空!"); |
|
|
|
|
|
|
|
|
if (id == null) { |
|
|
|
|
|
return R.fail("测试报告id不能为空!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// testReportService.check(reportName); |
|
|
|
|
|
TestReport testReport = new TestReport(); |
|
|
TestReport testReport = new TestReport(); |
|
|
testReport.setReportName(reportName); |
|
|
|
|
|
|
|
|
testReport.setId(id); |
|
|
if(file != null ){ |
|
|
if(file != null ){ |
|
|
SysOssVo toolVo = iSysOssService.upload(file,true); |
|
|
SysOssVo toolVo = iSysOssService.upload(file,true); |
|
|
testReport.setReportPath(toolVo.getOriginalName()); |
|
|
testReport.setReportPath(toolVo.getOriginalName()); |
|
|
testReport.setReportOssId(toolVo.getOssId()); |
|
|
testReport.setReportOssId(toolVo.getOssId()); |
|
|
} |
|
|
} |
|
|
testReport.setUpdateType("报告"); |
|
|
|
|
|
testReportService.save(testReport); |
|
|
testReportService.save(testReport); |
|
|
return R.ok("操作成功!"); |
|
|
return R.ok("操作成功!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 上传测试数据 |
|
|
|
|
|
|
|
|
* 前端用户-上传测试数据 |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
@SneakyThrows |
|
|
@SneakyThrows |
|
@ -165,7 +163,7 @@ public class TestReportController { |
|
|
testReport.setReportPath(toolVo.getOriginalName()); |
|
|
testReport.setReportPath(toolVo.getOriginalName()); |
|
|
testReport.setReportOssId(toolVo.getOssId()); |
|
|
testReport.setReportOssId(toolVo.getOssId()); |
|
|
} |
|
|
} |
|
|
testReport.setUpdateType("测试数据"); |
|
|
|
|
|
|
|
|
|
|
|
testReportService.save(testReport); |
|
|
testReportService.save(testReport); |
|
|
return R.ok("操作成功!"); |
|
|
return R.ok("操作成功!"); |
|
|
} |
|
|
} |
|
@ -190,11 +188,10 @@ public class TestReportController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 下载测试数据 |
|
|
|
|
|
|
|
|
* 前端用户-下载测试数据/后端下载测试结果 |
|
|
* |
|
|
* |
|
|
* @param ossId OSS对象ID |
|
|
* @param ossId OSS对象ID |
|
|
*/ |
|
|
*/ |
|
|
@SaCheckPermission("system:oss:download") |
|
|
|
|
|
@GetMapping("/downloadTestData/{ossId}") |
|
|
@GetMapping("/downloadTestData/{ossId}") |
|
|
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException { |
|
|
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException { |
|
|
|
|
|
|
|
|