update dkamar
This commit is contained in:
parent
eb35ebeec8
commit
f322b3880f
@ -362,4 +362,11 @@ public class ReportingController {
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/dashboard-kamar"}, method = {RequestMethod.GET})
|
||||
public void exportPdfDKamar(ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService.exportPdfDKamar();
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -584,4 +584,17 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfDKamar() {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "dkamar.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Exception at exportPdfDKamar");
|
||||
LOG.error(ReportingDao.class, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -163,4 +163,8 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfLaporanTindakan(ruanganid, instalasiid, kelasid, unitid, produkid, statusprodukid);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfDKamar() {
|
||||
return this.reportingDao.exportPdfDKamar();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user