1.手动批量上传文件夹图像到项目(单张)

This commit is contained in:
cuizhibin 2025-08-05 20:23:46 +08:00
parent b818eec318
commit ffbf766cee
2 changed files with 8 additions and 3 deletions

View File

@ -99,7 +99,7 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, PartEntity> impleme
if(StrUtil.isNotEmpty(turbine.getProjectId())){
ProjectEntity project = projectService.getById(turbine.getProjectId());
if(null != project){
resp.setProjectId(resp.getProjectId());
resp.setProjectId(project.getProjectId());
resp.setProjectName(project.getProjectName());
}
}

View File

@ -61,11 +61,16 @@ public class ImageController {
return Result.ok(imageService.uploadProjectBatch(projectId, imageSource, collectReq, files));
}
@ApiOperation(value = "手动批量上传文件夹图像到项目(单张)", httpMethod = "POST")
@PostMapping("/{projectId}/{imageSource}/upload")
public Result<ImageReq> uploadProject(@PathVariable String projectId, @PathVariable String imageSource, ImageCollectReq collectReq, @RequestParam("file") MultipartFile file) {
return Result.ok(imageService.uploadProjectBatch(projectId, imageSource, collectReq, new MultipartFile[]{file}).get(0));
}
@ApiOperation(value = "上传图像", httpMethod = "POST")
@PostMapping("/{imageSource}/upload/{partId}")
public Result<ImageReq> uploadOutWork(@PathVariable String imageSource, @PathVariable String partId, ImageCollectReq collectReq, @RequestParam("file") MultipartFile file) {
MultipartFile[] files = {file};
return Result.ok(imageService.batchUploadDefectImage(partId, imageSource, collectReq, files).get(0));
return Result.ok(imageService.batchUploadDefectImage(partId, imageSource, collectReq, new MultipartFile[]{file}).get(0));
}
@ApiOperation(value = "设置信息", httpMethod = "POST")