update kasir

This commit is contained in:
ridwan 2025-02-18 14:08:21 +07:00
parent 03299f2a3b
commit 600e4573c8
4 changed files with 47 additions and 1 deletions

View File

@ -402,6 +402,19 @@ public class ReportingController {
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
@RequestMapping(value = {"/lap-penerimaan-kasir"}, method = {RequestMethod.GET})
public void exportPdfLapPenerimaanKasir(
@RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir,
@RequestParam("idDokter") Integer idDokter, @RequestParam("idRuangan") Integer idRuangan,
@RequestParam("idKasir") Integer idKasir, @RequestParam("kelompokPasien") Integer kelompokPasien, ModelAndView mv,
HttpServletRequest req, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService
.exportPdfLapPenerimaanKasir(tglAwal, tglAkhir, idDokter, idRuangan, idKasir, kelompokPasien);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}
// Klinik Utama Bintaro

View File

@ -657,6 +657,25 @@ public class ReportingDao {
return null;
}
public JasperPrint exportPdfLapPenerimaanKasir(Date tglAwal, Date tglAkhir, Integer idKasir, Integer idDokter, Integer idRuangan, Integer kelompokPasien) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "lapPenerimaanKasirH.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("tglAwal", tglAwal);
parameters.put("tglAkhir", tglAkhir);
parameters.put("idDokter", idDokter);
parameters.put("idRuangan", idRuangan);
parameters.put("idKasir", idKasir);
parameters.put("kelompokPasien", kelompokPasien);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception e) {
LOG.error("Exception at exportPdfLapPenerimaanKasir");
LOG.error(ReportingDao.class, e);
}
return null;
}
// Klinik Utama Bintaro

View File

@ -184,6 +184,20 @@ public class ReportingService {
}
public JasperPrint exportPdfLapPenerimaanKasir(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, Integer idKasir, Integer kelompokPasien) {
try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date parse = formatter.parse(tglAwal);
Date parse2 = formatter.parse(tglAkhir);
return this.reportingDao.exportPdfLapPenerimaanKasir(parse, parse2, idDokter, idRuangan, idKasir, kelompokPasien);
} catch (ParseException e) {
log.error(e.getMessage());
return null;
}
}
//Klinik Utama Bintaro
public JasperPrint exportPdfBuktiLayananBintaro(String norec, String user) {

View File

@ -6,7 +6,7 @@ spring.datasource.username=postgres
spring.datasource.password=root
spring.mvc.dispatch-trace-request=true
spring.main.banner-mode=off
application.jasper-xml.dir-path=/mnt/files/jasper-xml/
application.jasper-xml.dir-path=D:\\UP\\
application.jasper-xml.dir-bintaro-path=/mnt/files/jasper-xml-bintaro/
application.pdf.dir-sep=/mnt/files/sep/
application.pdf.dir-lis=/mnt/lis/