Commit 82330ac8981bfcfc9a3a4d772fd0b7d9b188f283
1 parent
46386e1d89
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 22 additions and 14 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
82330ac
... | ... | @@ -1515,17 +1515,8 @@ |
1515 | 1515 | } |
1516 | 1516 | } |
1517 | 1517 | |
1518 | - if (null != buildDateNoybjStart && null != buildDateNoybjEnd ) { | |
1519 | - MongoCondition c1 = MongoCondition.newInstance(); | |
1520 | - MongoCondition con1 = MongoCondition.newInstance("buildDateNoybj", buildDateNoybjStart, MongoOper.GTE).and("buildDateNoybj",buildDateNoybjEnd,MongoOper.LTE); | |
1521 | - MongoCondition con2 = MongoCondition.newInstance("buildDate", buildDateStart, MongoOper.GTE).and("buildDate",buildDateEnd,MongoOper.LTE); | |
1522 | - if (c != null) { | |
1523 | - c = c.andOperator(c1.orCondition(new MongoCondition[]{con1, con2}).getCriteria()); | |
1524 | - } else { | |
1525 | - c = c1.orCondition(new MongoCondition[]{con1, con2}).getCriteria(); | |
1526 | - } | |
1527 | - } | |
1528 | 1518 | |
1519 | + | |
1529 | 1520 | if (null != checkTimeStart) { |
1530 | 1521 | if (null != c) { |
1531 | 1522 | c = c.and("checkTime").gte(checkTimeStart); |
... | ... | @@ -1541,6 +1532,23 @@ |
1541 | 1532 | c = Criteria.where("checkTime").lte(checkTimeEnd); |
1542 | 1533 | } |
1543 | 1534 | } |
1535 | + | |
1536 | + if (null != buildDateNoybjStart && null != buildDateNoybjEnd ) { | |
1537 | + | |
1538 | + if (null != c) { | |
1539 | + c.orOperator( | |
1540 | + Criteria.where("buildDateNoybj").gte(buildDateNoybjStart).lt(buildDateNoybjEnd), | |
1541 | + Criteria.where("buildDate").gte(buildDateNoybjStart).lt(buildDateNoybjEnd) | |
1542 | + ); | |
1543 | + } else { | |
1544 | + c = new Criteria(); | |
1545 | + c.orOperator( | |
1546 | + Criteria.where("buildDateNoybj").gte(buildDateNoybjStart).lt(buildDateNoybjEnd), | |
1547 | + Criteria.where("buildDate").gte(buildDateNoybjStart).lt(buildDateNoybjEnd) | |
1548 | + ); | |
1549 | + } | |
1550 | + } | |
1551 | + | |
1544 | 1552 | if (null != nextCheckTimeStart) { |
1545 | 1553 | if (null != c) { |
1546 | 1554 | c = c.and("nextCheckTime").gte(nextCheckTimeStart); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySpecialDiseaseClinicFacade.java
View file @
82330ac
... | ... | @@ -270,16 +270,16 @@ |
270 | 270 | babyQuery.setHospitalId(hospitalId); |
271 | 271 | babyQuery.setSort(null); |
272 | 272 | if(babyQuery.getBuildDateEnd()!=null){ |
273 | - babyQuery.setBuildDateEnd(DateUtil.addDay(babyQuery.getBuildDateEnd(), 1)); | |
273 | + babyQuery.setBuildDateEnd(DateUtil.getDayLastSecond(babyQuery.getBuildDateEnd())); | |
274 | 274 | } |
275 | 275 | if(babyQuery.getCheckDateEnd()!=null){ |
276 | - babyQuery.setCheckDateEnd(DateUtil.addDay(babyQuery.getCheckDateEnd(), 1)); | |
276 | + babyQuery.setCheckDateEnd(DateUtil.getDayLastSecond(babyQuery.getCheckDateEnd())); | |
277 | 277 | } |
278 | 278 | if(babyQuery.getNextDateEnd()!=null){ |
279 | - babyQuery.setNextDateEnd(DateUtil.addDay(babyQuery.getNextDateEnd(), 1)); | |
279 | + babyQuery.setNextDateEnd(DateUtil.getDayLastSecond(babyQuery.getNextDateEnd())); | |
280 | 280 | } |
281 | 281 | if(babyQuery.getBirthEnd()!=null){ |
282 | - babyQuery.setBirthEnd(DateUtil.addDay(babyQuery.getBirthEnd(), 1)); | |
282 | + babyQuery.setBirthEnd(DateUtil.getDayLastSecond(babyQuery.getBirthEnd())); | |
283 | 283 | } |
284 | 284 | babySpecialDiseaseClinicModels = babySDCService.queryBabySpecialDiseaseClinicRecord(babyQuery); |
285 | 285 | } |