Commit 702d4671fa8fc1e1547dedf61f7476d37da840ab
1 parent
af2ada5a1c
Exists in
master
and in
8 other branches
修改新电子病历
Showing 1 changed file with 23 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
702d467
| ... | ... | @@ -489,7 +489,7 @@ |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | if(CollectionUtils.isNotEmpty(patientses)){ |
| 492 | - buildPatientList(dueDate,patientses,listData); | |
| 492 | + buildPatientList(dueDate,patientses,listData,null); | |
| 493 | 493 | |
| 494 | 494 | PostReviewQuery postReviewQuery = new PostReviewQuery(); |
| 495 | 495 | if (list.size() - 1 > i) { |
| 496 | 496 | |
| ... | ... | @@ -528,14 +528,23 @@ |
| 528 | 528 | patientsQuery1.setType(1); |
| 529 | 529 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery1); |
| 530 | 530 | List list1=new ArrayList(); |
| 531 | - List l= buildPatientList(dueDate, patientsList, list1); | |
| 531 | + List l= buildPatientList(dueDate, patientsList, list1,null); | |
| 532 | 532 | if(!l.isEmpty()){ |
| 533 | 533 | sort(l); |
| 534 | 534 | sortList.add(l); |
| 535 | 535 | } |
| 536 | 536 | }else{ |
| 537 | 537 | List list1=new ArrayList(); |
| 538 | - List l=buildPatientList(dueDate, list, list1); | |
| 538 | + List<SortIn> tmp =new ArrayList(); | |
| 539 | + for(Patients patients:list){ | |
| 540 | + tmp.add(new SortIn(patients)); | |
| 541 | + } | |
| 542 | + sortList(tmp); | |
| 543 | + Date min=null; | |
| 544 | + if(!tmp.isEmpty()){ | |
| 545 | + min=tmp.get(tmp.size()-1).getDate(); | |
| 546 | + } | |
| 547 | + List l=buildPatientList(dueDate, list, list1,min); | |
| 539 | 548 | if(!l.isEmpty()){ |
| 540 | 549 | sort(l); |
| 541 | 550 | sortList.add(l); |
| ... | ... | @@ -562,7 +571,7 @@ |
| 562 | 571 | |
| 563 | 572 | |
| 564 | 573 | |
| 565 | - private List buildPatientList(Date dueDate, List<Patients> patientses,List listData) { | |
| 574 | + private List buildPatientList(Date dueDate, List<Patients> patientses,List listData,Date min) { | |
| 566 | 575 | if(CollectionUtils.isEmpty(patientses)){ |
| 567 | 576 | return listData; |
| 568 | 577 | } |
| ... | ... | @@ -582,7 +591,11 @@ |
| 582 | 591 | //初诊记录 |
| 583 | 592 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
| 584 | 593 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 585 | - antExChuQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
| 594 | + if(null==min){ | |
| 595 | + antExChuQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
| 596 | + }else{ | |
| 597 | + antExChuQuery.setStart( min); | |
| 598 | + } | |
| 586 | 599 | antExChuQuery.setEnd(new Date(dueDate.getTime() + 86398000)); |
| 587 | 600 | antExChuQuery.setPid(pid); |
| 588 | 601 | |
| ... | ... | @@ -600,7 +613,11 @@ |
| 600 | 613 | AntExQuery antExQuery = new AntExQuery(); |
| 601 | 614 | antExQuery.setYn(YnEnums.YES.getId()); |
| 602 | 615 | antExQuery.setPid(pid); |
| 603 | - antExQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
| 616 | + if(null==min) { | |
| 617 | + antExQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
| 618 | + }else{ | |
| 619 | + antExQuery.setStart(min); | |
| 620 | + } | |
| 604 | 621 | antExQuery.setEnd(new Date(dueDate.getTime() + 86398000)); |
| 605 | 622 | List<AntenatalExaminationModel> list1 = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
| 606 | 623 | if (CollectionUtils.isNotEmpty(list1)) { |