文档库--添加判空
This commit is contained in:
+13
-18
@@ -143,23 +143,26 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
for (Map.Entry<String, Object> entry : inputMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put(key, value);
|
||||
queryMap.put("match", queryMapTemp);
|
||||
must.add(queryMap);
|
||||
if(ObjectUtils.isNotEmpty(value)){
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put(key, value);
|
||||
queryMap.put("match", queryMapTemp);
|
||||
must.add(queryMap);
|
||||
}
|
||||
}
|
||||
int a=0;
|
||||
}
|
||||
//封装下拉,树形,日期查询条件
|
||||
if (ObjectUtils.isNotEmpty(otherMap)) {
|
||||
for (Map.Entry<String, Object> entry : otherMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put(key, value);
|
||||
queryMap.put("match", queryMapTemp);
|
||||
must.add(queryMap);
|
||||
if(ObjectUtils.isNotEmpty(value)){
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put(key, value);
|
||||
queryMap.put("match", queryMapTemp);
|
||||
must.add(queryMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
//列表
|
||||
@@ -203,14 +206,6 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
|
||||
});
|
||||
mapTemp.put("file_name", fileList);
|
||||
|
||||
//下拉单选和下拉多选数据字典处理
|
||||
// mapTemp.entrySet().forEach(entry -> {
|
||||
// if (fieldPullList.contains(entry.getKey())) {
|
||||
// //下拉选处理数据字典
|
||||
// bussDocumentLibraryEOService.dictItem(sysDictItems, entry, onlCgformFieldList, (String) map.get("cut"));
|
||||
// }
|
||||
// });
|
||||
}
|
||||
IPage page = new Page(Integer.parseInt(map.get("pageNo").toString()), Integer.parseInt(map.get("pageSize").toString()));
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
|
||||
Reference in New Issue
Block a user