Commit 788239fa98b46e72dbc7b6fa76a7c2a9a990a3f4
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
788239f
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
788239f
... | ... | @@ -376,11 +376,13 @@ |
376 | 376 | patientsQuery.setCityId(riskPatientsQueryRequest.getCityRegisterId()); |
377 | 377 | patientsQuery.setStreetId(riskPatientsQueryRequest.getStreetRegisterId()); |
378 | 378 | List<String> hospitalList = null; |
379 | + List<String> fmHospitalList = null; | |
379 | 380 | //区域范围内孕妇 |
380 | 381 | if (isRegion) { |
381 | 382 | patientsQuery.setExtEnable(false); |
382 | 383 | //王平说的 必须要给区域医院权限,不然他就是蠢逼 201611124 16:41 |
383 | 384 | hospitalList = new ArrayList<>(); |
385 | + fmHospitalList = new ArrayList<>(); | |
384 | 386 | String hospital = autoMatchFacade.getHospitalId(userId); |
385 | 387 | if (null != hospital) { |
386 | 388 | hospitalList.add(hospital); |
... | ... | @@ -398,7 +400,6 @@ |
398 | 400 | } |
399 | 401 | } |
400 | 402 | } |
401 | - | |
402 | 403 | if (StringUtils.isNotEmpty(riskPatientsQueryRequest.gethId())) { |
403 | 404 | List<String> orgId = new ArrayList<>(); |
404 | 405 | orgId.add(riskPatientsQueryRequest.gethId()); |
405 | 406 | |
406 | 407 | |
... | ... | @@ -426,11 +427,36 @@ |
426 | 427 | } |
427 | 428 | patientsQuery.setHospitalList(hospitalList); |
428 | 429 | |
429 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCprovinceId())) | |
430 | + | |
431 | + fmHospitalList.addAll(hospitalList); | |
432 | + | |
433 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) { | |
434 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
435 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
436 | + organizationQuery.setProvinceId(riskPatientsQueryRequest.getCprovinceId()); | |
437 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFcityId())) { | |
438 | + organizationQuery.setCityId(riskPatientsQueryRequest.getCcityId()); | |
439 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFareaId())) { | |
440 | + organizationQuery.setAreaId(riskPatientsQueryRequest.getCareaId()); | |
441 | + } | |
442 | + } | |
443 | + List<String> orgId = new ArrayList<>(); | |
444 | + List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
445 | + if (CollectionUtils.isNotEmpty(organizations)) { | |
446 | + for (Organization org : organizations) { | |
447 | + if (null != org.getId()) { | |
448 | + orgId.add(org.getId() + ""); | |
449 | + } | |
450 | + } | |
451 | + } | |
452 | + fmHospitalList.retainAll(orgId); | |
453 | + } | |
454 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) | |
430 | 455 | { |
431 | - patientsQuery.setFmHospitalList(hospitalList); | |
456 | + patientsQuery.setFmHospitalList(fmHospitalList); | |
432 | 457 | } |
433 | 458 | |
459 | + | |
434 | 460 | } else { |
435 | 461 | String hospital = autoMatchFacade.getHospitalId(userId); |
436 | 462 | patientsQuery.setHospitalId(hospital); |
437 | 463 | |
... | ... | @@ -463,13 +489,13 @@ |
463 | 489 | |
464 | 490 | if (riskPatientsQueryRequest.getPostViewDaysStart() != null) |
465 | 491 | { |
466 | - Date start = DateUtil.addDay(new Date(),-riskPatientsQueryRequest.getPostViewDaysStart()+1); | |
492 | + Date start = DateUtil.addDay(new Date(),-riskPatientsQueryRequest.getPostViewDaysStart()); | |
467 | 493 | patientsQuery.setFmDateEnd(start); |
468 | 494 | } |
469 | 495 | |
470 | 496 | if (riskPatientsQueryRequest.getPostViewDaysEnd() != null) |
471 | 497 | { |
472 | - Date end = DateUtil.addDay(new Date(),-riskPatientsQueryRequest.getPostViewDaysEnd()); | |
498 | + Date end = DateUtil.addDay(new Date(),-riskPatientsQueryRequest.getPostViewDaysEnd()-1); | |
473 | 499 | patientsQuery.setFmDateStart(end); |
474 | 500 | } |
475 | 501 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java
View file @
788239f
... | ... | @@ -100,6 +100,13 @@ |
100 | 100 | private String cprovinceId; |
101 | 101 | private String ccityId; |
102 | 102 | private String careaId; |
103 | + | |
104 | + | |
105 | + //分娩医院 | |
106 | + private String fprovinceId; | |
107 | + private String fcityId; | |
108 | + private String fareaId; | |
109 | + | |
103 | 110 | // 医院id |
104 | 111 | private String hId; |
105 | 112 | |
... | ... | @@ -123,6 +130,30 @@ |
123 | 130 | |
124 | 131 | //分娩医院 |
125 | 132 | private String fmHospital; |
133 | + | |
134 | + public String getFprovinceId() { | |
135 | + return fprovinceId; | |
136 | + } | |
137 | + | |
138 | + public void setFprovinceId(String fprovinceId) { | |
139 | + this.fprovinceId = fprovinceId; | |
140 | + } | |
141 | + | |
142 | + public String getFcityId() { | |
143 | + return fcityId; | |
144 | + } | |
145 | + | |
146 | + public void setFcityId(String fcityId) { | |
147 | + this.fcityId = fcityId; | |
148 | + } | |
149 | + | |
150 | + public String getFareaId() { | |
151 | + return fareaId; | |
152 | + } | |
153 | + | |
154 | + public void setFareaId(String fareaId) { | |
155 | + this.fareaId = fareaId; | |
156 | + } | |
126 | 157 | |
127 | 158 | public Integer getPostViewDaysStart() { |
128 | 159 | return postViewDaysStart; |