Commit 53e4ce8c7b807768f0675f0ce6c8f7759344268c
1 parent
8b6f8f69dc
Exists in
master
and in
6 other branches
产筛
Showing 1 changed file with 31 additions and 11 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
53e4ce8
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | import com.lyms.platform.permission.service.UsersService; |
| 23 | 23 | import com.lyms.platform.pojo.*; |
| 24 | 24 | import com.lyms.platform.query.AntExRecordQuery; |
| 25 | +import com.lyms.platform.query.BasicConfigQuery; | |
| 25 | 26 | import com.lyms.platform.query.DataPermissionsModelQuery; |
| 26 | 27 | import com.lyms.platform.query.PatientsQuery; |
| 27 | 28 | import org.apache.commons.collections.CollectionUtils; |
| ... | ... | @@ -672,7 +673,7 @@ |
| 672 | 673 | List currentRiskList = oneRecord.gethRisk(); |
| 673 | 674 | List beforeRiskList = twoRecord.gethRisk(); |
| 674 | 675 | |
| 675 | - if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && getConditionRisk(request.getRiskFactorId(),currentRiskList)) | |
| 676 | + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel())) | |
| 676 | 677 | { |
| 677 | 678 | ids.add(oneRecord.getId()); |
| 678 | 679 | incriskMap.put(oneRecord.getId(), currentRiskList); |
| ... | ... | @@ -687,7 +688,7 @@ |
| 687 | 688 | incrHrisk.add(riskId); |
| 688 | 689 | } |
| 689 | 690 | } |
| 690 | - if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk)) | |
| 691 | + if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel())) | |
| 691 | 692 | { |
| 692 | 693 | ids.add(oneRecord.getId()); |
| 693 | 694 | incriskMap.put(oneRecord.getId(), incrHrisk); |
| ... | ... | @@ -698,7 +699,7 @@ |
| 698 | 699 | { |
| 699 | 700 | if (StringUtils.isNotEmpty(request.getRiskFactorId())) |
| 700 | 701 | { |
| 701 | - if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && getConditionRisk(request.getRiskFactorId(),oneRecord.gethRisk())) | |
| 702 | + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && getConditionRisk(request.getRiskFactorId(), oneRecord.gethRisk(),request.getLevel())) | |
| 702 | 703 | { |
| 703 | 704 | ids.add(oneRecord.getId()); |
| 704 | 705 | incriskMap.put(oneRecord.getId(), oneRecord.gethRisk()); |
| ... | ... | @@ -726,7 +727,7 @@ |
| 726 | 727 | |
| 727 | 728 | List currentRiskList = oneRecord.gethRisk(); |
| 728 | 729 | List beforeRiskList = twoRecord.gethRisk(); |
| 729 | - if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && getConditionRisk(request.getRiskFactorId(),currentRiskList)) | |
| 730 | + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel())) | |
| 730 | 731 | { |
| 731 | 732 | ids.add(oneRecord.getId()); |
| 732 | 733 | incriskMap.put(oneRecord.getId(), currentRiskList); |
| 733 | 734 | |
| ... | ... | @@ -741,10 +742,11 @@ |
| 741 | 742 | incrHrisk.add(String.valueOf(riskId)); |
| 742 | 743 | } |
| 743 | 744 | } |
| 744 | - if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk)) | |
| 745 | + if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel())) | |
| 745 | 746 | { |
| 746 | - ids.add(oneRecord.getId()); | |
| 747 | - incriskMap.put(oneRecord.getId(), incrHrisk); | |
| 747 | + | |
| 748 | + ids.add(oneRecord.getId()); | |
| 749 | + incriskMap.put(oneRecord.getId(), incrHrisk); | |
| 748 | 750 | } |
| 749 | 751 | } |
| 750 | 752 | } |
| ... | ... | @@ -760,7 +762,7 @@ |
| 760 | 762 | pageAntExRecordsQuery.setPage(request.getPage()); |
| 761 | 763 | pageAntExRecordsQuery.setLimit(request.getLimit()); |
| 762 | 764 | pageAntExRecordsQuery.setIds(ids); |
| 763 | - pageAntExRecordsQuery.setLevelId(request.getLevel()); | |
| 765 | + //pageAntExRecordsQuery.setLevelId(request.getLevel()); | |
| 764 | 766 | |
| 765 | 767 | |
| 766 | 768 | List<AntExRecordModel> pageAntExRecords = recordService.queryAntExRecords(pageAntExRecordsQuery); |
| 767 | 769 | |
| 768 | 770 | |
| 769 | 771 | |
| ... | ... | @@ -775,13 +777,31 @@ |
| 775 | 777 | return pageAntExRecords; |
| 776 | 778 | } |
| 777 | 779 | |
| 778 | - private boolean getConditionRisk(String riskId,List<String> incrHrisk) | |
| 780 | + | |
| 781 | + private boolean isExistsLevel(String level,List<String> incrHrisk) | |
| 779 | 782 | { |
| 783 | + if (StringUtils.isNotEmpty(level)) | |
| 784 | + { | |
| 785 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 786 | + basicConfigQuery.setIds(incrHrisk); | |
| 787 | + basicConfigQuery.setParentId(level); | |
| 788 | + List<BasicConfig> configs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 789 | + if (CollectionUtils.isNotEmpty(configs)) | |
| 790 | + { | |
| 791 | + return true; | |
| 792 | + } | |
| 793 | + return false; | |
| 794 | + } | |
| 795 | + return true; | |
| 796 | + } | |
| 797 | + | |
| 798 | + private boolean getConditionRisk(String riskId,List<String> incrHrisk,String level) | |
| 799 | + { | |
| 780 | 800 | if (StringUtils.isEmpty(riskId)) |
| 781 | 801 | { |
| 782 | - return true; | |
| 802 | + return true && isExistsLevel(level,incrHrisk); | |
| 783 | 803 | } |
| 784 | - return incrHrisk.contains(riskId); | |
| 804 | + return incrHrisk.contains(riskId) && isExistsLevel(level,incrHrisk); | |
| 785 | 805 | } |
| 786 | 806 | |
| 787 | 807 |