Change entity pie
This commit is contained in:
parent
24e2b1bd00
commit
6304365ec6
@ -61,7 +61,21 @@ public class StatisticController {
|
||||
List<Object[]> timeEntityCommits = commitRepository.getCommitTimeEntityStatistic().stream()
|
||||
.map(stat -> new Object[]{stat.getDate(), stat.getCountCommit()})
|
||||
.collect(Collectors.toList());
|
||||
model.addAttribute("commitTimeEntityData", timeEntityCommits);
|
||||
List<Object[]> allTimeEntityCommits = commitRepository.getCommitTimeStatistic().stream()
|
||||
.map(stat -> new Object[]{stat.getDate(), stat.getCountCommit()})
|
||||
.collect(Collectors.toList());
|
||||
int j = 0;
|
||||
for (int i = 0; i < allTimeEntityCommits.size(); i++) {
|
||||
if ((j < timeEntityCommits.size()) && (allTimeEntityCommits.get(i)[0].equals(timeEntityCommits.get(j)[0]))) {
|
||||
allTimeEntityCommits.get(i)[1] = timeEntityCommits.get(j)[1];
|
||||
j++;
|
||||
} else {
|
||||
if (i > 0) {
|
||||
allTimeEntityCommits.get(i)[1] = allTimeEntityCommits.get(i - 1)[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("commitTimeEntityData", allTimeEntityCommits);
|
||||
return STATISTIC;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user