| 
					
				 | 
			
			
				@ -792,6 +792,15 @@ public class StatisticsESService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String filesize = df.format(size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return filesize + "%"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public int getRangeNum(int first, int second, int i) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (second == 0 && first > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if (second == 0 && first == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        float size = (float) (first * 100) / second; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return Integer.valueOf(String.valueOf(size*100)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Double getRange2(int first, int second, int i) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (second == 0 && first > 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5397,7 +5406,7 @@ public class StatisticsESService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return saveModel.getResult2().longValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String, Object> getLevelDeviceAndBinding(String area, int level, int sort, String lowLevel, String year, String deviceType) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String, Object> getLevelDeviceAndBinding(String area, int level, int sort, String lowLevel, String year, String deviceType,int sortType) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String index_85 = "85";//设备发放量统计指标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String index_86 = "86";//设备绑定量统计指标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String index_87 = "87";//设备使用量统计指标 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5547,10 +5556,21 @@ public class StatisticsESService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //对结果进行排序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Collections.sort(resultList, new Comparator<Map<String, Object>>() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                public int compare(Map<String, Object> o1, Map<String, Object> o2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int map1value = (int) o1.get("allNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int map2value = (int) o2.get("allNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                public int compare(Map<String, Object> o1, Map<String, Object> o2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int map1value = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int map2value = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if(sortType==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map1value = (int) o1.get("allNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map2value = (int) o2.get("allNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else if(sortType==2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map1value = (int) o1.get("bindingNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map2value = (int) o2.get("bindingNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map1value = (int) o1.get("rateNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        map2value = (int) o2.get("rateNum"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (map1value - map2value > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        return sort == 1 ? -1 : 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } else if (map1value - map2value < 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5673,6 +5693,7 @@ public class StatisticsESService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        reMap.put("allNum", allAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        reMap.put("bindingNum", bindingAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        reMap.put("rate", getRange(bindingAmount, allAmount, 2));//续签率是 续签量/去年的签约数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        reMap.put("rateNum", getRangeNum(bindingAmount, allAmount, 2));//续签率是 续签量/去年的签约数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return reMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |