Commit 738ce471c51b253d7ffd175a14445aee326d9643
1 parent
bcdc6f5e82
Exists in
master
and in
1 other branch
update
Showing 2 changed files with 33 additions and 15 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
738ce47
| ... | ... | @@ -187,6 +187,13 @@ |
| 187 | 187 | if (CollectionUtils.isNotEmpty(models)) { |
| 188 | 188 | BabyNutritionResult result = new BabyNutritionResult(); |
| 189 | 189 | result.convertToResult(models.get(0)); |
| 190 | + | |
| 191 | + BabyModel babyModel = babyBookbuildingService.queryBabyById(models.get(0).getBabyId()); | |
| 192 | + if (babyModel != null) | |
| 193 | + { | |
| 194 | + result.setCheckMonth(DateUtil.getBabyMonthAge1(babyModel.getBirth(),models.get(0).getNutritiTime())); | |
| 195 | + } | |
| 196 | + | |
| 190 | 197 | Organization org = organizationService.getOrganization(Integer.parseInt(result.getHospitalId())); |
| 191 | 198 | result.setHospitalName(org.getName()); |
| 192 | 199 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyNutritionResult.java
View file @
738ce47
| ... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 | |
| 21 | 21 | private Double weight; |
| 22 | 22 | |
| 23 | + private Integer checkMonth; | |
| 23 | 24 | |
| 24 | 25 | private String babyId; |
| 25 | 26 | |
| 26 | 27 | |
| 27 | 28 | |
| ... | ... | @@ -135,23 +136,8 @@ |
| 135 | 136 | private List<Map<String,Integer>> diets; |
| 136 | 137 | |
| 137 | 138 | |
| 138 | - public List<Map<String,Integer>> getDiets() { | |
| 139 | - return diets; | |
| 140 | - } | |
| 141 | 139 | |
| 142 | - public void setDiets(List<Map<String,Integer>> diets) { | |
| 143 | - this.diets = diets; | |
| 144 | - } | |
| 145 | 140 | |
| 146 | - | |
| 147 | - public String getInterpretDoctorId() { | |
| 148 | - return interpretDoctorId; | |
| 149 | - } | |
| 150 | - | |
| 151 | - public void setInterpretDoctorId(String interpretDoctorId) { | |
| 152 | - this.interpretDoctorId = interpretDoctorId; | |
| 153 | - } | |
| 154 | - | |
| 155 | 141 | public BabyNutritionResult convertToResult(BabyNutritionModel model) { |
| 156 | 142 | setId(model.getId()); |
| 157 | 143 | setHospitalId(model.getHospitalId()); |
| ... | ... | @@ -202,6 +188,31 @@ |
| 202 | 188 | setRemark(model.getRemark()); |
| 203 | 189 | setDiets(CollectionUtils.isNotEmpty(model.getDiets()) ? model.getDiets() : new ArrayList<Map<String, Integer>>()); |
| 204 | 190 | return this; |
| 191 | + } | |
| 192 | + | |
| 193 | + public Integer getCheckMonth() { | |
| 194 | + return checkMonth; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setCheckMonth(Integer checkMonth) { | |
| 198 | + this.checkMonth = checkMonth; | |
| 199 | + } | |
| 200 | + | |
| 201 | + public List<Map<String,Integer>> getDiets() { | |
| 202 | + return diets; | |
| 203 | + } | |
| 204 | + | |
| 205 | + public void setDiets(List<Map<String,Integer>> diets) { | |
| 206 | + this.diets = diets; | |
| 207 | + } | |
| 208 | + | |
| 209 | + | |
| 210 | + public String getInterpretDoctorId() { | |
| 211 | + return interpretDoctorId; | |
| 212 | + } | |
| 213 | + | |
| 214 | + public void setInterpretDoctorId(String interpretDoctorId) { | |
| 215 | + this.interpretDoctorId = interpretDoctorId; | |
| 205 | 216 | } |
| 206 | 217 | |
| 207 | 218 | public List<String> getFoods() { |