diff --git a/Medifirst2000/pom.xml b/Medifirst2000/pom.xml index cd664a2b..a6105582 100644 --- a/Medifirst2000/pom.xml +++ b/Medifirst2000/pom.xml @@ -74,6 +74,7 @@ 1.42.0 1.18.28 + 1.7 10000 @@ -99,20 +100,34 @@ slf4j-api ${org.slf4j.version} + + joda-time + joda-time + ${joda-time.version} + + + org.apache.poi + poi + ${poi.version} + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + ${ulisesbocchio.jasypt.version} + + org.slf4j jcl-over-slf4j ${org.slf4j.version} runtime - org.slf4j log4j-over-slf4j ${org.slf4j.version} runtime - ch.qos.logback logback-classic @@ -120,25 +135,12 @@ runtime - - joda-time - joda-time - ${joda-time.version} - - - - org.apache.poi - poi - ${poi.version} - - junit junit ${junit.version} test - Jasa Medika diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PelayananPasienDao.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PelayananPasienDao.java index 826bec47..45e721e0 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PelayananPasienDao.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PelayananPasienDao.java @@ -293,7 +293,9 @@ public interface PelayananPasienDao extends JpaRepository> findPasienPaketDiRanapByDokter(@Param("listIdSpog") List listIdSpog, - @Param("listProdukEntriId") List listProdukEntriId); + @Param("listProdukEntriId") List listProdukEntriId, + @Param("listRanapId") List listRanapId); } diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java index b7ee6022..2ff5d7d0 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java @@ -1620,7 +1620,7 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel List tarifDetailNonKelas = hargaNettoProdukByKelasDDao .findByConcateProdukKelas(allConcatProdukNonkelas); Set> ibuPaketDiRanapByDokter = pelayananPasienDao.findPasienPaketDiRanapByDokter(drKsmObgyn, - allProdukEntriId); + allProdukEntriId, Arrays.asList(GRUP_RAWAT_INAP)); Set setIdIbu = ibuPaketDiRanapByDokter.stream() .map(pasien -> Integer.parseInt(pasien.get("pasienId").toString())).collect(Collectors.toSet()); List> ibuAnak = pasienDao.findIdByIdOfIbu(setIdIbu); diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/util/JasyptConfig.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/util/JasyptConfig.java new file mode 100644 index 00000000..92eb3b78 --- /dev/null +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/util/JasyptConfig.java @@ -0,0 +1,38 @@ +package com.jasamedika.medifirst2000.util; + +import com.ulisesbocchio.jasyptspringboot.annotation.EncryptablePropertySource; +import com.ulisesbocchio.jasyptspringboot.annotation.EncryptablePropertySources; +import org.jasypt.encryption.StringEncryptor; +import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; +import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author salmanoe + * @version 1.0.0 + * @since 23/01/2024 + */ +@Configuration +@EncryptablePropertySources({@EncryptablePropertySource("classpath:jdbc.bridging.properties"), + @EncryptablePropertySource("classpath:jdbc.cssd.properties"), + @EncryptablePropertySource("classpath:jdbc.development.properties"), + @EncryptablePropertySource("classpath:jdbc.ip3rs.properties"), + @EncryptablePropertySource("classpath:jdbc.it.properties"), + @EncryptablePropertySource("classpath:jdbc.k3kl.properties"), + @EncryptablePropertySource("classpath:jdbc.laundry.properties"), + @EncryptablePropertySource("classpath:jdbc.localhost.properties"), + @EncryptablePropertySource("classpath:jdbc.mirroring.properties"), + @EncryptablePropertySource("classpath:jdbc.pelayanan.properties"), + @EncryptablePropertySource("classpath:jdbc.sdm.properties"), + @EncryptablePropertySource("classpath:jdbc.web.properties")}) +public class JasyptConfig { + @Bean + public StringEncryptor jasyptStringEncryptor() { + String password = System.getProperty("jasypt.encryptor.password"); + PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor(); + SimpleStringPBEConfig config = new SimpleStringPBEConfig(); + config.setPassword(password); + return encryptor; + } +} diff --git a/jasamedika-config/pom.xml b/jasamedika-config/pom.xml index 9a09dcc1..d4da22f8 100644 --- a/jasamedika-config/pom.xml +++ b/jasamedika-config/pom.xml @@ -109,6 +109,11 @@ 1.8 + + com.github.ulisesbocchio + jasypt-maven-plugin + 3.0.0 + Module Medifirst2000 untuk Configuration diff --git a/jasamedika-config/src/main/resources/jdbc.bridging.properties b/jasamedika-config/src/main/resources/jdbc.bridging.properties index 38cd7bad..af4e8839 100644 --- a/jasamedika-config/src/main/resources/jdbc.bridging.properties +++ b/jasamedika-config/src/main/resources/jdbc.bridging.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 25 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.cssd.properties b/jasamedika-config/src/main/resources/jdbc.cssd.properties index 20fb3a9b..e4e59a18 100644 --- a/jasamedika-config/src/main/resources/jdbc.cssd.properties +++ b/jasamedika-config/src/main/resources/jdbc.cssd.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.development.properties b/jasamedika-config/src/main/resources/jdbc.development.properties index f09fb3f7..5f186e44 100644 --- a/jasamedika-config/src/main/resources/jdbc.development.properties +++ b/jasamedika-config/src/main/resources/jdbc.development.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Development jdbc.url = jdbc:postgresql://192.168.12.3:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = postgres +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = 192.168.12.3 jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.ip3rs.properties b/jasamedika-config/src/main/resources/jdbc.ip3rs.properties index 20fb3a9b..e4e59a18 100644 --- a/jasamedika-config/src/main/resources/jdbc.ip3rs.properties +++ b/jasamedika-config/src/main/resources/jdbc.ip3rs.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.it.properties b/jasamedika-config/src/main/resources/jdbc.it.properties index 20fb3a9b..e4e59a18 100644 --- a/jasamedika-config/src/main/resources/jdbc.it.properties +++ b/jasamedika-config/src/main/resources/jdbc.it.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.k3kl.properties b/jasamedika-config/src/main/resources/jdbc.k3kl.properties index 20fb3a9b..e4e59a18 100644 --- a/jasamedika-config/src/main/resources/jdbc.k3kl.properties +++ b/jasamedika-config/src/main/resources/jdbc.k3kl.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.laundry.properties b/jasamedika-config/src/main/resources/jdbc.laundry.properties index 20fb3a9b..e4e59a18 100644 --- a/jasamedika-config/src/main/resources/jdbc.laundry.properties +++ b/jasamedika-config/src/main/resources/jdbc.laundry.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 5 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.mirroring.properties b/jasamedika-config/src/main/resources/jdbc.mirroring.properties index 7f96edd6..4e813ca1 100644 --- a/jasamedika-config/src/main/resources/jdbc.mirroring.properties +++ b/jasamedika-config/src/main/resources/jdbc.mirroring.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 50 # DB Mirroring jdbc.url = jdbc:postgresql://ds.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_jasper +jdbc.password = ekAdeCmnJ3 jdbc.serverName = ds.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.pelayanan.properties b/jasamedika-config/src/main/resources/jdbc.pelayanan.properties index 38cd7bad..af4e8839 100644 --- a/jasamedika-config/src/main/resources/jdbc.pelayanan.properties +++ b/jasamedika-config/src/main/resources/jdbc.pelayanan.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 25 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.sdm.properties b/jasamedika-config/src/main/resources/jdbc.sdm.properties index 26b01e89..3bbd394f 100644 --- a/jasamedika-config/src/main/resources/jdbc.sdm.properties +++ b/jasamedika-config/src/main/resources/jdbc.sdm.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 60 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432 diff --git a/jasamedika-config/src/main/resources/jdbc.web.properties b/jasamedika-config/src/main/resources/jdbc.web.properties index 38cd7bad..af4e8839 100644 --- a/jasamedika-config/src/main/resources/jdbc.web.properties +++ b/jasamedika-config/src/main/resources/jdbc.web.properties @@ -9,8 +9,8 @@ hikari.config.maximum.pool.size = 25 # DB Production jdbc.url = jdbc:postgresql://psql1.rsabhk.lan:5432/rsab_hk_production -jdbc.username = postgres -jdbc.password = root +jdbc.username = smart_user +jdbc.password = 1miwhir3yr jdbc.serverName = psql1.rsabhk.lan jdbc.databaseName = rsab_hk_production jdbc.portNumber = 5432