|
|
@@ -877,25 +877,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
lists.sort(new Comparator<StatisticsBean>() {
|
|
|
@Override
|
|
|
public int compare(StatisticsBean o1, StatisticsBean o2) {
|
|
|
- if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
|
|
|
- double a = o1.getAll_check_score() / (o1.getChecked_num()+0.00);
|
|
|
- double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00);
|
|
|
- if (a > b ) {
|
|
|
- return 1;
|
|
|
- } else if (a < b) {
|
|
|
- return -1;
|
|
|
- } else {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(o1.getChecked_num() == 0){
|
|
|
- return -1 ;
|
|
|
- }else if(o2.getChecked_num() ==0){
|
|
|
- return 1;
|
|
|
- }else{
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
+ return o1.compare2To(o2);
|
|
|
}
|
|
|
});
|
|
|
|