|
@@ -1696,14 +1696,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
if (tabPdf2.exists()) {
|
|
|
tabPdf2.delete();
|
|
|
}
|
|
|
-
|
|
|
- FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
|
|
|
-
|
|
|
- BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
|
|
|
+ String fileUrl ="";
|
|
|
+ if (dataListPdf.size() > 0) {
|
|
|
+ FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
|
|
|
+ BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
|
|
|
+ fileUrl = bladeFile2.getLink();
|
|
|
+ }
|
|
|
|
|
|
UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
|
|
|
updateWrapper.in("p_key_id", pkeyId + "");
|
|
|
- updateWrapper.set("pdf_url", bladeFile2.getLink());
|
|
|
+ updateWrapper.set("pdf_url", fileUrl);
|
|
|
wbsTreeContractService.update(updateWrapper);
|
|
|
|
|
|
if (outputStream != null) {
|
|
@@ -1712,7 +1714,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
if (exceInp != null) {
|
|
|
IoUtil.closeQuietly(exceInp);
|
|
|
}
|
|
|
- return R.data(bladeFile2.getLink());
|
|
|
+ return R.data(fileUrl);
|
|
|
|
|
|
}
|
|
|
|