Commit 2d0e7073568935ec13ce0fa3525cff147ae3b00d
1 parent
403429d67b
Exists in
master
and in
6 other branches
修复异常
Showing 2 changed files with 19 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyAfterVisitServiceImpl.java
View file @
2d0e707
| ... | ... | @@ -458,7 +458,9 @@ |
| 458 | 458 | query.addCriteria(Criteria.where("appointmentTime").gte(start).lte(end)); |
| 459 | 459 | } |
| 460 | 460 | } |
| 461 | - | |
| 461 | + if (!appointmentTimeBoolean && !nonNull) { | |
| 462 | + query.addCriteria(Criteria.where("appointmentTime").gte(new Date())); | |
| 463 | + } | |
| 462 | 464 | |
| 463 | 465 | // 追访结果 1-显示 当前时间 > 预约时间 |
| 464 | 466 | // 2-显示 当前时间 < 预约时间 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyAfterVisitInfoModelWork.java
View file @
2d0e707
| 1 | 1 | package com.lyms.platform.operate.web.worker; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.utils.StringUtils; | |
| 3 | 4 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| 4 | 5 | import com.lyms.platform.operate.web.utils.InitDataUtils; |
| 5 | -import com.lyms.platform.pojo.BabyAfterVisitInfoModel; | |
| 6 | -import com.lyms.platform.pojo.BabyAfterVisitStatisticsModel; | |
| 7 | -import com.lyms.platform.pojo.BabyEyeCheck; | |
| 8 | -import com.lyms.platform.pojo.BabyModel; | |
| 6 | +import com.lyms.platform.pojo.*; | |
| 9 | 7 | import org.springframework.beans.BeanUtils; |
| 10 | 8 | import org.springframework.data.domain.Sort; |
| 11 | 9 | import org.springframework.data.mongodb.core.MongoTemplate; |
| ... | ... | @@ -64,6 +62,20 @@ |
| 64 | 62 | } else { |
| 65 | 63 | babyAfterVisitInfoModel.setAppointmentTime(new Date()); |
| 66 | 64 | } |
| 65 | + if (Objects.equals(TYPE_CHECK, type)) { | |
| 66 | + // 儿保检查--检查医生 | |
| 67 | + List<BabyCheckModel> babyCheckModels = mongoTemplate.find(Query.query(Criteria.where("buildId").is(babyId)).with(new Sort(new Sort.Order(Sort.Direction.DESC, "created"))), BabyCheckModel.class); | |
| 68 | + String checkDoctor = ""; | |
| 69 | + if (CollectionUtils.isNotEmpty(babyCheckModels)) { | |
| 70 | + BabyCheckModel checkModel = babyCheckModels.get(0); | |
| 71 | + String checkDoctorDb = checkModel.getCheckDoctor(); | |
| 72 | + if (StringUtils.isNotEmpty(checkDoctorDb)) { | |
| 73 | + checkDoctor = checkDoctorDb; | |
| 74 | + } | |
| 75 | + } | |
| 76 | + babyAfterVisitInfoModel.setCheckDoctor(checkDoctor); | |
| 77 | + } | |
| 78 | + | |
| 67 | 79 | if (Objects.equals(TYPE_EYE_CHECK, type)) { |
| 68 | 80 | // 阳性项目 |
| 69 | 81 | List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where(BABY_ID).is(babyId)). |