update param
This commit is contained in:
parent
8c89bcb757
commit
57f8cd4e5e
@ -807,6 +807,7 @@ public class ReportingController {
|
||||
@RequestParam("tglAwal") String tglAwal,
|
||||
@RequestParam("tglAkhir") String tglAkhir,
|
||||
@RequestParam(value = "idInstalasi", required = false, defaultValue = "") Integer idInstalasi,
|
||||
@RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit,
|
||||
@RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan,
|
||||
@RequestParam(value = "idProduk", required = false, defaultValue = "") Integer idProduk,
|
||||
@RequestParam(value = "idPegawai", required = false, defaultValue = "") Integer idPegawai,
|
||||
@ -817,7 +818,7 @@ public class ReportingController {
|
||||
HttpServletResponse response) throws Exception {
|
||||
|
||||
// Generate report (common for both PDF/Excel)
|
||||
JasperPrint jasperPrint = this.reportingService.exportLpVolumeTindakan(tglAwal, tglAkhir, idInstalasi, idRuangan, idProduk, idPegawai, idKp, printBy);
|
||||
JasperPrint jasperPrint = this.reportingService.exportLpVolumeTindakan(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idProduk, idPegawai, idKp, printBy);
|
||||
|
||||
if ("excel".equalsIgnoreCase(format)) {
|
||||
// Handle Excel export
|
||||
|
||||
@ -1111,7 +1111,7 @@ public class ReportingDao {
|
||||
}
|
||||
|
||||
public JasperPrint exportKunjunganPasien(Date tglAwal, Date tglAkhir, Integer idRuangan, String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate3.getDataSource().getConnection()) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jaspersim2DirPath + "kunjungan_pasien.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
@ -1145,7 +1145,7 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportLpVolumeTindakan(Date tglAwal, Date tglAkhir, Integer idInstalasi, Integer idRuangan, Integer idProduk, Integer idPegawai, Integer idKp, String printBy) {
|
||||
public JasperPrint exportLpVolumeTindakan(Date tglAwal, Date tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idProduk, Integer idPegawai, Integer idKp, String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jaspersim2DirPath + "laporan_volume_tindakan_pasien.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
@ -1153,6 +1153,7 @@ public class ReportingDao {
|
||||
parameters.put("tglAwal", tglAwal);
|
||||
parameters.put("tglAkhir", tglAkhir);
|
||||
parameters.put("idInstalasi", idInstalasi);
|
||||
parameters.put("idUnit", idInstalasi);
|
||||
parameters.put("idRuangan", idRuangan);
|
||||
parameters.put("idProduk", idProduk);
|
||||
parameters.put("idPegawai", idPegawai);
|
||||
|
||||
@ -364,12 +364,12 @@ public class ReportingService {
|
||||
}
|
||||
}
|
||||
|
||||
public JasperPrint exportLpVolumeTindakan(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idRuangan, Integer idProduk, Integer idPegawai, Integer idKp, String printBy) {
|
||||
public JasperPrint exportLpVolumeTindakan(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idProduk, Integer idPegawai, Integer idKp, String printBy) {
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date parse = formatter.parse(tglAwal);
|
||||
Date parse2 = formatter.parse(tglAkhir);
|
||||
return this.reportingDao.exportLpVolumeTindakan(parse, parse2, idInstalasi, idRuangan, idProduk, idPegawai, idKp, printBy);
|
||||
return this.reportingDao.exportLpVolumeTindakan(parse, parse2, idInstalasi, idUnit, idRuangan, idProduk, idPegawai, idKp, printBy);
|
||||
} catch (ParseException e) {
|
||||
log.error(e.getMessage());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user