Commit 9226baaafb0847663f4ac7cb339bc63361751d46
1 parent
6a8a7618c4
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 26 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisCrisisItemController.java
View file @
9226baa
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | */ |
100 | 100 | @RequestMapping(method = RequestMethod.GET, value = "/syncLisCrisisData") |
101 | 101 | @ResponseBody |
102 | - public List<LisCrisisItem> getSyncLisCrisis(@RequestHeader("Authorization") String token, | |
102 | + public List<Map<String, Object>> getSyncLisCrisis(@RequestHeader("Authorization") String token, | |
103 | 103 | @RequestParam("page") Integer page, |
104 | 104 | @RequestParam("limit") Integer limit) { |
105 | 105 | |
... | ... | @@ -115,7 +115,31 @@ |
115 | 115 | query.setPage(page); |
116 | 116 | List<LisCrisisItem> lisCrisisItemList = lisCrisisItemService.query(query); |
117 | 117 | |
118 | - return lisCrisisItemList; | |
118 | + | |
119 | + List<Map<String, Object>> list = new ArrayList<>(); | |
120 | + | |
121 | + if (CollectionUtils.isNotEmpty(lisCrisisItemList)) { | |
122 | + for (LisCrisisItem data : lisCrisisItemList) { | |
123 | + Map<String, Object> map = new HashMap<>(); | |
124 | + Map<String, Object> content = new HashMap<>(); | |
125 | + map.put("emergenceId", data.getId()); | |
126 | + map.put("hospitalId", data.getHospitalId()); | |
127 | + content.put("type", data.getItemName()); | |
128 | + content.put("ref", data.getRef() + " " + data.getUnit()); | |
129 | + content.put("real", data.getResult() + " " + data.getUnit()); | |
130 | + map.put("content", JsonUtil.obj2JsonString(content)); | |
131 | + map.put("applyDoctorCode", data.getApplyDoctorCode()); | |
132 | + map.put("applyDoctorName", data.getApplyDoctorName()); | |
133 | + map.put("publishTime", DateUtil.getyyyy_MM_dd(data.getPublishTime())); | |
134 | + map.put("status", data.getStatus()); | |
135 | + map.put("statusName", data.getStatusName()); | |
136 | + map.put("patientId", data.getPatientId()); | |
137 | + list.add(map); | |
138 | + } | |
139 | + } | |
140 | + | |
141 | + | |
142 | + return list; | |
119 | 143 | } |
120 | 144 | |
121 | 145 |