Update SPK Farmasi

This commit is contained in:
ridwan 2025-04-29 10:09:04 +07:00
parent a77bd46413
commit 49901e3493
3 changed files with 30 additions and 5 deletions

View File

@ -416,11 +416,12 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
//SPK
@RequestMapping(value = {"/SPK/{norec}"}, method = {RequestMethod.GET})
public void exportPdfSKPULP(@PathVariable("norec") String norec,
@RequestParam(value = "jnsbrg", required = false) String jnsbrg,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfSKPULP(norec);
JasperPrint jasperPrint = this.reportingService.exportPdfSKPULP(norec, jnsbrg);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}

View File

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

View File

@ -199,9 +199,18 @@ public class ReportingService {
}
}
public JasperPrint exportPdfSKPULP(String norec){
return this.reportingDao.exportPdfSKPULP(norec);
// //spk_awal
// public JasperPrint exportPdfSKPULP(String norec){
// return this.reportingDao.exportPdfSKPULP(norec);
// }
public JasperPrint exportPdfSKPULP(String norec, String jnsbrg) {
// System.out.print(norec);
// System.out.print(jnsbrg);
if (Objects.equals(jnsbrg, "BMHP/Obat-obatan/Reagen")){
return this.reportingDao.exportPdfSkpUlpUpdateFarmasiDong(norec, jnsbrg);
} else {
return this.reportingDao.exportPdfSKPULP(norec);
}
}
public JasperPrint exportPdfBuktiOrderBarang(String norec, String pegawaiMengetahui, String pegawaiMeminta, String nipMengetahui, String nipMeminta, String jabatanMengetahui, String jabatanMeminta, String user) {