Commit cf29e28a46597fa5152b77e8c44cac72e3230725
1 parent
3c9a461e3a
Exists in
master
and in
6 other branches
ๆ้
Showing 2 changed files with 12 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
cf29e28
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | import com.lyms.platform.common.utils.StringUtils; |
14 | 14 | import com.lyms.platform.operate.web.facade.AccessPermissionFacade; |
15 | 15 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
16 | +import com.lyms.platform.operate.web.facade.OrganizationGroupsFacade; | |
16 | 17 | import com.lyms.platform.operate.web.service.IBloodPressureService; |
17 | 18 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
18 | 19 | import com.lyms.platform.operate.web.utils.MongoUtil; |
... | ... | @@ -51,6 +52,8 @@ |
51 | 52 | |
52 | 53 | @Autowired |
53 | 54 | private PatientWeightService2 patientWeightService2; |
55 | + @Autowired | |
56 | + private OrganizationGroupsFacade groupsFacade; | |
54 | 57 | |
55 | 58 | |
56 | 59 | public BaseResponse addOrUpdate(Integer userId, BloodPressure bloodPressure) { |
... | ... | @@ -94,7 +97,9 @@ |
94 | 97 | @Override |
95 | 98 | public BaseResponse list(String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit, Integer userId) { |
96 | 99 | boolean flag = false; |
97 | - List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); | |
100 | +// List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); | |
101 | + | |
102 | + List<String> hospitalIds = groupsFacade.findGroupHospital(userId, true); | |
98 | 103 | Criteria criteria = Criteria.where("yn").is(1).and("hospitalId").in(hospitalIds); |
99 | 104 | Criteria pCriteria = Criteria.where("yn").is(1).and("hospitalId").in(hospitalIds); |
100 | 105 | if(StringUtils.isNotEmpty(key)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
cf29e28
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | import com.lyms.platform.common.utils.StringUtils; |
15 | 15 | import com.lyms.platform.operate.web.facade.AccessPermissionFacade; |
16 | 16 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
17 | +import com.lyms.platform.operate.web.facade.OrganizationGroupsFacade; | |
17 | 18 | import com.lyms.platform.operate.web.service.IBloodSugarService; |
18 | 19 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
19 | 20 | import com.lyms.platform.operate.web.utils.MathUtil; |
... | ... | @@ -46,6 +47,8 @@ |
46 | 47 | |
47 | 48 | @Autowired |
48 | 49 | private AccessPermissionFacade accessPermissionFacade; |
50 | + @Autowired | |
51 | + private OrganizationGroupsFacade groupsFacade; | |
49 | 52 | |
50 | 53 | |
51 | 54 | public BaseResponse add(Integer userId, BloodSugar bloodSugar) { |
52 | 55 | |
53 | 56 | |
... | ... | @@ -75,9 +78,11 @@ |
75 | 78 | if(StringUtils.isNotEmpty(key) || StringUtils.isNotEmpty(vcCardNo) || weekEnd != null || weekStart != null || age != null) { |
76 | 79 | flag = true; |
77 | 80 | } |
81 | +// List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); | |
82 | + List<String> hospitalIds = groupsFacade.findGroupHospital(userId, true); | |
78 | 83 | Criteria criteria = Criteria.where("yn").is(1); |
84 | + criteria.and("hospitalId").in(hospitalIds); | |
79 | 85 | if(flag) { |
80 | - List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); | |
81 | 86 | List<String> pids = mongoUtil.getPidsByCondition2(hospitalIds, key, vcCardNo, weekStart, weekEnd, age); |
82 | 87 | criteria.and("pid").in(pids); |
83 | 88 | } |