|
@@ -182,23 +182,23 @@ public class PrintCommonServiceImpl implements PrintCommonService {
|
|
|
if (Objects.nonNull(type) && Objects.equals(type, SystemConstant.FTL_PREFIX)) {
|
|
|
filePath = (String) jsonObject.get(SystemConstant.HTML_PATH);
|
|
|
if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig()) && filePath.contains(dictionaryConfig.fssLocalFileDomain().getConfig())) {
|
|
|
- url = filePath;
|
|
|
- } else {
|
|
|
url = dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + filePath;
|
|
|
+ htmlFile = new File(url);
|
|
|
+ } else {
|
|
|
+ htmlFile = new File(dictionaryConfig.fssPublicDomain().getConfig(), filePath);
|
|
|
}
|
|
|
- htmlFile = new File(url);
|
|
|
} else if (Objects.nonNull(type) && Objects.equals(type, SystemConstant.HTML_PREFIX)) {
|
|
|
filePath = (String) jsonObject.get(SystemConstant.PATH);
|
|
|
- if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig()) && filePath.contains(dictionaryConfig.fssLocalFileDomain().getConfig())) {
|
|
|
- url = filePath;
|
|
|
- } else {
|
|
|
- url = dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + filePath;
|
|
|
- }
|
|
|
UploadFileEnum uploadType = Enum.valueOf(UploadFileEnum.class, (String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
|
if (oss) {
|
|
|
htmlFile = fileStoreUtil.ossDownload(filePath, url, uploadType.getFssType());
|
|
|
} else {
|
|
|
- htmlFile = new File(filePath);
|
|
|
+ if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig()) && filePath.contains(dictionaryConfig.fssLocalFileDomain().getConfig())) {
|
|
|
+ url = dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + filePath;
|
|
|
+ htmlFile = new File(url);
|
|
|
+ } else {
|
|
|
+ htmlFile = new File(dictionaryConfig.fssPublicDomain().getConfig(), filePath);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
StringJoiner pdfStringJoiner = SystemConstant.getDirName(UploadFileEnum.PDF, true);
|
|
@@ -1366,6 +1366,8 @@ public class PrintCommonServiceImpl implements PrintCommonService {
|
|
|
String destUrl = null;
|
|
|
if (Objects.nonNull(dictionaryConfig.fssLocalPdfDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalPdfDomain().getConfig())) {
|
|
|
destUrl = dictionaryConfig.fssLocalPdfDomain().getConfig() + File.separator + pdfDirName;
|
|
|
+ } else {
|
|
|
+ destUrl = dictionaryConfig.fssPublicDomain().getConfig() + File.separator + pdfDirName;
|
|
|
}
|
|
|
|
|
|
createPrintPdfUtil.createPackagePdf(pdfPackageDto, destUrl);
|