Update Triase IGD

This commit is contained in:
ridwan 2025-01-21 08:44:12 +07:00
parent 61b3ca20c6
commit 0bbaefcc43
3 changed files with 26 additions and 0 deletions

View File

@ -386,6 +386,14 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/triase-igd/{norec}"}, method = {RequestMethod.GET})
public void exportPdfTriaseIGD(@PathVariable("norec") String norec,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfTriaseIGD(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
// Klinik Utama Bintaro

View File

@ -629,6 +629,20 @@ public class ReportingDao {
return null;
}
public JasperPrint exportPdfTriaseIGD(String norec) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "triaseigd.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("norec", norec);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var17) {
LOG.error("Exception at exportPdfTriaseIGD");
LOG.error(ReportingDao.class, var17);
}
return null;
}
// Klinik Utama Bintaro

View File

@ -175,6 +175,10 @@ public class ReportingService {
return this.reportingDao.exportPdfUsulanPermintaanBdJ(norec);
}
public JasperPrint exportPdfTriaseIGD(String norec) {
return this.reportingDao.exportPdfTriaseIGD(norec);
}
//Klinik Utama Bintaro