private void updatePrimerVaccinationReportsForDates(Set<String> dates) { DateTimeFormatter formatter = DateTimeFormat.forPattern(EbodacConstants.REPORT_DATE_FORMAT); for (String dateString : dates) { LocalDate date = LocalDate.parse(dateString, formatter); generateOrUpdatePrimerVaccinationReport( subjectService.findSubjectsPrimerVaccinatedAtDay(date), date); } }
@Override public void generateDailyReportsFromDate(LocalDate startDate) { LocalDate now = DateUtil.now().toLocalDate(); for (LocalDate date = startDate; date.isBefore(now); date = date.plusDays(1)) { generateOrUpdatePrimerVaccinationReport( subjectService.findSubjectsPrimerVaccinatedAtDay(date), date); generateOrUpdateBoosterVaccinationReport( subjectService.findSubjectsBoosterVaccinatedAtDay(date), date); } }