Commit 6c4befd2ca4cc8b98dfcb6d42666618906f915be
1 parent
8b5513345f
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 29 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java
View file @
6c4befd
| ... | ... | @@ -80,6 +80,24 @@ |
| 80 | 80 | |
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | + * 小程序查询单个儿童膳食列表 | |
| 84 | + * @param page | |
| 85 | + * @param limit | |
| 86 | + * @param babyId | |
| 87 | + * @param request | |
| 88 | + * @return | |
| 89 | + */ | |
| 90 | + @RequestMapping(value = "/queryBabyAppNutritionList", method = RequestMethod.GET) | |
| 91 | + @ResponseBody | |
| 92 | + public BaseResponse queryBabyAppNutritionList(@RequestParam("page") Integer page, | |
| 93 | + @RequestParam("limit") Integer limit, | |
| 94 | + @RequestParam(required = false) String babyId, | |
| 95 | + HttpServletRequest request) { | |
| 96 | + return babyNutritionFacade.queryBabyNutritionList(babyId,page, limit, null, null, null,null, | |
| 97 | + null, null, null); | |
| 98 | + } | |
| 99 | + | |
| 100 | + /** | |
| 83 | 101 | * 查询营养记录 |
| 84 | 102 | * |
| 85 | 103 | * @param babyId |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
6c4befd
| ... | ... | @@ -245,7 +245,12 @@ |
| 245 | 245 | */ |
| 246 | 246 | public BaseResponse queryBabyNutritionList(String babyId,Integer page, Integer limit, String queryNo, String vcCardNo, |
| 247 | 247 | String babyName, Integer userId, String recordTime, String interpretDoctorId, String settleStatus) { |
| 248 | - String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 248 | + String hospitalId = null; | |
| 249 | + if (userId != null) | |
| 250 | + { | |
| 251 | + hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 252 | + } | |
| 253 | + | |
| 249 | 254 | List<Map> list = new ArrayList<>(); |
| 250 | 255 | List<String> babyIds = new ArrayList<>(); |
| 251 | 256 | BaseListResponse objectResponse = new BaseListResponse(); |
| 252 | 257 | |
| ... | ... | @@ -272,11 +277,15 @@ |
| 272 | 277 | } |
| 273 | 278 | |
| 274 | 279 | BabyNutritionQuery babyQuery = new BabyNutritionQuery(); |
| 275 | - babyQuery.setHospitalId(hospitalId); | |
| 280 | + | |
| 276 | 281 | babyQuery.setBabyIds(babyIds); |
| 277 | 282 | if (StringUtils.isNotEmpty(babyId)) |
| 278 | 283 | { |
| 279 | 284 | babyQuery.setBabyId(babyId); |
| 285 | + } | |
| 286 | + else | |
| 287 | + { | |
| 288 | + babyQuery.setHospitalId(hospitalId); | |
| 280 | 289 | } |
| 281 | 290 | babyQuery.setLimit(limit); |
| 282 | 291 | babyQuery.setPage(page); |