up piutang

This commit is contained in:
ridwan 2025-09-11 15:11:11 +07:00
parent 7f97dad611
commit deb1b00c16
3 changed files with 54 additions and 0 deletions

View File

@ -551,6 +551,23 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/bukti-layanan-penunjang"}, method = {RequestMethod.GET})
public void exportPdfBuktiLayananPenunjang(@RequestParam("norec") String norec,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfBuktiLayananPenunjang(norec, printBy);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/surat-collecting-piutang-ranap"}, method = {RequestMethod.GET})
public void exportPdfSuratCollectingPiutangRanap(@RequestParam("norec") String norec,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfSuratCollectingPiutangRanap(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
// Klinik Utama Bintaro

View File

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

View File

@ -284,6 +284,14 @@ public class ReportingService {
return this.reportingDao.exportPdfBuktiPenerimaanBarangFarmasi(norec, idMenyerahkan, idMengetahui, idMenerima, jabatanMenyerahkan, jabatanMengetahui, jabatanMenerima, printBy);
}
public JasperPrint exportPdfBuktiLayananPenunjang(String norec, String printBy) {
return this.reportingDao.exportPdfBuktiLayananPenunjang(norec, printBy);
}
public JasperPrint exportPdfSuratCollectingPiutangRanap(String norec) {
return this.reportingDao.exportPdfSuratCollectingPiutangRanap(norec);
}
//Klinik Utama Bintaro