Map<String, Map<String, EnergyDosageSummary>> list2map(List<EnergyDosageSummary> list) {
list = list.stream().sorted(Comparator.comparing(EnergyDosageSummary::getCostCenter)).collect(Collectors.toList());
//costCenter-feeType-bean
Map<String, Map<String, EnergyDosageSummary>> resultMap = new HashMap<>(list.size());
for (EnergyDosageSummary summary : list) {
resultMap.computeIfAbsent(summary.getCostCenter(), key -> new HashMap<>()).put(summary.getFeeType(), summary);
}
return resultMap;
}