diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java index d0c86f0de..50f5c7846 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java @@ -328,9 +328,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { Map queryMapTemp = new HashMap<>(); if (key.equals("serial_number")){ + s = s.toLowerCase(); queryMap.put(key, "*" + s + "*"); map.put("wildcard", queryMap); } else { + s = s.toLowerCase(); queryMapTemp.put("query", s); queryMapTemp.put("minimum_should_match", 2); queryMap.put(key, queryMapTemp); @@ -919,8 +921,27 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { */ @Override public IPage getParagraphInfoList(Map map) { + //指定module_type_flag= WDK + JSONArray queryJsonMust = new JSONArray(); + Map mapModule = new HashMap<>(); + Map mapModule1 = new HashMap<>(); + Map mapModule2 = new HashMap<>(); + mapModule.put("query", "WDK"); + mapModule1.put("module_type_flag", mapModule); + mapModule2.put("match", mapModule1); + queryJsonMust.add(mapModule2); + //段落, 有条件的时候,查询的数据中不含有魑的数据 + JSONArray queryJsonMustNot = new JSONArray(); if(ObjectUtils.isEmpty(map.get("mapOne"))){ ((Map) map.get("mapOne")).put("flag",SEARCH_FLAG); + }else{ + Map mapTemp = new HashMap<>(); + Map map1 = new HashMap<>(); + Map map2 = new HashMap<>(); + mapTemp.put("query", SEARCH_FLAG); + map1.put("flag", mapTemp); + map2.put("match", map1); + queryJsonMustNot.add(map2); } String cut = (String) map.get("cut"); //module_type 代表文档库的段落 @@ -956,17 +977,20 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { JSONArray queryMapJsonAll = new JSONArray(); //首次查询条件 if (ObjectUtils.isNotEmpty(mapOne)) { - if(StringUtils.isNotBlank((String)mapOne.get("title")) - || StringUtils.isNotBlank((String)mapOne.get("serial_number"))){ - Map queryMap = new HashMap<>(); - Map queryMapTemp = new HashMap<>(); - queryMapTemp.put("flag",SEARCH_FLAG ); - queryMap.put("match_phrase", queryMapTemp); - queryMapJsonTemp.add(queryMap); - } +// if(StringUtils.isNotBlank((String)mapOne.get("title")) +// || StringUtils.isNotBlank((String)mapOne.get("serial_number"))){ +// Map queryMap = new HashMap<>(); +// Map queryMapTemp = new HashMap<>(); +// queryMapTemp.put("flag",SEARCH_FLAG ); +// queryMap.put("match_phrase", queryMapTemp); +// queryMapJsonTemp.add(queryMap); +// } for (Map.Entry entry : mapOne.entrySet()) { String key = entry.getKey(); String value = (String) entry.getValue(); + if("serial_number".equals(key) || "title".equals(key) || "file_text".equals(key)){ + value = value.toLowerCase(); + } if (ObjectUtils.isNotEmpty(value)) { for (String s : value.split(",")) { Map queryMap = new HashMap<>(); @@ -1007,6 +1031,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, null, null); queryMapJsonAll.add(jsonObject); } + if(CollectionUtils.isNotEmpty(queryJsonMust)){ + JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryJsonMust, null, null); + queryMapJsonAll.add(jsonObject); + } } String ids = (String) mapTwo.get("ids"); @@ -1113,7 +1141,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { IPage iPage = getiPage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null, - pageNo, pageSize, paragraphFlag,(String) map.get("cut"),sort,null); + pageNo, pageSize, paragraphFlag,(String) map.get("cut"),sort,queryJsonMustNot); return iPage; } diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index 411eef23b..2f8d6386c 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -125,7 +125,7 @@
- @@ -690,6 +690,17 @@ }) }, methods: { + selectChange(val){ + this.$nextTick(() => { + let element = document.querySelectorAll( + ".tableclassname .ant-table-expanded-row" + ); + let len = element.length / 2; + for (let i = 0; i < len; i++) { + element[i + len].style.height = element[i].offsetHeight + "px"; + } + }); + }, onInput(r) { let value = r.target.value r.target.value = value.replace(/[^\u4e00-\u9fa5]/g, '') @@ -770,7 +781,9 @@ height: 38px !important; line-height: 38px !important; } - + .ant-select-selection-selected-value{ + height:100%; + } .selectWid .ant-select-selection__rendered { line-height: 36px !important; } @@ -781,9 +794,12 @@ height: calc(100% - 100px); overflow: auto; } -/deep/ .ant-select-allow-clear{ - height: 30px; -} +///deep/ .ant-select-allow-clear{ +// height: 30px; +//} + /deep/.ant-table-row{ + height:69px; + } .text { margin-right: 10px; }