|
|
|
@ -123,12 +123,18 @@ public class UcoAccountService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void updateCustomerApplication(Map<String, String> payload) {
|
|
|
|
private void updateCustomerApplication(Map<String, String> payload) {
|
|
|
|
webClient.post().uri(SecurityURI.UPDATE_CUSTOMER_APPLICATION).bodyValue(payload).retrieve()
|
|
|
|
webClient.post()
|
|
|
|
.onStatus(status -> status.is4xxClientError() || status.is5xxServerError(), clientResponse
|
|
|
|
.uri(SecurityURI.UPDATE_CUSTOMER_APPLICATION)
|
|
|
|
-> Mono.error(new RuntimeException("Response has error status."))).bodyToMono(String.class);
|
|
|
|
.bodyValue(payload)
|
|
|
|
|
|
|
|
.retrieve()
|
|
|
|
|
|
|
|
.onStatus(
|
|
|
|
|
|
|
|
status -> status.is4xxClientError() || status.is5xxServerError(),
|
|
|
|
|
|
|
|
clientResponse -> Mono.error(new RuntimeException("Response has error status."))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.bodyToMono(String.class)
|
|
|
|
|
|
|
|
.block();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<AccountDetail> fetchdepositAccountFromCiihive(String porOrgacode, String cmpCustcode) {
|
|
|
|
public List<AccountDetail> fetchdepositAccountFromCiihive(String porOrgacode, String cmpCustcode) {
|
|
|
|
String url = UCOURI.GET_CMP_UCOACCOUNTS + "?porOrgacode=" + porOrgacode + "&cmpCustcode=" + cmpCustcode;
|
|
|
|
String url = UCOURI.GET_CMP_UCOACCOUNTS + "?porOrgacode=" + porOrgacode + "&cmpCustcode=" + cmpCustcode;
|
|
|
|
List<Object> map = (List<Object>) webClientDeposit.getCmpUcoAccounts(url, porOrgacode);
|
|
|
|
List<Object> map = (List<Object>) webClientDeposit.getCmpUcoAccounts(url, porOrgacode);
|
|
|
|
@ -165,7 +171,7 @@ public void saveCustomerAccountDetails(String porOrgacode, String cmpCustcode,St
|
|
|
|
fetchdepositAccountFromCiihive(porOrgacode, cmpCustcode).stream().forEach(k -> {
|
|
|
|
fetchdepositAccountFromCiihive(porOrgacode, cmpCustcode).stream().forEach(k -> {
|
|
|
|
if(k.getMbmBkmsnumber().equals(accountNumber)){
|
|
|
|
if(k.getMbmBkmsnumber().equals(accountNumber)){
|
|
|
|
UcoAccount ucoAccount = UcoAccount.builder()
|
|
|
|
UcoAccount ucoAccount = UcoAccount.builder()
|
|
|
|
.id(new AccountId(k.getPorOrgacode(), k.getMbmBkmsnumber())) // Set the AccountId, assuming a method exists to create or retrieve it
|
|
|
|
.id(new AccountId(k.getPorOrgacode(), k.getMbmBkmsnumber()))
|
|
|
|
.dmpProdcode(k.getDmpProdcode())
|
|
|
|
.dmpProdcode(k.getDmpProdcode())
|
|
|
|
.mbmBkmstitle(k.getMbmBkmstitle())
|
|
|
|
.mbmBkmstitle(k.getMbmBkmstitle())
|
|
|
|
.pcrCurrdesc(k.getPcrCurrdesc())
|
|
|
|
.pcrCurrdesc(k.getPcrCurrdesc())
|
|
|
|
|