Commit 0457395264f187561981312a190f951952f1f51b

Authored by litao
1 parent c8369419f0

产检医生统计导出

Showing 3 changed files with 43 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReportController.java View file @ 0457395
... ... @@ -84,6 +84,17 @@
84 84 return reportService.doctorMedical(startDate, endDate, childBirth);
85 85 }
86 86  
  87 + /**
  88 + * 产检医生统计导出
  89 + * @param startDate 建档开始时间
  90 + * @param endDate 建档结束时间
  91 + * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部
  92 + * @return
  93 + */
  94 + @RequestMapping(method = RequestMethod.GET,value = "/doctor/export")
  95 + public void exportDoctor(String startDate, String endDate, Integer childBirth, HttpServletResponse resp) {
  96 + reportService.exportDoctor(startDate, endDate, childBirth, resp);
  97 + }
87 98  
88 99 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IReportService.java View file @ 0457395
... ... @@ -55,5 +55,7 @@
55 55 * @param resp
56 56 */
57 57 void exportCheck(String startDate, String endDate, Integer startWeek, Integer endWeek, Integer childBirth, HttpServletResponse resp);
  58 +
  59 + void exportDoctor(String startDate, String endDate, Integer childBirth, HttpServletResponse resp);
58 60 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 0457395
... ... @@ -183,6 +183,36 @@
183 183 ResponseUtil.responseExcel(cnames,results, resp);
184 184 }
185 185  
  186 + @Override
  187 + public void exportDoctor(String startDate, String endDate, Integer childBirth, HttpServletResponse resp) {
  188 + ReportModel data = (ReportModel) doctorMedical(startDate, endDate, childBirth).getData();
  189 + Map<String, String> cnames = new LinkedHashMap<>();
  190 + cnames.put("id", "#");
  191 + cnames.put("doctorName", "产检医生");
  192 + cnames.put("inspectTime", "产检人次");
  193 + cnames.put("inspectPeople", "产检人数");
  194 + cnames.put("twice", "两次(含)以上人数");
  195 + cnames.put("twiceProportion", "两次(含)以上比例");
  196 + cnames.put("fiveTimes", "五次(含)以上人数");
  197 + cnames.put("fiveTimeProportion", "五次(含)以上比例");
  198 +
  199 + List<Map<String,Object>> results = new ArrayList<>();
  200 + List<Map<String, Object>> grid = data.getGrid();
  201 + for (Map<String, Object> map : grid) {
  202 + Map<String, Object> result = new LinkedHashMap<>();
  203 + result.put("id", result.get("id"));
  204 + result.put("doctorName", result.get("doctorName"));
  205 + result.put("inspectTime", result.get("inspectTime"));
  206 + result.put("inspectPeople", result.get("inspectPeople"));
  207 + result.put("twice", result.get("twice"));
  208 + result.put("twiceProportion", result.get("twiceProportion"));
  209 + result.put("fiveTimes", result.get("fiveTimes"));
  210 + result.put("fiveTimeProportion", result.get("fiveTimeProportion"));
  211 + results.add(result);
  212 + }
  213 + ResponseUtil.responseExcel(cnames,results, resp);
  214 + }
  215 +
186 216  
187 217 private List<Map<String, Object>> createGrid(List<Object> peopleList, List<Object> proportionList) {
188 218 List<Map<String, Object>> restList = new ArrayList<>();