|
@@ -124,33 +124,53 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
});
|
|
});
|
|
|
// 道管Map
|
|
// 道管Map
|
|
|
Map<String,Integer> center_ranking = new HashMap<>();
|
|
Map<String,Integer> center_ranking = new HashMap<>();
|
|
|
|
|
+ Map<String,StatisticsBo> center_ranking2 = new HashMap<>();
|
|
|
center_ranking.put("30",1);
|
|
center_ranking.put("30",1);
|
|
|
center_ranking.put("31",1);
|
|
center_ranking.put("31",1);
|
|
|
center_ranking.put("32",1);
|
|
center_ranking.put("32",1);
|
|
|
|
|
|
|
|
|
|
+ center_ranking2.put("30",null);
|
|
|
|
|
+ center_ranking2.put("31",null);
|
|
|
|
|
+ center_ranking2.put("32",null);
|
|
|
|
|
+
|
|
|
Map<String,Integer> fee_ranking= new HashMap<>();
|
|
Map<String,Integer> fee_ranking= new HashMap<>();
|
|
|
|
|
+ Map<String,StatisticsBo> fee_ranking2= new HashMap<>();
|
|
|
// 这边需要对道管和收费站内的员工进行排名
|
|
// 这边需要对道管和收费站内的员工进行排名
|
|
|
List<FeeStation> list_feeStation = departmentDao.getAllFS();
|
|
List<FeeStation> list_feeStation = departmentDao.getAllFS();
|
|
|
for(FeeStation fee: list_feeStation){
|
|
for(FeeStation fee: list_feeStation){
|
|
|
fee_ranking.put(fee.getDeptid(), 1);
|
|
fee_ranking.put(fee.getDeptid(), 1);
|
|
|
|
|
+ fee_ranking2.put(fee.getDeptid(), null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for(int i=0;i<lists.size();i++){
|
|
for(int i=0;i<lists.size();i++){
|
|
|
// 累计道管排名
|
|
// 累计道管排名
|
|
|
String centerId= lists.get(i).getUser().getParent_organid().toString();
|
|
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 );
|
|
|
|
|
|
|
+ if(i>0 && center_ranking2.get(centerId)!=null && lists.get(i).compareTo( center_ranking2.get(centerId)) ==0 ){
|
|
|
|
|
+ lists.get(i).setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ lists.get(i).setCenter_ranking(center_ranking.get(centerId));
|
|
|
|
|
+ center_ranking2.put(centerId, lists.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+ center_ranking.put(centerId,center_ranking.get(centerId) +1 );
|
|
|
|
|
|
|
|
|
|
+
|
|
|
// 累计收费站的排名
|
|
// 累计收费站的排名
|
|
|
String feeStationId= lists.get(i).getUser().getOrganid().toString();
|
|
String feeStationId= lists.get(i).getUser().getOrganid().toString();
|
|
|
- lists.get(i).setFee_station_ranking(fee_ranking.get(feeStationId));
|
|
|
|
|
|
|
+ if(i>0 && fee_ranking2.get(feeStationId)!=null && lists.get(i).compareTo(fee_ranking2.get(feeStationId)) ==0 ){
|
|
|
|
|
+ lists.get(i).setFee_station_ranking(fee_ranking2.get(feeStationId).getFee_station_ranking());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ lists.get(i).setFee_station_ranking(fee_ranking.get(feeStationId));
|
|
|
|
|
+ fee_ranking2.put(feeStationId, lists.get(i));
|
|
|
|
|
+ }
|
|
|
fee_ranking.put(feeStationId, fee_ranking.get(feeStationId)+1);
|
|
fee_ranking.put(feeStationId, fee_ranking.get(feeStationId)+1);
|
|
|
|
|
|
|
|
// 公司排名
|
|
// 公司排名
|
|
|
- lists.get(i).setCompany_ranking(i+1);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(i>0 && lists.get(i-1).compareTo(lists.get(i)) == 0 ){
|
|
|
|
|
+ lists.get(i).setCompany_ranking( lists.get(i-1).getCompany_ranking());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ lists.get(i).setCompany_ranking(i+1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return lists;
|
|
return lists;
|
|
|
}
|
|
}
|
|
|
|
|
|