Commit 3a8b540a733d1bbe557af04152b1008f12ea681d

Authored by [wangbo]
1 parent 6c11130b81

修改孕妇追访bug

Showing 4 changed files with 30 additions and 4 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java View file @ 3a8b540
... ... @@ -248,7 +248,7 @@
248 248 */
249 249 public void dandleReachDue() {
250 250 //查询出满足预产期前两周的孕妇
251   - Date endDate = DateUtil.addDay(DateUtil.formatDate(new Date()), +14);
  251 + Date endDate = DateUtil.addDay(DateUtil.formatDate(new Date()), +21);
252 252 PatientsQuery patientsQuery = new PatientsQuery();
253 253 patientsQuery.setDueDateEnd(endDate);
254 254 patientsQuery.setYn(YnEnums.YES.getId());
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 3a8b540
... ... @@ -426,8 +426,10 @@
426 426 if (null != followupStatus) {
427 427 if (0 == followupStatus) {
428 428 condition = condition.and("followupTime", new Date(), MongoOper.GTE);
  429 + condition = condition.and("stop", "0", MongoOper.IS);
429 430 } else if (1 == followupStatus) {
430 431 condition = condition.and("followupTime", new Date(), MongoOper.LTE);
  432 + condition = condition.and("stop", "0", MongoOper.IS);
431 433 } else if (2 == followupStatus) {
432 434 condition = condition.and("stop", "1", MongoOper.IS);
433 435 }
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java View file @ 3a8b540
... ... @@ -176,8 +176,10 @@
176 176 if (null != followupStatus) {
177 177 if (followupStatus == 0) {
178 178 condition = condition.and("followupTime", new Date(), MongoOper.GTE);
  179 + condition = condition.and("stop", "0", MongoOper.IS);
179 180 } else if (followupStatus == 1) {
180 181 condition = condition.and("followupTime", new Date(), MongoOper.LTE);
  182 + condition = condition.and("stop", "0", MongoOper.IS);
181 183 } else if (followupStatus == 2) {
182 184 condition = condition.and("stop", "1", MongoOper.IS);
183 185 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java View file @ 3a8b540
... ... @@ -297,7 +297,31 @@
297 297 patientsQuery.setLastMensesEnd(end);
298 298 isPatient = true;
299 299 }
  300 + //产后复查 只查询产后30-60天的人
  301 + if (downQueryRequest.getTrackType() == 7) {
  302 + Calendar instance = Calendar.getInstance();
  303 + instance.setTime(new Date());
  304 + instance.add(Calendar.DATE, -30);//30天
  305 + instance.set(Calendar.HOUR_OF_DAY, 23);
  306 + instance.set(Calendar.MINUTE, 59);
  307 + instance.set(Calendar.SECOND, 59);
  308 + instance.set(Calendar.MILLISECOND, 999);
  309 + Date end = instance.getTime();
  310 + patientsQuery.setFmDateEnd(end);
300 311  
  312 + instance.setTime(new Date());
  313 + instance.add(Calendar.DATE, -60);//60天
  314 + instance.set(Calendar.HOUR_OF_DAY, 00);
  315 + instance.set(Calendar.MINUTE, 00);
  316 + instance.set(Calendar.SECOND, 00);
  317 + instance.set(Calendar.MILLISECOND, 000);
  318 + Date start = instance.getTime();
  319 + patientsQuery.setFmDateStart(start);
  320 +
  321 + isPatient = true;
  322 + }
  323 +
  324 +
301 325 if (downQueryRequest.getStartDueDate() != null) {//预产期开始日期
302 326 patientsQuery.setDueDateStart(downQueryRequest.getStartDueDate());
303 327 isPatient = true;
... ... @@ -354,6 +378,7 @@
354 378 isPatient = true;
355 379 }
356 380  
  381 +
357 382 if (downQueryRequest.getStartWeek() != null && downQueryRequest.getEndWeek() != null) {//孕周
358 383 Date start = DateUtil.getWeekStart(downQueryRequest.getStartWeek());
359 384 patientsQuery.setLastMensesStart(start);
... ... @@ -459,8 +484,6 @@
459 484 //追访时间
460 485 downRecordQuery.setTrackDownDateStart(DateUtil.parseYMD(downQueryRequest.getTrackDownDateStart()));
461 486 downRecordQuery.setTrackDownDateEnd(DateUtil.parseYMD(downQueryRequest.getTrackDownDateEnd()));
462   -
463   -
464 487 //逾期天数
465 488 if (null != downQueryRequest.getBeOverdueDays()) {
466 489 Calendar instance = Calendar.getInstance();
... ... @@ -481,7 +504,6 @@
481 504 instance.set(Calendar.MILLISECOND, 000);
482 505 Date start = instance.getTime();
483 506 downRecordQuery.setStartBeOverdueDays(start);
484   -
485 507 }
486 508  
487 509