Commit 634c80ddc61677fa5c0f6942cef0aab0f756ca64
1 parent
7ae41923fb
Exists in
master
and in
6 other branches
高危排名统计
Showing 1 changed file with 6 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
634c80d
| ... | ... | @@ -641,10 +641,13 @@ |
| 641 | 641 | ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); |
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | - Collections.sort(data); | |
| 645 | - if (data.size() >=10) | |
| 644 | + if (CollectionUtils.isNotEmpty(data)) | |
| 646 | 645 | { |
| 647 | - data = data.subList(0,10); | |
| 646 | + Collections.sort(data); | |
| 647 | + if (data.size() >=10) | |
| 648 | + { | |
| 649 | + data = data.subList(0,10); | |
| 650 | + } | |
| 648 | 651 | int all = 0; |
| 649 | 652 | for (PatientRiskSortResult result : data) |
| 650 | 653 | { |
| ... | ... | @@ -655,7 +658,6 @@ |
| 655 | 658 | result.setPercent(StringUtils.getPercent(result.getCount(),all)); |
| 656 | 659 | } |
| 657 | 660 | } |
| 658 | - | |
| 659 | 661 | } |
| 660 | 662 | return new BaseListResponse() |
| 661 | 663 | .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data); |