|
@@ -1293,7 +1293,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
@Override
|
|
|
public R getBussPdfInfo(Long pkeyId) throws Exception {
|
|
|
String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
- //String file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ String sys_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
|
|
@@ -1304,8 +1304,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
return R.fail("请关联清表!");
|
|
|
}
|
|
|
|
|
|
- String pdfPath = file_path + "/pdf//" + pkeyId + ".pdf";
|
|
|
- String excelPath = file_path + "/pdf//" + pkeyId + ".xlsx";
|
|
|
+ String pdfPath = sys_net_url + "/pdf//" + pkeyId + ".pdf";
|
|
|
+ String excelPath = sys_net_url + "/pdf//" + pkeyId + ".xlsx";
|
|
|
File tabPdf = ResourceUtil.getFile(pdfPath);
|
|
|
if (tabPdf.exists()) {
|
|
|
tabPdf.delete();
|
|
@@ -1554,6 +1554,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
//输出流
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
FileOutputStream outputStream = new FileOutputStream(excelPath);
|
|
|
workbook.write(outputStream);
|
|
|
FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
|
|
@@ -1562,8 +1565,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
//附件
|
|
|
TableFile tableFile1 = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getType, 1)).stream().findAny().orElse(null);
|
|
|
if (tableFile1 != null) {
|
|
|
- /*tableFile1.setDomainPdfUrl(bladeFile.getLink());
|
|
|
- tableFileService.saveOrUpdate(tableFile1);*/
|
|
|
tableFileService.update(Wrappers.<TableFile>lambdaUpdate().set(TableFile::getDomainPdfUrl, bladeFile.getLink()).eq(TableFile::getId, tableFile1.getId()));
|
|
|
} else {
|
|
|
TableFile tableFile = new TableFile();
|