Commit 840a22fa60648883dfd7438f0e8665c2517fa471
1 parent
04cfe104f3
Exists in
master
and in
6 other branches
床位预约
Showing 1 changed file with 10 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
840a22f
... | ... | @@ -5519,14 +5519,16 @@ |
5519 | 5519 | Date start = DateUtil.parseYMD(checkDates[0]); |
5520 | 5520 | Date end = DateUtil.parseYMD(checkDates[1]); |
5521 | 5521 | |
5522 | - Aggregation aggregation4 = | |
5523 | - Aggregation.newAggregation( | |
5524 | - Aggregation.match(Criteria.where("hospitalId").is(hospitalId).and("tcmGuide").exists(true).and("yn") | |
5525 | - .is(YnEnums.YES.getId()).and("checkDate").gte(DateUtil.getDayFirstSecond(start)).lte(DateUtil.getDayLastSecond(end))), | |
5526 | - Aggregation.group("buildId").count().as("总人数")); | |
5527 | - AggregationResults <BasicDBObject> results = | |
5528 | - mongoTemplate.aggregate(aggregation4, "lyms_babycheck", BasicDBObject.class); | |
5529 | - int count = results.getMappedResults().size(); | |
5522 | +// Aggregation aggregation4 = | |
5523 | +// Aggregation.newAggregation( | |
5524 | +// Aggregation.match(Criteria.where("hospitalId").is(hospitalId).and("tcmGuide").exists(true).and("yn") | |
5525 | +// .is(YnEnums.YES.getId()).and("checkDate").gte(DateUtil.getDayFirstSecond(start)).lte(DateUtil.getDayLastSecond(end))), | |
5526 | +// Aggregation.group("buildId").count().as("总人数")); | |
5527 | +// AggregationResults <BasicDBObject> results = | |
5528 | +// mongoTemplate.aggregate(aggregation4, "lyms_babycheck", BasicDBObject.class); | |
5529 | +// int count = results.getMappedResults().size(); | |
5530 | + int count = (int)mongoTemplate.count(new Query().addCriteria(Criteria.where("hospitalId").is(hospitalId).and("tcmGuide").exists(true).and("yn") | |
5531 | + .is(YnEnums.YES.getId()).and("checkDate").gte(DateUtil.getDayFirstSecond(start)).lte(DateUtil.getDayLastSecond(end))),BabyCheckModel.class); | |
5530 | 5532 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setData(count).setErrormsg("成功"); |
5531 | 5533 | } |
5532 | 5534 | } |