update fahmi

This commit is contained in:
Kals1um 2024-12-20 08:25:51 +07:00
parent 1ac5776fc4
commit a555dec861
4 changed files with 64 additions and 8 deletions

View File

@ -299,10 +299,10 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/kwitansi/{noSbm}"}, method = {RequestMethod.GET})
public void exportKwitansi(@PathVariable("noSbm") String noSbm,
@RequestMapping(value = {"/kwitansi/{noregistrasi}"}, method = {RequestMethod.GET})
public void exportKwitansi(@PathVariable("noregistrasi") String noregistrasi,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfKwitansi(noSbm);
JasperPrint jasperPrint = this.reportingService.exportPdfKwitansi(noregistrasi);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@ -322,4 +322,22 @@ public class ReportingController {
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/kwitansi_nonLayanan/{noregistrasi}"}, method = {RequestMethod.GET})
public void exportPdfKwitansiNonL(@PathVariable("noregistrasi") String noregistrasi,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfKwitansiNonL(noregistrasi);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/kwidipo/{noregistrasi}"}, method = {RequestMethod.GET})
public void exportPdfKwidipo(@PathVariable("noregistrasi") String noregistrasi,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfKwidipo(noregistrasi);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
}

View File

@ -394,12 +394,12 @@ public class ReportingDao {
return null;
}
public JasperPrint exportPdfKwitansi(String noSbm) {
public JasperPrint exportPdfKwitansi(String noregistrasi) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "kwitansi.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("nosbm", noSbm);
parameters.put("noregistrasi", noregistrasi);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var17) {
LOG.error("Exception at exportPdfKwitansi");
@ -435,4 +435,33 @@ public class ReportingDao {
}
return null;
}
public JasperPrint exportPdfKwitansiNonL(String noregistrasi) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "kwitansi_nonLayanan.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("noregistrasi", noregistrasi);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var17) {
LOG.error("Exception at exportPdfKwitansiNonL");
LOG.error(ReportingDao.class, var17);
}
return null;
}
public JasperPrint exportPdfKwidipo(String noregistrasi) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "kwidipo.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("noregistrasi", noregistrasi);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var17) {
LOG.error("Exception at exportPdfKwidipo");
LOG.error(ReportingDao.class, var17);
}
return null;
}
}

View File

@ -120,8 +120,8 @@ public class ReportingService {
}
}
public JasperPrint exportPdfKwitansi(String noSbm) {
return this.reportingDao.exportPdfKwitansi(noSbm);
public JasperPrint exportPdfKwitansi(String noregistrasi) {
return this.reportingDao.exportPdfKwitansi(noregistrasi);
}
public JasperPrint exportPdfMonitoringUsulan(String norec) {
@ -131,4 +131,13 @@ public class ReportingService {
public JasperPrint exportPdfSppb(String norec) {
return this.reportingDao.exportPdfSppb(norec);
}
public JasperPrint exportPdfKwitansiNonL(String noregistrasi) {
return this.reportingDao.exportPdfKwitansiNonL(noregistrasi);
}
public JasperPrint exportPdfKwidipo(String noregistrasi) {
return this.reportingDao.exportPdfKwidipo(noregistrasi);
}
}

View File

@ -6,6 +6,6 @@ spring.datasource.username=postgres
spring.datasource.password=root
spring.mvc.dispatch-trace-request=true
spring.main.banner-mode=off
application.jasper-xml.dir-path=/mnt/files/jasper-xml/
application.jasper-xml.dir-path=D:\\UP\\
application.pdf.dir-sep=/mnt/files/sep/
application.pdf.dir-lis=/mnt/lis/