|
@ -2997,6 +2997,34 @@ public class StatisticsESService {
|
|
|
String quotaDate = elasticsearchUtil.getQuotaTime();
|
|
|
//统计年龄分布
|
|
|
List<SaveModel> list = elasticsearchUtil.findOneDateQuotaLevel2(quotaDate,area,Integer.parseInt(level),"60","2",disease);
|
|
|
return null;
|
|
|
|
|
|
//总数量
|
|
|
SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(quotaDate,area,Integer.parseInt(level),"60","2");
|
|
|
|
|
|
Double num = saveModel.getResult2();
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
DecimalFormat decimalFormat=new DecimalFormat("0.00");//构造方法的字符格式这里如果小数不足2位,会以0补足.
|
|
|
Double ageRate = list.get(0).getResult2()/num;
|
|
|
map.put("0ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(1).getResult2()/num;
|
|
|
map.put("7ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(2).getResult2()/num;
|
|
|
map.put("19ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(3).getResult2()/num;
|
|
|
map.put("31ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(4).getResult2()/num;
|
|
|
map.put("51ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(5).getResult2()/num;
|
|
|
map.put("65ageRate",decimalFormat.format(ageRate));
|
|
|
|
|
|
map.put("0age",list.get(0).getResult2().longValue());
|
|
|
map.put("7age",list.get(1).getResult2().longValue());
|
|
|
map.put("19age",list.get(2).getResult2().longValue());
|
|
|
map.put("31age",list.get(3).getResult2().longValue());
|
|
|
map.put("51age",list.get(4).getResult2().longValue());
|
|
|
map.put("65age",list.get(5).getResult2().longValue());
|
|
|
map.put("total",saveModel.getResult2().longValue());
|
|
|
|
|
|
return map;
|
|
|
}
|
|
|
}
|