From ad0130b9e9b432c269afdc8b40fc10a488e24ae7 Mon Sep 17 00:00:00 2001 From: salmanoe Date: Fri, 12 Aug 2022 16:31:43 +0700 Subject: [PATCH] Prepare cetakan resep --- .../controller/ReportingController.java | 44 ++ .../src/main/webapp/WEB-INF/jasper-views.xml | 16 + .../WEB-INF/templates/jrxml/resep.jrxml | 381 ++++++++++++++++++ .../templates/jrxml/resep_racikan.jrxml | 82 ++++ 4 files changed, 523 insertions(+) create mode 100644 jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep.jrxml create mode 100644 jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep_racikan.jrxml diff --git a/jasamedika-reporting/src/main/java/com/jasamedika/medifirst2000/controller/ReportingController.java b/jasamedika-reporting/src/main/java/com/jasamedika/medifirst2000/controller/ReportingController.java index 72732f55..03ecbf9e 100644 --- a/jasamedika-reporting/src/main/java/com/jasamedika/medifirst2000/controller/ReportingController.java +++ b/jasamedika-reporting/src/main/java/com/jasamedika/medifirst2000/controller/ReportingController.java @@ -7499,6 +7499,50 @@ public class ReportingController extends LocaleController return m; } + + @RequestMapping("/resep") + public ModelAndView generateResep(ModelAndView m, + @RequestParam(value = "format", required = false) String format, + @RequestParam(value = "startDate", required = true) String startDate, + @RequestParam(value = "endDate", required = true) String endDate) { + + DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + + Map kepalaTtdRekap = pegawaiService + .findKepalaPegawai("Kepala Instalasi Loundry dan Sterilisasi Sentral"); + Map grandTarifQty = laundryService.findGrandTarifQtyCuciLinen(startDate, endDate); + List> dsRekapCuciLinen = laundryService.findDepartemenTarifQtyCuciLinen(startDate, endDate); + List> sdsRekapCuciLinen = laundryService.findRuanganTarifQtyCuciLinen(startDate, endDate); + + try { + Date sd = df.parse(startDate); + Date ed = df.parse(endDate); + + m.addObject("startDate", sd); + m.addObject("endDate", ed); + + } catch (ParseException e) { + e.printStackTrace(); + } + + m.addObject("dsRekapLayananLaundry", dsRekapCuciLinen); + m.addObject("sdsRekapLayananLaundry", sdsRekapCuciLinen); + m.addObject("grandSubTotal", grandTarifQty.get("grandSubTotal")); + m.addObject("grandTotal", grandTarifQty.get("grandTotal")); + m.addObject("grandBerat", grandTarifQty.get("grandBerat")); + m.addObject("rataanBeratCucian", grandTarifQty.get("rataanBeratCucian")); + m.addObject("rataanLembarCucian", grandTarifQty.get("rataanLembarCucian")); + m.addObject("format", "pdf"); + if (CommonUtil.isNotNullOrEmpty(kepalaTtdRekap)) { + m.addObject("nipPegawai", kepalaTtdRekap.get("nipPegawai")); + m.addObject("namaPegawai", kepalaTtdRekap.get("namaPegawai")); + } + if (format != null && !format.isEmpty()) { + m.addObject("format", format); + } + + return m; + } @RequestMapping("/suratPelimpahanTugas") public ModelAndView generateSuratPelimpahanTugas(ModelAndView m, diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/jasper-views.xml b/jasamedika-reporting/src/main/webapp/WEB-INF/jasper-views.xml index 8a82de69..f8200c8b 100644 --- a/jasamedika-reporting/src/main/webapp/WEB-INF/jasper-views.xml +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/jasper-views.xml @@ -211,5 +211,21 @@ sdsRekapCuciLinen + + + + + + + + + sdsResep + diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep.jrxml new file mode 100644 index 00000000..5300cf06 --- /dev/null +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep.jrxml @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="90" splitType="Stretch"> + <image> + <reportElement x="-4" y="-20" width="388" height="110" uuid="0d6d891e-46bc-4742-b8dd-ef5167539064"/> + <imageExpression><![CDATA["src/main/webapp/WEB-INF/images/kop.png"]]></imageExpression> + </image> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep_racikan.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep_racikan.jrxml new file mode 100644 index 00000000..db09d9d8 --- /dev/null +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/resep_racikan.jrxml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +