From 564d0c483925b817023b9fbc94bbdbabe4781e65 Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Tue, 28 Nov 2017 11:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=97=E5=8F=B7=E6=94=B9=E6=8B=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/service/impl/PatientWeightServiceImpl.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 6a9ddc6..a7d7fa5 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -298,12 +298,22 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient patientWeight.setHospitalName(couponMapper.getHospitalName(patientWeight.getHospitalId())); List> weightInfo = new ArrayList<>(); List betweenDay = DateUtil.getBetweenDay(7); - for (String day : betweenDay) { - - } - for (Map map : patientWeight.getDayWeights2()) { - + for (String date : betweenDay) { + Map temp = new HashMap<>(); + weightInfo.add(temp); + temp.put("id", date); + for (Map map : patientWeight.getDayWeights2()) { + if(date.equals(map.get("date").toString())) { + temp.put("name", map.get("nowWeight")); + break; + } + } + if(!temp.containsKey("name")) { + temp.put("name", "--"); + } } + patientWeight.setWeightInfo(weightInfo); + return RespBuilder.buildSuccess(patientWeight); } -- 1.8.3.1