|
@@ -11,6 +11,7 @@ import cn.cslg.pas.common.model.request.MapRequest;
|
|
import cn.cslg.pas.common.model.request.OrderDTO;
|
|
import cn.cslg.pas.common.model.request.OrderDTO;
|
|
import cn.cslg.pas.common.model.request.QueryRequest;
|
|
import cn.cslg.pas.common.model.request.QueryRequest;
|
|
import cn.cslg.pas.common.model.request.StringRequest;
|
|
import cn.cslg.pas.common.model.request.StringRequest;
|
|
|
|
+import cn.cslg.pas.common.utils.FormatUtil;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.expressManager;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.expressManager;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.operateNode;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.operateNode;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.treeNode;
|
|
import cn.cslg.pas.common.utils.parseQueryToTree.treeNode;
|
|
@@ -39,6 +40,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -63,8 +65,8 @@ public class EsPatentService {
|
|
* @return
|
|
* @return
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
- public PatentDetailDTO selectPatentDetail(PatentNoVO vo) throws IOException {
|
|
|
|
- PatentDetailDTO dto = new PatentDetailDTO();
|
|
|
|
|
|
+ public PatentColumnDTO selectPatentDetail(PatentNoVO vo) throws IOException {
|
|
|
|
+ PatentColumnDTO dto = new PatentColumnDTO();
|
|
SearchRequest.Builder builder = new SearchRequest.Builder();
|
|
SearchRequest.Builder builder = new SearchRequest.Builder();
|
|
//设置查询索引
|
|
//设置查询索引
|
|
builder.index("patent");
|
|
builder.index("patent");
|
|
@@ -76,19 +78,8 @@ public class EsPatentService {
|
|
for (Hit<Patent> hit : hits) {
|
|
for (Hit<Patent> hit : hits) {
|
|
Patent esMess = hit.source();
|
|
Patent esMess = hit.source();
|
|
BeanUtils.copyProperties(esMess, dto);
|
|
BeanUtils.copyProperties(esMess, dto);
|
|
- dto.setMipc(esMess.getMipc());
|
|
|
|
- dto.setLegalStatus(esMess.getLegalStatus());
|
|
|
|
- dto.setSimpleStatus(esMess.getSimpleStatus());
|
|
|
|
- dto.setPatentType(esMess.getPatentType());
|
|
|
|
- if (!CollectionUtils.isEmpty(esMess.getTitle())) {
|
|
|
|
- dto.setTitle(this.loadContent(esMess.getTitle()));
|
|
|
|
- }
|
|
|
|
- if (!CollectionUtils.isEmpty(esMess.getAbstractStr())) {
|
|
|
|
- dto.setAbstractStr(this.loadContent(esMess.getAbstractStr()));
|
|
|
|
- }
|
|
|
|
- if (!CollectionUtils.isEmpty(esMess.getClaim())) {
|
|
|
|
- dto.setClaim(this.loadContent(esMess.getClaim()));
|
|
|
|
- }
|
|
|
|
|
|
+ dto.setRightHolderAddr(esMess.getRightHolderAddr());
|
|
|
|
+ dto.setApplicantAddr(esMess.getApplicantAddr());
|
|
if (!CollectionUtils.isEmpty(esMess.getApplicant())) {
|
|
if (!CollectionUtils.isEmpty(esMess.getApplicant())) {
|
|
dto.setApplicant(this.loadName(esMess.getApplicant()));
|
|
dto.setApplicant(this.loadName(esMess.getApplicant()));
|
|
}
|
|
}
|
|
@@ -99,6 +90,7 @@ public class EsPatentService {
|
|
dto.setInventor(this.loadName(esMess.getInventor()));
|
|
dto.setInventor(this.loadName(esMess.getInventor()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ dto.setPictureGuid(FormatUtil.getPictureFormat(dto.getAppNo()));
|
|
return dto;
|
|
return dto;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -176,9 +168,6 @@ public class EsPatentService {
|
|
//设置查询索引
|
|
//设置查询索引
|
|
builder.index("patent");
|
|
builder.index("patent");
|
|
//申请号
|
|
//申请号
|
|
- if (StringUtils.isNotEmpty(vo.getAppNo())) {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
Query q1 = QueryBuilders.term(t -> t.field("patent_no.keyword").value(vo.getAppNo()));
|
|
Query q1 = QueryBuilders.term(t -> t.field("patent_no.keyword").value(vo.getAppNo()));
|
|
//公开号
|
|
//公开号
|
|
Query q2 = QueryBuilders.term(t -> t.field("patent_no.keyword").value(vo.getPublicNo()));
|
|
Query q2 = QueryBuilders.term(t -> t.field("patent_no.keyword").value(vo.getPublicNo()));
|
|
@@ -196,8 +185,8 @@ public class EsPatentService {
|
|
kinDTO.setAppNo(patent.getAppNo());
|
|
kinDTO.setAppNo(patent.getAppNo());
|
|
kinDTO.setPublicNo(patent.getPublicNo());
|
|
kinDTO.setPublicNo(patent.getPublicNo());
|
|
kinDTO.setGrantNo(patent.getGrantNo());
|
|
kinDTO.setGrantNo(patent.getGrantNo());
|
|
- kinDTO.setTitle(this.loadContent(patent.getTitle()));
|
|
|
|
- kinDTO.setAbstractStr(this.loadContent(patent.getAbstractStr()));
|
|
|
|
|
|
+ kinDTO.setTitle(patent.getTitle());
|
|
|
|
+ kinDTO.setAbstractStr(patent.getAbstractStr());
|
|
kinDTO.setApplicant(this.loadName(patent.getApplicant()));
|
|
kinDTO.setApplicant(this.loadName(patent.getApplicant()));
|
|
kinDTO.setRightHolder(this.loadName(patent.getRightHolder()));
|
|
kinDTO.setRightHolder(this.loadName(patent.getRightHolder()));
|
|
list.add(kinDTO);
|
|
list.add(kinDTO);
|