Commit b03cd68236974994965fc0ab73f91b5b629c467a
1 parent
7ebb5bf772
Exists in
master
and in
6 other branches
SmsConfigModel 过滤掉不同步
Showing 1 changed file with 30 additions and 2 deletions
platform-dal/src/main/java/com/lyms/platform/query/LisCrisisItemQuery.java
View file @
b03cd68
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | import org.apache.commons.lang.StringUtils; |
10 | 10 | import org.springframework.data.mongodb.core.query.Criteria; |
11 | 11 | |
12 | +import java.util.Date; | |
12 | 13 | import java.util.List; |
13 | 14 | |
14 | 15 | /** |
... | ... | @@ -39,6 +40,28 @@ |
39 | 40 | //患者ID |
40 | 41 | private List<String> parentIds; |
41 | 42 | |
43 | + //大于修改时间 | |
44 | + private Date gteModified; | |
45 | + //大于创建时间 | |
46 | + //大于创建时间 | |
47 | + private Date gteCreated; | |
48 | + | |
49 | + public Date getGteModified() { | |
50 | + return gteModified; | |
51 | + } | |
52 | + | |
53 | + public void setGteModified(Date gteModified) { | |
54 | + this.gteModified = gteModified; | |
55 | + } | |
56 | + | |
57 | + public Date getGteCreated() { | |
58 | + return gteCreated; | |
59 | + } | |
60 | + | |
61 | + public void setGteCreated(Date gteCreated) { | |
62 | + this.gteCreated = gteCreated; | |
63 | + } | |
64 | + | |
42 | 65 | public List<String> getParentIds() { |
43 | 66 | return parentIds; |
44 | 67 | } |
... | ... | @@ -253,7 +276,7 @@ |
253 | 276 | condition=condition.and("serviceStatus",serviceStatus,MongoOper.IS); |
254 | 277 | } |
255 | 278 | if(null!=age){ |
256 | - condition=condition.and("age",age,MongoOper.IS); | |
279 | + condition=condition.and("age", age, MongoOper.IS); | |
257 | 280 | } |
258 | 281 | Criteria c1 = null; |
259 | 282 | if(null!=startWeek){ |
260 | 283 | |
... | ... | @@ -266,10 +289,15 @@ |
266 | 289 | c1 = c1.lte(endWeek); |
267 | 290 | } |
268 | 291 | } |
292 | + | |
269 | 293 | if (c1!=null) { |
270 | 294 | condition = condition.andCondition(new MongoCondition(c1)); |
271 | 295 | } |
272 | - | |
296 | + if (null != gteModified && null != gteCreated) { | |
297 | + MongoCondition mongoCondition = new MongoCondition("modified", gteModified, MongoOper.GTE); | |
298 | + MongoCondition condition2 = new MongoCondition("created", gteCreated, MongoOper.GTE); | |
299 | + condition = condition.orCondition(new MongoCondition[]{mongoCondition, condition2}); | |
300 | + } | |
273 | 301 | return condition.toMongoQuery(); |
274 | 302 | } |
275 | 303 | } |