Commit 0cdf426706d88012ea08f87947e2c36599e518e7
1 parent
4e1f90fb79
Exists in
master
and in
6 other branches
update
Showing 5 changed files with 47 additions and 14 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyNutritionModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyNutritionRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyNutritionResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/BabyNutritionModel.java
View file @
0cdf426
... | ... | @@ -12,6 +12,9 @@ |
12 | 12 | @Document(collection = "lyms_nutrition") |
13 | 13 | public class BabyNutritionModel { |
14 | 14 | |
15 | + // yyMonth,营养月龄:1---36月 | |
16 | + private Integer yyMonth; | |
17 | + | |
15 | 18 | private String id; |
16 | 19 | |
17 | 20 | private Double height; |
... | ... | @@ -505,6 +508,14 @@ |
505 | 508 | |
506 | 509 | public void setFeedType(String feedType) { |
507 | 510 | this.feedType = feedType; |
511 | + } | |
512 | + | |
513 | + public Integer getYyMonth() { | |
514 | + return yyMonth; | |
515 | + } | |
516 | + | |
517 | + public void setYyMonth(Integer yyMonth) { | |
518 | + this.yyMonth = yyMonth; | |
508 | 519 | } |
509 | 520 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java
View file @
0cdf426
... | ... | @@ -176,9 +176,9 @@ |
176 | 176 | @ResponseBody |
177 | 177 | @TokenRequired |
178 | 178 | public BaseObjectResponse queryQhfyBabyDietReport(@PathVariable("id") String id, HttpServletRequest request, @RequestParam("doctorId")String doctorId |
179 | - , @RequestParam(required = false)String oid,@RequestParam(required = false)String rid, @RequestParam(required = false) Integer yyMonth | |
179 | + , @RequestParam(required = false)String oid,@RequestParam(required = false)String rid | |
180 | 180 | ) { |
181 | - return babyNutritionFacade.queryQhfyBabyDietReport(id, getUserId(request), doctorId, oid, rid,yyMonth); | |
181 | + return babyNutritionFacade.queryQhfyBabyDietReport(id, getUserId(request), doctorId, oid, rid); | |
182 | 182 | } |
183 | 183 | |
184 | 184 | |
... | ... | @@ -196,7 +196,7 @@ |
196 | 196 | { |
197 | 197 | return babyNutritionFacade.queryBabyDietReport(id, null, null); |
198 | 198 | } |
199 | - return babyNutritionFacade.queryQhfyBabyDietReport(id, null, null,null,null,null); | |
199 | + return babyNutritionFacade.queryQhfyBabyDietReport(id, null, null,null,null); | |
200 | 200 | } |
201 | 201 | |
202 | 202 | |
203 | 203 | |
204 | 204 | |
... | ... | @@ -204,16 +204,15 @@ |
204 | 204 | /** |
205 | 205 | * 查询选择 month |
206 | 206 | * @param id |
207 | - * @param yyMonth //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容 | |
208 | 207 | * @param request |
209 | 208 | * @return |
210 | 209 | */ |
211 | 210 | @RequestMapping(value = "/queryQhdDeitSelect", method = RequestMethod.GET) |
212 | 211 | @ResponseBody |
213 | 212 | @TokenRequired |
214 | - public BaseObjectResponse queryQhdDeitSelect(@RequestParam(required = true) String id, @RequestParam(required = false) Integer yyMonth, HttpServletRequest request | |
213 | + public BaseObjectResponse queryQhdDeitSelect(@RequestParam(required = true) String id,HttpServletRequest request | |
215 | 214 | ) { |
216 | - return babyNutritionFacade.queryQhdDeitSelect(id, getUserId(request),yyMonth); | |
215 | + return babyNutritionFacade.queryQhdDeitSelect(id, getUserId(request)); | |
217 | 216 | } |
218 | 217 | |
219 | 218 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
0cdf426
... | ... | @@ -165,6 +165,8 @@ |
165 | 165 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
166 | 166 | |
167 | 167 | BabyNutritionModel model = request.convertToDataModel(); |
168 | + model.setYyMonth(request.getYyMonth()); | |
169 | + | |
168 | 170 | if (StringUtils.isNotEmpty(model.getId())) { |
169 | 171 | model.setModified(new Date()); |
170 | 172 | babyNutritionService.updateBabyNutrition(model, model.getId()); |
... | ... | @@ -1890,7 +1892,7 @@ |
1890 | 1892 | /** |
1891 | 1893 | * 秦皇岛市妇幼精简版儿童膳食报告 |
1892 | 1894 | */ |
1893 | - public BaseObjectResponse queryQhfyBabyDietReport(String id, Integer userId, String doctorId,String oid,String rid,Integer yyMonth | |
1895 | + public BaseObjectResponse queryQhfyBabyDietReport(String id, Integer userId, String doctorId,String oid,String rid | |
1894 | 1896 | ) { |
1895 | 1897 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
1896 | 1898 | Map data = new HashMap(); |
1897 | 1899 | |
1898 | 1900 | |
... | ... | @@ -1937,18 +1939,18 @@ |
1937 | 1939 | |
1938 | 1940 | |
1939 | 1941 | Map <String, String> weightRes = babyCheckFacade.getGrowthValueMapNew(DateUtil.getyyyy_MM_dd(baby.getBirth()) |
1940 | - , model.getWeight(), baby.getSex(), null, baby.getId(), DateUtil.getyyyy_MM_dd(model.getNutritiTime()),yyMonth); | |
1942 | + , model.getWeight(), baby.getSex(), null, baby.getId(), DateUtil.getyyyy_MM_dd(model.getNutritiTime()),model.getYyMonth()); | |
1941 | 1943 | |
1942 | 1944 | Map <String, String> heightRes = babyCheckFacade.getGrowthValue1MapNew(DateUtil.getyyyy_MM_dd(baby.getBirth()) |
1943 | - , model.getHeight(), baby.getSex(), 1, null, DateUtil.getyyyy_MM_dd(model.getNutritiTime()),yyMonth); | |
1945 | + , model.getHeight(), baby.getSex(), 1, null, DateUtil.getyyyy_MM_dd(model.getNutritiTime()),model.getYyMonth()); | |
1944 | 1946 | |
1945 | 1947 | //体重评价 |
1946 | 1948 | map.put("weightEvaluate", weightRes.get("res")); |
1947 | 1949 | //身高评价 |
1948 | 1950 | map.put("heightEvaluate", heightRes.get("res")); |
1949 | 1951 | int month = DateUtil.getMonth(baby.getBirth(), model.getNutritiTime()); |
1950 | - if(yyMonth != null){ | |
1951 | - month = yyMonth; //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容 | |
1952 | + if(model.getYyMonth() != null){ | |
1953 | + month = model.getYyMonth(); //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容 | |
1952 | 1954 | } |
1953 | 1955 | if (month > 60) { |
1954 | 1956 | return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("月龄范围没有报告"); |
... | ... | @@ -2284,7 +2286,7 @@ |
2284 | 2286 | return objectResponse; |
2285 | 2287 | } |
2286 | 2288 | |
2287 | - public BaseObjectResponse queryQhdDeitSelect(String id, Integer userId,Integer yyMonth) { | |
2289 | + public BaseObjectResponse queryQhdDeitSelect(String id, Integer userId) { | |
2288 | 2290 | BabyNutritionQuery babyQuery = new BabyNutritionQuery(); |
2289 | 2291 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
2290 | 2292 | babyQuery.setHospitalId(hospitalId); |
... | ... | @@ -2315,8 +2317,8 @@ |
2315 | 2317 | BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId()); |
2316 | 2318 | |
2317 | 2319 | int month = DateUtil.getMonth(baby.getBirth(), model.getNutritiTime()); |
2318 | - if(yyMonth != null){ | |
2319 | - month = yyMonth; //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容 | |
2320 | + if(model.getYyMonth() != null){ | |
2321 | + month = model.getYyMonth(); //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容 | |
2320 | 2322 | } |
2321 | 2323 | if (month > 60) { |
2322 | 2324 | return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("月龄范围没有报告"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyNutritionRequest.java
View file @
0cdf426
... | ... | @@ -14,6 +14,8 @@ |
14 | 14 | */ |
15 | 15 | public class BabyNutritionRequest implements IBasicRequestConvert<BabyNutritionModel> { |
16 | 16 | |
17 | + // yyMonth,营养月龄:1---36月 | |
18 | + private Integer yyMonth; | |
17 | 19 | |
18 | 20 | private String id; |
19 | 21 | |
... | ... | @@ -547,6 +549,14 @@ |
547 | 549 | |
548 | 550 | public void setFeedType(String feedType) { |
549 | 551 | this.feedType = feedType; |
552 | + } | |
553 | + | |
554 | + public Integer getYyMonth() { | |
555 | + return yyMonth; | |
556 | + } | |
557 | + | |
558 | + public void setYyMonth(Integer yyMonth) { | |
559 | + this.yyMonth = yyMonth; | |
550 | 560 | } |
551 | 561 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyNutritionResult.java
View file @
0cdf426
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * Created by Administrator on 2019-01-29. |
14 | 14 | */ |
15 | 15 | public class BabyNutritionResult { |
16 | + // yyMonth,营养月龄:1---36月 | |
17 | + private Integer yyMonth; | |
16 | 18 | |
17 | 19 | private String id; |
18 | 20 | |
... | ... | @@ -139,6 +141,7 @@ |
139 | 141 | |
140 | 142 | |
141 | 143 | public BabyNutritionResult convertToResult(BabyNutritionModel model) { |
144 | + setYyMonth(model.getYyMonth()); | |
142 | 145 | setId(model.getId()); |
143 | 146 | setHospitalId(model.getHospitalId()); |
144 | 147 | setHeight(model.getHeight()); |
... | ... | @@ -561,6 +564,14 @@ |
561 | 564 | |
562 | 565 | public Map getCook() { |
563 | 566 | return cook; |
567 | + } | |
568 | + | |
569 | + public Integer getYyMonth() { | |
570 | + return yyMonth; | |
571 | + } | |
572 | + | |
573 | + public void setYyMonth(Integer yyMonth) { | |
574 | + this.yyMonth = yyMonth; | |
564 | 575 | } |
565 | 576 | |
566 | 577 | public void setCook(Map cook) { |