Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-09-01 10:12:28 +08:00
2 changed files with 58 additions and 14 deletions
@@ -328,9 +328,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> 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<String, Object> map) {
//指定module_type_flag= WDK
JSONArray queryJsonMust = new JSONArray();
Map<String, Object> mapModule = new HashMap<>();
Map<String, Object> mapModule1 = new HashMap<>();
Map<String, Object> 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<String, Object>) map.get("mapOne")).put("flag",SEARCH_FLAG);
}else{
Map<String, Object> mapTemp = new HashMap<>();
Map<String, Object> map1 = new HashMap<>();
Map<String, Object> 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<String, Object> queryMap = new HashMap<>();
Map<String, Object> 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<String, Object> queryMap = new HashMap<>();
// Map<String, Object> queryMapTemp = new HashMap<>();
// queryMapTemp.put("flag",SEARCH_FLAG );
// queryMap.put("match_phrase", queryMapTemp);
// queryMapJsonTemp.add(queryMap);
// }
for (Map.Entry<String, Object> 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<String, Object> 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;
}
@@ -125,7 +125,7 @@
<div v-else-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue"
<a-select v-model="item.dataValue" @change='selectChange'
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
@@ -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;
}