Commit 4488d6fd6e50f6d31005fa0bdb235711c7df448a
1 parent
ba1c849bae
Exists in
master
and in
6 other branches
Revert "访视添加字段"
This reverts commit a77d1f0a
Showing 1 changed file with 12 additions and 19 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
4488d6f
... | ... | @@ -1844,14 +1844,9 @@ |
1844 | 1844 | // 年龄段 |
1845 | 1845 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(startAge) && |
1846 | 1846 | com.lyms.platform.common.utils.StringUtils.isNotEmpty(endAge)) { |
1847 | - Calendar c = Calendar.getInstance(); | |
1848 | - c.setTime(new Date()); | |
1849 | - c.add(Calendar.YEAR, -Integer.parseInt(startAge)); | |
1850 | - Date startDate = c.getTime(); | |
1851 | - c.setTime(new Date()); | |
1852 | - c.add(Calendar.YEAR, - Integer.parseInt(endAge)); | |
1853 | - Date endDate = c.getTime(); | |
1854 | - List<PersonModel> personModels = mongoTemplate.find(Query.query(Criteria.where("birth").gte(endDate).lte(startDate)), PersonModel.class); | |
1847 | + long startTime = System.currentTimeMillis() - Integer.parseInt(startAge) * 356 * 24 * 60 * 60 * 1000; | |
1848 | + long endTime = System.currentTimeMillis() - Integer.parseInt(endAge) * 356 * 24 * 60 * 60 * 1000; | |
1849 | + List<PersonModel> personModels = mongoTemplate.find(Query.query(Criteria.where("birth").gte(new Date(startTime)).and("birth").lte(new Date(endTime))), PersonModel.class); | |
1855 | 1850 | for (PersonModel model : personModels) { |
1856 | 1851 | pids.add(model.getId()); |
1857 | 1852 | } |
1858 | 1853 | |
... | ... | @@ -1918,18 +1913,16 @@ |
1918 | 1913 | |
1919 | 1914 | // 高危等级 |
1920 | 1915 | String highRiskLevel = matdeliverFollowRequest.getHighRiskLevel(); |
1921 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(highRiskLevel)) { | |
1922 | - List<Patients> patientGaoweis = mongoTemplate.find(Query.query(Criteria.where("riskLevelId").regex(highRiskLevel).and("yn").is(1)), Patients.class); | |
1923 | - List<String> patientIds = new ArrayList<>(); | |
1924 | - for (Patients patient : patientGaoweis) { | |
1925 | - patientIds.add(patient.getId()); | |
1926 | - } | |
1927 | - List<String> parentIdList1 = matDeliverQuery.getParentIdList(); | |
1928 | - if (CollectionUtils.isNotEmpty(parentIdList1)) { | |
1929 | - patientIds.addAll(parentIdList1); | |
1930 | - } | |
1931 | - matDeliverQuery.setParentIdList(patientIds); | |
1916 | + List<Patients> patientGaoweis = mongoTemplate.find(Query.query(Criteria.where("riskLevelId").regex(highRiskLevel).and("yn").is("1")), Patients.class); | |
1917 | + List<String> patientIds = new ArrayList<>(); | |
1918 | + for (Patients patient : patientGaoweis) { | |
1919 | + patientIds.add(patient.getId()); | |
1932 | 1920 | } |
1921 | + List<String> parentIdList1 = matDeliverQuery.getParentIdList(); | |
1922 | + if (CollectionUtils.isNotEmpty(parentIdList1)) { | |
1923 | + patientIds.addAll(parentIdList1); | |
1924 | + } | |
1925 | + matDeliverQuery.setParentIdList(patientIds); | |
1933 | 1926 | |
1934 | 1927 | |
1935 | 1928 | if (StringUtils.isNotEmpty(matdeliverFollowRequest.getNeed())) {//是否分页 |