Commit a1b4df6a413e5f18cface1f76680b9d164130944
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java
View file @
a1b4df6
... | ... | @@ -196,20 +196,7 @@ |
196 | 196 | groupRiskSeriesList.add(groupRiskSeries); |
197 | 197 | groupRiskOption.setSeries(groupRiskSeriesList); |
198 | 198 | |
199 | - | |
200 | - // 4. 按省或市或地区查询区域内近12个自然月每月建档人数 | |
201 | - List<AreaData> patientMonthList = statisticsService.queryMonthPatients(new AreaDataQuery()); | |
202 | 199 | Map<String, Map<String, Integer>> patientMonthMap = new HashMap<>(); |
203 | - Map<String, Integer> pmap = new HashMap<>(); | |
204 | - for (AreaData areaData:patientMonthList) { | |
205 | - String month = buildMonth(areaData.getYear()); | |
206 | - if (pmap.containsKey(month)) { | |
207 | - pmap.put(month, pmap.get(month) + areaData.getVal()); | |
208 | - } else { | |
209 | - pmap.put(month, areaData.getVal()); | |
210 | - } | |
211 | - } | |
212 | - patientMonthMap.put("建档人数", pmap); | |
213 | 200 | // 6. 按省或市或地区查询区域内近12个自然月每月产检中历史高危人数(按颜色分组) |
214 | 201 | AreaDataQuery query = new AreaDataQuery(); |
215 | 202 | query.setDays(12); |
216 | 203 | |
217 | 204 | |
218 | 205 | |
... | ... | @@ -224,18 +211,53 @@ |
224 | 211 | } |
225 | 212 | } |
226 | 213 | patientMonthMap.put("高危人数", rmap); |
227 | - | |
228 | - | |
214 | + // 4. 按省或市或地区查询区域内近12个自然月每月建档人数 | |
215 | + query = new AreaDataQuery(); | |
216 | + List<AreaData> patientMonthList = statisticsService.queryMonthPatients(query); | |
217 | + Map<String, Integer> pmap = new HashMap<>(); | |
218 | + for (AreaData areaData:patientMonthList) { | |
219 | + String month = buildMonth(areaData.getYear()); | |
220 | + if (pmap.containsKey(month)) { | |
221 | + pmap.put(month, pmap.get(month) + areaData.getVal()); | |
222 | + } else { | |
223 | + pmap.put(month, areaData.getVal()); | |
224 | + } | |
225 | + } | |
226 | + patientMonthMap.put("建档人数", pmap); | |
229 | 227 | Option patientMonthOption = buildLineOption("建档&高危人数", null, patientMonthMap, buildDefaultMonth(12)); |
230 | 228 | |
229 | + // 按省或市或地区查询区域内近12个自然月每月初诊人数、复诊人数 | |
230 | + query = new AreaDataQuery(); | |
231 | + List<AreaData> reportMonthList = statisticsService.queryMonthReports(query); | |
232 | + Map<String, Map<String, Integer>> reportMonthMap = new HashMap<>(); | |
233 | + Map<String, Integer> firstmap = new HashMap<>(); | |
234 | + Map<String, Integer> secondmap = new HashMap<>(); | |
235 | + for (AreaData areaData:reportMonthList) { | |
236 | + String month = buildMonth(areaData.getYear()); | |
237 | + if (firstmap.containsKey(month)) { | |
238 | + firstmap.put(month, firstmap.get(month) + areaData.getVal()); | |
239 | + } else { | |
240 | + firstmap.put(month, areaData.getVal()); | |
241 | + } | |
242 | + if (secondmap.containsKey(month)) { | |
243 | + secondmap.put(month, secondmap.get(month) + areaData.getVal()); | |
244 | + } else { | |
245 | + secondmap.put(month, areaData.getVal()); | |
246 | + } | |
247 | + } | |
248 | + reportMonthMap.put("初诊人数", firstmap); | |
249 | + reportMonthMap.put("复诊人数", secondmap); | |
250 | + Option reportMonthOption = buildLineOption("初诊&复诊人数", null, reportMonthMap, buildDefaultMonth(12)); | |
231 | 251 | |
232 | 252 | |
253 | + | |
233 | 254 | result.put("type", 1); |
234 | 255 | result.put("kvData", kvData); |
235 | 256 | result.put("mapsOption", option); |
236 | 257 | result.put("areaBarOption", areaBarOption); |
237 | 258 | result.put("riskOption", groupRiskOption); |
238 | 259 | result.put("patientMonthOption", patientMonthOption); |
260 | + result.put("reportMonthOption", reportMonthOption); | |
239 | 261 | ResultUtils.buildSuccessResultAndWrite(response, result); |
240 | 262 | } |
241 | 263 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
View file @
a1b4df6
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | //其他高危 |
56 | 56 | private Map otherRisk; |
57 | 57 | //诊断 |
58 | - private String diagnosis; | |
58 | + private List diagnosis; | |
59 | 59 | //分类 |
60 | 60 | private String type; |
61 | 61 | //异常 |
... | ... | @@ -102,7 +102,7 @@ |
102 | 102 | examinationModel.setRiskFactor(JsonUtil.array2JsonString(riskFactor)); |
103 | 103 | examinationModel.setRiskScore(riskScore); |
104 | 104 | examinationModel.setOtherRisk(JsonUtil.obj2JsonString(otherRisk)); |
105 | - examinationModel.setDiagnosis(diagnosis); | |
105 | + examinationModel.setDiagnosis(JsonUtil.array2JsonString(diagnosis)); | |
106 | 106 | examinationModel.setType(type); |
107 | 107 | examinationModel.setTypeYc(typeYc); |
108 | 108 | examinationModel.setTreatmentOpinion(treatmentOpinion); |
109 | 109 | |
... | ... | @@ -178,11 +178,11 @@ |
178 | 178 | this.currentDueDate = currentDueDate; |
179 | 179 | } |
180 | 180 | |
181 | - public String getDiagnosis() { | |
181 | + public List getDiagnosis() { | |
182 | 182 | return diagnosis; |
183 | 183 | } |
184 | 184 | |
185 | - public void setDiagnosis(String diagnosis) { | |
185 | + public void setDiagnosis(List diagnosis) { | |
186 | 186 | this.diagnosis = diagnosis; |
187 | 187 | } |
188 | 188 |