|
|
|
@ -1,10 +1,13 @@
|
|
|
|
|
package com.docus.server.controller;
|
|
|
|
|
|
|
|
|
|
import com.docus.server.common.service.IFileUploadService;
|
|
|
|
|
import com.docus.server.dto.segmentation.UploadBatchFileRequest;
|
|
|
|
|
import com.docus.server.vo.scheduling.management.schcollectorversionfile.UploadFileVO;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
@ -14,6 +17,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 文件上传下载 API
|
|
|
|
@ -39,8 +43,9 @@ public class FileController {
|
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
@ApiImplicitParam(name = "files", value = "文件", required = true, dataTypeClass = MultipartFile.class)
|
|
|
|
|
})
|
|
|
|
|
public void uploadFile(@RequestPart("files") MultipartFile[] files, String pathKey) throws Exception {
|
|
|
|
|
iFileUploadService.uploadFile(files, pathKey);
|
|
|
|
|
public void uploadFile(@RequestPart("files") MultipartFile[] files, @Validated UploadBatchFileRequest request) throws Exception {
|
|
|
|
|
List<UploadFileVO> segmentation = iFileUploadService.uploadFile(files, "segmentation");
|
|
|
|
|
//将基础信息存到库表里面,后面自动分段后,需要上传到归档系统
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|