|
@@ -205,10 +205,61 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
// 将评估报告日转换为中文并设置到中文评估报告日中
|
|
// 将评估报告日转换为中文并设置到中文评估报告日中
|
|
eqptReportFillBO.setChineseReportDate(DateToChinese.dateStrConvertChinese(eqptReportFillBO.getEqptReportBaseInfo().getReportDate()));
|
|
eqptReportFillBO.setChineseReportDate(DateToChinese.dateStrConvertChinese(eqptReportFillBO.getEqptReportBaseInfo().getReportDate()));
|
|
|
|
|
|
|
|
+ // 获取框架模板(主模板)
|
|
|
|
+ TmplAssetReport mainTmpl;
|
|
|
|
+ // 获取封面模板
|
|
|
|
+ TmplAssetReportSection coverTmpl = null;
|
|
|
|
+ // 获取摘要模板
|
|
|
|
+ TmplAssetReportSection digestTmpl = null;
|
|
|
|
+ // 获取正文模板
|
|
|
|
+ TmplAssetReportSection detailTmpl = null;
|
|
|
|
+ // 获取委托人概况模板
|
|
|
|
+ TmplAssetReportSection consignorTmpl = null;
|
|
|
|
+ // 获取产权持有人概况模板
|
|
|
|
+ TmplAssetReportSection ownerTmpl = null;
|
|
|
|
+ // 获取目录模板
|
|
|
|
+ TmplAssetReportSection catalogueTmpl = null;
|
|
|
|
+ // 获取附件模板
|
|
|
|
+ TmplAssetReportSection attachmentsTmpl = null;
|
|
|
|
+ if (eqptReportFillBO.getEqptReportBaseInfo().getReportType().equals("评估报告")) {
|
|
|
|
+ // 获取框架模板(主模板)
|
|
|
|
+ mainTmpl = tmplAssetReportMapper.getTmplByCode(MAIN.getCode(), "机器设备");
|
|
|
|
+ // 获取封面模板
|
|
|
|
+ coverTmpl = reportSectionMapper.getTmplByCode(COVER.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取摘要模板
|
|
|
|
+ digestTmpl = reportSectionMapper.getTmplByCode(DIGEST.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取正文模板
|
|
|
|
+ detailTmpl = reportSectionMapper.getTmplByCode(DETAIL.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取委托人概况模板
|
|
|
|
+ consignorTmpl = reportSectionMapper.getTmplByCode(CONSIGNOR.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取产权持有人概况模板
|
|
|
|
+ ownerTmpl = reportSectionMapper.getTmplByCode(PROPERTY_OWNER.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取目录模板
|
|
|
|
+ catalogueTmpl = reportSectionMapper.getTmplByCode(CATALOGUE.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取附件模板
|
|
|
|
+ attachmentsTmpl = reportSectionMapper.getTmplByCode(ATTACHMENTS.getCode(), mainTmpl.getId());
|
|
|
|
+ } else if (eqptReportFillBO.getEqptReportBaseInfo().getReportType().equals("咨询报告")) {
|
|
|
|
+ // 获取框架模板(主模板)
|
|
|
|
+ mainTmpl = tmplAssetReportMapper.getTmplByCode(CONSULT_MAIN.getCode(), "机器设备");
|
|
|
|
+ // 获取封面模板
|
|
|
|
+ coverTmpl = reportSectionMapper.getTmplByCode(CONSULT_COVER.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取摘要模板
|
|
|
|
+ digestTmpl = reportSectionMapper.getTmplByCode(CONSULT_DIGEST.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取正文模板
|
|
|
|
+ detailTmpl = reportSectionMapper.getTmplByCode(CONSULT_DETAIL.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取委托人概况模板
|
|
|
|
+ consignorTmpl = reportSectionMapper.getTmplByCode(CONSULT_CONSIGNOR.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取产权持有人概况模板
|
|
|
|
+ ownerTmpl = reportSectionMapper.getTmplByCode(CONSULT_PROPERTY_OWNER.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取目录模板
|
|
|
|
+ catalogueTmpl = reportSectionMapper.getTmplByCode(CONSULT_CATALOGUE.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取附件模板
|
|
|
|
+ attachmentsTmpl = reportSectionMapper.getTmplByCode(CONSULT_ATTACHMENTS.getCode(), mainTmpl.getId());
|
|
|
|
+ } else {
|
|
|
|
+ throw new BusinessException("无符合条件的模板,请咨询系统管理人员了解详情");
|
|
|
|
+ }
|
|
|
|
|
|
// 第一步:设置封面
|
|
// 第一步:设置封面
|
|
- // 获取封面模板
|
|
|
|
- TmplAssetReportSection coverTmpl = reportSectionMapper.getTmplByCode(COVER.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String coverTmplPath = fileNetConfig.getBaseDir() + coverTmpl.getSectionFileUrl() + coverTmpl.getSectionFileName();
|
|
String coverTmplPath = fileNetConfig.getBaseDir() + coverTmpl.getSectionFileUrl() + coverTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -220,8 +271,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
|
|
|
|
|
|
|
|
// 第二步:设置摘要内容
|
|
// 第二步:设置摘要内容
|
|
- // 获取摘要模板
|
|
|
|
- TmplAssetReportSection digestTmpl = reportSectionMapper.getTmplByCode(DIGEST.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String digestTmplPath = fileNetConfig.getBaseDir() + digestTmpl.getSectionFileUrl() + digestTmpl.getSectionFileName();
|
|
String digestTmplPath = fileNetConfig.getBaseDir() + digestTmpl.getSectionFileUrl() + digestTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -232,8 +281,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
InputStream digestIs = new ByteArrayInputStream(resultdigestByte);
|
|
InputStream digestIs = new ByteArrayInputStream(resultdigestByte);
|
|
|
|
|
|
// 第三步:设置正文内容
|
|
// 第三步:设置正文内容
|
|
- // 获取正文模板
|
|
|
|
- TmplAssetReportSection detailTmpl = reportSectionMapper.getTmplByCode(DETAIL.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String detailTmplPath = fileNetConfig.getBaseDir() + detailTmpl.getSectionFileUrl() + detailTmpl.getSectionFileName();
|
|
String detailTmplPath = fileNetConfig.getBaseDir() + detailTmpl.getSectionFileUrl() + detailTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -252,8 +299,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 第四步:设置委托人概况到正文
|
|
// 第四步:设置委托人概况到正文
|
|
- // 获取委托人概况模板
|
|
|
|
- TmplAssetReportSection consignorTmpl = reportSectionMapper.getTmplByCode(CONSIGNOR.getCode());
|
|
|
|
// 委托人概况模板文件位置
|
|
// 委托人概况模板文件位置
|
|
String consignorTmplPath = fileNetConfig.getBaseDir() + consignorTmpl.getSectionFileUrl() + consignorTmpl.getSectionFileName();
|
|
String consignorTmplPath = fileNetConfig.getBaseDir() + consignorTmpl.getSectionFileUrl() + consignorTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
@@ -271,8 +316,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 第五步:设置产权持有人概况到正文
|
|
// 第五步:设置产权持有人概况到正文
|
|
- // 获取产权持有人概况模板
|
|
|
|
- TmplAssetReportSection ownerTmpl = reportSectionMapper.getTmplByCode(PROPERTY_OWNER.getCode());
|
|
|
|
// 产权持有人概况模板文件位置
|
|
// 产权持有人概况模板文件位置
|
|
String ownerTmplPath = fileNetConfig.getBaseDir() + ownerTmpl.getSectionFileUrl() + ownerTmpl.getSectionFileName();
|
|
String ownerTmplPath = fileNetConfig.getBaseDir() + ownerTmpl.getSectionFileUrl() + ownerTmpl.getSectionFileName();
|
|
for (int i = eqptReportFillBO.getEqptReportBaseInfo().getPropertyOwnerInfos().size(); i > 0; i--) {
|
|
for (int i = eqptReportFillBO.getEqptReportBaseInfo().getPropertyOwnerInfos().size(); i > 0; i--) {
|
|
@@ -289,8 +332,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 第六步:设置主体框架
|
|
// 第六步:设置主体框架
|
|
- // 获取框架模板
|
|
|
|
- TmplAssetReport mainTmpl = tmplAssetReportMapper.getTmplByCode(MAIN.getCode());
|
|
|
|
// 框架生成后文件位置
|
|
// 框架生成后文件位置
|
|
String docUrl = fileNetConfig.getAssetOutputReportPath() + System.currentTimeMillis() + "_设备融资报告.docx";
|
|
String docUrl = fileNetConfig.getAssetOutputReportPath() + System.currentTimeMillis() + "_设备融资报告.docx";
|
|
String mainPath = fileNetConfig.getBaseDir() + docUrl;
|
|
String mainPath = fileNetConfig.getBaseDir() + docUrl;
|
|
@@ -309,15 +350,11 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
// 将正文插入到框架
|
|
// 将正文插入到框架
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, detailDoc, "insertDetail", false, false);
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, detailDoc, "insertDetail", false, false);
|
|
|
|
|
|
- // 获取目录模板
|
|
|
|
- TmplAssetReportSection catalogueTmpl = reportSectionMapper.getTmplByCode(CATALOGUE.getCode());
|
|
|
|
// 目录模板文件位置
|
|
// 目录模板文件位置
|
|
String catalogueTmplPath = fileNetConfig.getBaseDir() + catalogueTmpl.getSectionFileUrl() + catalogueTmpl.getSectionFileName();
|
|
String catalogueTmplPath = fileNetConfig.getBaseDir() + catalogueTmpl.getSectionFileUrl() + catalogueTmpl.getSectionFileName();
|
|
// 将框架读取出来
|
|
// 将框架读取出来
|
|
Document catalogueDoc = new Document(catalogueTmplPath);
|
|
Document catalogueDoc = new Document(catalogueTmplPath);
|
|
|
|
|
|
- // 获取附件模板
|
|
|
|
- TmplAssetReportSection attachmentsTmpl = reportSectionMapper.getTmplByCode(ATTACHMENTS.getCode());
|
|
|
|
// 附件模板文件位置
|
|
// 附件模板文件位置
|
|
String attachmentsPath = fileNetConfig.getBaseDir() + attachmentsTmpl.getSectionFileUrl() + attachmentsTmpl.getSectionFileName();
|
|
String attachmentsPath = fileNetConfig.getBaseDir() + attachmentsTmpl.getSectionFileUrl() + attachmentsTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -333,25 +370,25 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, catalogueDoc, "insertCatalogue", false, false);
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, catalogueDoc, "insertCatalogue", false, false);
|
|
|
|
|
|
// 第七步:删除预留书签插入位置的空白行
|
|
// 第七步:删除预留书签插入位置的空白行
|
|
- DocumentBuilder mainBuilder = new DocumentBuilder(mainDoc);
|
|
|
|
- // 移除正文的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertDetail");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
- // 移除摘要的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertDigest");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
- // 移除目录的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertCatalogue");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
- // 移除附件的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertAttachments");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
- // 移除委托人概况的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertConsignor");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
- // 移除产权持有人概况的书签所在段落
|
|
|
|
- mainBuilder.moveToBookmark("insertPropertyOwner");
|
|
|
|
- mainBuilder.getCurrentParagraph().remove();
|
|
|
|
|
|
+// DocumentBuilder mainBuilder = new DocumentBuilder(mainDoc);
|
|
|
|
+// // 移除正文的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertDetail");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
+// // 移除摘要的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertDigest");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
+// // 移除目录的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertCatalogue");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
+// // 移除附件的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertAttachments");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
+// // 移除委托人概况的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertConsignor");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
+// // 移除产权持有人概况的书签所在段落
|
|
|
|
+// mainBuilder.moveToBookmark("insertPropertyOwner");
|
|
|
|
+// mainBuilder.getCurrentParagraph().remove();
|
|
|
|
|
|
// 第八步:生成并保存文档
|
|
// 第八步:生成并保存文档
|
|
// 将封面和文档进行拼接
|
|
// 将封面和文档进行拼接
|
|
@@ -407,6 +444,31 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Boolean generateCRReport(Long reportId) throws Exception {
|
|
public Boolean generateCRReport(Long reportId) throws Exception {
|
|
|
|
+
|
|
|
|
+ // 获取框架模板
|
|
|
|
+ TmplAssetReport mainTmpl = tmplAssetReportMapper.getTmplByCode(ANALYSIS_MAIN.getCode(), "债权");
|
|
|
|
+ // 获取封面模板
|
|
|
|
+ TmplAssetReportSection coverTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_COVER.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取摘要模板
|
|
|
|
+ TmplAssetReportSection digestTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DIGEST.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取正文模板
|
|
|
|
+ TmplAssetReportSection detailTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DETAIL.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取债务人信息模板
|
|
|
|
+ TmplAssetReportSection debtorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DEBTOR.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取自然人保证人信息模板
|
|
|
|
+ TmplAssetReportSection personGuarantorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_PERSON_GUARANTOR.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取企业保证人信息模板
|
|
|
|
+ TmplAssetReportSection enterpriseGuarantorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_ENTERPRISE_GUARANTOR.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取资产情况模板
|
|
|
|
+ TmplAssetReportSection debtorAssetTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DEBTOR_ASSET.getCode(), mainTmpl.getId());
|
|
|
|
+ TmplAssetReportSection guarantorAssetTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_GUARANTOR_ASSET.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取诉讼情况信息模板
|
|
|
|
+ TmplAssetReportSection lawsuitTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_LAWSUIT.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取诉讼情况信息模板
|
|
|
|
+ TmplAssetReportSection guarantorAdditionalDebtRepaymentSourcesTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_GUARANTOR_ADDITIONAL_DEBT_REPAYMENT_SOURCES.getCode(), mainTmpl.getId());
|
|
|
|
+ // 获取目录模板
|
|
|
|
+ TmplAssetReportSection catalogueTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_CATALOGUE.getCode(), mainTmpl.getId());
|
|
|
|
+
|
|
// 获取与设置基础报告信息
|
|
// 获取与设置基础报告信息
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
CRReportFillBO crReportFillBO = assetsReportMapper.getCRReportFillBO(reportId);
|
|
CRReportFillBO crReportFillBO = assetsReportMapper.getCRReportFillBO(reportId);
|
|
@@ -574,8 +636,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
crReportFillBO.setConsolidatedList(consolidatedList);
|
|
crReportFillBO.setConsolidatedList(consolidatedList);
|
|
|
|
|
|
// 第一步:设置封面
|
|
// 第一步:设置封面
|
|
- // 获取封面模板
|
|
|
|
- TmplAssetReportSection coverTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_COVER.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String coverTmplPath = fileNetConfig.getBaseDir() + coverTmpl.getSectionFileUrl() + coverTmpl.getSectionFileName();
|
|
String coverTmplPath = fileNetConfig.getBaseDir() + coverTmpl.getSectionFileUrl() + coverTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -585,8 +645,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
// 将封面的字节流转成输入流以供后续使用
|
|
// 将封面的字节流转成输入流以供后续使用
|
|
InputStream coverIs = new ByteArrayInputStream(resultCoverByte);
|
|
InputStream coverIs = new ByteArrayInputStream(resultCoverByte);
|
|
|
|
|
|
- // 获取摘要模板
|
|
|
|
- TmplAssetReportSection digestTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DIGEST.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String digestTmplPath = fileNetConfig.getBaseDir() + digestTmpl.getSectionFileUrl() + digestTmpl.getSectionFileName();
|
|
String digestTmplPath = fileNetConfig.getBaseDir() + digestTmpl.getSectionFileUrl() + digestTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -597,8 +655,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
InputStream digestIs = new ByteArrayInputStream(resultdigestByte);
|
|
InputStream digestIs = new ByteArrayInputStream(resultdigestByte);
|
|
|
|
|
|
// 第三步:设置正文内容
|
|
// 第三步:设置正文内容
|
|
- // 获取正文模板
|
|
|
|
- TmplAssetReportSection detailTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DETAIL.getCode());
|
|
|
|
// 封面模板文件位置
|
|
// 封面模板文件位置
|
|
String detailTmplPath = fileNetConfig.getBaseDir() + detailTmpl.getSectionFileUrl() + detailTmpl.getSectionFileName();
|
|
String detailTmplPath = fileNetConfig.getBaseDir() + detailTmpl.getSectionFileUrl() + detailTmpl.getSectionFileName();
|
|
// 读取模板文件
|
|
// 读取模板文件
|
|
@@ -612,8 +668,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
Document detailDoc = new Document(detailIs);
|
|
Document detailDoc = new Document(detailIs);
|
|
|
|
|
|
// 第四步:设置债务人信息到正文
|
|
// 第四步:设置债务人信息到正文
|
|
- // 获取债务人信息模板
|
|
|
|
- TmplAssetReportSection debtorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DEBTOR.getCode());
|
|
|
|
// 债务人信息模板文件位置
|
|
// 债务人信息模板文件位置
|
|
String debtorTmplPath = fileNetConfig.getBaseDir() + debtorTmpl.getSectionFileUrl() + debtorTmpl.getSectionFileName();
|
|
String debtorTmplPath = fileNetConfig.getBaseDir() + debtorTmpl.getSectionFileUrl() + debtorTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
@@ -630,8 +684,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 第五步:设置保证人信息到正文
|
|
// 第五步:设置保证人信息到正文
|
|
- // 获取企业保证人信息模板
|
|
|
|
- TmplAssetReportSection enterpriseGuarantorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_ENTERPRISE_GUARANTOR.getCode());
|
|
|
|
// 企业保证人信息模板文件位置
|
|
// 企业保证人信息模板文件位置
|
|
String enterpriseGuarantorTmplPath = fileNetConfig.getBaseDir() + enterpriseGuarantorTmpl.getSectionFileUrl() + enterpriseGuarantorTmpl.getSectionFileName();
|
|
String enterpriseGuarantorTmplPath = fileNetConfig.getBaseDir() + enterpriseGuarantorTmpl.getSectionFileUrl() + enterpriseGuarantorTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下
|
|
@@ -647,8 +699,7 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
detailDoc = AsposeWordUtil.insertDocumentAfterBookMark(detailDoc, new Document(enterpriseGuarantorIs), "insertEnterpriseGuarantor", false, false);
|
|
detailDoc = AsposeWordUtil.insertDocumentAfterBookMark(detailDoc, new Document(enterpriseGuarantorIs), "insertEnterpriseGuarantor", false, false);
|
|
enterpriseGuarantorIs.close();
|
|
enterpriseGuarantorIs.close();
|
|
}
|
|
}
|
|
- // 获取自然人保证人信息模板
|
|
|
|
- TmplAssetReportSection personGuarantorTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_PERSON_GUARANTOR.getCode());
|
|
|
|
|
|
+
|
|
// 自然人保证人信息模板文件位置
|
|
// 自然人保证人信息模板文件位置
|
|
String personGuarantorTmplPath = fileNetConfig.getBaseDir() + personGuarantorTmpl.getSectionFileUrl() + personGuarantorTmpl.getSectionFileName();
|
|
String personGuarantorTmplPath = fileNetConfig.getBaseDir() + personGuarantorTmpl.getSectionFileUrl() + personGuarantorTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
@@ -665,8 +716,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 设置资产情况
|
|
// 设置资产情况
|
|
- TmplAssetReportSection debtorAssetTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_DEBTOR_ASSET.getCode());
|
|
|
|
- TmplAssetReportSection guarantorAssetTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_GUARANTOR_ASSET.getCode());
|
|
|
|
String debtorAssetTmplPath = fileNetConfig.getBaseDir() + debtorAssetTmpl.getSectionFileUrl() + debtorAssetTmpl.getSectionFileName();
|
|
String debtorAssetTmplPath = fileNetConfig.getBaseDir() + debtorAssetTmpl.getSectionFileUrl() + debtorAssetTmpl.getSectionFileName();
|
|
String guarantorAssetTmplPath = fileNetConfig.getBaseDir() + guarantorAssetTmpl.getSectionFileUrl() + guarantorAssetTmpl.getSectionFileName();
|
|
String guarantorAssetTmplPath = fileNetConfig.getBaseDir() + guarantorAssetTmpl.getSectionFileUrl() + guarantorAssetTmpl.getSectionFileName();
|
|
int guarantorAssetSort = crReportFillBO.getReportBaseInfo().getPersonGuarantorList().size() + enterpriseCount;
|
|
int guarantorAssetSort = crReportFillBO.getReportBaseInfo().getPersonGuarantorList().size() + enterpriseCount;
|
|
@@ -693,8 +742,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // 获取诉讼情况信息模板
|
|
|
|
- TmplAssetReportSection lawsuitTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_LAWSUIT.getCode());
|
|
|
|
// 诉讼情况信息模板文件位置
|
|
// 诉讼情况信息模板文件位置
|
|
String lawsuitTmplPath = fileNetConfig.getBaseDir() + lawsuitTmpl.getSectionFileUrl() + lawsuitTmpl.getSectionFileName();
|
|
String lawsuitTmplPath = fileNetConfig.getBaseDir() + lawsuitTmpl.getSectionFileUrl() + lawsuitTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
@@ -710,8 +757,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
lawsuitIs.close();
|
|
lawsuitIs.close();
|
|
}
|
|
}
|
|
|
|
|
|
- // 获取诉讼情况信息模板
|
|
|
|
- TmplAssetReportSection guarantorAdditionalDebtRepaymentSourcesTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_GUARANTOR_ADDITIONAL_DEBT_REPAYMENT_SOURCES.getCode());
|
|
|
|
// 诉讼情况信息模板文件位置
|
|
// 诉讼情况信息模板文件位置
|
|
String guarantorAdditionalDebtRepaymentSourcesPath = fileNetConfig.getBaseDir() + guarantorAdditionalDebtRepaymentSourcesTmpl.getSectionFileUrl() + guarantorAdditionalDebtRepaymentSourcesTmpl.getSectionFileName();
|
|
String guarantorAdditionalDebtRepaymentSourcesPath = fileNetConfig.getBaseDir() + guarantorAdditionalDebtRepaymentSourcesTmpl.getSectionFileUrl() + guarantorAdditionalDebtRepaymentSourcesTmpl.getSectionFileName();
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
// 插入时会导致先插入的排在后插入的后面,所以把顺序反转一下(企业和自然人用同一个序号排序)
|
|
@@ -728,8 +773,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
}
|
|
}
|
|
|
|
|
|
// 第六步:设置主体框架
|
|
// 第六步:设置主体框架
|
|
- // 获取框架模板
|
|
|
|
- TmplAssetReport mainTmpl = tmplAssetReportMapper.getTmplByCode(ANALYSIS_MAIN.getCode());
|
|
|
|
// 框架生成后文件位置
|
|
// 框架生成后文件位置
|
|
String docUrl = fileNetConfig.getAssetOutputReportPath() + System.currentTimeMillis() + "_债权分析报告.docx";
|
|
String docUrl = fileNetConfig.getAssetOutputReportPath() + System.currentTimeMillis() + "_债权分析报告.docx";
|
|
String mainPath = fileNetConfig.getBaseDir() + docUrl;
|
|
String mainPath = fileNetConfig.getBaseDir() + docUrl;
|
|
@@ -748,8 +791,6 @@ public class AssetsReportServiceImpl extends ServiceImpl<AssetsReportMapper, Ass
|
|
// 将正文插入到框架
|
|
// 将正文插入到框架
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, detailDoc, "insertDetail", false, false);
|
|
AsposeWordUtil.insertDocumentAfterBookMark(mainDoc, detailDoc, "insertDetail", false, false);
|
|
|
|
|
|
- // 获取目录模板
|
|
|
|
- TmplAssetReportSection catalogueTmpl = reportSectionMapper.getTmplByCode(ANALYSIS_CATALOGUE.getCode());
|
|
|
|
// 目录模板文件位置
|
|
// 目录模板文件位置
|
|
String catalogueTmplPath = fileNetConfig.getBaseDir() + catalogueTmpl.getSectionFileUrl() + catalogueTmpl.getSectionFileName();
|
|
String catalogueTmplPath = fileNetConfig.getBaseDir() + catalogueTmpl.getSectionFileUrl() + catalogueTmpl.getSectionFileName();
|
|
// 将框架读取出来
|
|
// 将框架读取出来
|