Commit 33df7d2ce7a2032169066b77de9e062aeffb62fb
1 parent
e216bba0d0
Exists in
master
and in
6 other branches
体重管理相关代码
Showing 1 changed file with 25 additions and 24 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
33df7d2
1 | 1 | package com.lyms.platform.operate.web.service.impl; |
2 | 2 | |
3 | -import com.lyms.hospitalapi.pojo.ReportModel; | |
4 | 3 | import com.lyms.platform.common.enums.*; |
5 | 4 | import com.lyms.platform.common.result.BaseResponse; |
6 | 5 | import com.lyms.platform.common.result.PageResult; |
... | ... | @@ -10,7 +9,6 @@ |
10 | 9 | import com.lyms.platform.operate.web.service.PatientWeightService; |
11 | 10 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
12 | 11 | import com.lyms.platform.operate.web.utils.MongoUtil; |
13 | -import com.lyms.platform.pojo.NewbornVisit; | |
14 | 12 | import com.lyms.platform.pojo.PatientWeight; |
15 | 13 | import com.lyms.platform.pojo.Patients; |
16 | 14 | import org.apache.commons.lang.StringUtils; |
17 | 15 | |
18 | 16 | |
19 | 17 | |
20 | 18 | |
21 | 19 | |
22 | 20 | |
... | ... | @@ -499,31 +497,34 @@ |
499 | 497 | } |
500 | 498 | |
501 | 499 | public void setReport(Map<String,Object> report) { |
502 | - Map<String, Object> xAxis = new HashMap<>(); | |
503 | - xAxis.put("type", "category"); | |
504 | - xAxis.put("boundaryGap", false); | |
505 | - List<Integer> datas = new ArrayList<>(); | |
506 | - for (int i = 1; i <= 40 ; i++) { | |
507 | - datas.add(i); | |
500 | + Map<String, Object> reportModel = new HashMap<>(); | |
501 | + List<Integer> xAxis = new ArrayList<>(); | |
502 | + for (int i = 0; i < 40; i++) { | |
503 | + xAxis.add(i + 1); | |
508 | 504 | } |
509 | - xAxis.put("data", datas); | |
505 | + reportModel.put("xAxis", xAxis); | |
510 | 506 | |
511 | - Map<String, Object> yAxis = new HashMap<>(); | |
512 | - yAxis.put("type", "value"); | |
513 | - yAxis.put("boundaryGap", Arrays.asList("0", "100%")); | |
514 | - | |
515 | 507 | List<Map<String, Object>> series = new ArrayList<>(); |
516 | - Map<String, Object> m1 = new HashMap<>(); | |
517 | - m1.put("name", "I"); | |
518 | - m1.put("type", "scatter"); | |
519 | - m1.put("xAxisIndex", 0); | |
520 | - m1.put("yAxisIndex", 0); | |
521 | - List<List<Integer>> seriesList = new ArrayList<>(); | |
508 | + Map<String, Object> port = new HashMap<>(); | |
509 | + List<Object> list = new ArrayList<>(); | |
510 | + list.add(Arrays.asList(1, 3)); | |
511 | + list.add(Arrays.asList(2, 4.2)); | |
512 | + port.put("portData", list); | |
513 | + series.add(port); | |
522 | 514 | |
515 | + Map<String, Object> high = new HashMap<>(); | |
516 | + high.put("lowData", Arrays.asList(1,2,3,4)); | |
517 | + series.add(high); | |
523 | 518 | |
519 | + Map<String, Object> normal = new HashMap<>(); | |
520 | + normal.put("highData", Arrays.asList(3,4,5,6)); | |
521 | + series.add(normal); | |
524 | 522 | |
525 | - Map<String, Object> reportModel = new HashMap<>(); | |
526 | - report.put("xAxis", xAxis); | |
523 | + Map<String, Object> low = new HashMap<>(); | |
524 | + low.put("normalData", Arrays.asList(2,3,4,5)); | |
525 | + series.add(low); | |
526 | + | |
527 | + reportModel.put("series", series); | |
527 | 528 | |
528 | 529 | report.put("reportModel", reportModel); |
529 | 530 | } |