Commit 6585773a5685e08c09b093b3dd29e8e014e53edf
1 parent
930483ddbf
Exists in
master
and in
1 other branch
修复bug
Showing 1 changed file with 9 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
6585773
| ... | ... | @@ -1003,13 +1003,17 @@ |
| 1003 | 1003 | String foreignId = healthChargeModel.getBabyForeignId(); |
| 1004 | 1004 | BabyModel mongoTemplateOne = mongoTemplate.findOne(Query.query(Criteria.where("id").is(foreignId)), BabyModel.class); |
| 1005 | 1005 | if (mongoTemplateOne != null) { |
| 1006 | - String babayName = ""; | |
| 1006 | + String babayName = "", weight = "", babyHeight = ""; | |
| 1007 | 1007 | |
| 1008 | 1008 | String babyNutritionId = healthChargeModel.getBabyNutritionId(); |
| 1009 | 1009 | Date createTime = null; |
| 1010 | 1010 | if (babyNutritionId != null) { |
| 1011 | 1011 | BabyNutritionModel nutritionModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(babyNutritionId)), BabyNutritionModel.class); |
| 1012 | - createTime = nutritionModel.getCreated(); | |
| 1012 | + if (null != nutritionModel) { | |
| 1013 | + createTime = nutritionModel.getCreated(); | |
| 1014 | + weight = nutritionModel.getWeight().toString(); | |
| 1015 | + babyHeight = nutritionModel.getHeight().toString(); | |
| 1016 | + } | |
| 1013 | 1017 | |
| 1014 | 1018 | } |
| 1015 | 1019 | String doctorId = healthChargeModel.getDoctorId(); |
| ... | ... | @@ -1027,13 +1031,9 @@ |
| 1027 | 1031 | hashMap.put("babyName", babayName); |
| 1028 | 1032 | hashMap.put("gender", sex != null ? sex == 1 ? "男" : "女" : ""); |
| 1029 | 1033 | hashMap.put("phone", mongoTemplateOne.getMphone()); |
| 1030 | - String cardNo = mongoTemplateOne.getCardNo(); | |
| 1031 | - if (StringUtils.isEmpty(cardNo)) { | |
| 1032 | - cardNo = mongoTemplateOne.getMcertNo(); | |
| 1033 | - } | |
| 1034 | - hashMap.put("cardNo", cardNo); | |
| 1035 | - hashMap.put("weight", mongoTemplateOne.getBabyWeight()); | |
| 1036 | - hashMap.put("babyHeight", mongoTemplateOne.getBabyHeight()); | |
| 1034 | + hashMap.put("cardNo", mongoTemplateOne.getVcCardNo()); | |
| 1035 | + hashMap.put("weight", weight); | |
| 1036 | + hashMap.put("babyHeight", babyHeight); | |
| 1037 | 1037 | hashMap.put("createTime", createTime); |
| 1038 | 1038 | hashMap.put("interpretDoctorName", doctorName); |
| 1039 | 1039 | hashMap.put("id", babyNutritionId); |