|
@@ -10,6 +10,7 @@ import cn.cslg.pas.common.utils.*;
|
|
|
import cn.cslg.pas.common.vo.*;
|
|
|
import cn.cslg.pas.domain.ReportDocument;
|
|
|
import cn.cslg.pas.domain.business.*;
|
|
|
+import cn.cslg.pas.domain.es.Patent;
|
|
|
import cn.cslg.pas.domain.es.Text;
|
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.mapper.AvoidDesignMapper;
|
|
@@ -405,11 +406,11 @@ public class ReportExportService {
|
|
|
}
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
//申请日
|
|
|
- if(patent.getAppDate()!=null) {
|
|
|
- patentMap.put("appDate", dateFormat.format(patent.getAppDate()));
|
|
|
+ if (patent.getAppDate() != null) {
|
|
|
+ patentMap.put("appDate", dateFormat.format(patent.getAppDate()));
|
|
|
}
|
|
|
//公开日
|
|
|
- if(patent.getPublicDate()!=null) {
|
|
|
+ if (patent.getPublicDate() != null) {
|
|
|
patentMap.put("publicDate", dateFormat.format(patent.getPublicDate()));
|
|
|
}
|
|
|
//专利号
|
|
@@ -476,8 +477,13 @@ public class ReportExportService {
|
|
|
}
|
|
|
// private XWPFTemplate getstabilityTemplate(Integer projectId, String filePath) throws IOException {
|
|
|
// List<PatentRight> patentRights = new ArrayList<>();
|
|
|
+//
|
|
|
// //装载标的专利信息
|
|
|
-// Map<String, Object> signPatent = this.signPantentMess(report.getSignPatentNo());
|
|
|
+// 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);
|
|
|
// //根据报告Id获得报告信息
|
|
|
// // 根据拆分人(报告的创建人)Id和报告ID获得所有特征
|
|
|
// LambdaQueryWrapper<Features> allFeaturesWrapper = new LambdaQueryWrapper<>();
|
|
@@ -826,4 +832,64 @@ public class ReportExportService {
|
|
|
// XWPFTemplate template = XWPFTemplate.compile(filePath, configure).render(map);
|
|
|
// return template;
|
|
|
// }
|
|
|
+
|
|
|
+ //
|
|
|
+// public Map<String, Object> signPantentMess(String patentNo) throws IOException {
|
|
|
+//
|
|
|
+// Patent patent = new Patent();
|
|
|
+// try {
|
|
|
+// List<Patent> patentList = esPatentService.getPatentsByNo(Arrays.asList(patentNo), true, null, null);
|
|
|
+// if(patentList.size()>0){
|
|
|
+// patent=patentList.get(0);
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// throw new IOException();
|
|
|
+// }
|
|
|
+//
|
|
|
+// //装载单个专利的信息
|
|
|
+// Map<String, Object> patentMap = new HashMap<>();
|
|
|
+// List<JSONObject> applicantJSONs = JSON.parseArray(patent.get("applicant").toString(), JSONObject.class);
|
|
|
+// StringBuilder applicants = new StringBuilder();
|
|
|
+// StringBuilder rightPerson = new StringBuilder();
|
|
|
+// applicantJSONs.forEach(tem -> {
|
|
|
+// if (Integer.parseInt(tem.get("dataType").toString()) == 1) {
|
|
|
+// applicants.append(tem.get("name") + "\r");
|
|
|
+// } else {
|
|
|
+// rightPerson.append(tem.get("name") + "\r");
|
|
|
+// }
|
|
|
+// });
|
|
|
+// //申请日
|
|
|
+// patentMap.put("applicationDate", patent.getAppDate());
|
|
|
+//
|
|
|
+// //公开日
|
|
|
+// patentMap.put("publicDate", patent.getPublicDate());
|
|
|
+// //公开号
|
|
|
+// patentMap.put("publicNo", patent.getPublicNo());
|
|
|
+// //专利号
|
|
|
+// patentMap.put("patentNo", patent.getPatentNo());
|
|
|
+// //专利权人
|
|
|
+// patentMap.put("rightPerson", rightPerson);
|
|
|
+// //图示
|
|
|
+// patentMap.put("abstractPath", pasFile + patent.get("abstractPath"));
|
|
|
+// patentMap.put("name", patent.getTitle());
|
|
|
+// //查询专利权要
|
|
|
+// String resBody2 = outInterfaceService.getPatentRightFromPAS(patentNo);
|
|
|
+// JSONObject jsonObject2 = JSONObject.parseObject(resBody2);
|
|
|
+// //解析jason获得标的专利的权要
|
|
|
+// List<PatentRight> patentRightsOrgin = JSON.parseArray(jsonObject2.getString("data"), PatentRight.class);
|
|
|
+// List<Map<String, Object>> rights = new ArrayList<>();
|
|
|
+// //给权要进行格式更改
|
|
|
+// List<PatentRight> patentRights = featureService.FormatPatentRights(patentRightsOrgin, patentNo);
|
|
|
+// patentRights.forEach(item -> {
|
|
|
+// Map<String, Object> temMap = new HashMap<>();
|
|
|
+// temMap.put("rightName", "权" + (item.getSort() + 1));
|
|
|
+// temMap.put("content", item.getContent());
|
|
|
+// temMap.put("rightNameLong", "权利要求" + (item.getSort() + 1));
|
|
|
+// temMap.put("parentSort", item.getParentSort());
|
|
|
+// temMap.put("sort", item.getSort());
|
|
|
+// rights.add(temMap);
|
|
|
+// });
|
|
|
+// patentMap.put("rights", rights);
|
|
|
+// return patentMap;
|
|
|
+// }
|
|
|
}
|