Commit d09a1b4ec3106a65e820d8f55bd929ceb0c77955

Authored by jiangjiazhi
1 parent 702d4671fa

修改新电子病历

Showing 1 changed file with 20 additions and 4 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ d09a1b4
... ... @@ -528,7 +528,16 @@
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,null);
  531 + List<SortIn> tmp =new ArrayList();
  532 + for(Patients patients:patientsList){
  533 + tmp.add(new SortIn(patients));
  534 + }
  535 + sortList(tmp);
  536 + Date min=null;
  537 + if(!tmp.isEmpty()){
  538 + min=tmp.get(tmp.size()-1).getDate();
  539 + }
  540 + List l= buildPatientList(dueDate, patientsList, list1,min);
532 541 if(!l.isEmpty()){
533 542 sort(l);
534 543 sortList.add(l);
535 544  
536 545  
... ... @@ -593,10 +602,13 @@
593 602 antExChuQuery.setYn(YnEnums.YES.getId());
594 603 if(null==min){
595 604 antExChuQuery.setStart(patientses.get(0).getBookbuildingDate());
  605 + antExChuQuery.setEnd(new Date(dueDate.getTime()+86398000));
596 606 }else{
597   - antExChuQuery.setStart( min);
  607 + antExChuQuery.setStart(min);
  608 + if(min.before(patientses.get(0).getBookbuildingDate())){
  609 + antExChuQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000));
  610 + }
598 611 }
599   - antExChuQuery.setEnd(new Date(dueDate.getTime() + 86398000));
600 612 antExChuQuery.setPid(pid);
601 613  
602 614 List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery);
603 615  
604 616  
... ... @@ -615,10 +627,14 @@
615 627 antExQuery.setPid(pid);
616 628 if(null==min) {
617 629 antExQuery.setStart(patientses.get(0).getBookbuildingDate());
  630 + antExQuery.setEnd(new Date(dueDate.getTime() + 86398000));
618 631 }else{
619 632 antExQuery.setStart(min);
  633 + if(min.before(patientses.get(0).getBookbuildingDate())){
  634 + antExQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000));
  635 + }
620 636 }
621   - antExQuery.setEnd(new Date(dueDate.getTime() + 86398000));
  637 +
622 638 List<AntenatalExaminationModel> list1 = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery());
623 639 if (CollectionUtils.isNotEmpty(list1)) {
624 640 for (AntenatalExaminationModel an : list1) {