Commit 7a901b91e1b100ba141f07410919bc00ae4745c8
1 parent
dcebf150ce
Exists in
master
and in
6 other branches
改逻辑
Showing 2 changed files with 2 additions and 2 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
7a901b9
... | ... | @@ -1190,7 +1190,7 @@ |
1190 | 1190 | * 主要用于年龄查询 |
1191 | 1191 | * Date start = DateUtil.getBeforeAge(age); |
1192 | 1192 | Date end = DateUtil.getBeforeAge(age + 1); |
1193 | - pCriteria.and("birth").gte(end).lte(start); | |
1193 | + pCriteria.and("birth").gt(end).lte(start); | |
1194 | 1194 | * @param age |
1195 | 1195 | * @return |
1196 | 1196 | */ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
7a901b9
... | ... | @@ -146,7 +146,7 @@ |
146 | 146 | if(age != null) { |
147 | 147 | Date start = DateUtil.getBeforeAge(age); |
148 | 148 | Date end = DateUtil.getBeforeAge(age + 1); |
149 | - pCriteria.and("birth").gte(end).lte(start); | |
149 | + pCriteria.and("birth").gt(end).lte(start); | |
150 | 150 | } |
151 | 151 | List<Patients> patients = mongoTemplate.find(Query.query(pCriteria), Patients.class); |
152 | 152 | List<String> ids = new ArrayList<>(); |