|
|
|
|
@ -40,7 +40,7 @@ public class UcoAccountService {
|
|
|
|
|
this.objectMapper = objectMapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AccountInquiryResponse fetchAccountTitile(String porOrgacode, String acntTypeCode, String acntTypeValue) {
|
|
|
|
|
public List<AccountInquiryResponse> fetchAccountTitile(String porOrgacode, String acntTypeCode, String acntTypeValue) {
|
|
|
|
|
CustomerProfile customerProfile = new CustomerProfile();
|
|
|
|
|
|
|
|
|
|
if (acntTypeCode.equals(UCOConstants.CMP_PHONE)) {
|
|
|
|
|
@ -51,8 +51,17 @@ public class UcoAccountService {
|
|
|
|
|
if (Objects.isNull(customerProfile)) {
|
|
|
|
|
throw new AccountDoesntExistsException();
|
|
|
|
|
}
|
|
|
|
|
UcoAccount ucoAccount = ucoAccountRepository.findUcoAccountByCmpCustcode(porOrgacode, customerProfile.getCmpCustcode());
|
|
|
|
|
return AccountInquiryResponse.builder().mbmBkmsnumber(ucoAccount.getId().getMbmBkmsnumber()).mbmBkmstitle(ucoAccount.getMbmBkmstitle()).build();
|
|
|
|
|
List<UcoAccount> ucoAccountList= ucoAccountRepository.findUcoAccountByCmpCustcode(porOrgacode, customerProfile.getCmpCustcode());
|
|
|
|
|
List<AccountInquiryResponse> accountInquiryResponseList = new ArrayList<>();
|
|
|
|
|
ucoAccountList.stream().forEach(account ->{;
|
|
|
|
|
accountInquiryResponseList.add( AccountInquiryResponse.builder().mbmBkmsnumber(account.getId().getMbmBkmsnumber())
|
|
|
|
|
.mbmBkmstitle(account.getMbmBkmstitle())
|
|
|
|
|
.pcrCurrshort(account.getPcrCurrshort())
|
|
|
|
|
.pcrCurrcode(account.getPcrCurrcode())
|
|
|
|
|
.pcrCurrdesc(account.getPcrCurrdesc())
|
|
|
|
|
.build());
|
|
|
|
|
});
|
|
|
|
|
return accountInquiryResponseList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -95,6 +104,7 @@ public class UcoAccountService {
|
|
|
|
|
.pcrCurrdesc(accountDetail.getPcrCurrdesc())
|
|
|
|
|
.cmpCustcode(accountDetail.getCmpCustcode())
|
|
|
|
|
.pcrCurrcode(accountDetail.getPcrCurrcode())
|
|
|
|
|
.pcrCurrshort(accountDetail.getPcrCurrshort())
|
|
|
|
|
.mbmBkmsclosed(accountDetail.isMbmBkmsclosed())
|
|
|
|
|
.mbmBkmsopendate(LocalDate.now())
|
|
|
|
|
.sgtLasttrandate(LocalDate.now())
|
|
|
|
|
@ -136,6 +146,7 @@ public void saveCustomerAccountDetails(String porOrgacode, String cmpCustcode,St
|
|
|
|
|
.pcrCurrdesc(k.getPcrCurrdesc())
|
|
|
|
|
.cmpCustcode(k.getCmpCustcode())
|
|
|
|
|
.pcrCurrcode(k.getPcrCurrcode())
|
|
|
|
|
.pcrCurrshort(k.getPcrCurrshort())
|
|
|
|
|
.mbmBkmsclosed(k.isMbmBkmsclosed())
|
|
|
|
|
.mbmBkmsopendate(LocalDate.now())
|
|
|
|
|
.sgtLasttrandate(LocalDate.now())
|
|
|
|
|
|