Collections.sort(dyList, new Comparator<Map<String, Object>>() {
public int compare(Map<String, Object> arg0, Map<String, Object> arg1) {
int map1value=0;
int map2value=0;
if(arg0.get("getlicenseDate")!=null&&!arg0.get("getlicenseDate").equals(""))
{
map1value = Integer.valueOf(String.valueOf(arg0.get("getlicenseDate")).replace("-", "")).intValue();
}
if(arg1.get("getlicenseDate")!=null&&!arg1.get("getlicenseDate").equals(""))
{
map2value = Integer.valueOf(String.valueOf(arg1.get("getlicenseDate")).replace("-", "")).intValue();
}
return map2value-map1value;
}
});
时间: 2024-10-29 10:46:35