From 3a8b540a733d1bbe557af04152b1008f12ea681d Mon Sep 17 00:00:00 2001 From: "[wangbo]" Date: Wed, 31 Jul 2019 16:27:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=95=E5=A6=87=E8=BF=BD?= =?UTF-8?q?=E8=AE=BFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lyms/platform/biz/service/PatientsService.java | 2 +- .../com/lyms/platform/query/PatientsQuery.java | 2 ++ .../lyms/platform/query/ResidentsArchiveQuery.java | 2 ++ .../operate/web/facade/TrackDownFacade.java | 28 +++++++++++++++++++--- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java index f930015..a428162 100644 --- a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java +++ b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java @@ -248,7 +248,7 @@ public class PatientsService { */ public void dandleReachDue() { //查询出满足预产期前两周的孕妇 - Date endDate = DateUtil.addDay(DateUtil.formatDate(new Date()), +14); + Date endDate = DateUtil.addDay(DateUtil.formatDate(new Date()), +21); PatientsQuery patientsQuery = new PatientsQuery(); patientsQuery.setDueDateEnd(endDate); patientsQuery.setYn(YnEnums.YES.getId()); 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 bfe996f..a9bee4a 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 @@ -426,8 +426,10 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { if (null != followupStatus) { if (0 == followupStatus) { condition = condition.and("followupTime", new Date(), MongoOper.GTE); + condition = condition.and("stop", "0", MongoOper.IS); } else if (1 == followupStatus) { condition = condition.and("followupTime", new Date(), MongoOper.LTE); + condition = condition.and("stop", "0", MongoOper.IS); } else if (2 == followupStatus) { condition = condition.and("stop", "1", MongoOper.IS); } diff --git a/platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java index 2e4df3a..5d16fd6 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java @@ -176,8 +176,10 @@ public class ResidentsArchiveQuery extends BaseQuery implements IConvertToNative if (null != followupStatus) { if (followupStatus == 0) { condition = condition.and("followupTime", new Date(), MongoOper.GTE); + condition = condition.and("stop", "0", MongoOper.IS); } else if (followupStatus == 1) { condition = condition.and("followupTime", new Date(), MongoOper.LTE); + condition = condition.and("stop", "0", MongoOper.IS); } else if (followupStatus == 2) { condition = condition.and("stop", "1", MongoOper.IS); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java index 10ee267..60929bf 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java @@ -297,6 +297,30 @@ public class TrackDownFacade { patientsQuery.setLastMensesEnd(end); isPatient = true; } + //产后复查 只查询产后30-60天的人 + if (downQueryRequest.getTrackType() == 7) { + Calendar instance = Calendar.getInstance(); + instance.setTime(new Date()); + instance.add(Calendar.DATE, -30);//30天 + instance.set(Calendar.HOUR_OF_DAY, 23); + instance.set(Calendar.MINUTE, 59); + instance.set(Calendar.SECOND, 59); + instance.set(Calendar.MILLISECOND, 999); + Date end = instance.getTime(); + patientsQuery.setFmDateEnd(end); + + instance.setTime(new Date()); + instance.add(Calendar.DATE, -60);//60天 + instance.set(Calendar.HOUR_OF_DAY, 00); + instance.set(Calendar.MINUTE, 00); + instance.set(Calendar.SECOND, 00); + instance.set(Calendar.MILLISECOND, 000); + Date start = instance.getTime(); + patientsQuery.setFmDateStart(start); + + isPatient = true; + } + if (downQueryRequest.getStartDueDate() != null) {//预产期开始日期 patientsQuery.setDueDateStart(downQueryRequest.getStartDueDate()); @@ -354,6 +378,7 @@ public class TrackDownFacade { isPatient = true; } + if (downQueryRequest.getStartWeek() != null && downQueryRequest.getEndWeek() != null) {//孕周 Date start = DateUtil.getWeekStart(downQueryRequest.getStartWeek()); patientsQuery.setLastMensesStart(start); @@ -459,8 +484,6 @@ public class TrackDownFacade { //追访时间 downRecordQuery.setTrackDownDateStart(DateUtil.parseYMD(downQueryRequest.getTrackDownDateStart())); downRecordQuery.setTrackDownDateEnd(DateUtil.parseYMD(downQueryRequest.getTrackDownDateEnd())); - - //逾期天数 if (null != downQueryRequest.getBeOverdueDays()) { Calendar instance = Calendar.getInstance(); @@ -481,7 +504,6 @@ public class TrackDownFacade { instance.set(Calendar.MILLISECOND, 000); Date start = instance.getTime(); downRecordQuery.setStartBeOverdueDays(start); - } -- 1.8.3.1