|
@@ -1,5 +1,6 @@
|
|
|
package cn.cslg.pas.service.business;
|
|
|
|
|
|
+import cn.cslg.pas.common.dto.ComparedPatentVO;
|
|
|
import cn.cslg.pas.common.dto.business.GetFeatureSplitDTO;
|
|
|
import cn.cslg.pas.common.dto.business.TortCompareRecordDTO;
|
|
|
import cn.cslg.pas.common.dto.business.TortDTO;
|
|
@@ -14,9 +15,13 @@ import cn.cslg.pas.domain.business.CompareLiterature;
|
|
|
import cn.cslg.pas.domain.business.FTOCompareRecord;
|
|
|
import cn.cslg.pas.domain.business.Feature;
|
|
|
import cn.cslg.pas.domain.business.ProjectTask;
|
|
|
+import cn.cslg.pas.domain.es.Patent;
|
|
|
import cn.cslg.pas.exception.UnLoginException;
|
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.mapper.FTOCompareRecordMapper;
|
|
|
+import cn.cslg.pas.service.business.es.EsFamilyService;
|
|
|
+import cn.cslg.pas.service.business.es.EsPatentService;
|
|
|
+import cn.cslg.pas.service.business.es.EsService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.spire.pdf.packages.sprcxq;
|
|
@@ -29,6 +34,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -62,6 +68,10 @@ public class FTOCompareRecordService extends ServiceImpl<FTOCompareRecordMapper,
|
|
|
@Autowired
|
|
|
private TortCompareRecordService tortCompareRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private EsPatentService esPatentService;
|
|
|
+ @Autowired
|
|
|
+ private EsFamilyService esFamilyService;
|
|
|
/**
|
|
|
* 查询FTO对比结果VO
|
|
|
* @param getFeatureSplitDTO
|
|
@@ -821,4 +831,29 @@ public class FTOCompareRecordService extends ServiceImpl<FTOCompareRecordMapper,
|
|
|
return tortVOS;
|
|
|
}
|
|
|
|
|
|
+ public List<ComparedPatentVO> getComparedPatent(Integer projectId, Integer compareResult) {
|
|
|
+ //根据projectId 查询出对比过的专利号
|
|
|
+ List<String> patentNos = this.getBaseMapper().getComparedPatents(projectId,compareResult);
|
|
|
+ List<ComparedPatentVO> comparedPatentVOS = new ArrayList<>();
|
|
|
+ //根据专利号查询专利信息
|
|
|
+ List<Patent> patents = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ if (patentNos != null && patentNos.size() != 0) {
|
|
|
+ patents = esPatentService.getPatentsByNo(patentNos, true);
|
|
|
+ List<Map<String, Object>> maps = esFamilyService.getPatentFamilyByNos(patentNos, "inpadoc");
|
|
|
+ patents.forEach(item -> {
|
|
|
+ ComparedPatentVO comparedPatentVO = new ComparedPatentVO();
|
|
|
+ BeanUtils.copyProperties(item, comparedPatentVO);
|
|
|
+ Map<String, Object> map = maps.stream().filter(i -> i.get("id").toString().equals(item.getInpadocFamilyId())).findFirst().orElse(null);
|
|
|
+ if(map!=null){
|
|
|
+ comparedPatentVO.setInpadocFamilyNos((List<String>)map.get("nos"));
|
|
|
+ }
|
|
|
+ comparedPatentVOS.add(comparedPatentVO);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+ return comparedPatentVOS;
|
|
|
+ }
|
|
|
+
|
|
|
}
|