Commit 3c43e68e0490617e9655f3e0f054c8cd3812dae5
1 parent
34177792a8
Exists in
master
and in
6 other branches
访视管理 加上区域的数据
Showing 1 changed file with 9 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java
View file @
3c43e68
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | import com.lyms.platform.common.utils.EnumUtil; |
| 11 | 11 | import com.lyms.platform.common.utils.MongoConvertHelper; |
| 12 | 12 | import com.lyms.platform.common.utils.ReflectionUtils; |
| 13 | +import com.lyms.platform.operate.web.facade.AccessPermissionFacade; | |
| 13 | 14 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
| 14 | 15 | import com.lyms.platform.operate.web.service.INewbornVisitService; |
| 15 | 16 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| ... | ... | @@ -64,6 +65,9 @@ |
| 64 | 65 | @Autowired |
| 65 | 66 | private CouponService couponService; |
| 66 | 67 | |
| 68 | + @Autowired | |
| 69 | + private AccessPermissionFacade accessPermissionFacade; | |
| 70 | + | |
| 67 | 71 | @Override |
| 68 | 72 | public BaseObjectResponse init() { |
| 69 | 73 | List<Map<String, Object>> feedType = EnumUtil.toJson(FeedTypeEnums.class); |
| ... | ... | @@ -156,7 +160,11 @@ |
| 156 | 160 | @Override |
| 157 | 161 | public BaseObjectResponse list(Date startDate, Date endDate, String doctor, Integer userId, String key, Integer page, Integer limit) { |
| 158 | 162 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 159 | - Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId); | |
| 163 | + List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); | |
| 164 | + if(CollectionUtils.isEmpty(hospitalIds)) { | |
| 165 | + return RespBuilder.buildSuccess(); | |
| 166 | + } | |
| 167 | + Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospitalIds); | |
| 160 | 168 | if(startDate != null && endDate != null) { |
| 161 | 169 | criteria.and("checkTime").gte(startDate).lt(DateUtil.addDay(endDate, 1)); |
| 162 | 170 | } |