Commit df8683037e8860c2a59b263436cff38c7bea936a
1 parent
a552fff2d7
Exists in
master
and in
6 other branches
高危等级修复
Showing 1 changed file with 5 additions and 19 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
df86830
| ... | ... | @@ -1796,6 +1796,7 @@ |
| 1796 | 1796 | || StringUtils.isNotEmpty(matdeliverFollowRequest.getCityId())//居住地市 |
| 1797 | 1797 | || StringUtils.isNotEmpty(matdeliverFollowRequest.getAreaId())//居住区 |
| 1798 | 1798 | || StringUtils.isNotEmpty(matdeliverFollowRequest.getStreetId())//居住街道 |
| 1799 | + || StringUtils.isNotEmpty(matdeliverFollowRequest.getHighRiskLevel()) // 高危等级 | |
| 1799 | 1800 | ) { |
| 1800 | 1801 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 1801 | 1802 | patientsQuery.setQueryNo(matdeliverFollowRequest.getQueryNo()); |
| ... | ... | @@ -1824,6 +1825,10 @@ |
| 1824 | 1825 | //patientsQuery.setFmHospitalQueryList(hospitalList); |
| 1825 | 1826 | //patientsQuery.setTownOrgId(hospitalId); |
| 1826 | 1827 | |
| 1828 | + String highRiskLevel = matdeliverFollowRequest.getHighRiskLevel(); | |
| 1829 | + if (StringUtils.isNotEmpty(highRiskLevel)) { | |
| 1830 | + patientsQuery.setrLevel(highRiskLevel); | |
| 1831 | + } | |
| 1827 | 1832 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
| 1828 | 1833 | if (CollectionUtils.isEmpty(patientsList)) { |
| 1829 | 1834 | // 没有查到,直接抛出 |
| ... | ... | @@ -1906,25 +1911,6 @@ |
| 1906 | 1911 | idList = parentIdList; |
| 1907 | 1912 | } |
| 1908 | 1913 | matDeliverQuery.setParentIdList(idList); |
| 1909 | - } | |
| 1910 | - | |
| 1911 | - // 高危等级 | |
| 1912 | - String highRiskLevel = matdeliverFollowRequest.getHighRiskLevel(); | |
| 1913 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(highRiskLevel)) { | |
| 1914 | - | |
| 1915 | - List<Patients> patientGaoweis = mongoTemplate.find(Query.query(Criteria.where("riskLevelId").regex(highRiskLevel).and("yn").is(1)), Patients.class); | |
| 1916 | - List<String> patientIds = new ArrayList<>(); | |
| 1917 | - for (Patients patient : patientGaoweis) { | |
| 1918 | - patientIds.add(patient.getId()); | |
| 1919 | - } | |
| 1920 | - List<String> parentIdList1 = matDeliverQuery.getParentIdList(); | |
| 1921 | - if (CollectionUtils.isNotEmpty(parentIdList1)) { | |
| 1922 | - patientIds.addAll(parentIdList1); | |
| 1923 | - parentIdList1.retainAll(parentIdList1); | |
| 1924 | - } else { | |
| 1925 | - parentIdList1 = patientIds; | |
| 1926 | - } | |
| 1927 | - matDeliverQuery.setParentIdList(parentIdList1); | |
| 1928 | 1914 | } |
| 1929 | 1915 | |
| 1930 | 1916 |