Commit 5a74958c1528404bab918f3a105f2cfaedb26203
1 parent
4045882e53
Exists in
master
and in
6 other branches
产后复查
Showing 2 changed files with 48 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
5a74958
| ... | ... | @@ -4954,12 +4954,50 @@ |
| 4954 | 4954 | patientQuery.setHospitalId(postReviewModel.getHospitalId()); |
| 4955 | 4955 | patientQuery.setPid(postReviewModel.getPid()); |
| 4956 | 4956 | List<Patients> patientses = patientsService.queryPatient(patientQuery); |
| 4957 | - if (CollectionUtils.isNotEmpty(patientses) && patientses.size() > 1) | |
| 4957 | + if (CollectionUtils.isNotEmpty(patientses) && patientses.size() != 1) | |
| 4958 | 4958 | { |
| 4959 | - for (int i = 1;i < patientses.size();i++) | |
| 4959 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 4960 | + | |
| 4961 | + for (int i = 0;i < patientses.size();i++) | |
| 4960 | 4962 | { |
| 4961 | 4963 | Patients patients = patientses.get(i); |
| 4962 | - patients.setYn(YnEnums.NO.getId()); | |
| 4964 | + antExRecordQuery.setParentId(patients.getId()); | |
| 4965 | + List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC, "created"); | |
| 4966 | + if(CollectionUtils.isEmpty(antExRecordModelList) && patientses.size() != 1) | |
| 4967 | + { | |
| 4968 | + patients.setYn(YnEnums.NO.getId()); | |
| 4969 | + patientsService.updatePatient(patients); | |
| 4970 | + System.out.println(patients.getId()); | |
| 4971 | + } | |
| 4972 | + } | |
| 4973 | + } | |
| 4974 | + } | |
| 4975 | + } | |
| 4976 | + } | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + @RequestMapping(value = "/postReviewHandlehf", method = RequestMethod.GET) | |
| 4980 | + @ResponseBody | |
| 4981 | + public void postReviewHandlehf(String start) { | |
| 4982 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
| 4983 | + postReviewQuery.setYn(YnEnums.YES.getId()); | |
| 4984 | + postReviewQuery.setStart(DateUtil.parseYMD(start)); | |
| 4985 | + List<PostReviewModel> postReviewModels = postReviewService.findWithList(postReviewQuery); | |
| 4986 | + if(CollectionUtils.isNotEmpty(postReviewModels)) | |
| 4987 | + { | |
| 4988 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 4989 | + patientQuery.setYn(YnEnums.NO.getId()); | |
| 4990 | + for(PostReviewModel postReviewModel : postReviewModels) | |
| 4991 | + { | |
| 4992 | + patientQuery.setHospitalId(postReviewModel.getHospitalId()); | |
| 4993 | + patientQuery.setPid(postReviewModel.getPid()); | |
| 4994 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 4995 | + if (CollectionUtils.isNotEmpty(patientses)) | |
| 4996 | + { | |
| 4997 | + for (int i = 0;i < patientses.size();i++) | |
| 4998 | + { | |
| 4999 | + Patients patients = patientses.get(i); | |
| 5000 | + patients.setYn(YnEnums.YES.getId()); | |
| 4963 | 5001 | patientsService.updatePatient(patients); |
| 4964 | 5002 | System.out.println(patients.getId()); |
| 4965 | 5003 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostkfFaccade.java
View file @
5a74958
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.BabyService; |
| 4 | +import com.lyms.platform.biz.service.BasicConfigService; | |
| 4 | 5 | import com.lyms.platform.biz.service.MatDeliverService; |
| 5 | 6 | import com.lyms.platform.biz.service.PatientsService; |
| 6 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| ... | ... | @@ -18,6 +19,7 @@ |
| 18 | 19 | import com.lyms.platform.operate.web.request.PostKfRequest; |
| 19 | 20 | import com.lyms.platform.operate.web.result.ChildbirthManagerQueryModel; |
| 20 | 21 | import com.lyms.platform.operate.web.result.DefectiveChildModelResult; |
| 22 | +import com.lyms.platform.operate.web.utils.CommonsHelper; | |
| 21 | 23 | import com.lyms.platform.operate.web.worker.MaterDeliverWorker; |
| 22 | 24 | import com.lyms.platform.permission.service.UsersService; |
| 23 | 25 | import com.lyms.platform.pojo.*; |
| 24 | 26 | |
| ... | ... | @@ -49,8 +51,9 @@ |
| 49 | 51 | @Autowired |
| 50 | 52 | @Qualifier("commonThreadPool") |
| 51 | 53 | private ThreadPoolTaskExecutor commonThreadPool; |
| 52 | - | |
| 53 | 54 | @Autowired |
| 55 | + private BasicConfigService basicConfigService; | |
| 56 | + @Autowired | |
| 54 | 57 | private PatientsService patientsService; |
| 55 | 58 | @Autowired |
| 56 | 59 | private BabyService babyService; |
| ... | ... | @@ -533,6 +536,9 @@ |
| 533 | 536 | } |
| 534 | 537 | |
| 535 | 538 | childbirthManagerQueryModel.setPhone(patients.getPhone()); |
| 539 | + | |
| 540 | + childbirthManagerQueryModel.setRegisterAddress( CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
| 541 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
| 536 | 542 | } |
| 537 | 543 | |
| 538 | 544 | results.add(childbirthManagerQueryModel); |