|
@@ -290,15 +290,15 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
|
|
if (list != null && list.size() > 0) {
|
|
if (list != null && list.size() > 0) {
|
|
String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
|
|
String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
|
|
for (ArchiveFile file : list) {
|
|
for (ArchiveFile file : list) {
|
|
- if (StringUtil.isNotBlank(file.getFileUrl())) {
|
|
|
|
- String fileUrl = file.getFileUrl();
|
|
|
|
- String fileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1);
|
|
|
|
- InputStream file_out = CommonUtil.getOSSInputStream(fileUrl);
|
|
|
|
- if (file_out != null) {
|
|
|
|
- CommonUtil.inputStreamToFile(file_out, new File(localUrl + fileName));
|
|
|
|
- file.setFileUrl(fileName);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// if (StringUtil.isNotBlank(file.getFileUrl())) {
|
|
|
|
+// String fileUrl = file.getFileUrl();
|
|
|
|
+// String fileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1);
|
|
|
|
+// InputStream file_out = CommonUtil.getOSSInputStream(fileUrl);
|
|
|
|
+// if (file_out != null) {
|
|
|
|
+// CommonUtil.inputStreamToFile(file_out, new File(localUrl + fileName));
|
|
|
|
+// file.setFileUrl(fileName);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
if (StringUtil.isNotBlank(file.getPdfFileUrl())) {
|
|
if (StringUtil.isNotBlank(file.getPdfFileUrl())) {
|
|
String pdfFileUrl = file.getPdfFileUrl();
|
|
String pdfFileUrl = file.getPdfFileUrl();
|
|
String fileName = pdfFileUrl.substring(pdfFileUrl.lastIndexOf('/') + 1);
|
|
String fileName = pdfFileUrl.substring(pdfFileUrl.lastIndexOf('/') + 1);
|
|
@@ -402,23 +402,23 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
|
|
if (list != null && list.size() > 0) {
|
|
if (list != null && list.size() > 0) {
|
|
String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
|
|
String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
|
|
//拼接档案里文件的pdf设置allPdf
|
|
//拼接档案里文件的pdf设置allPdf
|
|
- for (ArchivesAutoDTO dto : list) {
|
|
|
|
- List<ArchiveFile> files = fileClient.getArchiveFileByArchivesId(dto.getId() + "", "");
|
|
|
|
- if (files != null && files.size() > 0) {
|
|
|
|
- List<String> urlList = new ArrayList<>();
|
|
|
|
- for (ArchiveFile file : files) {
|
|
|
|
- if (StringUtil.isNotBlank(file.getPdfFileUrl())) {
|
|
|
|
- urlList.add(file.getPdfFileUrl());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (urlList.size() > 0) {
|
|
|
|
- Long id = SnowFlakeUtil.getId();
|
|
|
|
- FileUtils.mergePdfPublicMethods(urlList, localUrl + id + ".pdf");
|
|
|
|
- dto.setAllFilePdf(id + ".pdf");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+// for (ArchivesAutoDTO dto : list) {
|
|
|
|
+// List<ArchiveFile> files = fileClient.getArchiveFileByArchivesId(dto.getId() + "", "");
|
|
|
|
+// if (files != null && files.size() > 0) {
|
|
|
|
+// List<String> urlList = new ArrayList<>();
|
|
|
|
+// for (ArchiveFile file : files) {
|
|
|
|
+// if (StringUtil.isNotBlank(file.getPdfFileUrl())) {
|
|
|
|
+// urlList.add(file.getPdfFileUrl());
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// if (urlList.size() > 0) {
|
|
|
|
+// Long id = SnowFlakeUtil.getId();
|
|
|
|
+// FileUtils.mergePdfPublicMethods(urlList, localUrl + id + ".pdf");
|
|
|
|
+// dto.setAllFilePdf(id + ".pdf");
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// }
|
|
try {
|
|
try {
|
|
Connection conn = data.dataSource().getConnection();
|
|
Connection conn = data.dataSource().getConnection();
|
|
//清空数据
|
|
//清空数据
|