|
@@ -301,13 +301,18 @@ public class EsPatentService {
|
|
}
|
|
}
|
|
|
|
|
|
//-------------------查询相关专利信息-----------
|
|
//-------------------查询相关专利信息-----------
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询专利(用于导出专利数据)
|
|
|
|
+ * @param patentDTO
|
|
|
|
+ * @param file
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
public List<PatentColumnDTO> selectPatent(SelectPatentDTO patentDTO, File file) throws Exception {
|
|
public List<PatentColumnDTO> selectPatent(SelectPatentDTO patentDTO, File file) throws Exception {
|
|
List<PatentColumnDTO> columnDTOS = new ArrayList<>();
|
|
List<PatentColumnDTO> columnDTOS = new ArrayList<>();
|
|
- //根据条件获取图片专利里的数据信息,如appNo
|
|
|
|
- List<EsPatentVectorVo> vectorVos = this.selectPicturePatent(patentDTO, file);
|
|
|
|
- if (!CollectionUtils.isEmpty(vectorVos)) {
|
|
|
|
- for (EsPatentVectorVo vectorVo : vectorVos) {
|
|
|
|
- String appNo = vectorVo.getAppNo();
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(patentDTO.getAppNos())) {
|
|
|
|
+ for (String appNo : patentDTO.getAppNos()) {
|
|
//获取专利的多张摘要附图
|
|
//获取专利的多张摘要附图
|
|
EsPictureNoDTO esPictureNoDTO = new EsPictureNoDTO();
|
|
EsPictureNoDTO esPictureNoDTO = new EsPictureNoDTO();
|
|
esPictureNoDTO.setAppNo(appNo);
|
|
esPictureNoDTO.setAppNo(appNo);
|
|
@@ -319,10 +324,36 @@ public class EsPatentService {
|
|
columnDTO.setPictureGuids(guids);
|
|
columnDTO.setPictureGuids(guids);
|
|
columnDTOS.add(columnDTO);
|
|
columnDTOS.add(columnDTO);
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ //根据条件获取图片专利里的数据信息,如appNo
|
|
|
|
+ List<EsPatentVectorVo> vectorVos = this.selectPicturePatent(patentDTO, file);
|
|
|
|
+ if (!CollectionUtils.isEmpty(vectorVos)) {
|
|
|
|
+ for (EsPatentVectorVo vectorVo : vectorVos) {
|
|
|
|
+ String appNo = vectorVo.getAppNo();
|
|
|
|
+ //获取专利的多张摘要附图
|
|
|
|
+ EsPictureNoDTO esPictureNoDTO = new EsPictureNoDTO();
|
|
|
|
+ esPictureNoDTO.setAppNo(appNo);
|
|
|
|
+ List<EsPictureNoVo> noVos = esDenseVectorService.getPictureByNo(esPictureNoDTO);
|
|
|
|
+ List<String> guids = noVos.stream().map(EsPictureNoVo::getGuid).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ //根据专利申请号appNo获取专利信息
|
|
|
|
+ PatentColumnDTO columnDTO = this.selectPatentByAppNo(appNo);
|
|
|
|
+ columnDTO.setPictureGuids(guids);
|
|
|
|
+ columnDTOS.add(columnDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
return columnDTOS;
|
|
return columnDTOS;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取图片专利里的信息
|
|
|
|
+ * @param patentDTO
|
|
|
|
+ * @param file
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
public List<EsPatentVectorVo> selectPicturePatent(SelectPatentDTO patentDTO, File file) throws Exception {
|
|
public List<EsPatentVectorVo> selectPicturePatent(SelectPatentDTO patentDTO, File file) throws Exception {
|
|
Boolean ifAllExport = patentDTO.getIfAllExport();
|
|
Boolean ifAllExport = patentDTO.getIfAllExport();
|
|
Integer limitNum = patentDTO.getLimitNum();
|
|
Integer limitNum = patentDTO.getLimitNum();
|
|
@@ -395,7 +426,12 @@ public class EsPatentService {
|
|
return vectorVos;
|
|
return vectorVos;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据申请号查询专利信息
|
|
|
|
+ * @param appNo
|
|
|
|
+ * @return
|
|
|
|
+ * @throws IOException
|
|
|
|
+ */
|
|
public PatentColumnDTO selectPatentByAppNo(String appNo) throws IOException {
|
|
public PatentColumnDTO selectPatentByAppNo(String appNo) throws IOException {
|
|
PatentColumnDTO columnDTO = new PatentColumnDTO();
|
|
PatentColumnDTO columnDTO = new PatentColumnDTO();
|
|
SearchRequest.Builder builder = new SearchRequest.Builder();
|
|
SearchRequest.Builder builder = new SearchRequest.Builder();
|