1.对list进行重新按照时间相同的情况下对总排放量的值进行倒序排序-从大到小
// 对list进行重新按照时间相同的情况下对总排放量进行倒序-从大到小
if (null != gasResultList && gasResultList.size() > 0) {
Collections.sort(gasResultList, new Comparator<Map>() {
@Override
public int compare(Map o1, Map o2) {
if (o1.get("MONITORTIME").equals(o2.get("MONITORTIME"))) {
Double one = Double.valueOf(o1.get("totalEmission").toString());
Double two = Double.valueOf(o2.get("totalEmission").toString());
return (int) (two - one);
}
return 0;
}
});
}