Update Usulan Fahmi

This commit is contained in:
ridwan 2025-01-20 13:31:12 +07:00
parent a17180f208
commit 61b3ca20c6
3 changed files with 36 additions and 0 deletions

View File

@ -378,6 +378,18 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/usulan-permintaan-barang-dan-jasa/{norec}"}, method = {RequestMethod.GET})
public void exportPdfUsulanPermintaanBdJ(@PathVariable("norec") String norec,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfUsulanPermintaanBdJ(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
// Klinik Utama Bintaro
@RequestMapping(value = {"/bukti-layanan-farmasi-bintaro/{norec}/{user}"}, method = {RequestMethod.GET})
public void exportPdfBuktiLayananBintaro(@PathVariable("norec") String norec,
@PathVariable("user") String user,

View File

@ -615,6 +615,23 @@ public class ReportingDao {
return null;
}
public JasperPrint exportPdfUsulanPermintaanBdJ(String norec) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "Daftar_Monitoring_Usulan_CT.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 exportPdfUsulanPermintaanBdJ");
LOG.error(ReportingDao.class, var17);
}
return null;
}
// Klinik Utama Bintaro
public JasperPrint exportPdfBuktiLayananBintaro(String norec, String user) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperBintaroDirPath + "bukti_layanan_bintaro.jrxml";

View File

@ -171,6 +171,13 @@ public class ReportingService {
return this.reportingDao.exportPdfLabelFarmasiNo(norec);
}
public JasperPrint exportPdfUsulanPermintaanBdJ(String norec) {
return this.reportingDao.exportPdfUsulanPermintaanBdJ(norec);
}
//Klinik Utama Bintaro
public JasperPrint exportPdfBuktiLayananBintaro(String norec, String user) {
return this.reportingDao.exportPdfBuktiLayananBintaro(norec, user);
}