Commit 57490f0b2ddf37e43146871c7ece57eb8723f158
1 parent
13cc61509a
Exists in
master
and in
1 other branch
修改新电子病历
Showing 1 changed file with 22 additions and 24 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
57490f0
... | ... | @@ -465,12 +465,6 @@ |
465 | 465 | postReviewQuery.setEnd(patientses.get(0).getBookbuildingDate()); |
466 | 466 | } |
467 | 467 | postReviewQuery.setPid(pid); |
468 | -// Object obj = map.get(listDate.get(i).getId()); | |
469 | - /* if (obj instanceof MaternalDeliverModel) { | |
470 | - listData.add(new AntData((MaternalDeliverModel) obj, patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
471 | - } else if (obj instanceof StopPregModel) { | |
472 | - listData.add(new AntData(stopPregs.get(0), patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); | |
473 | - }*/ | |
474 | 468 | |
475 | 469 | //产后复查记录 |
476 | 470 | List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); |
... | ... | @@ -489,7 +483,7 @@ |
489 | 483 | } |
490 | 484 | |
491 | 485 | if(CollectionUtils.isNotEmpty(patientses)){ |
492 | - buildPatientList(dueDate,patientses,listData,null); | |
486 | + buildPatientList(dueDate,patientses,listData,null,false); | |
493 | 487 | |
494 | 488 | PostReviewQuery postReviewQuery = new PostReviewQuery(); |
495 | 489 | if (list.size() - 1 > i) { |
... | ... | @@ -537,7 +531,7 @@ |
537 | 531 | if(!tmp.isEmpty()){ |
538 | 532 | min=tmp.get(tmp.size()-1).getDate(); |
539 | 533 | } |
540 | - List l= buildPatientList(dueDate, patientsList, list1,min); | |
534 | + List l= buildPatientList(dueDate, patientsList, list1,min,false); | |
541 | 535 | if(!l.isEmpty()){ |
542 | 536 | sort(l); |
543 | 537 | sortList.add(l); |
... | ... | @@ -553,7 +547,7 @@ |
553 | 547 | if(!tmp.isEmpty()){ |
554 | 548 | min=tmp.get(tmp.size()-1).getDate(); |
555 | 549 | } |
556 | - List l=buildPatientList(dueDate, list, list1,min); | |
550 | + List l=buildPatientList(dueDate, list, list1,min,true); | |
557 | 551 | if(!l.isEmpty()){ |
558 | 552 | sort(l); |
559 | 553 | sortList.add(l); |
... | ... | @@ -580,7 +574,7 @@ |
580 | 574 | |
581 | 575 | |
582 | 576 | |
583 | - private List buildPatientList(Date dueDate, List<Patients> patientses,List listData,Date min) { | |
577 | + private List buildPatientList(Date dueDate, List<Patients> patientses,List listData,Date min,boolean f) { | |
584 | 578 | if(CollectionUtils.isEmpty(patientses)){ |
585 | 579 | return listData; |
586 | 580 | } |
... | ... | @@ -600,13 +594,15 @@ |
600 | 594 | //初诊记录 |
601 | 595 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
602 | 596 | antExChuQuery.setYn(YnEnums.YES.getId()); |
603 | - if(null==min){ | |
604 | - antExChuQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
605 | - antExChuQuery.setEnd(new Date(dueDate.getTime()+86398000)); | |
606 | - }else{ | |
607 | - antExChuQuery.setStart(min); | |
608 | - if(min.before(patientses.get(0).getBookbuildingDate())){ | |
609 | - antExChuQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000)); | |
597 | + if(!f){ | |
598 | + if(null==min){ | |
599 | + antExChuQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
600 | + antExChuQuery.setEnd(new Date(dueDate.getTime()+86398000)); | |
601 | + }else{ | |
602 | + antExChuQuery.setStart(min); | |
603 | + if(min.before(patientses.get(0).getBookbuildingDate())&&min.before(dueDate)){ | |
604 | + antExChuQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000)); | |
605 | + } | |
610 | 606 | } |
611 | 607 | } |
612 | 608 | antExChuQuery.setPid(pid); |
... | ... | @@ -625,13 +621,15 @@ |
625 | 621 | AntExQuery antExQuery = new AntExQuery(); |
626 | 622 | antExQuery.setYn(YnEnums.YES.getId()); |
627 | 623 | antExQuery.setPid(pid); |
628 | - if(null==min) { | |
629 | - antExQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
630 | - antExQuery.setEnd(new Date(dueDate.getTime() + 86398000)); | |
631 | - }else{ | |
632 | - antExQuery.setStart(min); | |
633 | - if(min.before(patientses.get(0).getBookbuildingDate())){ | |
634 | - antExQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000)); | |
624 | + if(!f) { | |
625 | + if (null == min) { | |
626 | + antExQuery.setStart(patientses.get(0).getBookbuildingDate()); | |
627 | + antExQuery.setEnd(new Date(dueDate.getTime() + 86398000)); | |
628 | + } else { | |
629 | + antExQuery.setStart(min); | |
630 | + if (min.before(patientses.get(0).getBookbuildingDate())) { | |
631 | + antExQuery.setEnd(new Date(patientses.get(0).getBookbuildingDate().getTime() + 86398000)); | |
632 | + } | |
635 | 633 | } |
636 | 634 | } |
637 | 635 |