|
|
@@ -117,28 +117,37 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
lists.sort(new Comparator<StatisticsBo>() {
|
|
|
@Override
|
|
|
public int compare(StatisticsBo o1, StatisticsBo o2) {
|
|
|
- if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
|
|
|
- double a = o1.getCheck_all_score() / (o1.getChecked_num()+0.00);
|
|
|
- double b = o2.getCheck_all_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.compareTo(o2);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ // 道管Map
|
|
|
+ Map<String,Integer> center_ranking = new HashMap<>();
|
|
|
+ center_ranking.put("30",1);
|
|
|
+ center_ranking.put("31",1);
|
|
|
+ center_ranking.put("32",1);
|
|
|
+
|
|
|
+ Map<String,Integer> fee_ranking= new HashMap<>();
|
|
|
+ // 这边需要对道管和收费站内的员工进行排名
|
|
|
+ List<FeeStation> list_feeStation = departmentDao.getAllFS();
|
|
|
+ for(FeeStation fee: list_feeStation){
|
|
|
+ fee_ranking.put(fee.getDeptid(), 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ for(int i=0;i<lists.size();i++){
|
|
|
+ // 累计道管排名
|
|
|
+ String centerId= lists.get(i).getUser().getParent_organid().toString();
|
|
|
+ lists.get(i).setCenter_ranking(center_ranking.get(centerId));
|
|
|
+ center_ranking.put(centerId,center_ranking.get(centerId) +1 );
|
|
|
+
|
|
|
+ // 累计收费站的排名
|
|
|
+ String feeStationId= lists.get(i).getUser().getOrganid().toString();
|
|
|
+ lists.get(i).setFee_station_ranking(fee_ranking.get(feeStationId));
|
|
|
+ fee_ranking.put(feeStationId, fee_ranking.get(feeStationId)+1);
|
|
|
+
|
|
|
+ // 公司排名
|
|
|
+ lists.get(i).setCompany_ranking(i+1);
|
|
|
+ }
|
|
|
+
|
|
|
return lists;
|
|
|
}
|
|
|
|