Merge branch 'salman_hotfix'

This commit is contained in:
Salman Manoe 2023-08-31 09:00:26 +07:00
commit dc3adacf50
3 changed files with 7 additions and 7 deletions

View File

@ -260,10 +260,10 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
} }
@RequestMapping(value = {"/label-paket/{noregistrasi}"}, method = {RequestMethod.GET}) @RequestMapping(value = {"/label-paket/{norecvoucher}"}, method = {RequestMethod.GET})
public void exportLabelPaket(@PathVariable("noregistrasi") String noregistrasi, public void exportLabelPaket(@PathVariable("norecvoucher") String norecVoucher,
ModelAndView mv, HttpServletResponse response) throws Exception { ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfLabelPaket(noregistrasi); JasperPrint jasperPrint = this.reportingService.exportPdfLabelPaket(norecVoucher);
response.setContentType("application/pdf"); response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
} }

View File

@ -334,12 +334,12 @@ public class ReportingDao {
return null; return null;
} }
public JasperPrint exportPdfLabelPaket(String noregistrasi) { public JasperPrint exportPdfLabelPaket(String norecVoucher) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "label_paket.jrxml"; String path = jasperDirPath + "label_paket.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>(); Map<String, Object> parameters = new HashMap<>();
parameters.put("noregistrasi", noregistrasi); parameters.put("norecvoucher", norecVoucher);
return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var15) { } catch (Exception var15) {
LOG.error("Exception at exportPdfLabelPaket"); LOG.error("Exception at exportPdfLabelPaket");

View File

@ -88,8 +88,8 @@ public class ReportingService {
return this.reportingDao.exportPdfGelangPasien(noregistrasi); return this.reportingDao.exportPdfGelangPasien(noregistrasi);
} }
public JasperPrint exportPdfLabelPaket(String noregistrasi) { public JasperPrint exportPdfLabelPaket(String norecVoucher) {
return this.reportingDao.exportPdfLabelPaket(noregistrasi); return this.reportingDao.exportPdfLabelPaket(norecVoucher);
} }
public JasperPrint exportPdfResumeMedis(String norec) { public JasperPrint exportPdfResumeMedis(String norec) {