Commit c8369419f06ec39db0d0b50d1b263f153cb5ee87
1 parent
249f93883c
Exists in
master
and in
6 other branches
产检医生统计返回结构修改
Showing 2 changed files with 19 additions and 24 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/ReportModel.java
View file @
c836941
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | /** 其他数据 */ |
| 23 | 23 | private List<Object> data; |
| 24 | 24 | |
| 25 | - private List<Map<String, List<Object>>> doctorInfo; | |
| 25 | + private List<Object> doctorInfo; | |
| 26 | 26 | |
| 27 | 27 | public List<String> getxAxis() { |
| 28 | 28 | return xAxis; |
| 29 | 29 | |
| ... | ... | @@ -56,11 +56,11 @@ |
| 56 | 56 | this.data = data; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public List<Map<String, List<Object>>> getDoctorInfo() { | |
| 59 | + public List<Object> getDoctorInfo() { | |
| 60 | 60 | return doctorInfo; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - public void setDoctorInfo(List<Map<String, List<Object>>> doctorInfo) { | |
| 63 | + public void setDoctorInfo(List<Object> doctorInfo) { | |
| 64 | 64 | this.doctorInfo = doctorInfo; |
| 65 | 65 | } |
| 66 | 66 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
c836941
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | ReportModel reportModel = new ReportModel(); |
| 47 | 47 | List<Object> params = new ArrayList<>(); |
| 48 | 48 | List<Object> doctorNames = new ArrayList<>(); |
| 49 | - List<Map<String, List<Object>>> doctorInfo = new ArrayList<>(); | |
| 49 | + List<Object> doctorInfo = new ArrayList<>(); | |
| 50 | 50 | |
| 51 | 51 | List<Map<String, Object>> restList = reportDao.findList(getDoctorMedicalSql(startDate, endDate, childBirth, params), params); |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | |
| ... | ... | @@ -60,14 +60,10 @@ |
| 60 | 60 | return rest; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - private List<Map<String,Object>> createDoctorGrid(List<Map<String, Object>> restList, List<Object> doctorNames, List<Map<String, List<Object>>> doctorInfo) { | |
| 63 | + private List<Map<String,Object>> createDoctorGrid(List<Map<String, Object>> restList, List<Object> doctorNames, List<Object> doctorInfo) { | |
| 64 | 64 | List<Map<String,Object>> grid = new ArrayList<>(); |
| 65 | -// List<Object> inspectPeoples = new ArrayList<>(); /** 产检人数集合 */ | |
| 66 | -// List<Object> twicePeoples = new ArrayList<>(); /** 产检人数集合 */ | |
| 67 | -// List<Object> fiveTimesPeoples = new ArrayList<>(); /** 产检人数集合 */ | |
| 68 | 65 | for (Map<String, Object> map : restList) { |
| 69 | 66 | Map<String, Object> data = new HashMap<>(); |
| 70 | - Map<String,List<Object>> doctor = new HashMap<>(); | |
| 71 | 67 | List<Object> doctorList = new ArrayList<>(); |
| 72 | 68 | Object doctorName = map.get("DOCTOR_NAME"); |
| 73 | 69 | if(doctorName != null && StringUtils.isNotBlank(doctorName.toString())) { |
| 74 | 70 | |
| ... | ... | @@ -75,8 +71,11 @@ |
| 75 | 71 | } else { |
| 76 | 72 | data.put("doctorName", ""); |
| 77 | 73 | } |
| 78 | - doctorNames.add(doctorName); | |
| 79 | 74 | |
| 75 | + if(!"总计".equals(doctorName + "")) { | |
| 76 | + doctorNames.add(doctorName); | |
| 77 | + } | |
| 78 | + | |
| 80 | 79 | Object inspectTime = map.get("CJ_RC"); |
| 81 | 80 | if(inspectTime != null && StringUtils.isNotBlank(inspectTime.toString())) { |
| 82 | 81 | data.put("inspectTime", inspectTime); /** 产检人次 */ |
| ... | ... | @@ -98,11 +97,16 @@ |
| 98 | 97 | } |
| 99 | 98 | grid.add(data); |
| 100 | 99 | |
| 101 | - doctorList.add(inspectPeople); | |
| 102 | - doctorList.add(twice); | |
| 103 | - doctorList.add(fiveTimes); | |
| 104 | - doctor.put(doctorName + "", doctorList); | |
| 105 | - doctorInfo.add(doctor); | |
| 100 | + if(!"总计".equals(doctorName + "")) { | |
| 101 | + Map<String, Object> doctorMap = new HashMap<>(); | |
| 102 | + doctorList.add(inspectPeople); | |
| 103 | + doctorList.add(twice); | |
| 104 | + doctorList.add(fiveTimes); | |
| 105 | + doctorMap.put("name", doctorName); | |
| 106 | + doctorMap.put("type", "bar"); | |
| 107 | + doctorMap.put("data", doctorList); | |
| 108 | + doctorInfo.add(doctorMap); | |
| 109 | + } | |
| 106 | 110 | } |
| 107 | 111 | |
| 108 | 112 | /** 把总计放到第一位 */ |
| 109 | 113 | |
| 110 | 114 | |
| 111 | 115 | |
| ... | ... | @@ -118,24 +122,15 @@ |
| 118 | 122 | for (Map<String, Object> map : grid) { |
| 119 | 123 | map.put("id", i++); |
| 120 | 124 | |
| 121 | - if(map.containsKey("inspectPeople")) { | |
| 122 | -// inspectPeoples.add(map.get("inspectPeople")); | |
| 123 | - } | |
| 124 | - | |
| 125 | 125 | if(map.containsKey("twice")) { /** 两次以上比例 */ |
| 126 | 126 | map.put("twiceProportion", MathUtil.getProportion(map.get("twice"), map.get("inspectPeople"))); |
| 127 | -// twicePeoples.add(map.get("twice")); | |
| 128 | 127 | } |
| 129 | 128 | |
| 130 | 129 | if(map.containsKey("fiveTimes")) { /** 五次以上比例 */ |
| 131 | 130 | map.put("fiveTimeProportion", MathUtil.getProportion(map.get("fiveTimes"), map.get("inspectPeople"))); |
| 132 | -// fiveTimesPeoples.add(map.get("fiveTimes")); | |
| 133 | 131 | } |
| 134 | 132 | } |
| 135 | 133 | |
| 136 | -// peoples.put("fiveTimesPeoples", fiveTimesPeoples); | |
| 137 | -// peoples.put("twicePeoples", twicePeoples); | |
| 138 | -// peoples.put("inspectPeoples", inspectPeoples ); | |
| 139 | 134 | return grid; |
| 140 | 135 | } |
| 141 | 136 |