|
@ -205,6 +205,43 @@ public class TestReportController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* AI训练基准性能测试工具-上传测试结果 |
|
|
|
|
|
* |
|
|
|
|
|
*/ |
|
|
|
|
|
@Log(title = "测试任务管理", businessType = BusinessType.INSERT) |
|
|
|
|
|
@PostMapping(value = "/uploadResult4AiTraining", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
|
|
|
|
|
public R upload( @RequestPart("file") MultipartFile file,@RequestPart("img1") MultipartFile img1,@RequestPart("img2") MultipartFile img2, |
|
|
|
|
|
@RequestPart("id") String id) { |
|
|
|
|
|
|
|
|
|
|
|
if (id == null) { |
|
|
|
|
|
return R.fail("测试任务id不能为空!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TestReport testReport = new TestReport(); |
|
|
|
|
|
testReport.setId(Long.parseLong(id)); |
|
|
|
|
|
if(file != null ){ |
|
|
|
|
|
SysOssVo toolVo = iSysOssService.upload(file,true); |
|
|
|
|
|
testReport.setResultPath(toolVo.getOriginalName()); |
|
|
|
|
|
testReport.setResultOssId(toolVo.getOssId()); |
|
|
|
|
|
} |
|
|
|
|
|
if(img1 != null ){ |
|
|
|
|
|
SysOssVo toolVo = iSysOssService.upload(img1,true); |
|
|
|
|
|
testReport.setResult2Path(toolVo.getOriginalName()); |
|
|
|
|
|
testReport.setResult2OssId(toolVo.getOssId()); |
|
|
|
|
|
} |
|
|
|
|
|
if(img2 != null ){ |
|
|
|
|
|
SysOssVo toolVo = iSysOssService.upload(img2,true); |
|
|
|
|
|
testReport.setResult3Path(toolVo.getOriginalName()); |
|
|
|
|
|
testReport.setResult3OssId(toolVo.getOssId()); |
|
|
|
|
|
} |
|
|
|
|
|
testReport.setTestStatus("测试完成"); |
|
|
|
|
|
testReport.setUpdateTime(new Date()); |
|
|
|
|
|
testReportService.updateById(testReport); |
|
|
|
|
|
return R.ok("操作成功!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 前端用户-上传测试内容/测试模型 |
|
|
* 前端用户-上传测试内容/测试模型 |
|
|
* |
|
|
* |
|
|