Commit 8f6be691a55a3db849af2f81390372e914baa4a8

Authored by jiangjiazhi
1 parent 7ccca9b626

修改新电子病历

Showing 1 changed file with 17 additions and 13 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 8f6be69
... ... @@ -517,20 +517,9 @@
517 517 }
518 518 }
519 519 if(!listData.isEmpty()){
  520 + sort(listData);
520 521 sortList.add(listData);
521 522 }
522   - Collections.sort(listData, new Comparator<AntData>() {
523   - @Override
524   - public int compare(AntData o1, AntData o2) {
525   - if (o1.getCreated().after(o2.getCreated())) {
526   - return -1;
527   - }
528   - if (o1.getCreated().before(o2.getCreated())) {
529   - return 1;
530   - }
531   - return 0;
532   - }
533   - });
534 523 }
535 524 PatientsQuery patientsQuery1=new PatientsQuery();
536 525 patientsQuery1.setYn(YnEnums.YES.getId());
537 526  
... ... @@ -541,12 +530,14 @@
541 530 List list1=new ArrayList();
542 531 List l= buildPatientList(dueDate, patientsList, list1);
543 532 if(!l.isEmpty()){
  533 + sort(l);
544 534 sortList.add(l);
545 535 }
546 536 }else{
547 537 List list1=new ArrayList();
548 538 List l=buildPatientList(dueDate, list, list1);
549 539 if(!l.isEmpty()){
  540 + sort(l);
550 541 sortList.add(l);
551 542 }
552 543 }
... ... @@ -554,7 +545,20 @@
554 545 antexListResult.setData(sortList);
555 546 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(antexListResult);
556 547 }
557   -
  548 + private void sort(List<AntData> listData){
  549 + Collections.sort(listData, new Comparator<AntData>() {
  550 + @Override
  551 + public int compare(AntData o1, AntData o2) {
  552 + if (o1.getCreated().after(o2.getCreated())) {
  553 + return 1;
  554 + }
  555 + if (o1.getCreated().before(o2.getCreated())) {
  556 + return -1;
  557 + }
  558 + return 0;
  559 + }
  560 + });
  561 + }
558 562  
559 563  
560 564