Commit 66773b8b9f1d21d2a55eea786ab3ffb187800afe
1 parent
7633f06dbb
Exists in
master
and in
1 other branch
update code
Showing 1 changed file with 17 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
66773b8
... | ... | @@ -548,7 +548,7 @@ |
548 | 548 | query.setPage(page); |
549 | 549 | query.setLimit(limit); |
550 | 550 | query.setNeed("true"); |
551 | - query.setSort(" CHECK_TIME,ID ASC "); | |
551 | + query.setSort(" CHECK_TIME,ID DESC "); | |
552 | 552 | |
553 | 553 | query.setPhones(phones); |
554 | 554 | query.setVcCardNos(vcCardNos); |
555 | 555 | |
... | ... | @@ -556,8 +556,23 @@ |
556 | 556 | query.setHospitalIds(hosptalIds); |
557 | 557 | |
558 | 558 | Map<String,String> hospitalNames = getHospitalNames(hosptalIds); |
559 | - | |
560 | 559 | lises = lisService.queryLisDataByQuery(query); |
560 | + // 排序 | |
561 | + Collections.sort(lises, new Comparator() { | |
562 | + public int compare(Object a, Object b) { | |
563 | + if (((LisReportModel) a).getCheckTime() == null) { | |
564 | + return -1; | |
565 | + } | |
566 | + if (((LisReportModel) b).getCheckTime() == null) { | |
567 | + return -1; | |
568 | + } | |
569 | + if (((LisReportModel) a).getCheckTime().before(((LisReportModel) a).getCheckTime())) { | |
570 | + return 1; | |
571 | + } | |
572 | + return -1; | |
573 | + } | |
574 | + }); | |
575 | + | |
561 | 576 | if (CollectionUtils.isNotEmpty(lises)) |
562 | 577 | { |
563 | 578 | for(LisReportModel lisReportModel : lises) |