Commit 5f18ce6e2d71187e2278d55ea3dd85a526652540
1 parent
8308741552
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 5 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
5f18ce6
| ... | ... | @@ -353,7 +353,11 @@ |
| 353 | 353 | CollectionUtils.sortListByMapKeyWithDate(restList, "craeted"); |
| 354 | 354 | List<String> monthCountSet3 = new ArrayList<>(); |
| 355 | 355 | for (String s : monthCountSet2) { |
| 356 | - monthCountSet3.add(s.split("年")[1].replace("月", "")); | |
| 356 | + String month = s.split("年")[1].replace("月", ""); | |
| 357 | + if(month.length() == 1) { | |
| 358 | + month = "0" + month; | |
| 359 | + } | |
| 360 | + monthCountSet3.add(month); | |
| 357 | 361 | } |
| 358 | 362 | |
| 359 | 363 | return RespBuilder.buildSuccess("restList", restList, "count", bloodSugars.size(), "dayCount", dayCountSet.size(), "month", monthCountSet3, "monthAvgMap", monthAvgMap, "weekAvgMap", weekAvgMap); |