折线图显示规则修改

master
徐杰盟 2024-11-14 15:52:00 +08:00
parent 165a7e1046
commit 6ed589ef3d
1 changed files with 3 additions and 3 deletions

View File

@ -228,14 +228,14 @@ public class SzCaseController extends AbstractCommonFileController{
if (CollectionUtils.isNotEmpty(list)){
Calendar calendar = Calendar.getInstance();
for (int i = 1; i <= 12; i++) {
int month = calendar.get(Calendar.MONTH) + 1;
for (int i = 1; i <= month; i++) {
int finalI = i;
long count = list.stream()
.filter(item ->
{
calendar.setTime(item.getCaseDate());
return calendar.get(Calendar.MONTH) + 1 == finalI;
return month == finalI;
})
.count();
vos.add(new SzCaseStatisticsVo(i,null,Integer.valueOf(String.valueOf(count))));