Update service reporting
Akomodasi cetakan label paket
This commit is contained in:
parent
300c465eec
commit
9528f93e52
@ -260,6 +260,14 @@ public class ReportingController {
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/label-paket/{noregistrasi}"}, method = {RequestMethod.GET})
|
||||
public void exportLabelPaket(@PathVariable("noregistrasi") String noregistrasi,
|
||||
ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService.exportPdfLabelPaket(noregistrasi);
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/lap-resume-medis/{norec}"}, method = {RequestMethod.GET})
|
||||
public void printLapResumeMedis(@PathVariable("norec") String norec,
|
||||
ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
|
||||
@ -334,6 +334,20 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLabelPaket(String noregistrasi) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "label_paket.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("noregistrasi", noregistrasi);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var15) {
|
||||
LOG.error("Exception at exportPdfLabelPaket");
|
||||
LOG.error(ReportingDao.class, var15);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfResumeMedis(String norec) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "ResumeMedis.jrxml";
|
||||
|
||||
@ -88,6 +88,10 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfGelangPasien(noregistrasi);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLabelPaket(String noregistrasi) {
|
||||
return this.reportingDao.exportPdfLabelPaket(noregistrasi);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfResumeMedis(String norec) {
|
||||
return this.reportingDao.exportPdfResumeMedis(norec);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user