List<ReportTemplate>templates = reportTemplateDAO.findByProperty("reportType", "year");
Date timeStamp = new Date();
for(ReportTemplate template:templates)
{
String code = getReport(template, date);//实例化报表
YearReportId ID = new YearReportId(template.getId(), new Timestamp(date.getTime()));
YearReport yearReport = new YearReport(ID);
yearReport.setCode(code);
yearReport.setUpdateTime(new Timestamp(timeStamp.getTime()));
yearReportDAO.merge(yearReport);
}