Commit 0c7e64915d3ff4d3093cfa2378a619b70b4779fe
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TempFacade.java
View file @
0c7e649
| ... | ... | @@ -288,7 +288,8 @@ |
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - com.lyms.platform.operate.web.utils.CollectionUtils.reverseList(restList); | |
| 291 | +// com.lyms.platform.operate.web.utils.CollectionUtils.reverseList(restList); | |
| 292 | + com.lyms.platform.operate.web.utils.CollectionUtils.sortListByMapKeyWithDate(restList, "date"); | |
| 292 | 293 | return RespBuilder.buildSuccess(restList); |
| 293 | 294 | } |
| 294 | 295 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
0c7e649
| ... | ... | @@ -257,7 +257,6 @@ |
| 257 | 257 | List<Map<String, Object>> weekAvgMap = new ArrayList<>(); |
| 258 | 258 | Map<Integer, Map<String, Object>> weekAvgMapTemp = new LinkedHashMap<>(); |
| 259 | 259 | Date weekStart = DateUtil.getYmdDate(DateUtil.addDay(DateUtil.addWeek(date, -1), 1)); |
| 260 | - System.out.println(weekStart.toLocaleString()); | |
| 261 | 260 | List<BloodSugar> bloodSugarsWeek = mongoTemplate.find(Query.query(Criteria.where("pid").is(parentId).and("created").gte(weekStart)).with(new Sort(Sort.Direction.DESC, "created")), BloodSugar.class); |
| 262 | 261 | for (BloodSugar bloodSugar : bloodSugarsWeek) { |
| 263 | 262 | if(weekAvgMapTemp.containsKey(bloodSugar.getBloodSugarType())) { |
| ... | ... | @@ -330,6 +329,7 @@ |
| 330 | 329 | monthAvgMap.add(monthMap); |
| 331 | 330 | } |
| 332 | 331 | |
| 332 | + CollectionUtils.sortListByMapKeyWithDate(restList, "craeted"); | |
| 333 | 333 | |
| 334 | 334 | return RespBuilder.buildSuccess("restList", restList, "count", bloodSugars.size(), "dayCount", dayCountSet.size(), "month", monthCountSet, "monthAvgMap", monthAvgMap, "weekAvgMap", weekAvgMap); |
| 335 | 335 | } |