update config
This commit is contained in:
parent
659f2d8979
commit
7887366328
@ -83,27 +83,27 @@ public class DbConfig {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "fourDataSource")
|
// @Bean(name = "fourDataSource")
|
||||||
public DataSource dataSource4() {
|
// public DataSource dataSource4() {
|
||||||
try {
|
// try {
|
||||||
HikariConfig config = new HikariConfig();
|
// HikariConfig config = new HikariConfig();
|
||||||
config.setPoolName("PoolReporting3");
|
// config.setPoolName("PoolReporting3");
|
||||||
config.setDriverClassName("org.postgresql.Driver");
|
// config.setDriverClassName("org.postgresql.Driver");
|
||||||
config.setConnectionTestQuery("SELECT 1");
|
// config.setConnectionTestQuery("SELECT 1");
|
||||||
config.setJdbcUrl("jdbc:postgresql://192.168.12.3:5432/rsab_hk_25_01_14");
|
// config.setJdbcUrl("jdbc:postgresql://192.168.12.3:5432/rsab_hk_25_01_14");
|
||||||
config.setUsername("postgres");
|
// config.setUsername("postgres");
|
||||||
config.setPassword("postgres");
|
// config.setPassword("postgres");
|
||||||
config.setMinimumIdle(5);
|
// config.setMinimumIdle(5);
|
||||||
config.setIdleTimeout(300000L);
|
// config.setIdleTimeout(300000L);
|
||||||
config.setMaximumPoolSize(20);
|
// config.setMaximumPoolSize(20);
|
||||||
config.setConnectionTimeout(100000L);
|
// config.setConnectionTimeout(100000L);
|
||||||
config.setAutoCommit(ConnDb1.autoCommit);
|
// config.setAutoCommit(ConnDb1.autoCommit);
|
||||||
return new HikariDataSource(config);
|
// return new HikariDataSource(config);
|
||||||
} catch (Exception var3) {
|
// } catch (Exception var3) {
|
||||||
System.out.println(var3.getMessage());
|
// System.out.println(var3.getMessage());
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Bean(name = {"jdbcTemplate"})
|
@Bean(name = {"jdbcTemplate"})
|
||||||
public JdbcTemplate jdbcTemplate1(@Qualifier("db") DataSource ds) {
|
public JdbcTemplate jdbcTemplate1(@Qualifier("db") DataSource ds) {
|
||||||
@ -120,8 +120,8 @@ public class DbConfig {
|
|||||||
return new JdbcTemplate(ds);
|
return new JdbcTemplate(ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "fourJdbcTemplate")
|
// @Bean(name = "fourJdbcTemplate")
|
||||||
public JdbcTemplate jdbcTemplate4(@Qualifier("fourDataSource") DataSource ds) {
|
// public JdbcTemplate jdbcTemplate4(@Qualifier("fourDataSource") DataSource ds) {
|
||||||
return new JdbcTemplate(ds);
|
// return new JdbcTemplate(ds);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1810,6 +1810,20 @@ public class ReportingController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @RequestMapping(value = {"/smpktes/{smpk}"}, method = {RequestMethod.GET})
|
||||||
|
// public void exportPdfSMPKtes(@PathVariable("smpk") Integer smpk,
|
||||||
|
// @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
|
||||||
|
// ModelAndView mv, HttpServletResponse response) throws Exception {
|
||||||
|
// JasperPrint jasperPrint = null;
|
||||||
|
// try {
|
||||||
|
// jasperPrint = this.reportingService.exportPdfSMPKtes(smpk, printBy);
|
||||||
|
// response.setContentType("application/pdf");
|
||||||
|
// JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
// } finally {
|
||||||
|
// jasperPrint = null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
@RequestMapping(value = {"/rekap-logbook"}, method = {RequestMethod.GET})
|
@RequestMapping(value = {"/rekap-logbook"}, method = {RequestMethod.GET})
|
||||||
public void handleRekapLogbook(
|
public void handleRekapLogbook(
|
||||||
@RequestParam("tahun") String tahun,
|
@RequestParam("tahun") String tahun,
|
||||||
|
|||||||
@ -46,9 +46,9 @@ public class ReportingDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private JdbcTemplate jdbcTemplate3;
|
private JdbcTemplate jdbcTemplate3;
|
||||||
|
|
||||||
@Qualifier("fourJdbcTemplate")
|
// @Qualifier("fourJdbcTemplate")
|
||||||
@Autowired
|
// @Autowired
|
||||||
private JdbcTemplate jdbcTemplate4;
|
// private JdbcTemplate jdbcTemplate4;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PostgresArrayService postgresArrayService;
|
private PostgresArrayService postgresArrayService;
|
||||||
@ -1446,6 +1446,21 @@ public class ReportingDao {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||||
|
// try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
|
||||||
|
// String path = jaspersim2DirPath + "SMPK_testing.jrxml";
|
||||||
|
// JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
// Map<String, Object> parameters = new HashMap<>();
|
||||||
|
// parameters.put("smpk", smpk);
|
||||||
|
// parameters.put("printBy", printBy);
|
||||||
|
// return JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
// } catch (Exception var15) {
|
||||||
|
// LOG.error("Exception at exportPdfSMPKtes");
|
||||||
|
// LOG.error(ReportingDao.class, var15);
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
|
||||||
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id , String printBy) {
|
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id , String printBy) {
|
||||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||||
String path = jasperDirPath + "rekap_logbook_dong.jrxml";
|
String path = jasperDirPath + "rekap_logbook_dong.jrxml";
|
||||||
@ -1554,7 +1569,7 @@ public class ReportingDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public JasperPrint exportLpTreaseHasil(String norec) {
|
public JasperPrint exportLpTreaseHasil(String norec) {
|
||||||
try (Connection conn = this.jdbcTemplate4.getDataSource().getConnection()) {
|
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||||
String path = jasperDirPath + "trease_hasil.jrxml";
|
String path = jasperDirPath + "trease_hasil.jrxml";
|
||||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
Map<String, Object> parameters = new HashMap<>();
|
Map<String, Object> parameters = new HashMap<>();
|
||||||
|
|||||||
@ -473,6 +473,11 @@ public class ReportingService {
|
|||||||
return this.reportingDao.exportPdfSMPK(smpk, printBy);
|
return this.reportingDao.exportPdfSMPK(smpk, printBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public JasperPrint exportPdfSMPKtes(Integer smpk, String printBy) {
|
||||||
|
// log.info("Starting exportPdfSMPK with smpk: {}, printBy: {}", smpk, printBy);
|
||||||
|
// return this.reportingDao.exportPdfSMPKtes(smpk, printBy);
|
||||||
|
// }
|
||||||
|
|
||||||
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id, String printBy) {
|
public JasperPrint exportPdfRekapLogbook(String tahun, String bulan, Integer ksm_id, Integer pegawai_id, String printBy) {
|
||||||
log.info("Starting exportPdfRekapLogbook with tahun: {}, bulan: {}, ksm_id: {}, pegawai_id: {}, printBy: {}", tahun, bulan, ksm_id, pegawai_id, printBy);
|
log.info("Starting exportPdfRekapLogbook with tahun: {}, bulan: {}, ksm_id: {}, pegawai_id: {}, printBy: {}", tahun, bulan, ksm_id, pegawai_id, printBy);
|
||||||
return this.reportingDao.exportPdfRekapLogbook(tahun, bulan, ksm_id, pegawai_id, printBy);
|
return this.reportingDao.exportPdfRekapLogbook(tahun, bulan, ksm_id, pegawai_id, printBy);
|
||||||
|
|||||||
@ -32,6 +32,6 @@ spring.mvc.dispatch-trace-request=true
|
|||||||
spring.main.banner-mode=off
|
spring.main.banner-mode=off
|
||||||
application.jasper-xml.dir-path=/mnt/files/jasper-xml/
|
application.jasper-xml.dir-path=/mnt/files/jasper-xml/
|
||||||
application.jasper-xml.dir-bintaro-path=/mnt/files/jasper-xml-bintaro/
|
application.jasper-xml.dir-bintaro-path=/mnt/files/jasper-xml-bintaro/
|
||||||
application.jasper-xml.dir-sim2-path=/mnt/files/jasper-xml-sim2/
|
application.jasper-xml.dir-sim2-path=D:\\COBA\\
|
||||||
application.pdf.dir-sep=/mnt/files/sep/
|
application.pdf.dir-sep=/mnt/files/sep/
|
||||||
application.pdf.dir-lis=/mnt/lis/
|
application.pdf.dir-lis=/mnt/lis/
|
||||||
Loading…
x
Reference in New Issue
Block a user