Update service laporan permintaan makan
Penerapan parameter jenis diet
This commit is contained in:
parent
6be92545f9
commit
8765506b7f
@ -235,9 +235,10 @@ public class ReportingController {
|
||||
@RequestMapping(value = {"/lap-permintaan-makanan"}, method = {RequestMethod.GET})
|
||||
public void exportPermintaanMakanan(@RequestParam("idRu") int idRu,
|
||||
@RequestParam("tglAwal") String tglAwal,
|
||||
@RequestParam("tglAkhir") String tglAkhir, ModelAndView mv,
|
||||
@RequestParam("tglAkhir") String tglAkhir,
|
||||
@RequestParam(value = "jenisDiet", required = false, defaultValue = "") String jenisDiet, ModelAndView mv,
|
||||
HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService.printPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||
JasperPrint jasperPrint = this.reportingService.printPdfPermintaanMakanan(idRu, tglAwal, tglAkhir, jenisDiet);
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir) {
|
||||
public JasperPrint exportPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir, String jenisDiet) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "pl_permintaan_makan.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
@ -296,6 +296,7 @@ public class ReportingDao {
|
||||
parameters.put("idRu", idRu);
|
||||
parameters.put("tglAwal", tglAwal);
|
||||
parameters.put("tglAkhir", tglAkhir);
|
||||
parameters.put("jenisDiet", jenisDiet);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var17) {
|
||||
LOG.error("Exception at exportPdfPermintaanMakanan");
|
||||
|
||||
@ -76,8 +76,8 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfRekapPenjaminByRanap(tglAwal, tglAkhir, idDept, kelompokPasien);
|
||||
}
|
||||
|
||||
public JasperPrint printPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir) {
|
||||
return this.reportingDao.exportPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||
public JasperPrint printPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir, String jenisDiet) {
|
||||
return this.reportingDao.exportPdfPermintaanMakanan(idRu, tglAwal, tglAkhir, jenisDiet);
|
||||
}
|
||||
|
||||
public JasperPrint printPdfRekapMakanan(int idRu, String tglAwal, String tglAkhir) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user