Commit 4e7df22c6f76696c0b58fb9a4853b87c948488c0

Authored by wangshiming
1 parent 73ae278079
Exists in dev

大同 账号权限需求改造

Showing 5 changed files with 86 additions and 3 deletions

platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java View file @ 4e7df22
... ... @@ -441,6 +441,7 @@
441 441  
442 442 //产检医生id
443 443 private String cId;
  444 + private List<String> cIdList;
444 445 private Date buildTimeStart;
445 446 private Date buildTimeEnd;
446 447  
... ... @@ -545,6 +546,14 @@
545 546 this.cId = cId;
546 547 }
547 548  
  549 + public List<String> getcIdList() {
  550 + return cIdList;
  551 + }
  552 +
  553 + public void setcIdList(List<String> cIdList) {
  554 + this.cIdList = cIdList;
  555 + }
  556 +
548 557 public Integer getStatus() {
549 558 return status;
550 559 }
... ... @@ -742,6 +751,9 @@
742 751 }
743 752 if (StringUtils.isNotEmpty(cId)) {
744 753 condition = condition.and("checkDoctor", cId, MongoOper.IS);
  754 + }
  755 + if (CollectionUtils.isNotEmpty(cIdList)) {
  756 + condition = condition.and("checkDoctor", cIdList, MongoOper.IN);
745 757 }
746 758 if (StringUtils.isNotEmpty(fId)) {
747 759 condition = condition.and("fId", fId, MongoOper.IS);
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 4e7df22
... ... @@ -417,6 +417,7 @@
417 417  
418 418 //分娩医生
419 419 private String deliverDoctor;
  420 + private List<String> deliverDoctorList;
420 421  
421 422 //秦皇岛定制字段:是否产筛 0:未产筛 1:已产筛
422 423 public Integer productionSieveType;
... ... @@ -492,6 +493,14 @@
492 493 this.deliverDoctor = deliverDoctor;
493 494 }
494 495  
  496 + public List<String> getDeliverDoctorList() {
  497 + return deliverDoctorList;
  498 + }
  499 +
  500 + public void setDeliverDoctorList(List<String> deliverDoctorList) {
  501 + this.deliverDoctorList = deliverDoctorList;
  502 + }
  503 +
495 504 public String getBreastType() {
496 505 return breastType;
497 506 }
... ... @@ -961,6 +970,9 @@
961 970 //分娩医生
962 971 if (StringUtils.isNotEmpty(deliverDoctor)) {
963 972 condition = condition.and("deliverDoctor", deliverDoctor, MongoOper.IS);
  973 + }
  974 + if (CollectionUtils.isNotEmpty(deliverDoctorList)) {
  975 + condition = condition.and("deliverDoctor", deliverDoctorList, MongoOper.IN);
964 976 }
965 977 //筛选乳房列表是否做过检查0,1。false为了查出数据中没有该字段的。
966 978 Criteria c2 = MongoCondition.newInstance().getCriteria();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 4e7df22
... ... @@ -218,7 +218,27 @@
218 218 }
219 219 //产检医生
220 220 if("2100002419".equals(hospitalId)){//大同
221   - antExRecordQuery.setcId(userId == null ? "" : userId.toString());
  221 + Users u = usersService.getUsers(userId);
  222 + //产科网络 及 医务科 看全科室的
  223 + if("2100004954".equals(u.getDeptId()) || "2100004955".equals(u.getDeptId())){
  224 + if(StringUtils.isNotEmpty(antExManagerQueryRequest.getCheckDoctor())){
  225 + antExRecordQuery.setcId(antExManagerQueryRequest.getCheckDoctor());
  226 + }
  227 + }else if("4".equals(u.getZhiChenId())){//主任看本科室
  228 + List<String> cIdList = new ArrayList<>();
  229 + UsersQuery usersQuery = new UsersQuery();
  230 + usersQuery.setDeptId(u.getDeptId());
  231 + usersQuery.setYn(YnEnums.YES.getId());
  232 + List<Users> usersList = usersService.queryUsers(usersQuery);
  233 + if (CollectionUtils.isNotEmpty(usersList)) {
  234 + for (Users users : usersList) {
  235 + cIdList.add(users.getId().toString());
  236 + }
  237 + }
  238 + antExRecordQuery.setcIdList(cIdList);
  239 + }else{
  240 + antExRecordQuery.setcId(userId == null ? "" : userId.toString());
  241 + }
222 242 }else{
223 243 if(StringUtils.isNotEmpty(antExManagerQueryRequest.getCheckDoctor())){
224 244 antExRecordQuery.setcId(antExManagerQueryRequest.getCheckDoctor());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 4e7df22
... ... @@ -2704,7 +2704,27 @@
2704 2704 //隆化需求按接诊医生查询
2705 2705 //&&"2100001605".equals(hid) 去掉,前台入参有这个参数
2706 2706 if("2100002419".equals(hid)){//大同
2707   - patientsQuery.setDeliverDoctor(childbirthManagerRequest.getOperatorId() == null ? "" : childbirthManagerRequest.getOperatorId().toString());
  2707 + Users u = usersService.getUsers(childbirthManagerRequest.getOperatorId());
  2708 + //产科网络 及 医务科 看全科室的
  2709 + if("2100004954".equals(u.getDeptId()) || "2100004955".equals(u.getDeptId())){
  2710 + if (StringUtils.isNotEmpty(childbirthManagerRequest.getDeliverDoctor())) {
  2711 + patientsQuery.setDeliverDoctor(childbirthManagerRequest.getDeliverDoctor());
  2712 + }
  2713 + }else if("4".equals(u.getZhiChenId())){//主任看本科室
  2714 + List<String> deliverDoctorList = new ArrayList<>();
  2715 + UsersQuery usersQuery = new UsersQuery();
  2716 + usersQuery.setDeptId(u.getDeptId());
  2717 + usersQuery.setYn(YnEnums.YES.getId());
  2718 + List<Users> usersList = usersService.queryUsers(usersQuery);
  2719 + if (CollectionUtils.isNotEmpty(usersList)) {
  2720 + for (Users users : usersList) {
  2721 + deliverDoctorList.add(users.getId().toString());
  2722 + }
  2723 + }
  2724 + patientsQuery.setDeliverDoctorList(deliverDoctorList);
  2725 + }else{
  2726 + patientsQuery.setDeliverDoctor(childbirthManagerRequest.getOperatorId() == null ? "" : childbirthManagerRequest.getOperatorId().toString());
  2727 + }
2708 2728 }else{
2709 2729 if (StringUtils.isNotEmpty(childbirthManagerRequest.getDeliverDoctor())) {
2710 2730 patientsQuery.setDeliverDoctor(childbirthManagerRequest.getDeliverDoctor());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 4e7df22
... ... @@ -28,6 +28,7 @@
28 28 import com.lyms.platform.permission.model.Organization;
29 29 import com.lyms.platform.permission.model.OrganizationQuery;
30 30 import com.lyms.platform.permission.model.Users;
  31 +import com.lyms.platform.permission.model.UsersQuery;
31 32 import com.lyms.platform.permission.service.CouponService;
32 33 import com.lyms.platform.permission.service.OrganizationService;
33 34 import com.lyms.platform.permission.service.UsersService;
... ... @@ -3194,7 +3195,25 @@
3194 3195 // patientsQuery.setBookbuildingDoctorList(bookbuildingDoctorList);
3195 3196 // }
3196 3197 if("2100002419".equals(hospitalId)){
3197   - patientsQuery.setBookbuildingDoctor(patientManagerRequest.getOperatorId()==null ? null : patientManagerRequest.getOperatorId().toString());
  3198 + Users u = usersService.getUsers(patientManagerRequest.getOperatorId());
  3199 + //产科网络 及 医务科 看全科室的
  3200 + if("2100004954".equals(u.getDeptId()) || "2100004955".equals(u.getDeptId())){
  3201 + patientsQuery.setBookbuildingDoctor(StringUtils.isEmpty(patientManagerRequest.getBookbuildingDoctor()) ? null : patientManagerRequest.getBookbuildingDoctor());
  3202 + }else if("4".equals(u.getZhiChenId())){//主任看本科室
  3203 + List<String> bookbuildingDoctorList = new ArrayList<>();
  3204 + UsersQuery usersQuery = new UsersQuery();
  3205 + usersQuery.setDeptId(u.getDeptId());
  3206 + usersQuery.setYn(YnEnums.YES.getId());
  3207 + List<Users> usersList = usersService.queryUsers(usersQuery);
  3208 + if (CollectionUtils.isNotEmpty(usersList)) {
  3209 + for (Users users : usersList) {
  3210 + bookbuildingDoctorList.add(users.getId().toString());
  3211 + }
  3212 + }
  3213 + patientsQuery.setBookbuildingDoctorList(bookbuildingDoctorList);
  3214 + }else{
  3215 + patientsQuery.setBookbuildingDoctor(patientManagerRequest.getOperatorId()==null ? null : patientManagerRequest.getOperatorId().toString());
  3216 + }
3198 3217 }else{
3199 3218 patientsQuery.setBookbuildingDoctor(StringUtils.isEmpty(patientManagerRequest.getBookbuildingDoctor()) ? null : patientManagerRequest.getBookbuildingDoctor());
3200 3219 }