|
|
@@ -226,10 +226,10 @@ public class ReformServiceImpl implements ReformService {
|
|
|
}
|
|
|
buMenSql = buMenSql.replace("qqwweerr"," (" + buMenAtr + ")");
|
|
|
String str ="";
|
|
|
- if(BeanUtils.isNotEmpty(buMenAtr)){
|
|
|
- str = " AND FIND_IN_SET (wj.xi_lei_id_,'"+bmIds.trim()+"')";
|
|
|
- }
|
|
|
- buMenSql = buMenSql+str;
|
|
|
+ if(BeanUtils.isNotEmpty(buMenAtr)){
|
|
|
+ str = " AND FIND_IN_SET (wj.xi_lei_id_,'"+bmIds.trim()+"')";
|
|
|
+ }
|
|
|
+ buMenSql = buMenSql+str;
|
|
|
//buMenSql = String.format(buMenSql , bmIds);
|
|
|
buMenSql = buMenSql + conditions + sorts;
|
|
|
List<Map<String, Object>> buMenList = (List<Map<String, Object>>) commonDao.query(buMenSql);
|
|
|
@@ -294,7 +294,7 @@ public class ReformServiceImpl implements ReformService {
|
|
|
sxsql = String.format(sxsql, userId, userId, ContextUtil.isSuper() , BeanUtils.isNotEmpty(roleMap) , userId , kzIds);
|
|
|
sxsql = sxsql + conditions + sorts;
|
|
|
List<Map<String, Object>> limitLists = (List<Map<String, Object>>) commonDao.query(sxsql);
|
|
|
- // List<Map<String, Object>> mergedList = Stream.concat(Stream.concat(limitLists.stream(), buMenList.stream()),comList.stream()).collect(Collectors.toList());
|
|
|
+ // List<Map<String, Object>> mergedList = Stream.concat(Stream.concat(limitLists.stream(), buMenList.stream()),comList.stream()).collect(Collectors.toList());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
Comparator<Map<String, Object>> dateComparator = Comparator.comparing(
|
|
|
map -> {
|
|
|
@@ -324,22 +324,10 @@ public class ReformServiceImpl implements ReformService {
|
|
|
//重新排序,数据量超过一万可能耗时长一点,超过十万或许有性能问题
|
|
|
//sortData(order.trim(),mergedList);
|
|
|
List<Map<String, Object>> collect = sortByOrder(mergedList, order);
|
|
|
- Map<String, Object> map = paginate(collect, pageNo , limit);
|
|
|
- //sortData(order.trim(),mergedList);
|
|
|
- List<Map<String, Object>> collect = mergedList.stream().sorted(Comparator.comparing(
|
|
|
- (Map<String, Object> map) -> (String) map.get("fa_bu_shi_jian_"),
|
|
|
- Comparator.nullsLast(Comparator.naturalOrder())
|
|
|
- ).thenComparing(
|
|
|
- map -> (String) map.get("wen_jian_bian_hao"),
|
|
|
- Comparator.nullsLast(Comparator.naturalOrder())
|
|
|
- )
|
|
|
- ).collect(Collectors.toList());
|
|
|
-
|
|
|
Map<String, Object> map = paginate(collect, pageNo , limit);
|
|
|
result.setVariables(map);
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
public static List<Map<String, Object>> sortByOrder(
|
|
|
List<Map<String, Object>> mergedList,
|
|
|
String order) {
|