Commit 12234bd8bb1a53864c0fd496cd78fd9930751a41

Authored by liquanyu
1 parent f4378768fc

儿童统计

Showing 3 changed files with 13 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 12234bd
... ... @@ -2175,14 +2175,14 @@
2175 2175 Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1);
2176 2176 babyQuery.setCheckDateStart(end);
2177 2177 }
2178   - Map<String,List<BabyGrowthCountResult>> result = new HashMap<>();
  2178 + List<BabyGrowthCountResult> result = new ArrayList<>();
2179 2179  
2180 2180 Map<String,List<BabyGrowthCountResult>> mapItems = getCountGroupItemMaps();
2181 2181 for(String key : mapItems.keySet())
2182 2182 {
2183 2183 List<BabyGrowthCountResult> groups = mapItems.get(key);
2184 2184 GrowthCountTask task = new GrowthCountTask(groups,babyQuery,babyCheckService,key);
2185   - result.put(key,task.getResults());
  2185 + result.addAll(task.getResults());
2186 2186 }
2187 2187  
2188 2188 BaseObjectResponse objectResponse = new BaseObjectResponse();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyGrowthCountResult.java View file @ 12234bd
1 1 package com.lyms.platform.operate.web.result;
2 2  
3   -import java.util.ArrayList;
4   -import java.util.HashMap;
5   -import java.util.List;
6   -import java.util.Map;
7 3  
  4 +
8 5 /**
9 6 * Created by lqy on 2016-12-21.
10 7 */
11 8 public class BabyGrowthCountResult {
12 9  
  10 + //类型名称
  11 + private String typeName;
  12 +
13 13 //标准差
14 14 private String bzc;
15 15  
16 16  
... ... @@ -43,6 +43,12 @@
43 43 this.count = count;
44 44 }
45 45  
  46 + public String getTypeName() {
  47 + return typeName;
  48 + }
46 49  
  50 + public void setTypeName(String typeName) {
  51 + this.typeName = typeName;
  52 + }
47 53 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java View file @ 12234bd
... ... @@ -59,6 +59,7 @@
59 59 {
60 60 babyQuery.setWeightEvaluate(grouwth.getEvaluate());
61 61 }
  62 + grouwth.setTypeName(type);
62 63 int count = babyCheckService.queryBabyCheckCount(babyQuery);
63 64 grouwth.setCount(String.valueOf(count));
64 65 }