zero 1 vuosi sitten
vanhempi
commit
18a8f08f6e

+ 2 - 1
src/main/java/cn/cslg/pas/common/dto/business/EsCountDetailDTO.java

@@ -18,5 +18,6 @@ public class EsCountDetailDTO {
     private Long number;
     //限制数量
     private Integer topN;
-
+    //在一维数据下显示的名称
+    private String firstName;
 }

+ 11 - 0
src/main/java/cn/cslg/pas/common/dto/es/EsDateRangeDTO.java

@@ -0,0 +1,11 @@
+package cn.cslg.pas.common.dto.es;
+
+import lombok.Data;
+
+@Data
+public class EsDateRangeDTO {
+
+    private String minDate;
+
+    private String maxDate;
+}

+ 16 - 0
src/main/java/cn/cslg/pas/common/vo/es/EsDateRangeVO.java

@@ -0,0 +1,16 @@
+package cn.cslg.pas.common.vo.es;
+
+import cn.cslg.pas.common.dto.es.EsCustomFieldValueDTO;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class EsDateRangeVO {
+
+    private String condition;
+    private Integer projectId;
+    private List<EsCustomFieldValueDTO> customFields;
+    private Integer taskId;
+    private String field;
+}

+ 2 - 2
src/main/java/cn/cslg/pas/controller/CustomAnalyseController.java

@@ -48,14 +48,14 @@ public class CustomAnalyseController {
 
     @Operation(summary = "添加组别/分析项")
     @PostMapping("/addAnalyseGroup")
-    public Response addAnalyseGroup(@RequestBody CustomAnalyseDTO vo) {
+    public Response addAnalyseGroup(@RequestBody CustomAnalyseDTO vo) throws Exception {
         Integer groupId = customAnalyseService.addAnalyseGroup(vo);
         return Response.success(groupId);
     }
 
     @Operation(summary = "编辑组别")
     @PostMapping("/editAnalyseGroup")
-    public Response editAnalyseGroup(@RequestBody CustomAnalyseDTO vo) {
+    public Response editAnalyseGroup(@RequestBody CustomAnalyseDTO vo) throws Exception {
         Integer groupId = customAnalyseService.editAnalyseGroup(vo);
         return Response.success(groupId);
     }

+ 17 - 7
src/main/java/cn/cslg/pas/controller/PatentController.java

@@ -6,6 +6,7 @@ import cn.cslg.pas.common.dto.PatentExport.PatentExportParams;
 import cn.cslg.pas.common.dto.PatentExport.TaskParams;
 import cn.cslg.pas.common.dto.business.EsCountDTO;
 import cn.cslg.pas.common.dto.business.SelectClaimDTO;
+import cn.cslg.pas.common.dto.es.EsDateRangeDTO;
 import cn.cslg.pas.common.model.cronModel.Records;
 import cn.cslg.pas.common.model.request.StringRequest;
 import cn.cslg.pas.common.utils.*;
@@ -17,6 +18,7 @@ import cn.cslg.pas.common.vo.business.EsAllCountVO;
 import cn.cslg.pas.common.vo.business.PatentKinVO;
 import cn.cslg.pas.common.vo.business.PatentNoVO;
 import cn.cslg.pas.common.vo.es.EsCustomFieldBatchVO;
+import cn.cslg.pas.common.vo.es.EsDateRangeVO;
 import cn.cslg.pas.factorys.businessFactory.Business;
 import cn.cslg.pas.factorys.businessFactory.BusinessFactory;
 import cn.cslg.pas.service.business.CustomAnalyseService;
@@ -116,13 +118,6 @@ public class PatentController {
         return Response.success(records);
     }
 
-    @Operation(summary = "专利的聚合统计")
-    @PostMapping("/esCountAnalysis")
-    public Response esCountAnalysis(@RequestBody EsAllCountVO countVO) throws Exception {
-        EsCountDTO dto = esCountService.esCountAnalysis(countVO);
-        return Response.success(dto);
-    }
-
     @Operation(summary = "根据专利号查询内部专利")
     @GetMapping("/queryPatentByNo")
     public Response queryPatentByNo(String patentNo) throws Exception {
@@ -152,6 +147,21 @@ public class PatentController {
         return Response.success(dto);
     }
 
+    //----------------------------统计分析-------------------------
+    @Operation(summary = "专利的聚合统计")
+    @PostMapping("/esCountAnalysis")
+    public Response esCountAnalysis(@RequestBody EsAllCountVO countVO) throws Exception {
+        EsCountDTO dto = esCountService.esCountAnalysis(countVO);
+        return Response.success(dto);
+    }
+
+    @Operation(summary = "分析统计的栏位日期最大/最小值")
+    @PostMapping("/getFieldRange")
+    public Response getFieldRange(@RequestBody EsDateRangeVO rangeVO) throws Exception {
+        EsDateRangeDTO dto = esCountService.getFieldRange(rangeVO);
+        return Response.success(dto);
+    }
+
     //------------------------合并-----------------------------
     @Operation(summary = "专利列表上新增发明人/权利人/申请人合并")
     @PostMapping("/mergePerson")

+ 24 - 5
src/main/java/cn/cslg/pas/service/business/CustomAnalyseService.java

@@ -17,6 +17,7 @@ import cn.cslg.pas.mapper.CustomAnalysisItemMapper;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.BeanUtils;
@@ -103,7 +104,15 @@ public class CustomAnalyseService extends ServiceImpl<CustomAnalysisItemMapper,
     }
 
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
-    public Integer addAnalyseGroup(CustomAnalyseDTO vo) {
+    public Integer addAnalyseGroup(CustomAnalyseDTO vo) throws Exception {
+        List<CustomAnalysisItem> items = customAnalysisItemMapper.selectList(new QueryWrapper<CustomAnalysisItem>()
+                .lambda()
+                .eq(CustomAnalysisItem::getName, vo.getName())
+                .eq(CustomAnalysisItem::getType, vo.getType()));
+        if (items.size() > 1) {
+            throw new Exception("名称不可重复");
+        }
+
         String uid = IdUtil.simpleUUID();
         //获取登陆人信息 用于设置创建人
         PersonnelVO personnelVO = new PersonnelVO();
@@ -112,10 +121,14 @@ public class CustomAnalyseService extends ServiceImpl<CustomAnalysisItemMapper,
         } catch (Exception e) {
             throw new UnLoginException("未登录");
         }
-
         CustomAnalysisItem item = new CustomAnalysisItem();
         item.setUid(uid);
         BeanUtils.copyProperties(vo, item);
+        if (vo.getType() == 1) {
+            item.setParentId(0);
+        } else {
+            item.setParentId(vo.getParentId());
+        }
         item.setTenantId(personnelVO.getTenantId());
         item.setCreateId(personnelVO.getId());
         item.setCreateName(personnelVO.getName());
@@ -126,8 +139,14 @@ public class CustomAnalyseService extends ServiceImpl<CustomAnalysisItemMapper,
     }
 
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
-    public Integer editAnalyseGroup(CustomAnalyseDTO vo) {
-
+    public Integer editAnalyseGroup(CustomAnalyseDTO vo) throws Exception {
+        List<CustomAnalysisItem> items = customAnalysisItemMapper.selectList(new QueryWrapper<CustomAnalysisItem>()
+                .lambda()
+                .eq(CustomAnalysisItem::getName, vo.getName())
+                .eq(CustomAnalysisItem::getType, vo.getType()));
+        if (items.size() > 1) {
+            throw new Exception("名称不可重复");
+        }
         //获取登陆人信息 用于设置创建人
         PersonnelVO personnelVO = new PersonnelVO();
         try {
@@ -142,7 +161,7 @@ public class CustomAnalyseService extends ServiceImpl<CustomAnalysisItemMapper,
         item.setCreateId(personnelVO.getId());
         item.setCreateName(personnelVO.getName());
         item.setUpdateTime(new Date());
-        item.insert();
+        item.updateById();
         return item.getId();
     }
 

+ 104 - 32
src/main/java/cn/cslg/pas/service/business/es/EsCountService.java

@@ -3,12 +3,14 @@ package cn.cslg.pas.service.business.es;
 import cn.cslg.pas.common.dto.business.EsCountDTO;
 import cn.cslg.pas.common.dto.business.EsCountDetailDTO;
 import cn.cslg.pas.common.dto.es.EsCustomFieldValueDTO;
+import cn.cslg.pas.common.dto.es.EsDateRangeDTO;
 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.EsConfigVO;
 import cn.cslg.pas.common.vo.business.EsAllCountVO;
 import cn.cslg.pas.common.vo.business.EsCountVO;
+import cn.cslg.pas.common.vo.es.EsDateRangeVO;
 import cn.cslg.pas.domain.es.Patent;
 import cn.cslg.pas.factorys.EsCountAnalyseBuilderFactory.EsCountAnalysisBuilderFactory;
 import cn.cslg.pas.factorys.EsCountAnalyseBuilderFactory.IEsCountAnalysisBuilder;
@@ -56,13 +58,53 @@ public class EsCountService {
      * @throws Exception
      */
     public EsCountDTO esCountAnalysis(EsAllCountVO vo) throws Exception {
+        List<EsCountVO> countVOS = vo.getCountVOS();
         String searchCondition = vo.getCondition();
         List<EsCustomFieldValueDTO> customFields = vo.getCustomFields();
+        Integer taskId = vo.getTaskId();
+        Integer projectId = vo.getProjectId();
+        EsCountDTO esCountDTO = new EsCountDTO();
+        List<EsCountDetailDTO> detailDTOS = new ArrayList<>();
+        if (countVOS.size() > 1) {
+            EsCountVO countVO = countVOS.get(0);
+            List<String> values = countVO.getValues();
+            List<EsCountVO> esCountVOS = new ArrayList<>();
+            esCountVOS.add(countVOS.get(1));
+            if (StringUtils.isNotEmpty(countVO.getFieldId())) {
+                if (!CollectionUtils.isEmpty(values)) {
+                    for (String value : values) {
+                        EsCustomFieldValueDTO valueDTO = new EsCustomFieldValueDTO();
+                        valueDTO.setFieldId(countVO.getFieldId());
+                        valueDTO.setFieldValue(Arrays.asList(value));
+                        customFields.add(valueDTO);
+                        this.getReturnData(searchCondition, customFields, taskId, projectId, esCountVOS, detailDTOS, esCountDTO,value);
+                    }
+                }
+
+            } else {
+                for (String value : values) {
+                    if (searchCondition != null && !"".equals(searchCondition.trim())) {
+                        searchCondition = countVO.getField() + " = " + value + " AND " + searchCondition;
+                    } else {
+                        searchCondition = countVO.getField() + " = " + value;
+                    }
+                    this.getReturnData(searchCondition, customFields, taskId, projectId, esCountVOS, detailDTOS, esCountDTO,value);
+                }
+            }
+        } else {
+            this.getReturnData(searchCondition, customFields, taskId, projectId, countVOS, detailDTOS, esCountDTO,"");
+        }
+        esCountDTO.setDetailDTOS(detailDTOS);
+        return esCountDTO;
+    }
+
+    public void getReturnData(String searchCondition,List<EsCustomFieldValueDTO> customFields,Integer taskId,
+                     Integer projectId,List<EsCountVO> countVOS,List<EsCountDetailDTO> detailDTOS,
+                     EsCountDTO esCountDTO,String firstName) throws Exception {
         if (!CollectionUtils.isEmpty(customFields)) {
             searchCondition = esService.parseCustomField(customFields);
         }
-        Integer taskId = vo.getTaskId();
-        Integer projectId = vo.getProjectId();
+
         searchCondition = this.getCondition(searchCondition, taskId, projectId);
 
         SearchRequest.Builder builder = new SearchRequest.Builder();
@@ -78,9 +120,6 @@ public class EsCountService {
             query = formatQueryService.EsQueryToQuery((operateNode) tree, "patent");
         }
 
-        EsCountDTO esCountDTO = new EsCountDTO();
-        List<EsCountDetailDTO> detailDTOS = new ArrayList<>();
-        List<EsCountVO> countVOS = vo.getCountVOS();
         for (EsCountVO countVO : countVOS) {
             String field = countVO.getField();
             Integer topN = countVO.getTopN();
@@ -113,7 +152,6 @@ public class EsCountService {
                     if (dateList.contains(field)) {
                         if (CollectionUtils.isEmpty(values)) {
                             filtersBuckets.forEach(filtersBucket -> {
-//                                this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                                 Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
                                 try {
                                     this.getDateCountDTOS(filtersAgg, field, topN, format, detailDTOS, esCountDTO);
@@ -123,16 +161,14 @@ public class EsCountService {
                             });
                         } else {
                             filtersBuckets.forEach(filtersBucket -> {
-//                                this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                                 Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
-                                this.getDateAnalysisDTOS(filtersAgg, field, topN, detailDTOS,esCountDTO);
+                                this.getDateAnalysisDTOS(filtersAgg, field, topN, detailDTOS,esCountDTO,firstName);
                             });
                         }
                     } else if (nestedList.contains(field)) {
                         filtersBuckets.forEach(filtersBucket -> {
-//                            this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                             Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
-                            this.getNestedCountDTOS(filtersAgg, field,topN, detailDTOS);
+                            this.getNestedCountDTOS(filtersAgg, field,topN, detailDTOS,firstName);
                             if (!CollectionUtils.isEmpty(values)) {
                                 esCountDTO.setAllNumber(filtersAgg.nested().docCount());
                             }
@@ -141,16 +177,14 @@ public class EsCountService {
                         if (CollectionUtils.isEmpty(values)) {
                             Integer finalFieldType = fieldType;
                             filtersBuckets.forEach(filtersBucket -> {
-//                                this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                                 Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
                                 this.getChildCountDTOS(filtersAgg, field, finalFieldType, topN,detailDTOS,esCountDTO);
                             });
                         } else {
                             Integer finalFieldType1 = fieldType;
                             filtersBuckets.forEach(filtersBucket -> {
-//                                this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                                 Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
-                                this.getChildAnalysisDTOS(filtersAgg, field, finalFieldType1, topN,detailDTOS, esCountDTO);
+                                this.getChildAnalysisDTOS(filtersAgg, field, finalFieldType1, topN,detailDTOS, esCountDTO,firstName);
                             });
                         }
                     } else if (numberList.contains(field)) {
@@ -158,16 +192,14 @@ public class EsCountService {
 
                         } else {
                             filtersBuckets.forEach(filtersBucket -> {
-//                                this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                                 Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
-                                this.getNumberAnalysisDTOS(filtersAgg, field,topN, detailDTOS);
+                                this.getNumberAnalysisDTOS(filtersAgg, field,topN, detailDTOS,firstName);
                             });
                         }
                     } else {
                         filtersBuckets.forEach(filtersBucket -> {
-//                            this.getFiltersCountDTO(filtersBucket, finalSearchCondition, detailDTOS);
                             Aggregate filtersAgg = filtersBucket.aggregations().get("filters_agg");
-                            this.getTermCountDTOS(filtersAgg, field, topN,detailDTOS);
+                            this.getTermCountDTOS(filtersAgg, field, topN,detailDTOS,firstName);
                         });
                     }
                 } else {
@@ -178,10 +210,10 @@ public class EsCountService {
                     if (CollectionUtils.isEmpty(values)) {
                         this.getDateCountDTOS(agg, field, topN,format, detailDTOS,esCountDTO);
                     } else {
-                        this.getDateAnalysisDTOS(agg, field, topN, detailDTOS,esCountDTO);
+                        this.getDateAnalysisDTOS(agg, field, topN, detailDTOS,esCountDTO,firstName);
                     }
                 } else if (nestedList.contains(field)) {
-                    this.getNestedCountDTOS(agg, field,topN, detailDTOS);
+                    this.getNestedCountDTOS(agg, field,topN, detailDTOS,firstName);
                     if (!CollectionUtils.isEmpty(values)) {
                         esCountDTO.setAllNumber(agg.nested().docCount());
                     }
@@ -189,18 +221,54 @@ public class EsCountService {
                     if (CollectionUtils.isEmpty(values)) {
                         this.getChildCountDTOS(agg, field, fieldType,topN, detailDTOS, esCountDTO);
                     } else {
-                        this.getChildAnalysisDTOS(agg, field, fieldType,topN, detailDTOS, esCountDTO);
+                        this.getChildAnalysisDTOS(agg, field, fieldType,topN, detailDTOS, esCountDTO,firstName);
                     }
                 } else if (numberList.contains(field)) {
-                    this.getNumberAnalysisDTOS(agg, field,topN, detailDTOS);
+                    this.getNumberAnalysisDTOS(agg, field,topN, detailDTOS,firstName);
                 } else {
-                    this.getTermCountDTOS(agg, field,topN, detailDTOS);
+                    this.getTermCountDTOS(agg, field,topN, detailDTOS,firstName);
                 }
             }
+            esCountDTO.setCondition(searchCondition);
         }
-        esCountDTO.setDetailDTOS(detailDTOS);
-        esCountDTO.setCondition(searchCondition);
-        return esCountDTO;
+    }
+
+    public EsDateRangeDTO getFieldRange(EsDateRangeVO rangeVO) throws Exception {
+        String searchCondition = rangeVO.getCondition();
+        String field = rangeVO.getField();
+        List<EsCustomFieldValueDTO> customFields = rangeVO.getCustomFields();
+        if (!CollectionUtils.isEmpty(customFields)) {
+            searchCondition = esService.parseCustomField(customFields);
+        }
+        Integer taskId = rangeVO.getTaskId();
+        Integer projectId = rangeVO.getProjectId();
+        searchCondition = this.getCondition(searchCondition, taskId, projectId);
+
+        SearchRequest.Builder builder = new SearchRequest.Builder();
+        //设置查询索引
+        builder.index("patent");
+        //设置查询索引
+        Query query = null;
+        if (StringUtils.isNotEmpty(searchCondition)) {
+            //1. 解析检索条件
+            treeNode tree = expressManager.getInstance().Parse(searchCondition, false);
+            //格式化检索式
+            //3. 从es中检索数据
+            query = formatQueryService.EsQueryToQuery((operateNode) tree, "patent");
+        }
+        switch (field) {
+
+        }
+        Aggregation finalAggregation = null;
+        Query finalQuery = query;
+        Aggregation filtersAgg = new Aggregation.Builder().filters(new FiltersAggregation.Builder()
+                .filters(i -> i.array(Arrays.asList(finalQuery))).build())
+                .aggregations(new HashMap() {{
+                    put("filters_agg", finalAggregation);
+                }}).build();
+        builder.aggregations("Agg", filtersAgg);
+        EsDateRangeDTO rangeDTO = new EsDateRangeDTO();
+        return rangeDTO;
     }
 
     /**
@@ -302,7 +370,7 @@ public class EsCountService {
      * @param field
      * @param detailDTOS
      */
-    public void getTermCountDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS) {
+    public void getTermCountDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS,String firstName) {
         EsCountDetailDTO countDTO = new EsCountDetailDTO();
         countDTO.setField(field);
         countDTO.setName("其他");
@@ -317,6 +385,7 @@ public class EsCountService {
             dto.setName(bucket.key().stringValue());
             dto.setNumber(bucket.docCount());
             dto.setTopN(topN);
+            dto.setFirstName(firstName);
             if (aggregate != null) {
                 dto.setNumber(aggregate.filter().docCount());
             }
@@ -377,8 +446,8 @@ public class EsCountService {
      * @param field
      * @param detailDTOS
      */
-    public void getChildAnalysisDTOS(Aggregate agg, String field,Integer fieldType,Integer topN,
-                                     List<EsCountDetailDTO> detailDTOS, EsCountDTO esCountDTO) {
+    public void getChildAnalysisDTOS(Aggregate agg, String field, Integer fieldType, Integer topN,
+                                     List<EsCountDetailDTO> detailDTOS, EsCountDTO esCountDTO, String firstName) {
         Aggregate childAgg = agg.children().aggregations().get("childAgg");
         List<StringTermsBucket> list = childAgg.sterms().buckets().array();
         list.forEach(bucket -> {
@@ -390,6 +459,7 @@ public class EsCountService {
                 dto.setField(field);
                 dto.setName(termsBucket.key().stringValue());
                 dto.setNumber(termsBucket.docCount());
+                dto.setFirstName(firstName);
                 dto.setTopN(topN);
                 if (dto.getNumber() > 0) {
                     detailDTOS.add(dto);
@@ -416,7 +486,7 @@ public class EsCountService {
      * @param field
      * @param detailDTOS
      */
-    public void getNumberAnalysisDTOS(Aggregate agg, String field,Integer topN, List<EsCountDetailDTO> detailDTOS) {
+    public void getNumberAnalysisDTOS(Aggregate agg, String field,Integer topN, List<EsCountDetailDTO> detailDTOS,String firstName) {
         List<RangeBucket> list = agg.range().buckets().array();
         for (RangeBucket bucket : list) {
             EsCountDetailDTO dto = new EsCountDetailDTO();
@@ -424,6 +494,7 @@ public class EsCountService {
             dto.setName(bucket.key());
             dto.setNumber(bucket.docCount());
             dto.setTopN(topN);
+            dto.setFirstName(firstName);
             if (dto.getNumber() > 0) {
                 detailDTOS.add(dto);
             }
@@ -533,11 +604,12 @@ public class EsCountService {
      * @param topN
      * @param detailDTOS
      */
-    public void getDateAnalysisDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS,EsCountDTO esCountDTO) {
+    public void getDateAnalysisDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS, EsCountDTO esCountDTO, String firstName) {
         List<RangeBucket> list1 = agg.dateRange().buckets().array();
         List<EsCountDetailDTO> esCountDetailDTOS = new ArrayList<>();
         for (RangeBucket bucket : list1) {
             EsCountDetailDTO dto = new EsCountDetailDTO();
+            dto.setFirstName(firstName);
             dto.setField(field);
             dto.setName(bucket.key());
             dto.setNumber(bucket.docCount());
@@ -560,7 +632,7 @@ public class EsCountService {
      * @param field
      * @param detailDTOS
      */
-    public void getNestedCountDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS) {
+    public void getNestedCountDTOS(Aggregate agg, String field, Integer topN, List<EsCountDetailDTO> detailDTOS, String firstName) {
         Aggregate termsAgg = agg.nested().aggregations().get("terms_agg");
         EsCountDetailDTO countDTO = new EsCountDetailDTO();
         countDTO.setField(field);
@@ -576,6 +648,7 @@ public class EsCountService {
             dto.setName(bucket.key().stringValue());
             dto.setNumber(bucket.docCount());
             dto.setTopN(topN);
+            dto.setFirstName(firstName);
             if (aggregate != null) {
                 dto.setNumber(aggregate.filter().docCount());
             }
@@ -585,5 +658,4 @@ public class EsCountService {
         });
     }
 
-
 }

+ 2 - 2
src/main/resources/mapper/CustomAnalyseMapper.xml

@@ -17,7 +17,7 @@
             </if>
             <if test="vo.creatorId != null">
                 /*系统私有公开*/
-                or (permissions = 2 AND creator_id = #{vo.creatorId})
+                or (permissions = 2 AND create_id = #{vo.creatorId})
             </if>
             <if test="vo.tenantId != null and vo.projectId != null">
                 /*数据库公开*/
@@ -25,7 +25,7 @@
             </if>
             <if test="vo.projectId != null and vo.creatorId != null">
                 /*数据库私有*/
-                or (permissions = 4 AND creator_id = #{vo.creatorId} AND project_id = #{vo.projectId})
+                or (permissions = 4 AND create_id = #{vo.creatorId} AND project_id = #{vo.projectId})
             </if>
             )
         </where>