update smpk, surat pengantar jenazah

This commit is contained in:
ridwan 2026-07-21 15:11:42 +07:00
parent 5ab97287dc
commit 26d83b12a7
3 changed files with 36 additions and 36 deletions

View File

@ -1816,19 +1816,19 @@ public class ReportingController {
} }
} }
// @RequestMapping(value = {"/smpktes/{smpk}"}, method = {RequestMethod.GET}) @RequestMapping(value = {"/smpktes/{smpk}"}, method = {RequestMethod.GET})
// public void exportPdfSMPKtes(@PathVariable("smpk") Integer smpk, public void exportPdfSMPKtes(@PathVariable("smpk") Integer smpk,
// @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
// ModelAndView mv, HttpServletResponse response) throws Exception { ModelAndView mv, HttpServletResponse response) throws Exception {
// JasperPrint jasperPrint = null; JasperPrint jasperPrint = null;
// try { try {
// jasperPrint = this.reportingService.exportPdfSMPKtes(smpk, printBy); jasperPrint = this.reportingService.exportPdfSMPKtes(smpk, printBy);
// response.setContentType("application/pdf"); response.setContentType("application/pdf");
// JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
// } finally { } finally {
// jasperPrint = null; jasperPrint = null;
// } }
// } }
@RequestMapping(value = {"/rekap-logbook"}, method = {RequestMethod.GET}) @RequestMapping(value = {"/rekap-logbook"}, method = {RequestMethod.GET})
public void handleRekapLogbook( 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( public void handleSuratPengirimanJenazah(
@RequestParam("smpk") Integer smpk, @PathVariable("smpk") Integer smpk,
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format, @RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode, @RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
@ -2792,7 +2792,7 @@ public class ReportingController {
if ("excel".equalsIgnoreCase(format)) { if ("excel".equalsIgnoreCase(format)) {
// Handle Excel export // Handle Excel export
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); 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(); JRXlsxExporter exporter = new JRXlsxExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
@ -2809,7 +2809,7 @@ public class ReportingController {
} else { } else {
// Handle PDF preview // Handle PDF preview
response.setContentType("application/pdf"); 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(); JRPdfExporter exporter = new JRPdfExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterInput(new SimpleExporterInput(jasperPrint));

View File

@ -1452,20 +1452,20 @@ public class ReportingDao {
return null; return null;
} }
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) { public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
// try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
// String path = jaspersim2DirPath + "SMPK_testing.jrxml"; String path = jaspersim2DirPath + "SMPK_testing.jrxml";
// JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
// Map<String, Object> parameters = new HashMap<>(); Map<String, Object> parameters = new HashMap<>();
// parameters.put("smpk", smpk); parameters.put("smpk", smpk);
// parameters.put("printBy", printBy); parameters.put("printBy", printBy);
// return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
// } catch (Exception var15) { } catch (Exception var15) {
// LOG.error("Exception at exportPdfSMPKtes"); LOG.error("Exception at exportPdfSMPKtes");
// LOG.error(ReportingDao.class, var15); LOG.error(ReportingDao.class, var15);
// } }
// return null; return null;
// } }
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id , String printBy) { public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id , String printBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
@ -1813,7 +1813,7 @@ public class ReportingDao {
} }
public JasperPrint exporSuratPengirimanJenazah(Integer smpk, String printBy) { 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"; String path = jasperDirPath + "Surat_pengantar_jenazah.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>(); Map<String, Object> parameters = new HashMap<>();

View File

@ -479,10 +479,10 @@ public class ReportingService {
return this.reportingDao.exportPdfSMPK(smpk, printBy); return this.reportingDao.exportPdfSMPK(smpk, printBy);
} }
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) { public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
// log.info("Starting exportPdfSMPK with smpk: {}, printBy: {}", smpk, printBy); log.info("Starting exportPdfSMPK with smpk: {}, printBy: {}", smpk, printBy);
// return this.reportingDao.exportPdfSMPKtes(smpk, printBy); return this.reportingDao.exportPdfSMPKtes(smpk, printBy);
// } }
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id, String 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); log.info("Starting exportPdfRekapLogbook with tahun: {}, bulan: {}, ksm_id: {}, pegawai_id: {}, printBy: {}", tahun, bulan, ksm_id, pegawai_id, printBy);