Commit 58f434f865e20bfccf3ca29dea0d00c40e014568

Authored by zhangchao
1 parent 39e9244e68
Exists in dev

#fix:优化

Showing 1 changed file with 4 additions and 0 deletions

platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java View file @ 58f434f
... ... @@ -6,6 +6,7 @@
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
8 8 import com.lyms.platform.common.utils.StringUtils;
  9 +import org.apache.commons.collections.CollectionUtils;
9 10  
10 11 import java.util.List;
11 12  
... ... @@ -118,6 +119,9 @@
118 119 condition = condition.and("riskFactorId", rFactor, MongoOper.IN);
119 120 } else if (null != rFactorList && !rFactorList.isEmpty()) {
120 121 condition = condition.and("riskFactorId", rFactorList, MongoOper.IN);
  122 + }
  123 + if (CollectionUtils.isEmpty(rFactorList)){
  124 + condition = condition.and("risks", false, MongoOper.EXISTS);
121 125 }
122 126 if (deliveryModel!=null){
123 127 condition=condition.and("deliveryModel", deliveryModel, MongoOper.IS);