Ver código fonte

Merge remote-tracking branch 'origin/master'

lwhhszx 1 ano atrás
pai
commit
f6a7924b06

+ 11 - 2
src/main/java/cn/cslg/pas/service/business/es/EsService.java

@@ -17,6 +17,7 @@ import cn.cslg.pas.common.utils.parseQueryToTree.expressManager;
 import cn.cslg.pas.common.utils.parseQueryToTree.operateNode;
 import cn.cslg.pas.common.utils.parseQueryToTree.treeNode;
 import cn.cslg.pas.common.vo.ChinaLeagalStatus;
+import cn.cslg.pas.common.vo.ContentVO;
 import cn.cslg.pas.common.vo.PatentWithIdVO;
 import cn.cslg.pas.common.vo.StarPatentVO;
 import cn.cslg.pas.domain.es.*;
@@ -197,6 +198,16 @@ public class EsService {
             PatentColumnDTO columnDTO = new PatentColumnDTO();
 //            columnDTO.setPatentNo(esMess.getPatentNo());
             BeanUtils.copyProperties(esMess, columnDTO);
+            ContentVO titleVO = new ContentVO();
+            String title = StringUtils.strip(JSON.toJSONString(esMess.getTitle()), "[]");
+            ContentDetailDTO titleContent = JSONObject.parseObject(title, ContentDetailDTO.class);
+            titleVO.setContent(titleContent.getTextContent());
+            columnDTO.setTitle(titleVO);
+            ContentVO abstractVO = new ContentVO();
+            String abstractStr = StringUtils.strip(JSON.toJSONString(esMess.getAbstractStr()), "[]");
+            ContentDetailDTO abstractContent = JSONObject.parseObject(abstractStr, ContentDetailDTO.class);
+            abstractVO.setContent(abstractContent.getTextContent());
+            columnDTO.setAbstractStr(abstractVO);
             list.add(columnDTO);
 
         }
@@ -759,10 +770,8 @@ public class EsService {
         SearchResponse<Patent> response = client.search(builder.build(), Patent.class);
         SelectClaimDTO dto = new SelectClaimDTO();
         List<Hit<Patent>> hits = response.hits().hits();
-        long total = response.hits().total().value();
         for (Hit<Patent> hit : hits) {
             Patent esMess = hit.source();
-//            dto.setClaim(JSON.toJSONString(esMess.getClaim()));
             if (esMess != null) {
                 String claim = StringUtils.strip(JSON.toJSONString(esMess.getClaim()), "[]");
                 ContentDetailDTO contentDetailDTO = JSONObject.parseObject(claim, ContentDetailDTO.class);