Commit 2ffeb2d1aaacd90f5156fb5841b8c190c0734cd6
1 parent
f7216dabb6
Exists in
master
and in
6 other branches
update
Showing 4 changed files with 17 additions and 10 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyAfterVisitService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyAfterVisitServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
2ffeb2d
... | ... | @@ -539,6 +539,8 @@ |
539 | 539 | Date nextDate = bm.getNextDate(); |
540 | 540 | if (nextDate != null) { |
541 | 541 | babyAfterVisitService.addOrUpdateAfterVisitData(bm, TYPE_CHECK, STATUS_TYPE_NO); |
542 | + } else { | |
543 | + babyAfterVisitService.addOrUpdateAfterVisitData(bm, TYPE_CHECK, STATUS_TYPE_NULL); | |
542 | 544 | } |
543 | 545 | bm.setId(request.getBuildId()); |
544 | 546 | babyAfterVisitService.addOrUpdateAfterVisitData(bm, TYPE_STATISTICS, STATUS_TYPE_CHECK); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyAfterVisitService.java
View file @
2ffeb2d
... | ... | @@ -32,6 +32,8 @@ |
32 | 32 | public static final Integer STATUS_TYPE_YES = 1; |
33 | 33 | /**状态:作废*/ |
34 | 34 | public static final Integer STATUS_TYPE_NO = 2; |
35 | + /**状态:下次预约时间null*/ | |
36 | + public static final Integer STATUS_TYPE_NULL = 3; | |
35 | 37 | /**状态:更新*/ |
36 | 38 | public static final Integer STATUS_TYPE_UPDATE = 3; |
37 | 39 | /**状态:预建档/临时建档*/ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyAfterVisitServiceImpl.java
View file @
2ffeb2d
... | ... | @@ -456,24 +456,20 @@ |
456 | 456 | query.addCriteria(Criteria.where("appointmentTime").gte(start).lte(end)); |
457 | 457 | } |
458 | 458 | } |
459 | - //临时处理等待董勤回来处理 | |
460 | - boolean flag = true; | |
461 | 459 | // 追访结果 1-显示 当前时间 > 预约时间 |
462 | 460 | // 2-显示 当前时间 < 预约时间 |
463 | 461 | String afterVisitResult = request.getAfterVisitResult(); |
464 | 462 | if (Objects.equals("1", afterVisitResult)) { |
465 | 463 | if (!appointmentTimeBoolean && !nonNull) { |
466 | 464 | query.addCriteria(Criteria.where("appointmentTime").lte(new Date())); |
467 | - flag = false; | |
468 | 465 | } |
469 | 466 | } else if (Objects.equals("2", afterVisitResult)) { |
470 | 467 | if (!appointmentTimeBoolean && !nonNull) { |
471 | 468 | query.addCriteria(Criteria.where("appointmentTime").gt(new Date())); |
472 | - flag = false; | |
473 | 469 | } |
474 | 470 | } |
475 | 471 | |
476 | - if (!appointmentTimeBoolean && !nonNull && flag) { | |
472 | + if (!appointmentTimeBoolean && !nonNull ) { | |
477 | 473 | query.addCriteria(Criteria.where("appointmentTime").lt(new Date())); |
478 | 474 | } |
479 | 475 | |
... | ... | @@ -823,7 +819,7 @@ |
823 | 819 | // 档案转正、儿保检查 addOrUpdate |
824 | 820 | if (Objects.equals(TYPE_BUILD, type) || Objects.equals(TYPE_CHECK, type)) { |
825 | 821 | |
826 | - if (Objects.equals(STATUS_TYPE_NO, statusType)) { | |
822 | + if (Objects.equals(STATUS_TYPE_NO, statusType) || Objects.equals(STATUS_TYPE_NULL, statusType)) { | |
827 | 823 | BabyModel babyModel = (BabyModel) model; |
828 | 824 | babyModelId = babyModel.getId(); |
829 | 825 | models.add(babyModel); |
... | ... | @@ -836,6 +832,9 @@ |
836 | 832 | if (YnEnums.YES.getId() == yn) { |
837 | 833 | Date nextDate = babyModel.getNextDate(); |
838 | 834 | nextDate = nextDate == null ? new Date() : nextDate; |
835 | + if (Objects.equals(TYPE_CHECK, type)) { | |
836 | + nextDate = new Date(); | |
837 | + } | |
839 | 838 | mongoTemplate.updateFirst(query, Update.update("appointmentTime", nextDate), BabyAfterVisitInfoModel.class); |
840 | 839 | if (Objects.equals(TYPE_BUILD, type)) { |
841 | 840 | // 针对档案转正时,将其状态直接更新为作废 |
842 | 841 | |
... | ... | @@ -930,10 +929,10 @@ |
930 | 929 | } |
931 | 930 | BabyAfterVisitInfoDetailModel model = request; |
932 | 931 | model.setCreateTime(new Date()); |
933 | - model.setAfterVisitTime(new Date(afterVisitTime.getTime())); | |
932 | + model.setAfterVisitTime(new Date(afterVisitTime.getTime() - 28800000)); | |
934 | 933 | if (appointmentTime != null) { |
935 | 934 | if (!"1".equals(type)) { |
936 | - model.setAppointmentTime(new Date(appointmentTime.getTime())); | |
935 | + model.setAppointmentTime(new Date(appointmentTime.getTime() - 28800000)); | |
937 | 936 | } |
938 | 937 | } |
939 | 938 | model.setYn(1); |
940 | 939 | |
... | ... | @@ -942,10 +941,10 @@ |
942 | 941 | visitInfoModel.setAfterVisitResult(afterVisitResult); |
943 | 942 | if (Objects.equals(isAppointment, "1")) { |
944 | 943 | if (!"1".equals(type)) { |
945 | - visitInfoModel.setAppointmentTime(appointmentTime); | |
944 | + visitInfoModel.setAppointmentTime(model.getAppointmentTime()); | |
946 | 945 | } |
947 | 946 | } |
948 | - visitInfoModel.setAfterVisitTime(afterVisitTime); | |
947 | + visitInfoModel.setAfterVisitTime(model.getAfterVisitTime()); | |
949 | 948 | visitInfoModel.setAfterVisitUser(afterVisitUser); |
950 | 949 | visitInfoModel.setAfterVisitWay(afterVisitWay); |
951 | 950 | visitInfoModel.setAfterVisitWorkflow(afterVisitWorkflow); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
2ffeb2d
... | ... | @@ -106,6 +106,8 @@ |
106 | 106 | Date nextCheckTime = babyEyeCheck.getNextCheckTime(); |
107 | 107 | if (null != nextCheckTime) { |
108 | 108 | babyAfterVisitService.addOrUpdateAfterVisitData(babyEyeCheck, TYPE_EYE_CHECK, STATUS_TYPE_NO); |
109 | + } else { | |
110 | + babyAfterVisitService.addOrUpdateAfterVisitData(babyEyeCheck, TYPE_EYE_CHECK, STATUS_TYPE_NULL); | |
109 | 111 | } |
110 | 112 | BabyModel model = new BabyModel(); |
111 | 113 | model.setId(babyEyeCheck.getBabyId()); |
... | ... | @@ -145,6 +147,8 @@ |
145 | 147 | Date nextCheckTime = babyEyeCheck.getNextCheckTime(); |
146 | 148 | if (null != nextCheckTime) { |
147 | 149 | babyAfterVisitService.addOrUpdateAfterVisitData(babyEyeCheck, TYPE_EYE_CHECK, STATUS_TYPE_NO); |
150 | + } else { | |
151 | + babyAfterVisitService.addOrUpdateAfterVisitData(babyEyeCheck, TYPE_EYE_CHECK, STATUS_TYPE_NULL); | |
148 | 152 | } |
149 | 153 | |
150 | 154 | } |