use of py.org.fundacionparaguaya.pspserver.surveys.dtos.SnapshotTaken in project FP-PSP-SERVER by FundacionParaguaya.
the class SnapshotServiceImpl method countSnapshotTaken.
@Override
public SnapshotTaken countSnapshotTaken(FamilyFilterDTO filter) {
List<SnapshotEconomicEntity> snapshots = getSnapshotsLess2MonthsByFamilies(filter);
Map<String, Long> result = snapshots.stream().collect(Collectors.groupingBy(item -> item.getCreatedAt().toLocalDate().with(TemporalAdjusters.firstDayOfMonth()).format(DateTimeFormatter.ISO_DATE), Collectors.counting()));
SnapshotTaken t = new SnapshotTaken();
t.setByMonth(result);
return t;
}
use of py.org.fundacionparaguaya.pspserver.surveys.dtos.SnapshotTaken in project FP-PSP-SERVER by FundacionParaguaya.
the class ApplicationControllerTest method getDashboardTest.
private DashboardDTO getDashboardTest() {
DashboardDTO dto = new DashboardDTO();
dto.setNumberOfFamilies(new Long(1));
dto.setActivityFeed(new ArrayList<>());
dto.setSnapshotIndicators(new SnapshotIndicators());
dto.setSnapshotTaken(new SnapshotTaken());
dto.setTopOfIndicators(new ArrayList<>());
return dto;
}
Aggregations