From d202bfd7251cb91a05dba0b9c8047a0bb8a1d102 Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Tue, 28 Aug 2018 16:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=93=E9=87=8D=E8=90=A5?= =?UTF-8?q?=E5=85=BB=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/service/impl/PatientWeightServiceImpl.java | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 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 9ff666b..f82bcfe 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 @@ -448,21 +448,19 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient double bmi = Double.parseDouble(patientWeight.getBmi()); Map kmap = getComputeKul(Double.parseDouble(patientWeight.getBeforeWeight()), Double.parseDouble(patientWeight.getNowWeight()), week, bmi, patientWeight.getBregmatic()); - if (map == null || map.size() == 0) { - return null; - } + if (1 == type) { setGuide(week, map); // 设置指南 - } - - WeightConfigModel configModel = getWeightConfigBykcal(kmap, ReportConfig.getNSArea(basicConfig.getName())); - if (configModel != null) { - if (2 == type) { - setRecipe(map, configModel, week, kmap); // 设置食谱 - } else if (3 == type) { - setSuggest(map, configModel, week); // 设置建议 - } else if (4 == type) { - setCookbook(map, configModel); // 设置菜谱 + }else { + WeightConfigModel configModel = getWeightConfigBykcal(kmap, ReportConfig.getNSArea(basicConfig.getName())); + if (configModel != null) { + if (2 == type) { + setRecipe(map, configModel, week, kmap); // 设置食谱 + } else if (3 == type) { + setSuggest(map, configModel, week); // 设置建议 + } else if (4 == type) { + setCookbook(map, configModel); // 设置菜谱 + } } } } -- 1.8.3.1