update fd account
This commit is contained in:
+42
@@ -522,6 +522,25 @@ public final class DepositsApiConstants {
|
||||
fixedDepositRequestData.addAll(DEPOSIT_TERM_REQUEST_DATA_PARAMETERS);
|
||||
fixedDepositRequestData.add(linkedAccountParamName);
|
||||
fixedDepositRequestData.add(transferInterestToSavingsParamName);
|
||||
fixedDepositRequestData.add("accountType");
|
||||
fixedDepositRequestData.add("customerSegment");
|
||||
fixedDepositRequestData.add(SavingsApiConstants.accountStatusParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.modeOfOperationParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.specialCategoryParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.weakerSectionParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.guardianNameParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.guardianCifNumberParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.guardianRelationshipParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.guardianClientIdParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.minorDateOfBirthParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.introducerIdParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.introducerNameParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.introducerCifNumberParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.nomineeParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.linkedAccountIdParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.linkedAccountTypeParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.linkedAccountNoParamName);
|
||||
fixedDepositRequestData.add(SavingsApiConstants.jointHoldersParamName);
|
||||
return fixedDepositRequestData;
|
||||
}
|
||||
|
||||
@@ -532,6 +551,29 @@ public final class DepositsApiConstants {
|
||||
fixedDepositResponseData.addAll(DEPOSIT_TERM_RESPONSE_DATA_PARAMETERS);
|
||||
fixedDepositResponseData.add(linkedAccountParamName);
|
||||
fixedDepositResponseData.add(transferInterestToSavingsParamName);
|
||||
fixedDepositResponseData.add("accountType");
|
||||
fixedDepositResponseData.add("customerSegment");
|
||||
fixedDepositResponseData.add("accountTypeOptions");
|
||||
fixedDepositResponseData.add("customerSegmentOptions");
|
||||
fixedDepositResponseData.add("productCode");
|
||||
fixedDepositResponseData.add("previewAccountNo");
|
||||
fixedDepositResponseData.add(SavingsApiConstants.accountStatusParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.modeOfOperationParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.specialCategoryParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.weakerSectionParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.guardianNameParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.guardianCifNumberParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.guardianRelationshipParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.guardianClientIdParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.minorDateOfBirthParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.introducerIdParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.introducerNameParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.introducerCifNumberParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.nomineeParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.linkedAccountIdParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.linkedAccountTypeParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.linkedAccountNoParamName);
|
||||
fixedDepositResponseData.add(SavingsApiConstants.jointHoldersParamName);
|
||||
return fixedDepositResponseData;
|
||||
}
|
||||
|
||||
|
||||
+439
-29120
File diff suppressed because it is too large
Load Diff
+93
-6
@@ -408,6 +408,24 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
periodFrequencyTypeOptions, savingsAccountDatas, maturityInstructionOptions);
|
||||
|
||||
template = FixedDepositAccountData.withInterestChart((FixedDepositAccountData) template, accountChart);
|
||||
|
||||
try {
|
||||
final Collection<CodeValueData> accountTypeOpts = this.codeValueReadPlatformService
|
||||
.retrieveCodeValuesByCode(SavingsApiConstants.FD_PRODUCT_ACCOUNT_TYPE);
|
||||
final Collection<CodeValueData> customerSegmentOpts = this.codeValueReadPlatformService
|
||||
.retrieveCodeValuesByCode(SavingsApiConstants.FD_PRODUCT_CUSTOMER_SEGMENT);
|
||||
((FixedDepositAccountData) template).setAccountTypeOptions(accountTypeOpts);
|
||||
((FixedDepositAccountData) template).setCustomerSegmentOptions(customerSegmentOpts);
|
||||
} catch (final Exception ex) {
|
||||
log.warn("Failed to load FD account type/customer segment options: {}", ex.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
final String preview = accountNumberGenerator.previewAccountNumber(productId, officeId);
|
||||
template.setPreviewAccountNo(preview);
|
||||
} catch (final Exception ex) {
|
||||
log.warn("Failed to generate preview account number for FD productId={}: {}", productId, ex.getMessage());
|
||||
}
|
||||
} else if (depositAccountType.isRecurringDeposit()) {
|
||||
// Save CBS fields from mapper result before factory methods create new objects
|
||||
final RecurringDepositAccountData rdTemplateWithCbs = (RecurringDepositAccountData) template;
|
||||
@@ -696,6 +714,16 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
selectFieldsSqlBuilder.append("sa.total_penalty_charge_derived as totalPenaltyCharge, ");
|
||||
selectFieldsSqlBuilder.append("sa.total_withhold_tax_derived as totalWithholdTax,");
|
||||
selectFieldsSqlBuilder.append("sa.deposit_type_enum as depositTypeId, ");
|
||||
selectFieldsSqlBuilder.append("sa.account_type as accountType, sa.customer_segment as customerSegment, ");
|
||||
selectFieldsSqlBuilder.append("sa.account_status as accountStatus, sa.mode_of_operation as modeOfOperation, ");
|
||||
selectFieldsSqlBuilder.append("sa.special_category as specialCategory, sa.weaker_section as weakerSection, ");
|
||||
selectFieldsSqlBuilder.append("sa.guardian_name as guardianName, sa.guardian_cif_number as guardianCifNumber, ");
|
||||
selectFieldsSqlBuilder.append("sa.guardian_relationship as guardianRelationship, sa.guardian_client_id as guardianClientId, ");
|
||||
selectFieldsSqlBuilder.append("sa.minor_date_of_birth as minorDateOfBirth, ");
|
||||
selectFieldsSqlBuilder.append("sa.introducer_client_id as introducerClientId, sa.introducer_name as introducerName, ");
|
||||
selectFieldsSqlBuilder.append("sa.introducer_cif_number as introducerCifNumber, ");
|
||||
selectFieldsSqlBuilder.append("sa.linked_account_id as linkedAccountId, sa.linked_account_type as linkedAccountType, ");
|
||||
selectFieldsSqlBuilder.append("sa.linked_account_no as linkedAccountNo, ");
|
||||
selectFieldsSqlBuilder.append("sa.min_balance_for_interest_calculation as minBalanceForInterestCalculation, ");
|
||||
selectFieldsSqlBuilder.append("sa.withhold_tax as withHoldTax,");
|
||||
selectFieldsSqlBuilder.append("tg.id as taxGroupId, tg.name as taxGroupName ");
|
||||
@@ -904,7 +932,8 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
sqlBuilder.append("datp.deposit_period_frequency_enum as depositPeriodFrequencyTypeId, ");
|
||||
sqlBuilder.append("datp.on_account_closure_enum as onAccountClosureId, ");
|
||||
sqlBuilder.append("datp.transfer_interest_to_linked_account as transferInterestToSavings, ");
|
||||
sqlBuilder.append("datp.transfer_to_savings_account_id as transferToSavingsId ");
|
||||
sqlBuilder.append("datp.transfer_to_savings_account_id as transferToSavingsId, ");
|
||||
sqlBuilder.append("sp.fd_type as fdType ");
|
||||
|
||||
sqlBuilder.append(super.selectTablesSql());
|
||||
|
||||
@@ -954,10 +983,26 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
|
||||
final Long transferToSavingsId = JdbcSupport.getLong(rs, TRANSFER_TO_SAVINGS_ID);
|
||||
|
||||
return FixedDepositAccountData.instance(depositAccountData, preClosurePenalApplicable, preClosurePenalInterest,
|
||||
final FixedDepositAccountData result = FixedDepositAccountData.instance(depositAccountData, preClosurePenalApplicable, preClosurePenalInterest,
|
||||
preClosurePenalInterestOnType, minDepositTerm, maxDepositTerm, minDepositTermType, maxDepositTermType,
|
||||
inMultiplesOfDepositTerm, inMultiplesOfDepositTermType, depositAmount, maturityAmount, maturityDate, depositPeriod,
|
||||
depositPeriodFrequencyType, onAccountClosureType, transferInterestToSavings, transferToSavingsId);
|
||||
result.setCbsProductFields(rs.getString("accountType"), rs.getString("customerSegment"), rs.getString("fdType"), rs.getString("productCode"),
|
||||
JdbcSupport.getLocalDate(rs, "effectiveDate"), JdbcSupport.getLocalDate(rs, "effectiveTo"),
|
||||
JdbcSupport.getLocalDate(rs, "endDate"), rs.getBoolean("introducerRequired"), rs.getBoolean("shareLinkingEnabled"),
|
||||
rs.getBoolean("nominationFacility"), rs.getBoolean("dormancyAlert"), rs.getBoolean("isDormancyTrackingActive"),
|
||||
JdbcSupport.getLong(rs, "daysToInactive"), JdbcSupport.getLong(rs, "daysToDormancy"),
|
||||
JdbcSupport.getLong(rs, "daysToEscheat"), JdbcSupport.getInteger(rs, "interestCalculateSelector"),
|
||||
rs.getString("interestCalculationTypeName"), rs.getString("averagePeriod"), rs.getBoolean("autoPost"),
|
||||
JdbcSupport.getInteger(rs, "frequencyFixDay"), JdbcSupport.getLocalDate(rs, "lastInterestDate"),
|
||||
rs.getBoolean("enableLockinPeriod"), rs.getString("balanceFrequency"),
|
||||
rs.getBoolean("accountClosedZeroBalanceInDayClosing"), rs.getBoolean("balanceSwapOption"), rs.getBoolean("msme"),
|
||||
rs.getBoolean("autoDebitFacility"), rs.getBoolean("loanFacility"), rs.getBoolean("prematureWithdrawalOption"),
|
||||
rs.getBoolean("tenureFlexibility"), rs.getBoolean("lienMarked"), rs.getBoolean("maturityInstructions"),
|
||||
rs.getBoolean("creditMaturityProceeds"), rs.getBoolean("penaltyGracePeriodMissedInstallments"),
|
||||
rs.getBoolean("panelRequestApplicable"), rs.getBoolean("noPenaltyNomineeHeirClosure"),
|
||||
rs.getBoolean("deceasedSettlement"), rs.getBoolean("allowDebitTxnAfterDueDate"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1423,6 +1468,31 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
sqlBuilder.append(", dptp.pre_closure_penal_applicable as preClosurePenalApplicable, ");
|
||||
sqlBuilder.append("dptp.pre_closure_penal_interest as preClosurePenalInterest, ");
|
||||
sqlBuilder.append("dptp.pre_closure_penal_interest_on_enum as preClosurePenalInterestOnId, ");
|
||||
sqlBuilder.append("sa.account_type as accountType, sa.customer_segment as customerSegment, sa.fd_type as fdType, ");
|
||||
sqlBuilder.append("sa.product_code as productCode, ");
|
||||
sqlBuilder.append("sa.effective_date as effectiveDate, sa.effective_to as effectiveTo, sa.end_date as endDate, ");
|
||||
sqlBuilder.append("sa.introducer_required as introducerRequired, sa.share_linking_enabled as shareLinkingEnabled, ");
|
||||
sqlBuilder.append("sa.nomination_facility as nominationFacility, sa.dormancy_alert as dormancyAlert, ");
|
||||
sqlBuilder.append("sa.is_dormancy_tracking_active as isDormancyTrackingActive, ");
|
||||
sqlBuilder.append("sa.days_to_inactive as daysToInactive, sa.days_to_dormancy as daysToDormancy, ");
|
||||
sqlBuilder.append("sa.days_to_escheat as daysToEscheat, ");
|
||||
sqlBuilder.append("sa.interest_calculate_selector as interestCalculateSelector, ");
|
||||
sqlBuilder.append("icv.code_value as interestCalculationTypeName, ");
|
||||
sqlBuilder.append("sa.average_period as averagePeriod, ");
|
||||
sqlBuilder.append("sa.auto_post as autoPost, sa.frequency_fix_day as frequencyFixDay, ");
|
||||
sqlBuilder.append("sa.last_interest_date as lastInterestDate, sa.enable_lockin_period as enableLockinPeriod, ");
|
||||
sqlBuilder.append("sa.balance_frequency as balanceFrequency, ");
|
||||
sqlBuilder.append("sa.account_closed_zero_balance_in_day_closing as accountClosedZeroBalanceInDayClosing, ");
|
||||
sqlBuilder.append("sa.balance_swap_option as balanceSwapOption, sa.msme as msme, ");
|
||||
sqlBuilder.append("sa.auto_debit_facility as autoDebitFacility, sa.loan_facility as loanFacility, ");
|
||||
sqlBuilder.append("sa.premature_withdrawal_option as prematureWithdrawalOption, sa.tenure_flexibility as tenureFlexibility, ");
|
||||
sqlBuilder.append("sa.lien_marked as lienMarked, sa.maturity_instructions as maturityInstructions, ");
|
||||
sqlBuilder.append("sa.credit_maturity_proceeds as creditMaturityProceeds, ");
|
||||
sqlBuilder.append("sa.penalty_grace_period_missed_installments as penaltyGracePeriodMissedInstallments, ");
|
||||
sqlBuilder.append("sa.panel_request_applicable as panelRequestApplicable, ");
|
||||
sqlBuilder.append("sa.no_penalty_nominee_heir_closure as noPenaltyNomineeHeirClosure, ");
|
||||
sqlBuilder.append("sa.deceased_settlement as deceasedSettlement, ");
|
||||
sqlBuilder.append("sa.allow_debit_txn_after_due_date as allowDebitTxnAfterDueDate, ");
|
||||
sqlBuilder.append("dptp.min_deposit_term as minDepositTerm, ");
|
||||
sqlBuilder.append("dptp.max_deposit_term as maxDepositTerm, ");
|
||||
sqlBuilder.append("dptp.min_deposit_term_type_enum as minDepositTermTypeId, ");
|
||||
@@ -1431,6 +1501,7 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
sqlBuilder.append("dptp.in_multiples_of_deposit_term_type_enum as inMultiplesOfDepositTermTypeId ");
|
||||
|
||||
sqlBuilder.append(super.selectTablesSql());
|
||||
sqlBuilder.append("left join m_code_value icv on icv.id = sa.interest_calculate_selector ");
|
||||
|
||||
this.schemaSql = sqlBuilder.toString();
|
||||
}
|
||||
@@ -1472,10 +1543,26 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
||||
final EnumOptionData onAccountClosureType = null;
|
||||
final Boolean transferInterestToSavings = false;
|
||||
|
||||
return FixedDepositAccountData.instance(depositAccountData, preClosurePenalApplicable, preClosurePenalInterest,
|
||||
preClosurePenalInterestOnType, minDepositTerm, maxDepositTerm, minDepositTermType, maxDepositTermType,
|
||||
inMultiplesOfDepositTerm, inMultiplesOfDepositTermType, depositAmount, maturityAmount, maturityDate, depositPeriod,
|
||||
depositPeriodFrequencyType, onAccountClosureType, transferInterestToSavings, null);
|
||||
final FixedDepositAccountData result = FixedDepositAccountData.instance(depositAccountData, preClosurePenalApplicable,
|
||||
preClosurePenalInterest, preClosurePenalInterestOnType, minDepositTerm, maxDepositTerm, minDepositTermType,
|
||||
maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType, depositAmount, maturityAmount,
|
||||
maturityDate, depositPeriod, depositPeriodFrequencyType, onAccountClosureType, transferInterestToSavings, null);
|
||||
result.setCbsProductFields(rs.getString("accountType"), rs.getString("customerSegment"), rs.getString("fdType"), rs.getString("productCode"),
|
||||
JdbcSupport.getLocalDate(rs, "effectiveDate"), JdbcSupport.getLocalDate(rs, "effectiveTo"),
|
||||
JdbcSupport.getLocalDate(rs, "endDate"), rs.getBoolean("introducerRequired"), rs.getBoolean("shareLinkingEnabled"),
|
||||
rs.getBoolean("nominationFacility"), rs.getBoolean("dormancyAlert"), rs.getBoolean("isDormancyTrackingActive"),
|
||||
JdbcSupport.getLong(rs, "daysToInactive"), JdbcSupport.getLong(rs, "daysToDormancy"),
|
||||
JdbcSupport.getLong(rs, "daysToEscheat"), JdbcSupport.getInteger(rs, "interestCalculateSelector"),
|
||||
rs.getString("interestCalculationTypeName"), rs.getString("averagePeriod"), rs.getBoolean("autoPost"),
|
||||
JdbcSupport.getInteger(rs, "frequencyFixDay"), JdbcSupport.getLocalDate(rs, "lastInterestDate"),
|
||||
rs.getBoolean("enableLockinPeriod"), rs.getString("balanceFrequency"),
|
||||
rs.getBoolean("accountClosedZeroBalanceInDayClosing"), rs.getBoolean("balanceSwapOption"), rs.getBoolean("msme"),
|
||||
rs.getBoolean("autoDebitFacility"), rs.getBoolean("loanFacility"), rs.getBoolean("prematureWithdrawalOption"),
|
||||
rs.getBoolean("tenureFlexibility"), rs.getBoolean("lienMarked"), rs.getBoolean("maturityInstructions"),
|
||||
rs.getBoolean("creditMaturityProceeds"), rs.getBoolean("penaltyGracePeriodMissedInstallments"),
|
||||
rs.getBoolean("panelRequestApplicable"), rs.getBoolean("noPenaltyNomineeHeirClosure"),
|
||||
rs.getBoolean("deceasedSettlement"), rs.getBoolean("allowDebitTxnAfterDueDate"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+177
-6
@@ -24,6 +24,7 @@ import java.util.Collection;
|
||||
import lombok.Getter;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.staff.data.StaffData;
|
||||
@@ -73,6 +74,48 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
private Collection<PaymentTypeData> paymentTypeOptions;
|
||||
private final Collection<EnumOptionData> maturityInstructionOptions;
|
||||
|
||||
// CBS product/account fields used by the FD UI
|
||||
private String accountType;
|
||||
private String customerSegment;
|
||||
private String fdType;
|
||||
private Collection<CodeValueData> accountTypeOptions;
|
||||
private Collection<CodeValueData> customerSegmentOptions;
|
||||
private String productCode;
|
||||
private LocalDate effectiveDate;
|
||||
private LocalDate effectiveTo;
|
||||
private LocalDate endDate;
|
||||
private Boolean introducerRequired;
|
||||
private Boolean shareLinkingEnabled;
|
||||
private Boolean nominationFacility;
|
||||
private Boolean dormancyAlert;
|
||||
private Boolean isDormancyTrackingActive;
|
||||
private Long daysToInactive;
|
||||
private Long daysToDormancy;
|
||||
private Long daysToEscheat;
|
||||
private Integer interestCalculateSelector;
|
||||
private String interestCalculationTypeName;
|
||||
private String averagePeriod;
|
||||
private Boolean autoPost;
|
||||
private Integer frequencyFixDay;
|
||||
private LocalDate lastInterestDate;
|
||||
private Boolean enableLockinPeriod;
|
||||
private String balanceFrequency;
|
||||
private Boolean accountClosedZeroBalanceInDayClosing;
|
||||
private Boolean balanceSwapOption;
|
||||
private Boolean msme;
|
||||
private Boolean autoDebitFacility;
|
||||
private Boolean loanFacility;
|
||||
private Boolean prematureWithdrawalOption;
|
||||
private Boolean tenureFlexibility;
|
||||
private Boolean lienMarked;
|
||||
private Boolean maturityInstructions;
|
||||
private Boolean creditMaturityProceeds;
|
||||
private Boolean penaltyGracePeriodMissedInstallments;
|
||||
private Boolean panelRequestApplicable;
|
||||
private Boolean noPenaltyNomineeHeirClosure;
|
||||
private Boolean deceasedSettlement;
|
||||
private Boolean allowDebitTxnAfterDueDate;
|
||||
|
||||
// import fields
|
||||
private transient Integer rowIndex;
|
||||
private String dateFormat;
|
||||
@@ -92,6 +135,123 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
locale, dateFormat);
|
||||
}
|
||||
|
||||
public void setAccountType(String accountType) {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public void setCustomerSegment(String customerSegment) {
|
||||
this.customerSegment = customerSegment;
|
||||
}
|
||||
|
||||
public void setAccountTypeOptions(Collection<CodeValueData> accountTypeOptions) {
|
||||
this.accountTypeOptions = accountTypeOptions;
|
||||
}
|
||||
|
||||
public void setCustomerSegmentOptions(Collection<CodeValueData> customerSegmentOptions) {
|
||||
this.customerSegmentOptions = customerSegmentOptions;
|
||||
}
|
||||
|
||||
public void setFdType(String fdType) { this.fdType = fdType; }
|
||||
public String getFdType() { return fdType; }
|
||||
|
||||
public void setCbsProductFields(final String accountType, final String customerSegment, final String fdType, final String productCode,
|
||||
final LocalDate effectiveDate, final LocalDate effectiveTo, final LocalDate endDate, final Boolean introducerRequired,
|
||||
final Boolean shareLinkingEnabled, final Boolean nominationFacility, final Boolean dormancyAlert,
|
||||
final Boolean isDormancyTrackingActive, final Long daysToInactive, final Long daysToDormancy, final Long daysToEscheat,
|
||||
final Integer interestCalculateSelector, final String interestCalculationTypeName, final String averagePeriod,
|
||||
final Boolean autoPost, final Integer frequencyFixDay, final LocalDate lastInterestDate, final Boolean enableLockinPeriod,
|
||||
final String balanceFrequency, final Boolean accountClosedZeroBalanceInDayClosing, final Boolean balanceSwapOption,
|
||||
final Boolean msme, final Boolean autoDebitFacility, final Boolean loanFacility, final Boolean prematureWithdrawalOption,
|
||||
final Boolean tenureFlexibility, final Boolean lienMarked, final Boolean maturityInstructions,
|
||||
final Boolean creditMaturityProceeds, final Boolean penaltyGracePeriodMissedInstallments,
|
||||
final Boolean panelRequestApplicable, final Boolean noPenaltyNomineeHeirClosure, final Boolean deceasedSettlement,
|
||||
final Boolean allowDebitTxnAfterDueDate) {
|
||||
this.accountType = accountType;
|
||||
this.customerSegment = customerSegment;
|
||||
this.fdType = fdType;
|
||||
this.productCode = productCode;
|
||||
this.effectiveDate = effectiveDate;
|
||||
this.effectiveTo = effectiveTo;
|
||||
this.endDate = endDate;
|
||||
this.introducerRequired = introducerRequired;
|
||||
this.shareLinkingEnabled = shareLinkingEnabled;
|
||||
this.nominationFacility = nominationFacility;
|
||||
this.dormancyAlert = dormancyAlert;
|
||||
this.isDormancyTrackingActive = isDormancyTrackingActive;
|
||||
this.daysToInactive = daysToInactive;
|
||||
this.daysToDormancy = daysToDormancy;
|
||||
this.daysToEscheat = daysToEscheat;
|
||||
this.interestCalculateSelector = interestCalculateSelector;
|
||||
this.interestCalculationTypeName = interestCalculationTypeName;
|
||||
this.averagePeriod = averagePeriod;
|
||||
this.autoPost = autoPost;
|
||||
this.frequencyFixDay = frequencyFixDay;
|
||||
this.lastInterestDate = lastInterestDate;
|
||||
this.enableLockinPeriod = enableLockinPeriod;
|
||||
this.balanceFrequency = balanceFrequency;
|
||||
this.accountClosedZeroBalanceInDayClosing = accountClosedZeroBalanceInDayClosing;
|
||||
this.balanceSwapOption = balanceSwapOption;
|
||||
this.msme = msme;
|
||||
this.autoDebitFacility = autoDebitFacility;
|
||||
this.loanFacility = loanFacility;
|
||||
this.prematureWithdrawalOption = prematureWithdrawalOption;
|
||||
this.tenureFlexibility = tenureFlexibility;
|
||||
this.lienMarked = lienMarked;
|
||||
this.maturityInstructions = maturityInstructions;
|
||||
this.creditMaturityProceeds = creditMaturityProceeds;
|
||||
this.penaltyGracePeriodMissedInstallments = penaltyGracePeriodMissedInstallments;
|
||||
this.panelRequestApplicable = panelRequestApplicable;
|
||||
this.noPenaltyNomineeHeirClosure = noPenaltyNomineeHeirClosure;
|
||||
this.deceasedSettlement = deceasedSettlement;
|
||||
this.allowDebitTxnAfterDueDate = allowDebitTxnAfterDueDate;
|
||||
}
|
||||
|
||||
public void copyCbsFieldsFrom(final FixedDepositAccountData src) {
|
||||
if (src == null) {
|
||||
return;
|
||||
}
|
||||
this.accountType = src.accountType;
|
||||
this.customerSegment = src.customerSegment;
|
||||
this.fdType = src.fdType;
|
||||
this.accountTypeOptions = src.accountTypeOptions;
|
||||
this.customerSegmentOptions = src.customerSegmentOptions;
|
||||
this.productCode = src.productCode;
|
||||
this.effectiveDate = src.effectiveDate;
|
||||
this.effectiveTo = src.effectiveTo;
|
||||
this.endDate = src.endDate;
|
||||
this.introducerRequired = src.introducerRequired;
|
||||
this.shareLinkingEnabled = src.shareLinkingEnabled;
|
||||
this.nominationFacility = src.nominationFacility;
|
||||
this.dormancyAlert = src.dormancyAlert;
|
||||
this.isDormancyTrackingActive = src.isDormancyTrackingActive;
|
||||
this.daysToInactive = src.daysToInactive;
|
||||
this.daysToDormancy = src.daysToDormancy;
|
||||
this.daysToEscheat = src.daysToEscheat;
|
||||
this.interestCalculateSelector = src.interestCalculateSelector;
|
||||
this.interestCalculationTypeName = src.interestCalculationTypeName;
|
||||
this.averagePeriod = src.averagePeriod;
|
||||
this.autoPost = src.autoPost;
|
||||
this.frequencyFixDay = src.frequencyFixDay;
|
||||
this.lastInterestDate = src.lastInterestDate;
|
||||
this.enableLockinPeriod = src.enableLockinPeriod;
|
||||
this.balanceFrequency = src.balanceFrequency;
|
||||
this.accountClosedZeroBalanceInDayClosing = src.accountClosedZeroBalanceInDayClosing;
|
||||
this.balanceSwapOption = src.balanceSwapOption;
|
||||
this.msme = src.msme;
|
||||
this.autoDebitFacility = src.autoDebitFacility;
|
||||
this.loanFacility = src.loanFacility;
|
||||
this.prematureWithdrawalOption = src.prematureWithdrawalOption;
|
||||
this.tenureFlexibility = src.tenureFlexibility;
|
||||
this.lienMarked = src.lienMarked;
|
||||
this.maturityInstructions = src.maturityInstructions;
|
||||
this.creditMaturityProceeds = src.creditMaturityProceeds;
|
||||
this.penaltyGracePeriodMissedInstallments = src.penaltyGracePeriodMissedInstallments;
|
||||
this.panelRequestApplicable = src.panelRequestApplicable;
|
||||
this.noPenaltyNomineeHeirClosure = src.noPenaltyNomineeHeirClosure;
|
||||
this.deceasedSettlement = src.deceasedSettlement;
|
||||
this.allowDebitTxnAfterDueDate = src.allowDebitTxnAfterDueDate;
|
||||
}
|
||||
|
||||
private FixedDepositAccountData(Long clientId, Long productId, Long fieldofficerId, LocalDate submittedOnDate,
|
||||
EnumOptionData interestCompoundingPeriodType, EnumOptionData interestPostingPeriodType, EnumOptionData interestCalculationType,
|
||||
EnumOptionData interestCalculationDaysInYearType, Integer lockinPeriodFrequency, EnumOptionData lockinPeriodFrequencyType,
|
||||
@@ -150,7 +310,7 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
final Collection<PaymentTypeData> paymentTypeOptions = null;
|
||||
final Collection<SavingsAccountData> savingsAccountDatas = null;
|
||||
|
||||
return new FixedDepositAccountData(depositAccountData.id, depositAccountData.accountNo, depositAccountData.externalId,
|
||||
final FixedDepositAccountData result = new FixedDepositAccountData(depositAccountData.id, depositAccountData.accountNo, depositAccountData.externalId,
|
||||
depositAccountData.groupId, depositAccountData.groupName, depositAccountData.clientId, depositAccountData.clientName,
|
||||
depositAccountData.depositProductId, depositAccountData.depositProductName, depositAccountData.fieldOfficerId,
|
||||
depositAccountData.fieldOfficerName, depositAccountData.status, depositAccountData.timeline, depositAccountData.currency,
|
||||
@@ -170,11 +330,15 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
depositPeriod, depositPeriodFrequency, periodFrequencyTypeOptions, depositType, onAccountClosure, onAccountClosureOptions,
|
||||
paymentTypeOptions, savingsAccountDatas, linkedAccount, transferInterestToSavings, depositAccountData.withHoldTax,
|
||||
depositAccountData.taxGroup, maturityInstructionOptions, transferToSavingsId, transferToSavingsAccount);
|
||||
if (depositAccountData instanceof FixedDepositAccountData) {
|
||||
result.copyCbsFieldsFrom((FixedDepositAccountData) depositAccountData);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static FixedDepositAccountData withInterestChart(final FixedDepositAccountData account,
|
||||
final DepositAccountInterestRateChartData accountChart) {
|
||||
return new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
final FixedDepositAccountData result = new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
account.clientId, account.clientName, account.depositProductId, account.depositProductName, account.fieldOfficerId,
|
||||
account.fieldOfficerName, account.status, account.timeline, account.currency, account.nominalAnnualInterestRate,
|
||||
account.interestCompoundingPeriodType, account.interestPostingPeriodType, account.interestCalculationType,
|
||||
@@ -192,6 +356,8 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
account.onAccountClosure, account.onAccountClosureOptions, account.paymentTypeOptions, account.savingsAccounts,
|
||||
account.linkedAccount, account.transferInterestToSavings, account.withHoldTax, account.taxGroup,
|
||||
account.maturityInstructionOptions, account.transferToSavingsId, account.transferToSavingsAccount);
|
||||
result.copyCbsFieldsFrom(account);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static FixedDepositAccountData associationsAndTemplate(final FixedDepositAccountData account, FixedDepositAccountData template,
|
||||
@@ -202,7 +368,7 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
template = account;
|
||||
}
|
||||
|
||||
return new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
final FixedDepositAccountData result = new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
account.clientId, account.clientName, account.depositProductId, account.depositProductName, account.fieldOfficerId,
|
||||
account.fieldOfficerName, account.status, account.timeline, account.currency, account.nominalAnnualInterestRate,
|
||||
account.interestCompoundingPeriodType, account.interestPostingPeriodType, account.interestCalculationType,
|
||||
@@ -220,6 +386,8 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
account.onAccountClosure, account.onAccountClosureOptions, account.paymentTypeOptions, template.savingsAccounts,
|
||||
linkedAccount, account.transferInterestToSavings, account.withHoldTax, account.taxGroup, account.maturityInstructionOptions,
|
||||
account.transferToSavingsId, transferToSavingsAccount);
|
||||
result.copyCbsFieldsFrom(account);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static FixedDepositAccountData withTemplateOptions(final FixedDepositAccountData account,
|
||||
@@ -234,7 +402,7 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
final Collection<EnumOptionData> periodFrequencyTypeOptions, final Collection<SavingsAccountData> savingsAccounts,
|
||||
final Collection<EnumOptionData> maturityInstructionOptions) {
|
||||
|
||||
return new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
final FixedDepositAccountData result = new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
account.clientId, account.clientName, account.depositProductId, account.depositProductName, account.fieldOfficerId,
|
||||
account.fieldOfficerName, account.status, account.timeline, account.currency, account.nominalAnnualInterestRate,
|
||||
account.interestCompoundingPeriodType, account.interestPostingPeriodType, account.interestCalculationType,
|
||||
@@ -251,6 +419,8 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
account.onAccountClosure, account.onAccountClosureOptions, account.paymentTypeOptions, savingsAccounts,
|
||||
account.linkedAccount, account.transferInterestToSavings, account.withHoldTax, account.taxGroup, maturityInstructionOptions,
|
||||
account.transferToSavingsId, account.transferToSavingsAccount);
|
||||
result.copyCbsFieldsFrom(account);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static FixedDepositAccountData withClientTemplate(final Long clientId, final String clientName, final Long groupId,
|
||||
@@ -427,7 +597,7 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
final Collection<EnumOptionData> onAccountClosureOptions, final Collection<PaymentTypeData> paymentTypeOptions,
|
||||
final Collection<SavingsAccountData> savingsAccountDatas) {
|
||||
|
||||
return new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
final FixedDepositAccountData result = new FixedDepositAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName,
|
||||
account.clientId, account.clientName, account.depositProductId, account.depositProductName, account.fieldOfficerId,
|
||||
account.fieldOfficerName, account.status, account.timeline, account.currency, account.nominalAnnualInterestRate,
|
||||
account.interestCompoundingPeriodType, account.interestPostingPeriodType, account.interestCalculationType,
|
||||
@@ -445,7 +615,8 @@ public final class FixedDepositAccountData extends DepositAccountData {
|
||||
account.onAccountClosure, onAccountClosureOptions, paymentTypeOptions, savingsAccountDatas, account.linkedAccount,
|
||||
account.transferInterestToSavings, account.withHoldTax, account.taxGroup, account.maturityInstructionOptions,
|
||||
account.transferToSavingsId, account.transferToSavingsAccount);
|
||||
|
||||
result.copyCbsFieldsFrom(account);
|
||||
return result;
|
||||
}
|
||||
|
||||
private FixedDepositAccountData(final Long id, final String accountNo, final String externalId, final Long groupId,
|
||||
|
||||
Reference in New Issue
Block a user