Commit 6d6e039af5cdef165469fa36ee008de892d4d391
1 parent
3b7b41a51c
Exists in
master
and in
6 other branches
产后复查数据处理
Showing 1 changed file with 31 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
6d6e039
| ... | ... | @@ -4937,6 +4937,37 @@ |
| 4937 | 4937 | return ""; |
| 4938 | 4938 | } |
| 4939 | 4939 | |
| 4940 | + | |
| 4941 | + @RequestMapping(value = "/postReviewHandle", method = RequestMethod.GET) | |
| 4942 | + @ResponseBody | |
| 4943 | + public void postReviewHandle(String start) { | |
| 4944 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
| 4945 | + postReviewQuery.setYn(YnEnums.YES.getId()); | |
| 4946 | + postReviewQuery.setStart(DateUtil.parseYMD(start)); | |
| 4947 | + List<PostReviewModel> postReviewModels = postReviewService.findWithList(postReviewQuery); | |
| 4948 | + if(CollectionUtils.isNotEmpty(postReviewModels)) | |
| 4949 | + { | |
| 4950 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 4951 | + patientQuery.setYn(YnEnums.YES.getId()); | |
| 4952 | + for(PostReviewModel postReviewModel : postReviewModels) | |
| 4953 | + { | |
| 4954 | + patientQuery.setHospitalId(postReviewModel.getHospitalId()); | |
| 4955 | + patientQuery.setPid(postReviewModel.getPid()); | |
| 4956 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 4957 | + if (CollectionUtils.isNotEmpty(patientses) && patientses.size() > 1) | |
| 4958 | + { | |
| 4959 | + for (int i = 1;i < patientses.size();i++) | |
| 4960 | + { | |
| 4961 | + Patients patients = patientses.get(i); | |
| 4962 | + patients.setYn(YnEnums.NO.getId()); | |
| 4963 | + patientsService.updatePatient(patients); | |
| 4964 | + System.out.println(patients.getId()); | |
| 4965 | + } | |
| 4966 | + } | |
| 4967 | + } | |
| 4968 | + } | |
| 4969 | + } | |
| 4970 | + | |
| 4940 | 4971 | // @RequestMapping(value = "/test/a", method = RequestMethod.GET) |
| 4941 | 4972 | // @ResponseBody |
| 4942 | 4973 | // public void testa() { |