根据不同的排序规则对列表进行不同的排序
//排序
switch (sortRule) {
case 1: {
resultList.sort(Comparator.comparing(ReportFormVo::getWorkTime).reversed());
break;
}
case 2: {
resultList.sort(Comparator.comparing(ReportFormVo::getArea).reversed());
break;
}
case 3: {
resultList.sort(Comparator.comparing(ReportFormVo::getRunningTime).reversed());
break;
}
default: {
resultList.sort(Comparator.comparing(ReportFormVo::getOffLineTime).reversed());
}
}