Commit 688400e66fcd5689519c02e40d77ffcf836934b6
1 parent
b6882ce92b
Exists in
master
and in
8 other branches
增加设置parentid
Showing 3 changed files with 20 additions and 20 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostReviewService.java
View file @
688400e
| ... | ... | @@ -63,6 +63,14 @@ |
| 63 | 63 | return postReviewDao.findWithList(query.addOrder(Sort.Direction.DESC, "id")); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | + public List<PostReviewModel> findWithList(MongoQuery mongoQuery) { | |
| 67 | + return postReviewDao.findWithList(mongoQuery); | |
| 68 | + } | |
| 69 | + | |
| 70 | + public Integer count(PostReviewQuery mongoQuery){ | |
| 71 | + return postReviewDao.queryCount(mongoQuery.convertToQuery()); | |
| 72 | + } | |
| 73 | + | |
| 66 | 74 | /** |
| 67 | 75 | * 修改一条数据 |
| 68 | 76 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
688400e
| ... | ... | @@ -15,10 +15,7 @@ |
| 15 | 15 | import com.lyms.platform.permission.model.Users; |
| 16 | 16 | import com.lyms.platform.permission.service.UsersService; |
| 17 | 17 | import com.lyms.platform.pojo.*; |
| 18 | -import com.lyms.platform.query.AntExChuQuery; | |
| 19 | -import com.lyms.platform.query.AntExQuery; | |
| 20 | -import com.lyms.platform.query.BabyModelQuery; | |
| 21 | -import com.lyms.platform.query.PatientsQuery; | |
| 18 | +import com.lyms.platform.query.*; | |
| 22 | 19 | import org.apache.commons.collections.CollectionUtils; |
| 23 | 20 | import org.apache.commons.lang.StringUtils; |
| 24 | 21 | import org.apache.commons.lang.math.NumberUtils; |
| ... | ... | @@ -54,6 +51,8 @@ |
| 54 | 51 | private AntenatalExaminationFacade antenatalExaminationFacade; |
| 55 | 52 | @Autowired |
| 56 | 53 | private UsersService usersService; |
| 54 | + @Autowired | |
| 55 | + private PostReviewService postReviewService; | |
| 57 | 56 | |
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | |
| 61 | 60 | |
| ... | ... | @@ -296,23 +295,16 @@ |
| 296 | 295 | chanResult.setCheckDoctor(patients.getLastCheckEmployeeId()); |
| 297 | 296 | } |
| 298 | 297 | } |
| 299 | - //复诊次数 | |
| 300 | - int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); | |
| 301 | - chanResult.setcTimes(i); | |
| 302 | - antExChuQuery.setParentId(patients.getId()); | |
| 303 | - antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 304 | - List<AntenatalExaminationModel> ant = antExService.queryAntenatalExamination(antExChuQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 298 | + //复查次数 | |
| 299 | + PostReviewQuery postReviewQuery=new PostReviewQuery(); | |
| 300 | + postReviewQuery.setParentId(patients.getId()); | |
| 301 | + postReviewQuery.setYn(YnEnums.YES.getId()); | |
| 302 | + List<PostReviewModel> withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 305 | 303 | |
| 306 | - | |
| 307 | 304 | String nextCheckTime = ""; |
| 308 | -// List<AntenatalExaminationModel> examinationModels = antExService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
| 309 | - if (CollectionUtils.isNotEmpty(ant)) { | |
| 310 | - nextCheckTime = DateUtil.getyyyy_MM_dd(ant.get(0).getNextCheckTime()); | |
| 311 | - } else { | |
| 312 | - List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery); | |
| 313 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 314 | - nextCheckTime = DateUtil.getyyyy_MM_dd(list.get(0).getNextCheckTime()); | |
| 315 | - } | |
| 305 | + if (CollectionUtils.isNotEmpty(withList)) { | |
| 306 | + chanResult.setcTimes(withList.size()); | |
| 307 | + nextCheckTime = withList.get(0).getNextCheckTime(); | |
| 316 | 308 | } |
| 317 | 309 | chanResult.setNextCheckTime(nextCheckTime); |
| 318 | 310 | data.add(chanResult); |