|
@@ -1,6 +1,8 @@
|
|
|
package cn.cslg.pas.factorys.noveltyTemplateFacotry;
|
|
|
|
|
|
+import cn.cslg.pas.common.model.cronModel.PersonnelVO;
|
|
|
import cn.cslg.pas.common.model.cronModel.SystemFile;
|
|
|
+import cn.cslg.pas.common.utils.DateUtils;
|
|
|
import cn.cslg.pas.common.utils.StringUtils;
|
|
|
import cn.cslg.pas.common.vo.CompareLiteratureVO;
|
|
|
import cn.cslg.pas.common.vo.NoveltyProjectVO.NoveltyCompareRecordQueryVO;
|
|
@@ -25,10 +27,11 @@ import java.util.stream.Collectors;
|
|
|
public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
@Autowired
|
|
|
private EsPatentService esPatentService;
|
|
|
+
|
|
|
@Override
|
|
|
- public Map<String,Object> getMap(List<QueryNoveltyProjectVO> queryNoveltyProjectVOs,TechnicalCaseVO technicalCaseVO,List<CompareLiteratureVO> compareLiteratureVOS,List<NoveltyCompareRecordQueryVO> noveltyCompareRecordQueryVOS,List<RetrieveRecordVO> retrieveRecordVOS){
|
|
|
- Map<String,Object> map =new HashMap<>();
|
|
|
- Map<String, Object> baseMap = this.getBaseMap(queryNoveltyProjectVOs);
|
|
|
+ public Map<String, Object> getMap(List<QueryNoveltyProjectVO> queryNoveltyProjectVOs, TechnicalCaseVO technicalCaseVO, List<CompareLiteratureVO> compareLiteratureVOS, List<NoveltyCompareRecordQueryVO> noveltyCompareRecordQueryVOS, List<RetrieveRecordVO> retrieveRecordVOS, PersonnelVO personnelVO) {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ Map<String, Object> baseMap = this.getBaseMap(queryNoveltyProjectVOs, retrieveRecordVOS, personnelVO);
|
|
|
Map<String, Object> technicalCaseMap = this.getTechnicalCaseMap(technicalCaseVO);
|
|
|
List<Map<String, Object>> compareLiteratureMap = this.getCompareLiteratureMap(compareLiteratureVOS);
|
|
|
List<Map<String, Object>> compareRecordMap = this.getCompareRecordMap(noveltyCompareRecordQueryVOS, compareLiteratureVOS);
|
|
@@ -40,6 +43,7 @@ public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
map.put("searchRecord", searchRecordMap);
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Object> getTechnicalCaseMap(TechnicalCaseVO technicalCaseVO) {
|
|
|
Map<String, Object> technicalMap = new HashMap<>();
|
|
@@ -53,7 +57,7 @@ public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getBaseMap(List<QueryNoveltyProjectVO> queryNoveltyProjectVOs) {
|
|
|
+ public Map<String, Object> getBaseMap(List<QueryNoveltyProjectVO> queryNoveltyProjectVOs, List<RetrieveRecordVO> retrieveRecordVOS, PersonnelVO personnelVO) {
|
|
|
Map<String, Object> baseMap = new HashMap<>();
|
|
|
if (queryNoveltyProjectVOs == null || queryNoveltyProjectVOs.size() == 0) {
|
|
|
return baseMap;
|
|
@@ -64,8 +68,12 @@ public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
baseMap.put("customCaseNumber", queryNoveltyProjectVO.getCustomCaseNumber());
|
|
|
baseMap.put("caseName", queryNoveltyProjectVO.getCaseName());
|
|
|
baseMap.put("technicalContact", queryNoveltyProjectVO.getTechnicalContact());
|
|
|
- baseMap.put("searchUnit", queryNoveltyProjectVO.getSearchUnit());
|
|
|
-
|
|
|
+ String searchUnit = queryNoveltyProjectVO.getSearchUnit();
|
|
|
+ if (searchUnit == null || searchUnit.trim().equals("")) {
|
|
|
+ baseMap.put("searchUnit", "广东君龙律师事务所");
|
|
|
+ } else {
|
|
|
+ baseMap.put("searchUnit", queryNoveltyProjectVO.getSearchUnit());
|
|
|
+ }
|
|
|
baseMap.put("inventor", queryNoveltyProjectVO.getInventor());
|
|
|
baseMap.put("inventorContact", "");
|
|
|
baseMap.put("distinguishTechnical", "");
|
|
@@ -74,13 +82,21 @@ public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
baseMap.put("preliminaryConclusions", queryNoveltyProjectVO.getPreliminaryConclusions());
|
|
|
baseMap.put("applicationAdvice", queryNoveltyProjectVO.getApplicationAdvice());
|
|
|
baseMap.put("finalConclusions", NoveltyTempalteUtil.reFinalConclusions(Arrays.asList(queryNoveltyProjectVO.getPreliminaryConclusions(), queryNoveltyProjectVO.getApplicationAdvice())));
|
|
|
- baseMap.put("ifPatentability", "是");
|
|
|
+ baseMap.put("ifPatentability", queryNoveltyProjectVO.getIfPatentability());
|
|
|
baseMap.put("ipr", queryNoveltyProjectVO.getIpr());
|
|
|
if (queryNoveltyProjectVO.getHeadName() != null) {
|
|
|
baseMap.put("searchName", queryNoveltyProjectVO.getHeadName());
|
|
|
- } else if (queryNoveltyProjectVO.getCaseName() != null) {
|
|
|
+ } else if (queryNoveltyProjectVO.getCreateName() != null) {
|
|
|
baseMap.put("searchName", queryNoveltyProjectVO.getCreateName());
|
|
|
}
|
|
|
+ if (retrieveRecordVOS != null && retrieveRecordVOS.size() > 0) {
|
|
|
+ RetrieveRecordVO retrieveRecordVO = retrieveRecordVOS.get(retrieveRecordVOS.size() - 1);
|
|
|
+ Date date = retrieveRecordVO.getRetrieveTime();
|
|
|
+ if (date != null) {
|
|
|
+ String dateStr = DateUtils.formatDate(date, "yyyy-MM-dd");
|
|
|
+ baseMap.put("searchTime", dateStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
return baseMap;
|
|
|
}
|
|
|
|
|
@@ -108,7 +124,7 @@ public class GetVisionoxcxTempalte implements GetTemplateMapsImp {
|
|
|
List<String> patentNos = compareLiteratureVOS.stream().map(CompareLiteratureVO::getLiteratureNo).collect(Collectors.toList());
|
|
|
List<Patent> patents = new ArrayList<>();
|
|
|
try {
|
|
|
- patents = esPatentService.getPatentsByNo(patentNos, false, null, null);
|
|
|
+ patents = esPatentService.getPatentsByNo(patentNos, true, null, null);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|