Update Lap Tindakan
This commit is contained in:
parent
ecd695d3f3
commit
35875d5e08
@ -349,4 +349,17 @@ public class ReportingController {
|
|||||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = {"/lap-tindakan"}, method = {RequestMethod.GET})
|
||||||
|
public void exportPdfLaporanTindakan(
|
||||||
|
@RequestParam("ruanganid") Integer ruanganid, @RequestParam("instalasiid") Integer instalasiid,
|
||||||
|
@RequestParam("unitid") Integer unitid, @RequestParam("produkid") Integer produkid,
|
||||||
|
@RequestParam("statusprodukid") Integer statusprodukid, ModelAndView mv,
|
||||||
|
HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = this.reportingService
|
||||||
|
.printPdfLaporanTindakan(ruanganid, instalasiid, unitid, produkid, statusprodukid);
|
||||||
|
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -564,4 +564,23 @@ public class ReportingDao {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLaporanTindakan(
|
||||||
|
Integer ruanganid, Integer instalasiid, Integer unitid, Integer produkid, Integer statusprodukid) {
|
||||||
|
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||||
|
String path = jasperDirPath + "laporan_tindakan.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap<>();
|
||||||
|
parameters.put("ruanganid", ruanganid );
|
||||||
|
parameters.put("instalasiid", instalasiid);
|
||||||
|
parameters.put("unitid", unitid);
|
||||||
|
parameters.put("produkid", produkid);
|
||||||
|
parameters.put("statusprodukid", statusprodukid);
|
||||||
|
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var19) {
|
||||||
|
LOG.error("Exception at exportPdfLaporanTindakan");
|
||||||
|
LOG.error(ReportingDao.class, var19);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,4 +159,8 @@ public class ReportingService {
|
|||||||
return this.reportingDao.exportPdfLabelFarmasi(norec);
|
return this.reportingDao.exportPdfLabelFarmasi(norec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfLaporanTindakan(Integer ruanganid, Integer instalasiid, Integer unitid, Integer produkid, Integer statusprodukid) {
|
||||||
|
return this.reportingDao.exportPdfLaporanTindakan(ruanganid, instalasiid, produkid, unitid, statusprodukid);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user