Commit af449d669784617c942ccaacd3bb9b305952a252
1 parent
ee76f94b64
Exists in
master
and in
1 other branch
体重管理
Showing 1 changed file with 7 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
af449d6
... | ... | @@ -518,6 +518,13 @@ |
518 | 518 | |
519 | 519 | PageResult pageResult = findMongoPage(PatientWeight.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); |
520 | 520 | List<PatientWeight> patientWeights = (List<PatientWeight>) pageResult.getGrid(); |
521 | + Collections.sort(patientWeights, new Comparator<PatientWeight>() { | |
522 | + @Override | |
523 | + public int compare(PatientWeight o1, PatientWeight o2) { | |
524 | + //升序 | |
525 | + return o1.getModified().compareTo(o2.getModified()); | |
526 | + } | |
527 | + }); | |
521 | 528 | List<Map<String, Object>> restMap = new ArrayList<>(); |
522 | 529 | if(CollectionUtils.isNotEmpty(patientWeights)) { |
523 | 530 | for (PatientWeight patientWeight : patientWeights) { |