Commit 65e7d7447cdb4e03bfd14b04f43c8c6b08eeb00d
1 parent
c31dcc4c8b
Exists in
master
and in
8 other branches
add statistics(map) common index
Showing 1 changed file with 9 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java
View file @
65e7d74
... | ... | @@ -199,19 +199,19 @@ |
199 | 199 | // 4. 按省或市或地区查询区域内近12个自然月每月建档人数 |
200 | 200 | List<AreaData> patientMonthList = statisticsService.queryMonthPatients(new AreaDataQuery()); |
201 | 201 | Map<String, Map<String, Integer>> patientMonthMap = new HashMap<>(); |
202 | + | |
203 | + Map<String, Integer> pmap = new HashMap<>(); | |
202 | 204 | for (AreaData areaData:patientMonthList) { |
203 | - String regino = areaData.getProvinceName(); | |
204 | - Map<String, Integer> subMap = null; | |
205 | - if (patientMonthMap.containsKey(regino)) { | |
206 | - subMap = patientMonthMap.get(regino); | |
205 | + String month = buildMonth(areaData.getYear()); | |
206 | + if (pmap.containsKey(month)) { | |
207 | + pmap.put(month, pmap.get(month) + areaData.getVal()); | |
207 | 208 | } else { |
208 | - subMap = new HashMap<>(); | |
209 | - patientMonthMap.put(regino, subMap); | |
209 | + pmap.put(month, areaData.getVal()); | |
210 | 210 | } |
211 | - String month = buildMonth(areaData.getYear()); | |
212 | - subMap.put(month, areaData.getVal()); | |
213 | 211 | } |
214 | - Option patientMonthOption = buildLineOption("建档人数", null, patientMonthMap, buildDefaultMonth(12)); | |
212 | + patientMonthMap.put("建档人数", pmap); | |
213 | + | |
214 | + Option patientMonthOption = buildLineOption("建档&高危人数", null, patientMonthMap, buildDefaultMonth(12)); | |
215 | 215 | |
216 | 216 | |
217 | 217 |