Commit 98e30a97599e88a2de4593f961b0191966429e6e
1 parent
12b38498ce
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 14 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FolviteController.java
View file @
98e30a9
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | import com.lyms.platform.common.result.BaseListResponse; |
7 | 7 | import com.lyms.platform.common.result.BaseResponse; |
8 | 8 | import com.lyms.platform.common.utils.DateUtil; |
9 | +import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
9 | 10 | import com.lyms.platform.operate.web.service.FolviteService; |
10 | 11 | import com.lyms.platform.permission.model.FolviteQuery; |
11 | 12 | import com.lyms.platform.permission.model.FolviteRecordQuery; |
... | ... | @@ -35,6 +36,9 @@ |
35 | 36 | @Autowired |
36 | 37 | private FolviteService folviteService; |
37 | 38 | |
39 | + @Autowired | |
40 | + private AutoMatchFacade autoMatchFacade; | |
41 | + | |
38 | 42 | /** |
39 | 43 | * 查询or发放叶酸 |
40 | 44 | * |
41 | 45 | |
42 | 46 | |
... | ... | @@ -128,12 +132,15 @@ |
128 | 132 | @Param("isconceive") Integer isconceive, |
129 | 133 | @Param("receiveTime") String receiveTime, |
130 | 134 | @Param("drawTime") String drawTime, |
131 | - @Param("hospitalId") String hospitalId, | |
132 | 135 | @Param("page") Integer page, |
133 | - @Param("limit") Integer limit) { | |
136 | + @Param("limit") Integer limit, | |
137 | + HttpServletRequest request) { | |
134 | 138 | |
135 | 139 | FolviteRecordQuery query = new FolviteRecordQuery(); |
136 | 140 | query.setYn(YnEnums.YES.getId()); |
141 | + | |
142 | + String hospitalId = autoMatchFacade.getHospitalId(getUserId(request)); | |
143 | + | |
137 | 144 | if (StringUtils.isNotEmpty(hospitalId)) { |
138 | 145 | query.setHospitalId(hospitalId); |
139 | 146 | } |
140 | 147 | |
141 | 148 | |
... | ... | @@ -188,19 +195,19 @@ |
188 | 195 | @ResponseBody |
189 | 196 | @TokenRequired |
190 | 197 | public BaseResponse queryFolviteRecord(@Param("queryNo") String queryNo, |
191 | - @Param("hospitalId") String hospitalId, | |
192 | 198 | @Param("receiveTime") String receiveTime, |
193 | 199 | @Param("highRisk") String highRisk, |
194 | 200 | @Param("page") Integer page, |
195 | - @Param("limit") Integer limit) { | |
201 | + @Param("limit") Integer limit, | |
202 | + HttpServletRequest request) { | |
196 | 203 | FolviteQuery query = new FolviteQuery(); |
197 | 204 | query.setYn(YnEnums.YES.getId()); |
198 | 205 | if (StringUtils.isNotEmpty(queryNo)) { |
199 | 206 | query.setQueryNo(queryNo); |
200 | 207 | } |
201 | - if (StringUtils.isNotEmpty(hospitalId)) { | |
202 | - query.setHospitalId(hospitalId); | |
203 | - } | |
208 | + | |
209 | + String hospitalId = autoMatchFacade.getHospitalId(getUserId(request)); | |
210 | + query.setHospitalId(hospitalId); | |
204 | 211 | if (StringUtils.isNotEmpty(receiveTime)) { |
205 | 212 | try { |
206 | 213 | query.setStartReceiveDate(DateUtil.getSNDate(receiveTime)[0]); |