Commit 6d49d84fda736248e0c6ac23c49fcdf1346f1fbf
1 parent
863f95e38f
Exists in
master
and in
6 other branches
新曾高危优化
Showing 1 changed file with 48 additions and 12 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
6d49d84
| ... | ... | @@ -2,13 +2,11 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.*; |
| 4 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | +import com.lyms.platform.common.enums.RiskDefaultTypeEnum; | |
| 5 | 6 | import com.lyms.platform.common.enums.YnEnums; |
| 6 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
| 7 | 8 | import com.lyms.platform.common.result.BaseResponse; |
| 8 | -import com.lyms.platform.common.utils.DateUtil; | |
| 9 | -import com.lyms.platform.common.utils.ExcelUtil; | |
| 10 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
| 11 | -import com.lyms.platform.common.utils.StringUtils; | |
| 9 | +import com.lyms.platform.common.utils.*; | |
| 12 | 10 | import com.lyms.platform.operate.web.request.AntExManagerQueryRequest; |
| 13 | 11 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
| 14 | 12 | import com.lyms.platform.operate.web.result.AntExManagerResult; |
| ... | ... | @@ -644,6 +642,8 @@ |
| 644 | 642 | |
| 645 | 643 | private List<AntExRecordModel> getIncrRiskAntexRecard(final Map<String,List<AntExRecordModel>> map,AntExRecordQuery pageAntExRecordsQuery,final AntExManagerQueryRequest request) |
| 646 | 644 | { |
| 645 | + | |
| 646 | + initBasicData(); | |
| 647 | 647 | List<String> ids = new ArrayList<>(); |
| 648 | 648 | Map<String,List<String>> incriskMap = new HashMap<>(); |
| 649 | 649 | |
| 650 | 650 | |
| ... | ... | @@ -781,9 +781,9 @@ |
| 781 | 781 | } |
| 782 | 782 | } |
| 783 | 783 | } |
| 784 | + riskBasicMap.clear(); | |
| 784 | 785 | |
| 785 | 786 | |
| 786 | - | |
| 787 | 787 | // for (String patientId : map.keySet()) |
| 788 | 788 | // { |
| 789 | 789 | // List<AntExRecordModel> list = map.get(patientId); |
| 790 | 790 | |
| 791 | 791 | |
| 792 | 792 | |
| 793 | 793 | |
| ... | ... | @@ -917,22 +917,58 @@ |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | |
| 920 | - private boolean isExistsLevel(String level,List<String> incrHrisk) | |
| 920 | + private boolean isExistsLevel(String level,List<String> incrHrisks) | |
| 921 | 921 | { |
| 922 | 922 | if (StringUtils.isNotEmpty(level)) |
| 923 | 923 | { |
| 924 | - BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 925 | - basicConfigQuery.setIds(incrHrisk); | |
| 926 | - basicConfigQuery.setParentId(level); | |
| 927 | - List<BasicConfig> configs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 928 | - if (CollectionUtils.isNotEmpty(configs)) | |
| 924 | + List<String> list = riskBasicMap.get(level); | |
| 925 | + if (CollectionUtils.isNotEmpty(list)) | |
| 929 | 926 | { |
| 930 | - return true; | |
| 927 | + return list.containsAll(incrHrisks); | |
| 931 | 928 | } |
| 932 | 929 | return false; |
| 933 | 930 | } |
| 934 | 931 | return true; |
| 932 | + | |
| 933 | +// if (StringUtils.isNotEmpty(level)) | |
| 934 | +// { | |
| 935 | +// BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 936 | +// basicConfigQuery.setIds(incrHrisk); | |
| 937 | +// basicConfigQuery.setParentId(level); | |
| 938 | +// List<BasicConfig> configs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 939 | +// if (CollectionUtils.isNotEmpty(configs)) | |
| 940 | +// { | |
| 941 | +// return true; | |
| 942 | +// } | |
| 943 | +// return false; | |
| 944 | +// } | |
| 945 | +// return true; | |
| 935 | 946 | } |
| 947 | + | |
| 948 | + private Map<String,List<String>> riskBasicMap = new HashMap<>(); | |
| 949 | + | |
| 950 | + private void initBasicData() | |
| 951 | + { | |
| 952 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 953 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 954 | + basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID); | |
| 955 | + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 956 | + | |
| 957 | + if (CollectionUtils.isNotEmpty(basicConfigs)) { | |
| 958 | + for (BasicConfig basicConfig : basicConfigs) { | |
| 959 | + List<String> ids = new ArrayList<>(); | |
| 960 | + basicConfigQuery.setParentId(basicConfig.getId()); | |
| 961 | + List<BasicConfig> basicConfigs2 = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 962 | + if (CollectionUtils.isNotEmpty(basicConfigs2)) { | |
| 963 | + for (BasicConfig bc : basicConfigs2) { | |
| 964 | + ids.add(bc.getId()); | |
| 965 | + } | |
| 966 | + } | |
| 967 | + riskBasicMap.put(basicConfig.getId(),ids); | |
| 968 | + } | |
| 969 | + } | |
| 970 | + } | |
| 971 | + | |
| 936 | 972 | |
| 937 | 973 | private boolean getConditionRisk(String riskId,List<String> incrHrisk,String level) |
| 938 | 974 | { |