update kwitansi dan sppb apotik
This commit is contained in:
parent
49901e3493
commit
0df5589a80
@ -320,8 +320,9 @@ public class ReportingController {
|
||||
|
||||
@RequestMapping(value = {"/sppb/{norec}"}, method = {RequestMethod.GET})
|
||||
public void exportSppb(@PathVariable("norec") String norec,
|
||||
@RequestParam(value = "jnsbrg", required = false) String jnsbrg,
|
||||
ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||
JasperPrint jasperPrint = this.reportingService.exportPdfSppb(norec);
|
||||
JasperPrint jasperPrint = this.reportingService.exportPdfSppb(norec, jnsbrg);
|
||||
response.setContentType("application/pdf");
|
||||
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||
}
|
||||
|
||||
@ -550,6 +550,22 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfKwitansSum(String noregistrasi, String nama_pt, String kasir) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "sumkwitotal.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("noregistrasi", noregistrasi);
|
||||
parameters.put("nama_pt", nama_pt);
|
||||
parameters.put("kasir", kasir);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var17) {
|
||||
LOG.error("Exception at exportPdfKwitansSum");
|
||||
LOG.error(ReportingDao.class, var17);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfBuktiLayanan(String norec, String user) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "bukti_layanan.jrxml";
|
||||
@ -736,7 +752,6 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
//SKP
|
||||
public JasperPrint exportPdfSkpUlpUpdateFarmasiDong(String norec, String jnsbrg) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "skp_ulp_update_farmasi_dong.jrxml";
|
||||
@ -752,6 +767,21 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfSPPBApotik(String norec, String jnsbrg) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "sppb_apotik.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("norec", norec);
|
||||
parameters.put("jnsbrg", jnsbrg);
|
||||
return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||
} catch (Exception var17) {
|
||||
LOG.error("Exception at exportPdfSPPBApotik");
|
||||
LOG.error(ReportingDao.class, var17);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Klinik Utama Bintaro
|
||||
|
||||
public JasperPrint exportPdfBuktiLayananBintaro(String norec, String user) {
|
||||
|
||||
@ -134,8 +134,10 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfKwitansNonLiPT(noregistrasi, nama_pt, kasir);
|
||||
} else if (Objects.equals(jeniskwitansi, "KWITOTAL")){
|
||||
return this.reportingDao.exportPdfKwitansTotal(noregistrasi, nama_pt, kasir);
|
||||
} else if (Objects.equals(jeniskwitansi, "KWITOTALAN")){
|
||||
} else if (Objects.equals(jeniskwitansi, "KWITOTALAN_BILLING")){
|
||||
return this.reportingDao.exportPdfKwitansTotalara(noregistrasi, nama_pt, kasir);
|
||||
} else if (Objects.equals(jeniskwitansi, "KWITOTALAN")){
|
||||
return this.reportingDao.exportPdfKwitansSum(noregistrasi, nama_pt, kasir);
|
||||
} else {
|
||||
return this.reportingDao.exportPdfKwitansi(noregistrasi, kasir);
|
||||
}
|
||||
@ -145,8 +147,12 @@ public class ReportingService {
|
||||
return this.reportingDao.exportPdfMonitoringUsulan(norec);
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfSppb(String norec) {
|
||||
return this.reportingDao.exportPdfSppb(norec);
|
||||
public JasperPrint exportPdfSppb(String norec, String jnsbrg) {
|
||||
if (Objects.equals(jnsbrg, "BMHP/Obat-obatan/Reagen")) {
|
||||
return this.reportingDao.exportPdfSPPBApotik(norec, jnsbrg);
|
||||
} else {
|
||||
return this.reportingDao.exportPdfSppb(norec);
|
||||
}
|
||||
}
|
||||
|
||||
public JasperPrint exportPdfBuktiLayanan(String norec, String user) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user