From 61dafb344dc668a6ec000a47ea1ca21847cbc2c0 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Mon, 5 Dec 2016 13:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E5=8D=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lyms/platform/query/PatientsQuery.java | 3 ++- .../java/com/lyms/platform/operate/web/Test.java | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java index 4faa7ef..e82d935 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java @@ -9,6 +9,7 @@ import com.lyms.platform.common.utils.StringUtils; import org.apache.commons.collections.CollectionUtils; import org.springframework.data.mongodb.core.query.Criteria; +import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; @@ -889,7 +890,7 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { condition = condition.and("riskFactorId", rFactor, MongoOper.LIKE); } else if(norFactor){ - condition = condition.and("riskFactorId", "[]", MongoOper.NE); + condition = condition.and("riskFactorId", new ArrayList(), MongoOper.NE); MongoCondition c = MongoCondition.newInstance(); c1= c.andCondition(MongoCondition.newInstance("riskFactorId", null, MongoOper.NE)).getCriteria(); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java index 1fbae59..68ea338 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java @@ -55,17 +55,18 @@ public class Test { // antExChuQuery.setNextCheckTimeEnd(yuYueDate); // antExChuQuery.setHospitalId("242"); - patientsQuery1.setLastCheckEId(true); patientsQuery1.setHospitalId("242"); - patientsQuery1.setType(1); - - Date yuYueDate = DateUtil.addDay(new Date(), 2); - if (yuYueDate != null) { - //把时间格式化成 yyyy_MM_dd 的日期 - yuYueDate = DateUtil.formatDate(yuYueDate); - } - patientsQuery1.setDueDateStart(yuYueDate); - patientsQuery1.setDueDateEnd(yuYueDate); + patientsQuery1.setNorFactor(true); + patientsQuery1.setrLevel("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2"); +// patientsQuery1.setType(1); +// +// Date yuYueDate = DateUtil.addDay(new Date(), 2); +// if (yuYueDate != null) { +// //把时间格式化成 yyyy_MM_dd 的日期 +// yuYueDate = DateUtil.formatDate(yuYueDate); +// } +// patientsQuery1.setDueDateStart(yuYueDate); +// patientsQuery1.setDueDateEnd(yuYueDate); System.out.println(patientsQuery1.convertToQuery().convertToMongoQuery()); -- 1.8.3.1