Commit af952e5c54534fc91eb3541edb84393f598041c7
1 parent
3061d63913
Exists in
master
and in
6 other branches
BUG
Showing 1 changed file with 7 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java
View file @
af952e5
... | ... | @@ -229,8 +229,10 @@ |
229 | 229 | } |
230 | 230 | if (i1 > i2) { |
231 | 231 | return -1; |
232 | - } else { | |
232 | + } else if (i1 < i2) { | |
233 | 233 | return 1; |
234 | + } else { | |
235 | + return 0; | |
234 | 236 | } |
235 | 237 | } |
236 | 238 | }); |
237 | 239 | |
... | ... | @@ -371,8 +373,10 @@ |
371 | 373 | } |
372 | 374 | if (i1 > i2) { |
373 | 375 | return 1; |
374 | - } else { | |
376 | + } else if (i1 < i2) { | |
375 | 377 | return -1; |
378 | + } else { | |
379 | + return 0; | |
376 | 380 | } |
377 | 381 | } |
378 | 382 | }); |
... | ... | @@ -390,7 +394,7 @@ |
390 | 394 | } catch (Exception e) { |
391 | 395 | index++; |
392 | 396 | } |
393 | - if (babyStatisticsManagerWeekAgeGroupQueryModelList.get(index) == null) { | |
397 | + if (CollectionUtils.isEmpty(babyStatisticsManagerWeekAgeGroupQueryModelList) || babyStatisticsManagerWeekAgeGroupQueryModelList.get(index) == null) { | |
394 | 398 | BabyStatisticsManagerWeekAgeGroupQueryModel babyStatisticsManagerWeekAgeGroupQueryModel = new BabyStatisticsManagerWeekAgeGroupQueryModel(); |
395 | 399 | babyStatisticsManagerWeekAgeGroupQueryModel.setCount("0"); |
396 | 400 | babyStatisticsManagerWeekAgeGroupQueryModel.setWeekAge(i.toString()); |