update smpk, surat pengantar jenazah
This commit is contained in:
parent
5ab97287dc
commit
26d83b12a7
@ -1816,19 +1816,19 @@ public class ReportingController {
|
||||
}
|
||||
}
|
||||
|
||||
// @RequestMapping(value = {"/smpktes/{smpk}"}, method = {RequestMethod.GET})
|
||||
// public void exportPdfSMPKtes(@PathVariable("smpk") Integer smpk,
|
||||
// @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
|
||||
// ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
// JasperPrint jasperPrint = null;
|
||||
// try {
|
||||
// jasperPrint = this.reportingService.exportPdfSMPKtes(smpk, printBy);
|
||||
// response.setContentType("application/pdf");
|
||||
// JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
// } finally {
|
||||
// jasperPrint = null;
|
||||
// }
|
||||
// }
|
||||
@RequestMapping(value = {"/smpktes/{smpk}"}, method = {RequestMethod.GET})
|
||||
public void exportPdfSMPKtes(@PathVariable("smpk") Integer smpk,
|
||||
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
|
||||
ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = null;
|
||||
try {
|
||||
jasperPrint = this.reportingService.exportPdfSMPKtes(smpk, printBy);
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
} finally {
|
||||
jasperPrint = null;
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/rekap-logbook"}, method = {RequestMethod.GET})
|
||||
public void handleRekapLogbook(
|
||||
@ -2776,9 +2776,9 @@ public class ReportingController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/surat-pengiriman-jenazah"}, method = {RequestMethod.GET})
|
||||
@RequestMapping(value = {"/surat-pengiriman-jenazah/{smpk}"}, method = {RequestMethod.GET})
|
||||
public void handleSuratPengirimanJenazah(
|
||||
@RequestParam("smpk") Integer smpk,
|
||||
@PathVariable("smpk") Integer smpk,
|
||||
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
|
||||
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
|
||||
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
|
||||
@ -2792,7 +2792,7 @@ public class ReportingController {
|
||||
if ("excel".equalsIgnoreCase(format)) {
|
||||
// Handle Excel export
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=Laporan_Log_Radiologi.xlsx");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=Surat Pengiriman Jenazah.xlsx");
|
||||
|
||||
JRXlsxExporter exporter = new JRXlsxExporter();
|
||||
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
|
||||
@ -2809,7 +2809,7 @@ public class ReportingController {
|
||||
} else {
|
||||
// Handle PDF preview
|
||||
response.setContentType("application/pdf");
|
||||
response.setHeader("Content-Disposition", "inline; filename=Laporan_Log_Radiologi.pdf");
|
||||
response.setHeader("Content-Disposition", "inline; filename=Surat Pengiriman Jenazah.pdf");
|
||||
|
||||
JRPdfExporter exporter = new JRPdfExporter();
|
||||
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
|
||||
|
||||
@ -1452,20 +1452,20 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||
// try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
|
||||
// String path = jaspersim2DirPath + "SMPK_testing.jrxml";
|
||||
// JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
// Map<String, Object> parameters = new HashMap<>();
|
||||
// parameters.put("smpk", smpk);
|
||||
// parameters.put("printBy", printBy);
|
||||
// return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
// } catch (Exception var15) {
|
||||
// LOG.error("Exception at exportPdfSMPKtes");
|
||||
// LOG.error(ReportingDao.class, var15);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
|
||||
String path = jaspersim2DirPath + "SMPK_testing.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("smpk", smpk);
|
||||
parameters.put("printBy", printBy);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var15) {
|
||||
LOG.error("Exception at exportPdfSMPKtes");
|
||||
LOG.error(ReportingDao.class, var15);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id , String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
@ -1813,7 +1813,7 @@ public class ReportingDao {
|
||||
}
|
||||
|
||||
public JasperPrint exporSuratPengirimanJenazah(Integer smpk, String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "Surat_pengantar_jenazah.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
|
||||
@ -479,10 +479,10 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfSMPK(smpk, printBy);
|
||||
}
|
||||
|
||||
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||
// log.info("Starting exportPdfSMPK with smpk: {}, printBy: {}", smpk, printBy);
|
||||
// return this.reportingDao.exportPdfSMPKtes(smpk, printBy);
|
||||
// }
|
||||
public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||
log.info("Starting exportPdfSMPK with smpk: {}, printBy: {}", smpk, printBy);
|
||||
return this.reportingDao.exportPdfSMPKtes(smpk, printBy);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id, String printBy) {
|
||||
log.info("Starting exportPdfRekapLogbook with tahun: {}, bulan: {}, ksm_id: {}, pegawai_id: {}, printBy: {}", tahun, bulan, ksm_id, pegawai_id, printBy);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user