文档库添加高级搜索
This commit is contained in:
+17
-4
@@ -2931,12 +2931,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
fieldListNew.add(fieldTemp);
|
fieldListNew.add(fieldTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//封装查询条件
|
//封装查询条件(包含高级搜索)
|
||||||
String condition = getConditionStr(parameter);
|
String condition = getConditionStr(parameter);
|
||||||
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
|
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
|
||||||
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
|
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
|
||||||
IPage page = new Page(pageNo, pageSize);
|
|
||||||
|
|
||||||
|
|
||||||
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage infoPage = bussDocumentLibraryEOMapper.getInfoPage(page, " " + StringUtils.join(fieldListNew, ","), condition);
|
IPage infoPage = bussDocumentLibraryEOMapper.getInfoPage(page, " " + StringUtils.join(fieldListNew, ","), condition);
|
||||||
|
|
||||||
//树形数据字典
|
//树形数据字典
|
||||||
@@ -3060,6 +3061,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//高级搜索 queryConditionVOList List<QueryConditionVO>
|
||||||
|
List<QueryConditionVO> queryConditionVOList = (List<QueryConditionVO>) parameter.get("queryConditionVOList");
|
||||||
|
if(ObjectUtils.isNotEmpty(queryConditionVOList)){
|
||||||
|
String queryCondition = sqlJoint(queryConditionVOList);
|
||||||
|
if(StringUtils.isNotBlank(queryCondition)){
|
||||||
|
conditionSb.append(queryCondition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//处理列表表头排序
|
//处理列表表头排序
|
||||||
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
||||||
conditionSb.append(" order by " + (String) parameter.get("orderByField"));
|
conditionSb.append(" order by " + (String) parameter.get("orderByField"));
|
||||||
@@ -5048,10 +5060,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
|
|
||||||
//高级搜索条件拼接
|
//高级搜索条件拼接
|
||||||
|
|
||||||
private void sqlJoint(List<QueryConditionVO> queryConditionVOList){
|
private String sqlJoint(List<QueryConditionVO> queryConditionVOList){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
if(queryConditionVOList.size() != 0){
|
if(queryConditionVOList.size() != 0){
|
||||||
int count =0;
|
int count =0;
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
for (QueryConditionVO queryConditionVO : queryConditionVOList) {
|
for (QueryConditionVO queryConditionVO : queryConditionVOList) {
|
||||||
String type = queryConditionVO.getType();//and或or
|
String type = queryConditionVO.getType();//and或or
|
||||||
String rule = queryConditionVO.getRule();
|
String rule = queryConditionVO.getRule();
|
||||||
@@ -5083,6 +5095,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user