surat collecting piutang update

This commit is contained in:
ridwan 2025-05-06 16:26:59 +07:00
parent 0db404b8c5
commit 5a90babda1
3 changed files with 27 additions and 0 deletions

View File

@ -451,6 +451,14 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
} }
@RequestMapping(value = {"/surat-collecting-piutang/{noposting}"}, method = {RequestMethod.GET})
public void exportPdfSuratCollectingPiutang(@PathVariable("noposting") String norec,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfSuratCollectingPiutang(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
// Klinik Utama Bintaro // Klinik Utama Bintaro
@RequestMapping(value = {"/bukti-layanan-farmasi-bintaro/{norec}/{user}"}, method = {RequestMethod.GET}) @RequestMapping(value = {"/bukti-layanan-farmasi-bintaro/{norec}/{user}"}, method = {RequestMethod.GET})

View File

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

View File

@ -227,6 +227,10 @@ public class ReportingService {
return this.reportingDao.exportPdfTagihanPiutang(noposting, PrintBy); return this.reportingDao.exportPdfTagihanPiutang(noposting, PrintBy);
} }
public JasperPrint exportPdfSuratCollectingPiutang(String noposting) {
return this.reportingDao.exportPdfSuratCollectingPiutang(noposting);
}
//Klinik Utama Bintaro //Klinik Utama Bintaro