|
@@ -124,7 +124,7 @@ public class ReportExportService {
|
|
|
}
|
|
|
XWPFTemplate template = null;
|
|
|
if (report.getReportType() == 0 || report.getReportType() == 2) {
|
|
|
- template = this.getstabilityTemplate(projectId, templateFilePath);
|
|
|
+ template = this.getstabilityTemplate(projectId, templateFilePath);
|
|
|
} else if (report.getReportType() == 3) {
|
|
|
template = this.FTOTemplate(projectId, templateFilePath, templeId);
|
|
|
} else if (report.getReportType() == 4) {
|
|
@@ -132,7 +132,7 @@ public class ReportExportService {
|
|
|
} else if (report.getReportType() == 5) {
|
|
|
template = this.avoidDesignTemplate(projectId, templateFilePath);
|
|
|
} else if (report.getReportType() == 1) {
|
|
|
-// template = this.getThirdTemplate(report, filePath);
|
|
|
+ template = this.getThirdTemplate(projectId, templateFilePath);
|
|
|
}
|
|
|
// 读取模板、数据并渲染
|
|
|
// 文件是否已存在,则删除
|
|
@@ -560,7 +560,7 @@ public class ReportExportService {
|
|
|
List<CompareLiteratureVO> compareLiteratures = new ArrayList<>();
|
|
|
if (reasonIds.size() > 0) {
|
|
|
LambdaQueryWrapper<AssoReasonLiterature> literatureLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- literatureLambdaQueryWrapper.eq(AssoReasonLiterature::getReasonId, reasonIds);
|
|
|
+ literatureLambdaQueryWrapper.in(AssoReasonLiterature::getReasonId, reasonIds);
|
|
|
assoReasonLiteratures = assoReasonLiteratureService.list(literatureLambdaQueryWrapper);
|
|
|
if (assoReasonLiteratures.size() > 0) {
|
|
|
List<Integer> literatureIds = assoReasonLiteratures.stream().map(AssoReasonLiterature::getLiteratureId).collect(Collectors.toList());
|
|
@@ -585,7 +585,9 @@ public class ReportExportService {
|
|
|
//根据专利号查询专利详细信息
|
|
|
List<Patent> patentDTOS = new ArrayList<>();
|
|
|
try {
|
|
|
- patentDTOS = esPatentService.getPatentsByNo(patentNos, true, null, null);
|
|
|
+ if (patentNos != null && patentNos.size() > 0) {
|
|
|
+ patentDTOS = esPatentService.getPatentsByNo(patentNos, true, null, null);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
}
|
|
@@ -631,8 +633,9 @@ public class ReportExportService {
|
|
|
disclosures.append("\n");
|
|
|
}
|
|
|
int order = Integer.parseInt(OtherName.get(item.getPatentNo()).toString());
|
|
|
-
|
|
|
- patentListMap.put("name", item.getTitle());
|
|
|
+ if (item.getTitle() != null && item.getTitle().size() > 0) {
|
|
|
+ patentListMap.put("name", item.getTitle().get(0).getTextContent());
|
|
|
+ }
|
|
|
patentListMap.put("fileName", "D" + order);
|
|
|
patentListMap.put("publicDate", item.getPublicDate());
|
|
|
patentListMap.put("publicNo", item.getPublicNo());
|
|
@@ -783,7 +786,7 @@ public class ReportExportService {
|
|
|
for (CompareLiteratureVO item : partCompareLiterature) {
|
|
|
//根据id查询对比理由
|
|
|
List<Integer> temReasonIds = assoReasonLiteratures.stream().filter(t -> t.getLiteratureId().equals(item.getId())).map(AssoReasonLiterature::getReasonId).collect(Collectors.toList());
|
|
|
- List<Integer> temFeatureIds = partScenariosRecords.stream().filter(t->temReasonIds.contains(t.getReasonId())).map(AssoGroupReason::getFeatureId).distinct().collect(Collectors.toList());
|
|
|
+ List<Integer> temFeatureIds = partScenariosRecords.stream().filter(t -> temReasonIds.contains(t.getReasonId())).map(AssoGroupReason::getFeatureId).distinct().collect(Collectors.toList());
|
|
|
String tmName = item.getLiteratureNo();
|
|
|
if (OtherName.containsKey(item)) {
|
|
|
tmName = "D" + OtherName.get(item).toString();
|
|
@@ -819,6 +822,7 @@ public class ReportExportService {
|
|
|
temMap.put("creative", creative);
|
|
|
scenariosMaps.add(temMap);
|
|
|
}
|
|
|
+
|
|
|
List<Map<String, Object>> allRightScenarios = new ArrayList<>();
|
|
|
List<Map<String, Object>> resultMaps = new ArrayList<>();
|
|
|
// 存放创造性和新颖性的权要
|
|
@@ -849,10 +853,10 @@ public class ReportExportService {
|
|
|
}
|
|
|
}
|
|
|
map.put("rightScenrios", rightScenarios);
|
|
|
- map.put("rightName", rightScenarios.get(0).get("rightName"));
|
|
|
+ map.put("rightName", tem.getRightName());
|
|
|
String creative = creaList.size() == 0 ? "" : StringUtils.join(creaList, "、");
|
|
|
String novelty = noveList.size() == 0 ? "" : StringUtils.join(noveList, "-");
|
|
|
- resultMap.put("rightName", rightScenarios.get(0).get("rightName"));
|
|
|
+ resultMap.put("rightName", tem.getRightName());
|
|
|
resultMap.put("rightNovelty", novelty);
|
|
|
resultMap.put("rightCreative", creative);
|
|
|
allRightScenarios.add(map);
|
|
@@ -938,14 +942,18 @@ public class ReportExportService {
|
|
|
patentMap.put("abstractPath", pictureData);
|
|
|
}
|
|
|
|
|
|
- patentMap.put("name", patent.getTitle());
|
|
|
+ if (patent.getTitle() != null && patent.getTitle().size() > 0) {
|
|
|
+ patentMap.put("name", patent.getTitle().get(0).getTextContent());
|
|
|
+ }
|
|
|
|
|
|
//查询专利权要
|
|
|
List<Text> patentRights = patent.getClaim();
|
|
|
String patentRight = null;
|
|
|
+
|
|
|
if (patentRights != null && patentRights.size() > 0) {
|
|
|
patentRight = patentRights.get(0).getTextContent();
|
|
|
}
|
|
|
+
|
|
|
PatentRightParams params = new PatentRightParams();
|
|
|
params.setContent(patentRight);
|
|
|
params.setPatentNo(patentNo);
|
|
@@ -982,4 +990,281 @@ public class ReportExportService {
|
|
|
}
|
|
|
return maps;
|
|
|
}
|
|
|
+
|
|
|
+ private XWPFTemplate getThirdTemplate(Integer projectId, String filePath) throws IOException {
|
|
|
+ //装载标的专利信息
|
|
|
+ LambdaQueryWrapper<ReportProject> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(ReportProject::getProjectId, projectId);
|
|
|
+ ReportProject report = reportProjectService.getOne(queryWrapper, false);
|
|
|
+ String signPatentNo = report.getSignPatentNo();
|
|
|
+ Map<String, Object> signPatent = this.signPantentMess(signPatentNo);
|
|
|
+ List<Map<String, Object>> rights = (List<Map<String, Object>>) signPatent.get("rights");
|
|
|
+
|
|
|
+ List<Feature> allFeatures = new ArrayList<>();
|
|
|
+ LambdaQueryWrapper<PatentSplitMessage> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(PatentSplitMessage::getPatentNo, signPatentNo)
|
|
|
+ .eq(PatentSplitMessage::getProjectId, report.getProjectId());
|
|
|
+ List<PatentSplitMessage> patentSplitMessages = patentSplitMessageService.list(queryWrapper1);
|
|
|
+ if (patentSplitMessages.size() > 0) {
|
|
|
+ LambdaQueryWrapper<Feature> allFeaturesWrapper = new LambdaQueryWrapper<>();
|
|
|
+ allFeaturesWrapper.eq(Feature::getSplitMessageId, patentSplitMessages.get(0).getId());
|
|
|
+ allFeatures = featureService.list(allFeaturesWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //根据报告Id 查询出报告下所有的方案
|
|
|
+ LambdaQueryWrapper<ProofGroup> proofGroupWrapper = new LambdaQueryWrapper<>();
|
|
|
+ proofGroupWrapper.eq(ProofGroup::getProjectId, report.getProjectId());
|
|
|
+ List<ProofGroup> compareScenarios = proofGroupService.list(proofGroupWrapper);
|
|
|
+ List<Integer> scenarioIds = compareScenarios.stream().map(ProofGroup::getId).collect(Collectors.toList());
|
|
|
+ //根据对比方案Id 查询所有对比方案和(对比记录-特征)关联信息
|
|
|
+ List<AssoGroupReason> scenariosRecords = new ArrayList<>();
|
|
|
+ if (scenarioIds != null && scenarioIds.size() != 0) {
|
|
|
+ LambdaQueryWrapper<AssoGroupReason> queryRecordsByIDs = new LambdaQueryWrapper<>();
|
|
|
+ queryRecordsByIDs.in(AssoGroupReason::getGroupId, scenarioIds);
|
|
|
+ scenariosRecords = assoGroupReasonService.list(queryRecordsByIDs);
|
|
|
+ }
|
|
|
+ //获得对比记录id
|
|
|
+ List<Integer> reasonIds = scenariosRecords.stream().map(AssoGroupReason::getReasonId).collect(Collectors.toList());
|
|
|
+ //获得特征id
|
|
|
+ List<Integer> featureIds = scenariosRecords.stream().map(AssoGroupReason::getFeatureId).collect(Collectors.toList());
|
|
|
+ //查询对比记录
|
|
|
+ List<EvidenceReason> evidenceReasons = new ArrayList<>();
|
|
|
+ if (reasonIds != null && reasonIds.size() > 0) {
|
|
|
+ LambdaQueryWrapper<EvidenceReason> evidenceReasonLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ evidenceReasonLambdaQueryWrapper.in(EvidenceReason::getId, reasonIds);
|
|
|
+ evidenceReasons = evidenceReasonService.list(evidenceReasonLambdaQueryWrapper);
|
|
|
+ }
|
|
|
+ //查询特征
|
|
|
+ List<Feature> features = new ArrayList<>();
|
|
|
+ if (featureIds != null && featureIds.size() > 0) {
|
|
|
+ LambdaQueryWrapper<Feature> featureLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ featureLambdaQueryWrapper.in(Feature::getId, featureIds);
|
|
|
+ features = featureService.list(featureLambdaQueryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ //根据对比记录id获得对比文献
|
|
|
+ List<String> patentNos = new ArrayList<>();
|
|
|
+ List<AssoReasonLiterature> assoReasonLiteratures = new ArrayList<>();
|
|
|
+ List<CompareLiteratureVO> compareLiteratures = new ArrayList<>();
|
|
|
+ if (reasonIds.size() > 0) {
|
|
|
+ LambdaQueryWrapper<AssoReasonLiterature> literatureLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ literatureLambdaQueryWrapper.in(AssoReasonLiterature::getReasonId, reasonIds);
|
|
|
+ assoReasonLiteratures = assoReasonLiteratureService.list(literatureLambdaQueryWrapper);
|
|
|
+ if (assoReasonLiteratures.size() > 0) {
|
|
|
+ List<Integer> literatureIds = assoReasonLiteratures.stream().map(AssoReasonLiterature::getLiteratureId).collect(Collectors.toList());
|
|
|
+ if (literatureIds.size() > 0) {
|
|
|
+ compareLiteratures = compareLiteratureService.getByIds(literatureIds);
|
|
|
+ if (compareLiteratures.size() > 0) {
|
|
|
+ patentNos = compareLiteratures.stream().map(CompareLiteratureVO::getLiteratureNo).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //专利号别名的map
|
|
|
+ Map<String, Object> OtherName = new HashMap<>();
|
|
|
+ int flag = 1;
|
|
|
+ for (CompareLiteratureVO item : compareLiteratures) {
|
|
|
+ Integer order = item.getSysOrder() == null ? flag : item.getSysOrder();
|
|
|
+ OtherName.put(item.getLiteratureNo(), order);
|
|
|
+ flag++;
|
|
|
+ }
|
|
|
+
|
|
|
+ //根据专利号查询专利详细信息
|
|
|
+ List<Patent> patentDTOS = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ if (patentNos != null && patentNos.size() > 0) {
|
|
|
+ patentDTOS = esPatentService.getPatentsByNo(patentNos, true, null, null);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //存放专利信息的map集合
|
|
|
+ List<Map<String, Object>> patentListMaps = new ArrayList<>();
|
|
|
+
|
|
|
+ //填充专利数据到patentListMap
|
|
|
+ for (int i = 0; i < patentDTOS.size(); i++) {
|
|
|
+ Patent item = patentDTOS.get(i);
|
|
|
+ Map<String, Object> patentListMap = new HashMap<>();
|
|
|
+
|
|
|
+ List<PatentPerson> applicantJSONs = item.getApplicant();
|
|
|
+ StringBuilder applicants = new StringBuilder();
|
|
|
+ applicantJSONs.forEach(tem -> {
|
|
|
+ applicants.append(tem.getName() + "\r");
|
|
|
+ });
|
|
|
+
|
|
|
+ CompareLiteratureVO compareLiteratureVO = compareLiteratures.stream().filter(t -> t.getLiteratureNo().equals(item.getPatentNo())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ List<AssoReasonLiterature> assoReasonLiteratures1 = new ArrayList<>();
|
|
|
+ if (compareLiteratureVO != null) {
|
|
|
+ assoReasonLiteratures1 = assoReasonLiteratures.stream().filter(t -> t.getLiteratureId().equals(compareLiteratureVO.getId())).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ //填充相关揭露(对比记录文字和特征组合)
|
|
|
+ StringBuffer disclosures = new StringBuffer("");
|
|
|
+ //根据专利号获得对比记录
|
|
|
+ //遍历对比记录根据对比记录获得对比记录-特征关联信息并获得特征ID
|
|
|
+ for (AssoReasonLiterature tem : assoReasonLiteratures1) {
|
|
|
+ EvidenceReason evidenceReason = evidenceReasons.stream().filter(t -> t.getId().equals(tem.getReasonId())).findFirst().orElse(null);
|
|
|
+ if (evidenceReason != null) {
|
|
|
+ disclosures.append(evidenceReason.getEvidenceText());
|
|
|
+ }
|
|
|
+ //填充对比记录文字
|
|
|
+ disclosures.append("\r");
|
|
|
+ disclosures.append("(");
|
|
|
+ disclosures.append(tem.getFieldName());
|
|
|
+ disclosures.append("[" + (tem.getPosition()) + "]");
|
|
|
+ disclosures.append(")");
|
|
|
+ List<Integer> featuresIds = scenariosRecords.stream().filter(te -> te.getReasonId().equals(tem.getReasonId())).map(AssoGroupReason::getFeatureId).collect(Collectors.toList());
|
|
|
+ //根据特征Id获得特征内容
|
|
|
+ List<String> feaListContent = features.stream().filter(te -> featuresIds.contains(te.getId())).map(Feature::getContent).collect(Collectors.toList());
|
|
|
+ feaListContent.forEach(te -> disclosures.append("(" + te + ")"));
|
|
|
+ disclosures.append("\n");
|
|
|
+ }
|
|
|
+ int order = Integer.parseInt(OtherName.get(item.getPatentNo()).toString());
|
|
|
+
|
|
|
+ patentListMap.put("name", item.getTitle());
|
|
|
+ patentListMap.put("fileName", "D" + order);
|
|
|
+ patentListMap.put("publicDate", item.getPublicDate());
|
|
|
+ patentListMap.put("publicNo", item.getPublicNo());
|
|
|
+ patentListMap.put("SSIM", "");
|
|
|
+ patentListMap.put("applicant", applicants);
|
|
|
+ patentListMap.put("patentNo", item.getPatentNo());
|
|
|
+ if (item.getAbstractStr() != null && item.getAbstractStr().size() > 0) {
|
|
|
+ patentListMap.put("abstractStr", item.getAbstractStr().get(0).getTextContent());
|
|
|
+ }
|
|
|
+
|
|
|
+ patentListMap.put("compareFileName", "对比文件" + (order));
|
|
|
+ patentListMap.put("applicationDate", item.getAppDate());
|
|
|
+ //图示
|
|
|
+ String guid = FormatUtil.getPictureFormat(item.getAppNo());
|
|
|
+ PictureRenderData pictureData = this.guidToStream(guid);
|
|
|
+
|
|
|
+ if (pictureData != null) {
|
|
|
+ patentListMap.put("abstractPath", pictureData);
|
|
|
+ }
|
|
|
+ patentListMap.put("disclosures", disclosures);
|
|
|
+ patentListMap.put("order", order);
|
|
|
+ patentListMaps.add(patentListMap);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Map<String, Object>> rightMaps = new ArrayList<>();
|
|
|
+ List<Integer> noveltyIds = new ArrayList<Integer>();
|
|
|
+ List<Integer> creativeIds = new ArrayList<Integer>();
|
|
|
+ for (Map<String, Object> right : rights) {
|
|
|
+ String text = "";
|
|
|
+ if (right.get("parentSort") != null && !right.get("parentSort").equals("-1")) {
|
|
|
+ String parentSort = "";
|
|
|
+ List<String> sorts = new ArrayList<>(Arrays.asList(right.get("parentSort").toString().split(",")));
|
|
|
+ List<Integer> sortIds = new ArrayList<>();
|
|
|
+
|
|
|
+ sorts.forEach(item -> {
|
|
|
+ sortIds.add(Integer.parseInt(item) + 1);
|
|
|
+ });
|
|
|
+
|
|
|
+ parentSort = StringUtils.join(sortIds, "、");
|
|
|
+
|
|
|
+ text = right.get("rightNameLong") + "为引用权" + parentSort + "的从属权利要求,";
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int i = 0; i < compareScenarios.size(); i++) {
|
|
|
+ ProofGroup item1 = compareScenarios.get(i);
|
|
|
+ //判断是该权要的方案
|
|
|
+ if (right.get("sort").equals(item1.getClaimSort())) {
|
|
|
+ //根据方案id获得特征和记录关联表的id
|
|
|
+ List<Integer> recordIds = scenariosRecords.stream().filter(item -> item.getGroupId().equals(item1.getId())).map(AssoGroupReason::getReasonId).collect(Collectors.toList());
|
|
|
+ //获得记录
|
|
|
+ List<EvidenceReason> compareRecords1 = new ArrayList<>();
|
|
|
+ if (recordIds != null && recordIds.size() != 0) {
|
|
|
+ compareRecords1 = evidenceReasons.stream().filter(item -> recordIds.contains(item.getId())).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ //判断方案是否具有创造性或者新颖性字眼
|
|
|
+ if (item1.getDescription() != null && (item1.getDescription().contains("创造性") || item1.getDescription().contains("新颖性"))) {
|
|
|
+ //装载对比记录
|
|
|
+ List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
+
|
|
|
+ for (EvidenceReason record : compareRecords1) {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ PictureRenderData pictureData = this.guidToStream(record.getFileGuid());
|
|
|
+ map.put("figure", pictureData);
|
|
|
+ AssoReasonLiterature assoReasonLiterature = assoReasonLiteratures.stream().filter(t -> t.getReasonId().equals(record.getId())).findFirst().orElse(null);
|
|
|
+ String patentNo = "";
|
|
|
+ if (assoReasonLiterature != null) {
|
|
|
+ if (assoReasonLiterature.getFieldName() == null && assoReasonLiterature.getPosition() == null) {
|
|
|
+ map.put("position", "");
|
|
|
+ } else {
|
|
|
+ map.put("position", "\r" + "(" + assoReasonLiterature.getFieldName() + "[" + assoReasonLiterature.getPosition() + "]" + ")");
|
|
|
+ }
|
|
|
+
|
|
|
+ CompareLiteratureVO compareLiterature = compareLiteratures.stream().filter(t -> t.getId().equals(assoReasonLiterature.getLiteratureId())).findFirst().orElse(null);
|
|
|
+ patentNo = compareLiterature.getLiteratureNo() != null ? compareLiterature.getLiteratureNo() : "";
|
|
|
+ if (OtherName.containsKey(patentNo)) {
|
|
|
+ patentNo = "D" + OtherName.get(patentNo).toString() + ":";
|
|
|
+ } else if (!patentNo.equals("")) {
|
|
|
+ patentNo += ":";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String compareContent = "";
|
|
|
+
|
|
|
+ //获取对比内容
|
|
|
+ String content = record.getEvidenceText() != null ? record.getEvidenceText() : "";
|
|
|
+ //获得对比专利号
|
|
|
+
|
|
|
+ //获得解析过程
|
|
|
+ String paresingProcess = record.getDescription() != null ? "(" + record.getDescription() + ")" : "";
|
|
|
+ compareContent = patentNo + content + paresingProcess;
|
|
|
+ map.put("compareContent", compareContent);
|
|
|
+ maps.add(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item1.getDescription().contains("创造性")) {
|
|
|
+ creativeIds.add(Integer.parseInt(right.get("sort").toString()) + 1);
|
|
|
+
|
|
|
+ right.put("records", maps);
|
|
|
+ right.put("text", "第3款的创造性的规定。\n" + text + right.get("rightNameLong") + "的附加技术特征为:");
|
|
|
+ rightMaps.add(right);
|
|
|
+ } else if (item1.getDescription().contains("新颖性")) {
|
|
|
+ noveltyIds.add(Integer.parseInt(right.get("sort").toString()) + 1);
|
|
|
+ right.put("text", "第2款的新颖性的规定。\n" + text + right.get("rightNameLong") + "保护的主体,具体:");
|
|
|
+ right.put("records", compareRecords1);
|
|
|
+ rightMaps.add(right);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ String noveltyIdStr = StringUtils.join(noveltyIds, ",");
|
|
|
+ String creativeIdStr = StringUtils.join(creativeIds, ",");
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ String date = DateUtils.formatDate(new Date(), DateUtils.YYYY_MM_DD);
|
|
|
+ String[] ds = date.split("-");
|
|
|
+ map.put("sys", new SystemMO(ds[0], ds[1], ds[2], "", "reportName"));
|
|
|
+ map.put("signPatent", signPatent);
|
|
|
+ map.put("pantentNo", report.getSignPatentNo());
|
|
|
+ map.put("rights", rightMaps);
|
|
|
+ map.put("noveltyIdStr", noveltyIdStr);
|
|
|
+ map.put("creativeIdStr", creativeIdStr);
|
|
|
+ map.put("patentList", patentListMaps);
|
|
|
+ // 为表格的显示绑定行循环
|
|
|
+ LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
|
|
+ HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
|
|
+ // 将bz设置为行循环绑定的数据源的key,即key是bz的value会在模板中的{{bz}}处进行解析
|
|
|
+ Configure configure = Configure.builder()
|
|
|
+ .bind("patentList", policy)
|
|
|
+ .bind("fileDetails", policy)
|
|
|
+ .bind("allResults", policy)
|
|
|
+ .bind("signPatent.rights", policy)
|
|
|
+ .bind("remark", htmlRenderPolicy)
|
|
|
+ .build();
|
|
|
+ // 读取模板、数据并渲染
|
|
|
+ XWPFTemplate template = XWPFTemplate.compile(filePath, configure).render(map);
|
|
|
+ return template;
|
|
|
+ }
|
|
|
}
|