|
@@ -47,6 +47,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.io.BufferedInputStream;
|
|
import java.io.BufferedInputStream;
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
+import java.io.InputStream;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.zip.ZipEntry;
|
|
import java.util.zip.ZipEntry;
|
|
@@ -822,6 +823,24 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// private void downloadDependFile(String minioPath, String localPath) throws IOException {
|
|
|
|
+// FileDownService fileDownService = ApplicationContextAwareImpl.getApplicationContext().getBean(FileDownService.class);
|
|
|
|
+// Response download = fileDownService.download(MinioParameter.builder().objectName(minioPath).build());
|
|
|
|
+// Response.Body body = download.body();
|
|
|
|
+// InputStream inputStream;
|
|
|
|
+// inputStream = body.asInputStream();
|
|
|
|
+// File file = new File(localPath);
|
|
|
|
+// OutputStream outputStream = Files.newOutputStream(file.toPath());
|
|
|
|
+// byte[] buffer = new byte[1024];
|
|
|
|
+// int bytesRead;
|
|
|
|
+// while ((bytesRead = inputStream.read(buffer)) != -1) {
|
|
|
|
+// outputStream.write(buffer, 0, bytesRead);
|
|
|
|
+// }
|
|
|
|
+// inputStream.close();
|
|
|
|
+// outputStream.close();
|
|
|
|
+// download.close();
|
|
|
|
+// }
|
|
|
|
+
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
public void exportProjectTaskFileById(MultiSimulationProjectParam param){
|
|
public void exportProjectTaskFileById(MultiSimulationProjectParam param){
|
|
String projectId = param.getProjectId();
|
|
String projectId = param.getProjectId();
|
|
@@ -886,11 +905,13 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
|
|
Response.Body body = down.body();
|
|
Response.Body body = down.body();
|
|
ZipEntry entry2 = new ZipEntry(zipPath);
|
|
ZipEntry entry2 = new ZipEntry(zipPath);
|
|
zos.putNextEntry(entry2);
|
|
zos.putNextEntry(entry2);
|
|
- BufferedInputStream in = new BufferedInputStream(body.asInputStream());
|
|
|
|
|
|
+// BufferedInputStream in = new BufferedInputStream(body.asInputStream());
|
|
|
|
+ InputStream in = body.asInputStream();
|
|
while ((len = in.read(buffer)) != -1) {
|
|
while ((len = in.read(buffer)) != -1) {
|
|
zos.write(buffer, 0, len);
|
|
zos.write(buffer, 0, len);
|
|
}
|
|
}
|
|
in.close();
|
|
in.close();
|
|
|
|
+
|
|
}else if ("Ego.csv".equals(fileName) || "evaluation.csv".equals(fileName)) {
|
|
}else if ("Ego.csv".equals(fileName) || "evaluation.csv".equals(fileName)) {
|
|
MinioParameter minioPar = new MinioParameter();
|
|
MinioParameter minioPar = new MinioParameter();
|
|
minioPar.setObjectName(s);
|
|
minioPar.setObjectName(s);
|