Commit 564d0c483925b817023b9fbc94bbdbabe4781e65
1 parent
9bece8ec25
Exists in
master
and in
6 other branches
逗号改括号
Showing 1 changed file with 15 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
564d0c4
| ... | ... | @@ -298,12 +298,22 @@ |
| 298 | 298 | patientWeight.setHospitalName(couponMapper.getHospitalName(patientWeight.getHospitalId())); |
| 299 | 299 | List<Map<String, Object>> weightInfo = new ArrayList<>(); |
| 300 | 300 | List<String> betweenDay = DateUtil.getBetweenDay(7); |
| 301 | - for (String day : betweenDay) { | |
| 302 | - | |
| 301 | + for (String date : betweenDay) { | |
| 302 | + Map<String, Object> temp = new HashMap<>(); | |
| 303 | + weightInfo.add(temp); | |
| 304 | + temp.put("id", date); | |
| 305 | + for (Map<String, Object> map : patientWeight.getDayWeights2()) { | |
| 306 | + if(date.equals(map.get("date").toString())) { | |
| 307 | + temp.put("name", map.get("nowWeight")); | |
| 308 | + break; | |
| 309 | + } | |
| 310 | + } | |
| 311 | + if(!temp.containsKey("name")) { | |
| 312 | + temp.put("name", "--"); | |
| 313 | + } | |
| 303 | 314 | } |
| 304 | - for (Map<String, Object> map : patientWeight.getDayWeights2()) { | |
| 305 | - | |
| 306 | - } | |
| 315 | + patientWeight.setWeightInfo(weightInfo); | |
| 316 | + | |
| 307 | 317 | return RespBuilder.buildSuccess(patientWeight); |
| 308 | 318 | } |
| 309 | 319 |