update bukti layanan farmasi

This commit is contained in:
Kals1um 2025-01-07 08:17:15 +07:00
parent 19844ed0c7
commit b1e5e933bd
2 changed files with 14 additions and 7 deletions

View File

@ -327,9 +327,16 @@ public class ReportingController {
@RequestMapping(value = {"/bukti-layanan-farmasi/{norec}"}, method = {RequestMethod.GET})
public void exportPdfBuktiLayanan(@PathVariable("norec") String norec,
@RequestParam(value = "jenisbukti", required = false) String jenisbukti,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfBuktiLayanan(norec, jenisbukti);
JasperPrint jasperPrint = this.reportingService.exportPdfBuktiLayanan(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/bukti-nonlayanan-farmasi/{norec}"}, method = {RequestMethod.GET})
public void exportPdfBuktiNoLayanFarmasi(@PathVariable("norec") String norec,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfBuktiNoLayanFarmasi(norec);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}

View File

@ -147,12 +147,12 @@ public class ReportingService {
return this.reportingDao.exportPdfSppb(norec);
}
public JasperPrint exportPdfBuktiLayanan(String norec, String jenisbukti) {
if (Objects.equals(jenisbukti, "NONLAYANAN")){
return this.reportingDao.exportPdfBuktiNoLayanFarmasi(norec);
} else {
public JasperPrint exportPdfBuktiLayanan(String norec) {
return this.reportingDao.exportPdfBuktiLayanan(norec);
}
}
public JasperPrint exportPdfBuktiNoLayanFarmasi(String norec) {
return this.reportingDao.exportPdfBuktiNoLayanFarmasi(norec);
}
}