private T addCommonPartOfPeriodicleToMounthStatistics(T report, K periodical) { Long calendarDaysCount = calendarService.getAllDaysCount(periodical.getBeginDate(), periodical.getEndDate()); Integer holidaysCount = calendarService.getHolidaysCounForRegion( periodical.getBeginDate(), periodical.getEndDate(), periodical.getEmployee().getRegion()); Long workingDays = calendarDaysCount - holidaysCount; periodical.setWorkingDays(workingDays); periodical.setCalendarDays(calendarDaysCount); report.getPeriodicalsList().add(periodical); report.setMounthCalendarDays(report.getMounthCalendarDays() + calendarDaysCount); report.setMounthWorkDays(report.getMounthWorkDays() + workingDays); return report; }