diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java index ecf8d83..83db4df 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java @@ -1003,13 +1003,17 @@ public class BabyNutritionFacade { String foreignId = healthChargeModel.getBabyForeignId(); BabyModel mongoTemplateOne = mongoTemplate.findOne(Query.query(Criteria.where("id").is(foreignId)), BabyModel.class); if (mongoTemplateOne != null) { - String babayName = ""; + String babayName = "", weight = "", babyHeight = ""; String babyNutritionId = healthChargeModel.getBabyNutritionId(); Date createTime = null; if (babyNutritionId != null) { BabyNutritionModel nutritionModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(babyNutritionId)), BabyNutritionModel.class); - createTime = nutritionModel.getCreated(); + if (null != nutritionModel) { + createTime = nutritionModel.getCreated(); + weight = nutritionModel.getWeight().toString(); + babyHeight = nutritionModel.getHeight().toString(); + } } String doctorId = healthChargeModel.getDoctorId(); @@ -1027,13 +1031,9 @@ public class BabyNutritionFacade { hashMap.put("babyName", babayName); hashMap.put("gender", sex != null ? sex == 1 ? "男" : "女" : ""); hashMap.put("phone", mongoTemplateOne.getMphone()); - String cardNo = mongoTemplateOne.getCardNo(); - if (StringUtils.isEmpty(cardNo)) { - cardNo = mongoTemplateOne.getMcertNo(); - } - hashMap.put("cardNo", cardNo); - hashMap.put("weight", mongoTemplateOne.getBabyWeight()); - hashMap.put("babyHeight", mongoTemplateOne.getBabyHeight()); + hashMap.put("cardNo", mongoTemplateOne.getVcCardNo()); + hashMap.put("weight", weight); + hashMap.put("babyHeight", babyHeight); hashMap.put("createTime", createTime); hashMap.put("interpretDoctorName", doctorName); hashMap.put("id", babyNutritionId);