|
@@ -19,6 +19,7 @@ import org.springblade.archive.utils.FileUtils;
|
|
|
import org.springblade.archive.utils.FormulaUtil;
|
|
|
import org.springblade.business.entity.ArchiveFile;
|
|
|
import org.springblade.business.feign.ArchiveFileClient;
|
|
|
+import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.constant.OssConstant;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
@@ -30,6 +31,7 @@ import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
import org.springblade.core.tool.utils.ResourceUtil;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
import org.springblade.resource.feign.NewIOSSClient;
|
|
|
+import org.springblade.system.cache.ParamCache;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
@@ -81,7 +83,8 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
|
|
|
// files.add(file2);
|
|
|
// BladeFile bladeFile = newIOSSClient.uploadFile1(file2,"123");
|
|
|
|
|
|
- String file_path = "D:\\tmp";
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ boolean flag = FileUtils.LocalPath.equals(file_path);
|
|
|
String excelUrl = file_path + "\\备考表.xlsx";
|
|
|
|
|
|
Map<String, Object> DataInfo = new HashMap<>();
|
|
@@ -265,8 +268,8 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
|
|
|
String url = getPdfFileUrl(f);
|
|
|
urls.add(url);
|
|
|
}
|
|
|
-
|
|
|
- List<String> pageUrls = FileUtils.doForPageNumberUseItextpdf(urls,newIOSSClient);
|
|
|
+ String localPath = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ List<String> pageUrls = FileUtils.doForPageNumberUseItextpdf(urls,localPath,newIOSSClient);
|
|
|
for(int i=0;i<waitArchiveFiles.size();i++){
|
|
|
waitArchiveFiles.get(i).setPdfPageUrl(pageUrls.get(i));
|
|
|
}
|
|
@@ -286,7 +289,7 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
|
|
|
// Step 1: Get the list of formulas using archiveFormulaConfigService
|
|
|
List<ArchiveFormulaConfig> formulaConfigs = archiveFormulaConfigService.getByNumber(number);
|
|
|
|
|
|
- String file_path = FileUtils.LocalPath;
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
String excelUrl = getUrlByNumber(number);
|
|
|
Map<String, Object> dataInfo = new HashMap<>();
|
|
|
|
|
@@ -751,7 +754,7 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
|
|
|
public String MergePdfAndUpload(List<String> urlList,String fileName,String filePath,Long pojectId) {
|
|
|
String url = "";
|
|
|
Long id = SnowFlakeUtil.getId();
|
|
|
- String localPdf = FileUtils.LocalPath + "/pdf/" + id + ".pdf";
|
|
|
+ String localPdf = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL) + "/pdf/" + id + ".pdf";
|
|
|
|
|
|
try {
|
|
|
//合并pdf
|