Commit 0efbcc602af417dc6cdd3af606cd2846e18872ca
1 parent
e9f35365ce
Exists in
master
and in
6 other branches
统计
Showing 1 changed file with 23 additions and 35 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
0efbcc6
| ... | ... | @@ -543,7 +543,6 @@ |
| 543 | 543 | } |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | - | |
| 547 | 546 | if (addrType < 3) |
| 548 | 547 | { |
| 549 | 548 | if (CollectionUtils.isNotEmpty(list)) |
| ... | ... | @@ -564,7 +563,6 @@ |
| 564 | 563 | List<String> items = new ArrayList<>(); |
| 565 | 564 | for (Map<String, Object> addr : list) |
| 566 | 565 | { |
| 567 | - List<String> hids = new ArrayList<>(); | |
| 568 | 566 | String id = String.valueOf(addr.get("id")); |
| 569 | 567 | if (addrType == 1) |
| 570 | 568 | { |
| 571 | 569 | |
| 572 | 570 | |
| 573 | 571 | |
| ... | ... | @@ -577,30 +575,18 @@ |
| 577 | 575 | |
| 578 | 576 | //查询机构数 |
| 579 | 577 | List<Organization> orgs = organizationService.queryOrganization(idQuery); |
| 580 | - | |
| 581 | - if (CollectionUtils.isNotEmpty(orgs)) | |
| 578 | + List<String> hids = getConditionHospitalIds(currentUserHospPermissions, orgs); | |
| 579 | + Integer count = 0; | |
| 580 | + if (CollectionUtils.isNotEmpty(hids)) | |
| 582 | 581 | { |
| 583 | - for (Organization org : orgs) | |
| 584 | - { | |
| 585 | - hids.add(String.valueOf(org.getId())); | |
| 586 | - } | |
| 582 | + patientsQuery.setHospitalList(hids); | |
| 583 | + //高危等级 | |
| 584 | + patientsQuery.setrLevel(config.getId()); | |
| 585 | + count = patientsService.queryPatientCount(patientsQuery); | |
| 587 | 586 | } |
| 588 | - | |
| 589 | - PatientsQuery query1 = new PatientsQuery(); | |
| 590 | - query1.setHospitalList(hids); | |
| 591 | - query1.setYn(YnEnums.YES.getId()); | |
| 592 | - query1.setType(1); | |
| 593 | - //高危等级 | |
| 594 | - query1.setrLevel(config.getId()); | |
| 595 | - List buildType = new ArrayList(); | |
| 596 | - buildType.add(0); | |
| 597 | - buildType.add(2); | |
| 598 | - query1.setBuildTypeList(buildType); | |
| 599 | - Integer count = patientsService.queryPatientCount(query1); | |
| 600 | 587 | items.add(count == null ? "0" : String.valueOf(count)); |
| 601 | 588 | } |
| 602 | 589 | map.put("data",items); |
| 603 | - | |
| 604 | 590 | series.add(map); |
| 605 | 591 | } |
| 606 | 592 | } |
| 607 | 593 | |
| ... | ... | @@ -611,11 +597,19 @@ |
| 611 | 597 | organizationQuery.setYn(YnEnums.YES.getId()); |
| 612 | 598 | organizationQuery.setAreaId(countRequest.getAreaId()); |
| 613 | 599 | |
| 614 | - //TODO权限 | |
| 615 | - // List<Organization> press = getCurrentOrgs( countRequest, userId); | |
| 600 | + List<Integer> ids = new ArrayList<>(); | |
| 601 | + | |
| 602 | + if (CollectionUtils.isNotEmpty(currentUserHospPermissions)) | |
| 603 | + { | |
| 604 | + for (String key : currentUserHospPermissions) | |
| 605 | + { | |
| 606 | + ids.add(Integer.parseInt(key)); | |
| 607 | + } | |
| 608 | + } | |
| 609 | + organizationQuery.setIdList(ids); | |
| 616 | 610 | List<Organization> orgs = organizationService.queryOrganization(organizationQuery); |
| 617 | 611 | |
| 618 | - if (CollectionUtils.isNotEmpty(list)) | |
| 612 | + if (CollectionUtils.isNotEmpty(orgs)) | |
| 619 | 613 | { |
| 620 | 614 | for (Organization org : orgs) |
| 621 | 615 | { |
| 622 | 616 | |
| ... | ... | @@ -627,17 +621,12 @@ |
| 627 | 621 | List<String> items = new ArrayList<>(); |
| 628 | 622 | for (BasicConfig config : riskLevelConfig) |
| 629 | 623 | { |
| 630 | - PatientsQuery query1 = new PatientsQuery(); | |
| 631 | - query1.setHospitalId(String.valueOf(org.getId())); | |
| 632 | - query1.setYn(YnEnums.YES.getId()); | |
| 633 | - query1.setType(1); | |
| 624 | + | |
| 625 | + patientsQuery.setHospitalId(String.valueOf(org.getId())); | |
| 626 | + patientsQuery.setHospitalList(null); | |
| 634 | 627 | //高危等级 |
| 635 | - query1.setrLevel(config.getId()); | |
| 636 | - List buildType = new ArrayList(); | |
| 637 | - buildType.add(0); | |
| 638 | - buildType.add(2); | |
| 639 | - query1.setBuildTypeList(buildType); | |
| 640 | - Integer count = patientsService.queryPatientCount(query1); | |
| 628 | + patientsQuery.setrLevel(config.getId()); | |
| 629 | + Integer count = patientsService.queryPatientCount(patientsQuery); | |
| 641 | 630 | items.add(count == null ? "0" : String.valueOf(count)); |
| 642 | 631 | map.put("data",items); |
| 643 | 632 | } |
| ... | ... | @@ -645,7 +634,6 @@ |
| 645 | 634 | } |
| 646 | 635 | } |
| 647 | 636 | } |
| 648 | - | |
| 649 | 637 | datas.put("series",series); |
| 650 | 638 | datas.put("xAxis",xAxis); |
| 651 | 639 | datas.put("legend",titleItems); |