Commit bc2b53c39a5639514d9f972ae3328c098156afcd
1 parent
85a94bc0d3
Exists in
master
and in
6 other branches
修改产筛的预约追访时间
Showing 7 changed files with 136 additions and 8 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/TrackDownRecord.java
- platform-dal/src/main/java/com/lyms/platform/query/TrackDownRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
bc2b53c
... | ... | @@ -1335,6 +1335,8 @@ |
1335 | 1335 | downRecord.setAppointmentDate(new Date()); |
1336 | 1336 | downRecord.setStop("0"); |
1337 | 1337 | downRecord.setTrackType(TrackDownDateEnums.C.getId()); |
1338 | + //特殊处理 产筛预约追访时间 | |
1339 | + downRecord.setSieveAppointmentDate(new Date()); | |
1338 | 1340 | return downRecord; |
1339 | 1341 | } |
1340 | 1342 |
platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
View file @
bc2b53c
... | ... | @@ -128,6 +128,7 @@ |
128 | 128 | //追访预约时间 |
129 | 129 | private Date followupTime; |
130 | 130 | |
131 | + | |
131 | 132 | //是否终止流程 0 正常流程 1 终止流程 |
132 | 133 | private String stop; |
133 | 134 | |
... | ... | @@ -184,6 +185,7 @@ |
184 | 185 | public void setFollowupTime(Date followupTime) { |
185 | 186 | this.followupTime = followupTime; |
186 | 187 | } |
188 | + | |
187 | 189 | |
188 | 190 | public String getCheckup() { |
189 | 191 | return checkup; |
platform-dal/src/main/java/com/lyms/platform/pojo/TrackDownRecord.java
View file @
bc2b53c
... | ... | @@ -60,11 +60,34 @@ |
60 | 60 | //预约追访日期 |
61 | 61 | private Date appointmentDate; |
62 | 62 | |
63 | + //特殊 产筛预约追访时间 | |
64 | + private Date sieveAppointmentDate; | |
65 | + | |
66 | + //特殊 产筛追访日期 | |
67 | + private Date sieveTrackDownDate; | |
68 | + | |
63 | 69 | //追访日期 |
64 | 70 | private Date trackDownDate; |
65 | 71 | |
72 | + | |
66 | 73 | //是否终止流程 |
67 | 74 | private String stop; |
75 | + | |
76 | + public Date getSieveAppointmentDate() { | |
77 | + return sieveAppointmentDate; | |
78 | + } | |
79 | + | |
80 | + public Date getSieveTrackDownDate() { | |
81 | + return sieveTrackDownDate; | |
82 | + } | |
83 | + | |
84 | + public void setSieveTrackDownDate(Date sieveTrackDownDate) { | |
85 | + this.sieveTrackDownDate = sieveTrackDownDate; | |
86 | + } | |
87 | + | |
88 | + public void setSieveAppointmentDate(Date sieveAppointmentDate) { | |
89 | + this.sieveAppointmentDate = sieveAppointmentDate; | |
90 | + } | |
68 | 91 | |
69 | 92 | public Date getWomanBuildTime() { |
70 | 93 | return womanBuildTime; |
platform-dal/src/main/java/com/lyms/platform/query/TrackDownRecordQuery.java
View file @
bc2b53c
... | ... | @@ -84,6 +84,18 @@ |
84 | 84 | private Date endBeOverdueDays; |
85 | 85 | |
86 | 86 | |
87 | + //查询TrackType; | |
88 | + private Integer queryTrackType; | |
89 | + | |
90 | + public Integer getQueryTrackType() { | |
91 | + return queryTrackType; | |
92 | + } | |
93 | + | |
94 | + public void setQueryTrackType(Integer queryTrackType) { | |
95 | + this.queryTrackType = queryTrackType; | |
96 | + } | |
97 | + | |
98 | + | |
87 | 99 | public Date getStartBeOverdueDays() { |
88 | 100 | return startBeOverdueDays; |
89 | 101 | } |
... | ... | @@ -382,6 +394,24 @@ |
382 | 394 | condition = condition.and("stop", "1", MongoOper.IS); |
383 | 395 | } |
384 | 396 | } |
397 | + | |
398 | + /*******产筛特殊处理**********/ | |
399 | + if (queryTrackType != null && queryTrackType == 4) { | |
400 | + if (null != followupStatus) { | |
401 | + if (followupStatus == 0) { | |
402 | + Date newDate = DateUtil.parseYMDHMS(DateUtil.getyyyy_MM_dd(new Date()) + " 00:00:00"); | |
403 | + condition = condition.and("sieveAppointmentDate", newDate, MongoOper.GTE); | |
404 | + } else if (followupStatus == 1) { | |
405 | + Date newDate = DateUtil.parseYMDHMS(DateUtil.getyyyy_MM_dd(new Date()) + " 00:00:00"); | |
406 | + condition = condition.and("sieveAppointmentDate", newDate, MongoOper.LT); | |
407 | + } else if (followupStatus == 2) { | |
408 | + condition = condition.and("stop", "1", MongoOper.IS); | |
409 | + } | |
410 | + } | |
411 | + | |
412 | + } | |
413 | + | |
414 | + | |
385 | 415 | Criteria c1 = null; |
386 | 416 | |
387 | 417 | if (StringUtils.isNotEmpty(key)) { |
... | ... | @@ -471,6 +501,55 @@ |
471 | 501 | c1 = Criteria.where("appointmentDate").lte(endBeOverdueDays); |
472 | 502 | } |
473 | 503 | } |
504 | + /******产筛特殊处理*******/ | |
505 | + if (null != queryTrackType && queryTrackType == 4) { | |
506 | + if (null != trackDownDateStart) { | |
507 | + if (null != c1) { | |
508 | + c1 = c1.and("sieveTrackDownDate").gte(trackDownDateStart); | |
509 | + } else { | |
510 | + c1 = Criteria.where("sieveTrackDownDate").gte(trackDownDateStart); | |
511 | + } | |
512 | + } | |
513 | + if (null != trackDownDateEnd) { | |
514 | + if (c1 != null) { | |
515 | + c1 = c1.lte(trackDownDateEnd); | |
516 | + } else { | |
517 | + c1 = Criteria.where("sieveTrackDownDate").lte(trackDownDateEnd); | |
518 | + } | |
519 | + } | |
520 | + | |
521 | + if (null != startBeOverdueDays) { | |
522 | + if (null != c1) { | |
523 | + c1 = c1.and("sieveAppointmentDate").gte(startBeOverdueDays); | |
524 | + } else { | |
525 | + c1 = Criteria.where("sieveAppointmentDate").gte(startBeOverdueDays); | |
526 | + } | |
527 | + } | |
528 | + if (null != endBeOverdueDays) { | |
529 | + if (c1 != null) { | |
530 | + c1 = c1.lte(endBeOverdueDays); | |
531 | + } else { | |
532 | + c1 = Criteria.where("sieveAppointmentDate").lte(endBeOverdueDays); | |
533 | + } | |
534 | + } | |
535 | + if (null != appointmentDateStart) { | |
536 | + if (null != c1) { | |
537 | + c1 = c1.and("sieveAppointmentDate").gte(appointmentDateStart); | |
538 | + } else { | |
539 | + c1 = Criteria.where("sieveAppointmentDate").gte(appointmentDateStart); | |
540 | + } | |
541 | + } | |
542 | + if (null != appointmentDateEnd) { | |
543 | + if (c1 != null) { | |
544 | + c1 = c1.lte(appointmentDateEnd); | |
545 | + } else { | |
546 | + c1 = Criteria.where("sieveAppointmentDate").lte(appointmentDateEnd); | |
547 | + } | |
548 | + } | |
549 | + | |
550 | + | |
551 | + } | |
552 | + | |
474 | 553 | |
475 | 554 | if (null != c1) { |
476 | 555 | condition = condition.andCondition(new MongoCondition(c1)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
bc2b53c
... | ... | @@ -447,14 +447,18 @@ |
447 | 447 | downRecordQuery.setFoundStart(downQueryRequest.getFoundDateStart()); |
448 | 448 | downRecordQuery.setFoundEnd(downQueryRequest.getFoundDateEnd()); |
449 | 449 | //预约追访时间 |
450 | - downRecordQuery.setAppointmentDateStart(DateUtil.parseYMD(downQueryRequest.getAppointmentDateStart())); | |
451 | - downRecordQuery.setAppointmentDateEnd(DateUtil.parseYMD(downQueryRequest.getAppointmentDateEnd())); | |
450 | + downRecordQuery.setAppointmentDateStart(DateUtil.parseYMDHMS(downQueryRequest.getAppointmentDateStart() + " 00:00:00")); | |
451 | + downRecordQuery.setAppointmentDateEnd(DateUtil.parseYMDHMS(downQueryRequest.getAppointmentDateEnd() + " 23:59:59")); | |
452 | 452 | //追访状态 |
453 | 453 | downRecordQuery.setFollowupStatus(downQueryRequest.getFollowupStatus()); |
454 | 454 | //追访时间 |
455 | 455 | downRecordQuery.setTrackDownDateStart(DateUtil.parseYMD(downQueryRequest.getTrackDownDateStart())); |
456 | 456 | downRecordQuery.setTrackDownDateEnd(DateUtil.parseYMD(downQueryRequest.getTrackDownDateEnd())); |
457 | 457 | |
458 | + //设置查询queryTrackType 如果是4 执行产筛的查询条件 | |
459 | + downRecordQuery.setQueryTrackType(downQueryRequest.getTrackType()); | |
460 | + | |
461 | + | |
458 | 462 | //逾期天数 |
459 | 463 | if (null != downQueryRequest.getBeOverdueDays()) { |
460 | 464 | Calendar instance = Calendar.getInstance(); |
... | ... | @@ -943,8 +947,17 @@ |
943 | 947 | TrackDown trackDown = mongoTemplate.findOne(Query.query(criteria).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); |
944 | 948 | if (trackDown != null) { |
945 | 949 | temp.put("result", StringUtils.isEmpty(trackDown.getResult()) ? "--" : trackDown.getResult()); // 追访结果 |
946 | - temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); // 追访时间 | |
947 | - temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getAppointmentDate())); // 预约时间 | |
950 | + | |
951 | + | |
952 | + //获取产筛的预约时间 跟追访时间 | |
953 | + if (downRecord.getTrackType() != null && downRecord.getTrackType() == 4) { | |
954 | + temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveAppointmentDate())); // 产筛预约时间 | |
955 | + temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveTrackDownDate())); // 产筛追访时间 | |
956 | + } else { | |
957 | + temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getAppointmentDate())); // 预约时间 | |
958 | + temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); // 追访时间 | |
959 | + } | |
960 | + | |
948 | 961 | } else { |
949 | 962 | temp.put("result", "--"); // 婚检追访结果 |
950 | 963 | temp.put("trackDownTime", "--"); // 追访时间 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
View file @
bc2b53c
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
View file @
bc2b53c
... | ... | @@ -881,12 +881,10 @@ |
881 | 881 | } |
882 | 882 | /**冗余到追访记录表*/ |
883 | 883 | TrackDownRecord trackDownRecord1 = new TrackDownRecord(); |
884 | - if (trackDown.getReservatDate() != null) { | |
884 | + if (trackDown.getReservatDate() != null || trackDown.getTrackDownDateType() != 4 || trackDown.getTrackDownDateType() != 5) { | |
885 | 885 | trackDownRecord1.setAppointmentDate(trackDown.getReservatDate()); |
886 | - } else { | |
887 | - trackDownRecord1.setAppointmentDate(new Date()); | |
888 | 886 | } |
889 | - if (null != trackDown.getTrackDownDate()) { | |
887 | + if (null != trackDown.getTrackDownDate() || trackDown.getTrackDownDateType() != 4 || trackDown.getTrackDownDateType() != 5) { | |
890 | 888 | trackDownRecord1.setTrackDownDate(trackDown.getTrackDownDate()); |
891 | 889 | } |
892 | 890 | if (null != trackDown.getTrackDownTransfer()) { |
... | ... | @@ -894,6 +892,15 @@ |
894 | 892 | trackDownRecord1.setStop("0"); |
895 | 893 | } else if (3 == trackDown.getTrackDownTransfer()) { |
896 | 894 | trackDownRecord1.setStop("1"); |
895 | + } | |
896 | + } | |
897 | + //冗余产筛 预约追访时间 | |
898 | + if (trackDown.getTrackDownDateType() == 4) { | |
899 | + if (trackDown.getReservatDate() != null) { | |
900 | + trackDownRecord1.setSieveAppointmentDate(trackDown.getReservatDate()); | |
901 | + } | |
902 | + if (null != trackDown.getTrackDownDate()) { | |
903 | + trackDownRecord1.setSieveTrackDownDate(trackDown.getTrackDownDate()); | |
897 | 904 | } |
898 | 905 | } |
899 | 906 | trackDownRecordService.updateTrackDown(trackDownRecord1, trackDownRecord.getId()); |