From 58f434f865e20bfccf3ca29dea0d00c40e014568 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Mon, 8 Jul 2024 18:55:06 +0800 Subject: [PATCH] =?UTF-8?q?#fix:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/lyms/platform/query/PostpartumReportQuery.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java index 0baeead..dd33520 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java @@ -6,6 +6,7 @@ import com.lyms.platform.common.dao.operator.MongoCondition; import com.lyms.platform.common.dao.operator.MongoOper; import com.lyms.platform.common.dao.operator.MongoQuery; import com.lyms.platform.common.utils.StringUtils; +import org.apache.commons.collections.CollectionUtils; import java.util.List; @@ -119,6 +120,9 @@ public class PostpartumReportQuery extends BaseQuery implements IConvertToNative } else if (null != rFactorList && !rFactorList.isEmpty()) { condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); } + if (CollectionUtils.isEmpty(rFactorList)){ + condition = condition.and("risks", false, MongoOper.EXISTS); + } if (deliveryModel!=null){ condition=condition.and("deliveryModel", deliveryModel, MongoOper.IS); } -- 1.8.3.1