|
@ -1622,7 +1622,7 @@ public class StatisticsService extends BaseService {
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
public JSONObject getAVGSocreByMonth(String level ,String area,String statDate,String endDate)throws Exception{
|
|
|
public JSONArray getAVGSocreByMonth(String level ,String area,String statDate,String endDate)throws Exception{
|
|
|
|
|
|
List<String> times = getMonthBetween(statDate,endDate);
|
|
|
if(times==null||times.size()==0){
|
|
@ -1656,13 +1656,14 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Map<String,Object> rsMap = new HashMap<>();
|
|
|
JSONArray jsRs = new JSONArray();
|
|
|
for(String time : times){
|
|
|
rsMap.put(time,map.get(time)==null?0:((Map<String,Object>)map.get(time)).get("avgCount"));
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("month",time);
|
|
|
json.put("socre",map.get(time)==null?0:((Map<String,Object>)map.get(time)).get("avgCount"));
|
|
|
jsRs.put(json);
|
|
|
}
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("data",rsMap);
|
|
|
return data;
|
|
|
return jsRs;
|
|
|
}
|
|
|
|
|
|
private List<String> getMonthBetween(String minDate, String maxDate) throws Exception {
|