up laporan pasien pulang
This commit is contained in:
parent
b240990d62
commit
49ac34d4b7
@ -468,6 +468,19 @@ public class ReportingController {
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/lap-pasien-pulang"}, method = {RequestMethod.GET})
|
||||
public void exportPdfLapCetakPulang(
|
||||
@RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir,
|
||||
@RequestParam("IdDepartement") Integer IdDepartement, @RequestParam(value = "IdRuangan", required = false, defaultValue = "") Integer IdRuangan,
|
||||
@RequestParam(value = "IdRekanan", required = false, defaultValue = "") Integer IdRekanan, ModelAndView mv,
|
||||
HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService
|
||||
.exportPdfLapCetakPulang(tglAwal, tglAkhir, IdDepartement, IdRuangan, IdRekanan);
|
||||
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
// Klinik Utama Bintaro
|
||||
|
||||
@RequestMapping(value = {"/bukti-layanan-farmasi-bintaro/{norec}/{user}"}, method = {RequestMethod.GET})
|
||||
|
||||
@ -828,6 +828,24 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLapCetakPulang(Date tglAwal, Date tglAkhir, Integer IdDepartement, Integer IdRuangan , Integer IdRekanan) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "laporan_cetak_pulang_dong.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("tglAwal", tglAwal);
|
||||
parameters.put("tglAkhir", tglAkhir);
|
||||
parameters.put("IdDepartement", IdDepartement);
|
||||
parameters.put("IdRuangan", IdRuangan);
|
||||
parameters.put("IdRekanan", IdRekanan);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Exception at exportPdfLapCetakPulang");
|
||||
LOG.error(ReportingDao.class, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Klinik Utama Bintaro
|
||||
|
||||
public JasperPrint exportPdfBuktiLayananBintaro(String norec, String user) {
|
||||
|
||||
@ -235,6 +235,19 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfKwitansiCollectingPiutang(noposting, PrintBy);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLapCetakPulang(String tglAwal, String tglAkhir, Integer IdDepartement, Integer IdRuangan, Integer IdRekanan) {
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date parse = formatter.parse(tglAwal);
|
||||
Date parse2 = formatter.parse(tglAkhir);
|
||||
return this.reportingDao.exportPdfLapCetakPulang(parse, parse2, IdDepartement, IdRuangan, IdRekanan);
|
||||
} catch (ParseException e) {
|
||||
log.error(e.getMessage());
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Klinik Utama Bintaro
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user