diff --git a/src/main/java/com/reporting/dao/ReportingDao.java b/src/main/java/com/reporting/dao/ReportingDao.java index b2e8a88..1da71b1 100644 --- a/src/main/java/com/reporting/dao/ReportingDao.java +++ b/src/main/java/com/reporting/dao/ReportingDao.java @@ -1110,6 +1110,24 @@ public class ReportingDao { return null; } + public JasperPrint exportKunjunganPasien(Date tglAwal, Date tglAkhir, Integer idRuangan, String printBy) { + try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { + String path = jaspersim2DirPath + "visit.jrxml"; + JasperReport jasperReport = JasperCompileManager.compileReport(path); + Map parameters = new HashMap<>(); + parameters.put("tglAwal", tglAwal); + parameters.put("tglAkhir", tglAkhir); + parameters.put("idRuangan", idRuangan); + parameters.put("printBy", printBy); + return JasperFillManager.fillReport(jasperReport, parameters, conn); + } catch (Exception var15) { + LOG.error("Exception at exportVisit"); + LOG.error(ReportingDao.class, var15); + } + return null; + } + +/* public JasperPrint exportKunjunganPasien(Date tglAwal, Date tglAkhir, Integer idRuangan, String printBy) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { String path = jaspersim2DirPath + "kunjungan_pasien.jrxml"; @@ -1126,6 +1144,7 @@ public class ReportingDao { } return null; } +*/ public JasperPrint exportLpPendaftaranOnline(Date tglAwal, Date tglAkhir, Integer idUnit, Integer idRuangan, String printBy) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {