Commit bd6e6ffa9d5514ac3af6d70f86220d7813743dea
1 parent
781bc3822a
Exists in
dev
#fix:优化小程序高危饮食原则查询
Showing 3 changed files with 11 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnancyReportController.java
View file @
bd6e6ff
| ... | ... | @@ -19,6 +19,7 @@ |
| 19 | 19 | import org.springframework.web.bind.annotation.*; |
| 20 | 20 | |
| 21 | 21 | import javax.servlet.http.HttpServletRequest; |
| 22 | +import java.util.List; | |
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * 孕期营养报告模版 |
| 25 | 26 | |
| 26 | 27 | |
| ... | ... | @@ -218,12 +219,15 @@ |
| 218 | 219 | @RequestMapping(method = RequestMethod.GET, value = "/wx/matters/getRisk") |
| 219 | 220 | @ResponseBody |
| 220 | 221 | public BaseResponse getWxReportByRisk(@RequestParam Integer week, |
| 221 | - @RequestParam String riskFactorId,HttpServletRequest request){ | |
| 222 | + @RequestParam String riskFactorId, | |
| 223 | + @RequestParam String hospitalId){ | |
| 222 | 224 | BaseResponse baseResponse= new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 223 | 225 | PregnancyReportMattersQuery postpartumReportQuery=new PregnancyReportMattersQuery(); |
| 224 | 226 | postpartumReportQuery.setWeek(week); |
| 227 | + postpartumReportQuery.setHospitalId(hospitalId); | |
| 225 | 228 | postpartumReportQuery.setRiskFactorId(StringUtils.covertToList(riskFactorId, String.class)); |
| 226 | - baseResponse.setObject(pregnancyReportMattersServiceFacade.getReportByRisk(postpartumReportQuery,getUserId(request))); | |
| 229 | + List<PregnancyReportMatters> reportByRisk = pregnancyReportMattersServiceFacade.getReportByRisk(postpartumReportQuery, null); | |
| 230 | + baseResponse.setObject(reportByRisk); | |
| 227 | 231 | return baseResponse; |
| 228 | 232 | } |
| 229 | 233 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PregnancyReportMattersServiceFacade.java
View file @
bd6e6ff
| ... | ... | @@ -45,8 +45,10 @@ |
| 45 | 45 | return pregnancyReportMattersService.getPregnancyReport(id); |
| 46 | 46 | } |
| 47 | 47 | public List<PregnancyReportMatters> getReportByRisk(PregnancyReportMattersQuery postpartumReportQuery,Integer userId){ |
| 48 | - String hospitalId= autoMatchFacade.getHospitalId(userId); | |
| 49 | - postpartumReportQuery.setHospitalId(hospitalId); | |
| 48 | + if (userId!=null){ | |
| 49 | + String hospitalId= autoMatchFacade.getHospitalId(userId); | |
| 50 | + postpartumReportQuery.setHospitalId(hospitalId); | |
| 51 | + } | |
| 50 | 52 | postpartumReportQuery.setYn(1); |
| 51 | 53 | return pregnancyReportMattersService.queryPregnancyReport(postpartumReportQuery); |
| 52 | 54 | } |
platform-operate-api/src/main/resources/config.properties
View file @
bd6e6ff