Commit 4e1f90fb79b05f427681af860bc92116c21aab22

Authored by wtt
1 parent 560847b0b6

update

Showing 3 changed files with 51 additions and 14 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java View file @ 4e1f90f
... ... @@ -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
  179 + , @RequestParam(required = false)String oid,@RequestParam(required = false)String rid, @RequestParam(required = false) Integer yyMonth
180 180 ) {
181   - return babyNutritionFacade.queryQhfyBabyDietReport(id, getUserId(request), doctorId, oid, rid);
  181 + return babyNutritionFacade.queryQhfyBabyDietReport(id, getUserId(request), doctorId, oid, rid,yyMonth);
182 182 }
183 183  
184 184  
185 185  
186 186  
187 187  
188 188  
... ... @@ -196,23 +196,24 @@
196 196 {
197 197 return babyNutritionFacade.queryBabyDietReport(id, null, null);
198 198 }
199   - return babyNutritionFacade.queryQhfyBabyDietReport(id, null, null,null,null);
  199 + return babyNutritionFacade.queryQhfyBabyDietReport(id, null, null,null,null,null);
200 200 }
201 201  
202 202  
203 203  
204 204 /**
205   - * 查询选择
  205 + * 查询选择 month
206 206 * @param id
  207 + * @param yyMonth //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
207 208 * @param request
208 209 * @return
209 210 */
210 211 @RequestMapping(value = "/queryQhdDeitSelect", method = RequestMethod.GET)
211 212 @ResponseBody
212 213 @TokenRequired
213   - public BaseObjectResponse queryQhdDeitSelect(@RequestParam(required = true) String id, HttpServletRequest request
  214 + public BaseObjectResponse queryQhdDeitSelect(@RequestParam(required = true) String id, @RequestParam(required = false) Integer yyMonth, HttpServletRequest request
214 215 ) {
215   - return babyNutritionFacade.queryQhdDeitSelect(id, getUserId(request));
  216 + return babyNutritionFacade.queryQhdDeitSelect(id, getUserId(request),yyMonth);
216 217 }
217 218  
218 219  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 4e1f90f
... ... @@ -2654,9 +2654,9 @@
2654 2654  
2655 2655 //体重
2656 2656 if (type == 0) {
2657   - res = getGrowthValueMapNew(birth, value, sex, dueDate, babyId, checkDate);
  2657 + res = getGrowthValueMapNew(birth, value, sex, dueDate, babyId, checkDate,null);
2658 2658 } else {
2659   - res = getGrowthValue1MapNew(birth, value, sex, type, dueDate, checkDate);
  2659 + res = getGrowthValue1MapNew(birth, value, sex, type, dueDate, checkDate,null);
2660 2660 }
2661 2661  
2662 2662 BaseObjectResponse objectResponse = new BaseObjectResponse();
... ... @@ -2837,7 +2837,19 @@
2837 2837 return map;
2838 2838  
2839 2839 }
2840   - public Map getGrowthValueMapNew(String birth, Double value, Integer sex, String dueDate, String babyId, String checkDate) {
  2840 + /**
  2841 + *
  2842 + * @param birth
  2843 + * @param value
  2844 + * @param sex
  2845 + * @param dueDate
  2846 + * @param babyId
  2847 + * @param checkDate
  2848 + * @param yyMonth //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
  2849 + * @Author: 武涛涛
  2850 + * @Date: 2021/4/22 20:03
  2851 + */
  2852 + public Map getGrowthValueMapNew(String birth, Double value, Integer sex, String dueDate, String babyId, String checkDate,Integer yyMonth) {
2841 2853 Map <String, String> map = new HashMap <>();
2842 2854  
2843 2855  
... ... @@ -2898,6 +2910,9 @@
2898 2910 } else {
2899 2911 //计算儿童的月龄
2900 2912 int monthAge = DateUtil.getBabyAgeMonth(DateUtil.parseYMD(birth), DateUtil.parseYMD(checkDate));
  2913 + if(yyMonth != null){
  2914 + monthAge = yyMonth; //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
  2915 + }
2901 2916 //查询该月龄的年龄别体重值
2902 2917 list = babyCheckService.queryBabyHealthConfig(monthAge, sex, 0);
2903 2918 }
2904 2919  
... ... @@ -2979,8 +2994,20 @@
2979 2994 return map;
2980 2995  
2981 2996 }
  2997 + /**
  2998 + * 增加參數注釋
  2999 + * @param birth
  3000 + * @param value
  3001 + * @param sex
  3002 + * @param type
  3003 + * @param dueDate
  3004 + * @param checkDate
  3005 + * @param yyMonth /如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
  3006 + * @Author: 武涛涛
  3007 + * @Date: 2021/4/22 20:05
  3008 + */
2982 3009 public Map getGrowthValue1MapNew(String birth, Double value, Integer sex,
2983   - Integer type, String dueDate, String checkDate) {
  3010 + Integer type, String dueDate, String checkDate,Integer yyMonth) {
2984 3011 Map <String, String> map = new HashMap <>();
2985 3012 //计算儿童的月龄
2986 3013 int monthAge = 0;
... ... @@ -2991,6 +3018,9 @@
2991 3018 }
2992 3019 } else {
2993 3020 monthAge = DateUtil.getBabyAgeMonth(DateUtil.parseYMD(birth), DateUtil.parseYMD(checkDate));
  3021 + if(yyMonth != null){
  3022 + monthAge = yyMonth;
  3023 + }
2994 3024 }
2995 3025  
2996 3026  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java View file @ 4e1f90f
... ... @@ -1890,7 +1890,7 @@
1890 1890 /**
1891 1891 * 秦皇岛市妇幼精简版儿童膳食报告
1892 1892 */
1893   - public BaseObjectResponse queryQhfyBabyDietReport(String id, Integer userId, String doctorId,String oid,String rid
  1893 + public BaseObjectResponse queryQhfyBabyDietReport(String id, Integer userId, String doctorId,String oid,String rid,Integer yyMonth
1894 1894 ) {
1895 1895 BaseObjectResponse objectResponse = new BaseObjectResponse();
1896 1896 Map data = new HashMap();
1897 1897  
1898 1898  
... ... @@ -1937,16 +1937,19 @@
1937 1937  
1938 1938  
1939 1939 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()));
  1940 + , model.getWeight(), baby.getSex(), null, baby.getId(), DateUtil.getyyyy_MM_dd(model.getNutritiTime()),yyMonth);
1941 1941  
1942 1942 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()));
  1943 + , model.getHeight(), baby.getSex(), 1, null, DateUtil.getyyyy_MM_dd(model.getNutritiTime()),yyMonth);
1944 1944  
1945 1945 //体重评价
1946 1946 map.put("weightEvaluate", weightRes.get("res"));
1947 1947 //身高评价
1948 1948 map.put("heightEvaluate", heightRes.get("res"));
1949 1949 int month = DateUtil.getMonth(baby.getBirth(), model.getNutritiTime());
  1950 + if(yyMonth != null){
  1951 + month = yyMonth; //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
  1952 + }
1950 1953 if (month > 60) {
1951 1954 return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("月龄范围没有报告");
1952 1955 }
... ... @@ -2281,7 +2284,7 @@
2281 2284 return objectResponse;
2282 2285 }
2283 2286  
2284   - public BaseObjectResponse queryQhdDeitSelect(String id, Integer userId) {
  2287 + public BaseObjectResponse queryQhdDeitSelect(String id, Integer userId,Integer yyMonth) {
2285 2288 BabyNutritionQuery babyQuery = new BabyNutritionQuery();
2286 2289 String hospitalId = autoMatchFacade.getHospitalId(userId);
2287 2290 babyQuery.setHospitalId(hospitalId);
... ... @@ -2312,6 +2315,9 @@
2312 2315 BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId());
2313 2316  
2314 2317 int month = DateUtil.getMonth(baby.getBirth(), model.getNutritiTime());
  2318 + if(yyMonth != null){
  2319 + month = yyMonth; //如果选择了营养月龄,就按照营养月龄出报告的评价和文字内容
  2320 + }
2315 2321 if (month > 60) {
2316 2322 return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("月龄范围没有报告");
2317 2323 }