Commit 9b8ecf1de57f8f677c136f55591900814845678b
1 parent
134f597351
Exists in
master
and in
6 other branches
123
Showing 2 changed files with 13 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
9b8ecf1
| ... | ... | @@ -159,6 +159,7 @@ |
| 159 | 159 | List<String> xAxis = new ArrayList<>(); |
| 160 | 160 | if(bloodPressure != null) { |
| 161 | 161 | List<String> betweenDay = DateUtil.getBetweenDay(7); |
| 162 | + CollectionUtils.reverse(betweenDay); | |
| 162 | 163 | Map<String, Map<String, Object>> infos = bloodPressure.getInfos(); |
| 163 | 164 | for (String date : betweenDay) { |
| 164 | 165 | Map<String, Object> temp = new HashMap<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/CollectionUtils.java
View file @
9b8ecf1
| ... | ... | @@ -220,5 +220,17 @@ |
| 220 | 220 | restList.addAll(tempList); |
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | + | |
| 224 | + public static <T> void reverse(List<T> restList) { | |
| 225 | + if(CollectionUtils.isNotEmpty(restList)) { | |
| 226 | + List<T> tempList = new ArrayList<>(); | |
| 227 | + int size = restList.size(); | |
| 228 | + for (int i = size - 1; i >= 0 ; i--) { | |
| 229 | + tempList.add(restList.get(i)); | |
| 230 | + } | |
| 231 | + restList.clear(); | |
| 232 | + restList.addAll(tempList); | |
| 233 | + } | |
| 234 | + } | |
| 223 | 235 | } |