update label farmasi nonlayanan
This commit is contained in:
parent
f322b3880f
commit
be5f5cd3f2
@ -369,4 +369,12 @@ public class ReportingController {
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/label-farmasi-nonlayanan/{norec}"}, method = {RequestMethod.GET})
|
||||
public void exportPdfLabelFarmasiNo(@PathVariable("norec") String norec,
|
||||
ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService.exportPdfLabelFarmasiNo(norec);
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -597,4 +597,18 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLabelFarmasiNo(String norec) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "label_resep_manual.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("norec", norec);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var15) {
|
||||
LOG.error("Exception at exportPdfLabelFarmasiNo");
|
||||
LOG.error(ReportingDao.class, var15);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -167,4 +167,8 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfDKamar();
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfLabelFarmasiNo(String norec) {
|
||||
return this.reportingDao.exportPdfLabelFarmasiNo(norec);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user