Commit 1e1c6b71 authored by chenzhao's avatar chenzhao

修改稳压泵卡片排序

parent b69dd270
......@@ -242,22 +242,22 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
return item;
}).collect(Collectors.toList());
List<Map<String, Object>> records = pressurePumpInfo.getRecords();
records.sort((t1, t2) -> {
if(t1.get("update_time") instanceof Boolean) {
return -1;
} else if (t2.get("update_time") instanceof Boolean) {
return -1;
} else {
try {
Long s1 = DateUtils.dateParse(DateUtils.DATE_TIME_PATTERN, t1.get("update_time").toString()).getTime();
Long s2 = DateUtils.dateParse(DateUtils.DATE_TIME_PATTERN, t2.get("update_time").toString()).getTime();
return s1.compareTo(s2);
} catch (ParseException e) {
e.printStackTrace();
return -1;
}
}
});
// records.sort((t1, t2) -> {
// if(t1.get("update_time") instanceof Boolean) {
// return -1;
// } else if (t2.get("update_time") instanceof Boolean) {
// return -1;
// } else {
// try {
// Long s1 = DateUtils.dateParse(DateUtils.DATE_TIME_PATTERN, t1.get("update_time").toString()).getTime();
// Long s2 = DateUtils.dateParse(DateUtils.DATE_TIME_PATTERN, t2.get("update_time").toString()).getTime();
// return s1.compareTo(s2);
// } catch (ParseException e) {
// e.printStackTrace();
// return -1;
// }
// }
// });
pressurePumpInfo.setRecords(records);
}
return pressurePumpInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment