List<Map<String, Object>> dataList = new ArrayList<>();
Integer total = dataList.stream().mapToInt(e -> Integer.parseInt(e.get("num").toString())).sum(); //求num的总数量
dataList = dataList.stream().sorted((e1,e2) -> {
return -Double.compare(Double.valueOf(e1.get("num").toString()),Double.valueOf(e2.get("num").toString()));
}).collect(Collectors.toList()); //排序
dataList = dataList.stream().filter(e ->Integer.parseInt(e.get("caseNum").toString()) != 0).collect(Collectors.toList()); //过滤
Set<Map.Entry<String, List<Map<String, Object>>>> entries = dataList.stream()
.collect(Collectors.groupingBy(x -> x.get("code") + "_" + x.get("value") + "_" + x.get("name"))).entrySet(); //分组