Commit 2359c203d3a74e89bb1f28d2ee3dbe10a02f1aa4
1 parent
314d77697b
Exists in
master
and in
6 other branches
paix
Showing 1 changed file with 1 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
2359c20
... | ... | @@ -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 | } |