Added deposit amount fields in Read deposit
This commit is contained in:
+25
-7
@@ -38,6 +38,9 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
private EnumOptionData maxDepositTermType;
|
private EnumOptionData maxDepositTermType;
|
||||||
protected Integer inMultiplesOfDepositTerm;
|
protected Integer inMultiplesOfDepositTerm;
|
||||||
protected EnumOptionData inMultiplesOfDepositTermType;
|
protected EnumOptionData inMultiplesOfDepositTermType;
|
||||||
|
protected BigDecimal minDepositAmount;
|
||||||
|
protected BigDecimal depositAmount;
|
||||||
|
protected BigDecimal maxDepositAmount;
|
||||||
|
|
||||||
private Collection<EnumOptionData> interestFreePeriodTypeOptions;
|
private Collection<EnumOptionData> interestFreePeriodTypeOptions;
|
||||||
private Collection<EnumOptionData> preClosurePenalInterestOnTypeOptions;
|
private Collection<EnumOptionData> preClosurePenalInterestOnTypeOptions;
|
||||||
@@ -85,6 +88,9 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
final EnumOptionData maxDepositTermType = null;
|
final EnumOptionData maxDepositTermType = null;
|
||||||
final Integer inMultiplesOfDepositTerm = null;
|
final Integer inMultiplesOfDepositTerm = null;
|
||||||
final EnumOptionData inMultiplesOfDepositTermType = null;
|
final EnumOptionData inMultiplesOfDepositTermType = null;
|
||||||
|
final BigDecimal minDepositAmount = null;
|
||||||
|
final BigDecimal depositAmount = null;
|
||||||
|
final BigDecimal maxDepositAmount = null;
|
||||||
|
|
||||||
return new FixedDepositProductData(id, name, shortName, description, currency, nominalAnnualInterestRate,
|
return new FixedDepositProductData(id, name, shortName, description, currency, nominalAnnualInterestRate,
|
||||||
interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType,
|
interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType,
|
||||||
@@ -95,8 +101,8 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
penaltyToIncomeAccountMappings, interestRateCharts, chartTemplate, interestFreePeriodApplicable, interestFreeFromPeriod,
|
penaltyToIncomeAccountMappings, interestRateCharts, chartTemplate, interestFreePeriodApplicable, interestFreeFromPeriod,
|
||||||
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
||||||
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
||||||
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType, depositTermTypeOptions,
|
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType,
|
||||||
inMultiplesOfDepositTermTypeOptions);
|
minDepositAmount, depositAmount, maxDepositAmount, depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FixedDepositProductData withCharges(final FixedDepositProductData existingProduct, final Collection<ChargeData> charges) {
|
public static FixedDepositProductData withCharges(final FixedDepositProductData existingProduct, final Collection<ChargeData> charges) {
|
||||||
@@ -118,6 +124,7 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
existingProduct.interestFreePeriodTypeOptions, existingProduct.preClosurePenalInterestOnTypeOptions,
|
existingProduct.interestFreePeriodTypeOptions, existingProduct.preClosurePenalInterestOnTypeOptions,
|
||||||
existingProduct.minDepositTerm, existingProduct.maxDepositTerm, existingProduct.minDepositTermType,
|
existingProduct.minDepositTerm, existingProduct.maxDepositTerm, existingProduct.minDepositTermType,
|
||||||
existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm, existingProduct.inMultiplesOfDepositTermType,
|
existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm, existingProduct.inMultiplesOfDepositTermType,
|
||||||
|
existingProduct.minDepositAmount, existingProduct.depositAmount, existingProduct.maxDepositAmount,
|
||||||
existingProduct.depositTermTypeOptions, existingProduct.inMultiplesOfDepositTermTypeOptions);
|
existingProduct.depositTermTypeOptions, existingProduct.inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +162,8 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
existingProduct.preClosurePenalInterest, existingProduct.preClosurePenalInterestOnType, interestFreePeriodTypes,
|
existingProduct.preClosurePenalInterest, existingProduct.preClosurePenalInterestOnType, interestFreePeriodTypes,
|
||||||
preClosurePenalInterestOnTypeOptions, existingProduct.minDepositTerm, existingProduct.maxDepositTerm,
|
preClosurePenalInterestOnTypeOptions, existingProduct.minDepositTerm, existingProduct.maxDepositTerm,
|
||||||
existingProduct.minDepositTermType, existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm,
|
existingProduct.minDepositTermType, existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm,
|
||||||
existingProduct.inMultiplesOfDepositTermType, depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
existingProduct.inMultiplesOfDepositTermType, existingProduct.minDepositAmount, existingProduct.depositAmount,
|
||||||
|
existingProduct.maxDepositAmount, depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FixedDepositProductData withAccountingDetails(final FixedDepositProductData existingProduct,
|
public static FixedDepositProductData withAccountingDetails(final FixedDepositProductData existingProduct,
|
||||||
@@ -193,6 +201,7 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
existingProduct.interestFreePeriodTypeOptions, existingProduct.preClosurePenalInterestOnTypeOptions,
|
existingProduct.interestFreePeriodTypeOptions, existingProduct.preClosurePenalInterestOnTypeOptions,
|
||||||
existingProduct.minDepositTerm, existingProduct.maxDepositTerm, existingProduct.minDepositTermType,
|
existingProduct.minDepositTerm, existingProduct.maxDepositTerm, existingProduct.minDepositTermType,
|
||||||
existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm, existingProduct.inMultiplesOfDepositTermType,
|
existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm, existingProduct.inMultiplesOfDepositTermType,
|
||||||
|
existingProduct.minDepositAmount, existingProduct.depositAmount, existingProduct.maxDepositAmount,
|
||||||
existingProduct.depositTermTypeOptions, existingProduct.inMultiplesOfDepositTermTypeOptions);
|
existingProduct.depositTermTypeOptions, existingProduct.inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +210,8 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
final boolean preClosurePenalApplicable, final BigDecimal preClosurePenalInterest,
|
final boolean preClosurePenalApplicable, final BigDecimal preClosurePenalInterest,
|
||||||
final EnumOptionData preClosurePenalInterestOnType, final Integer minDepositTerm, final Integer maxDepositTerm,
|
final EnumOptionData preClosurePenalInterestOnType, final Integer minDepositTerm, final Integer maxDepositTerm,
|
||||||
final EnumOptionData minDepositTermType, final EnumOptionData maxDepositTermType, final Integer inMultiplesOfDepositTerm,
|
final EnumOptionData minDepositTermType, final EnumOptionData maxDepositTermType, final Integer inMultiplesOfDepositTerm,
|
||||||
final EnumOptionData inMultiplesOfDepositTermType) {
|
final EnumOptionData inMultiplesOfDepositTermType, final BigDecimal minDepositAmount, final BigDecimal depositAmount,
|
||||||
|
final BigDecimal maxDepositAmount) {
|
||||||
|
|
||||||
final Map<String, Object> accountingMappings = null;
|
final Map<String, Object> accountingMappings = null;
|
||||||
final Collection<PaymentTypeToGLAccountMapper> paymentChannelToFundSourceMappings = null;
|
final Collection<PaymentTypeToGLAccountMapper> paymentChannelToFundSourceMappings = null;
|
||||||
@@ -241,7 +251,7 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
||||||
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
||||||
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType,
|
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType,
|
||||||
depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
minDepositAmount, depositAmount, maxDepositAmount, depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FixedDepositProductData lookup(final Long id, final String name) {
|
public static FixedDepositProductData lookup(final Long id, final String name) {
|
||||||
@@ -292,6 +302,9 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
final EnumOptionData maxDepositTermType = null;
|
final EnumOptionData maxDepositTermType = null;
|
||||||
final Integer inMultiplesOfDepositTerm = null;
|
final Integer inMultiplesOfDepositTerm = null;
|
||||||
final EnumOptionData inMultiplesOfDepositTermType = null;
|
final EnumOptionData inMultiplesOfDepositTermType = null;
|
||||||
|
final BigDecimal minDepositAmount = null;
|
||||||
|
final BigDecimal depositAmount = null;
|
||||||
|
final BigDecimal maxDepositAmount = null;
|
||||||
final Collection<EnumOptionData> depositTermTypeOptions = null;
|
final Collection<EnumOptionData> depositTermTypeOptions = null;
|
||||||
final Collection<EnumOptionData> inMultiplesOfDepositTermTypeOptions = null;
|
final Collection<EnumOptionData> inMultiplesOfDepositTermTypeOptions = null;
|
||||||
|
|
||||||
@@ -305,7 +318,7 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
||||||
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
preClosurePenalInterestOnType, interestFreePeriodTypes, preClosurePenalInterestOnTypeOptions, minDepositTerm,
|
||||||
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType,
|
maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm, inMultiplesOfDepositTermType,
|
||||||
depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
minDepositAmount, depositAmount, maxDepositAmount, depositTermTypeOptions, inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FixedDepositProductData withInterestChart(final FixedDepositProductData existingProduct,
|
public static FixedDepositProductData withInterestChart(final FixedDepositProductData existingProduct,
|
||||||
@@ -328,7 +341,8 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
existingProduct.preClosurePenalInterestOnType, existingProduct.interestFreePeriodTypeOptions,
|
existingProduct.preClosurePenalInterestOnType, existingProduct.interestFreePeriodTypeOptions,
|
||||||
existingProduct.preClosurePenalInterestOnTypeOptions, existingProduct.minDepositTerm, existingProduct.maxDepositTerm,
|
existingProduct.preClosurePenalInterestOnTypeOptions, existingProduct.minDepositTerm, existingProduct.maxDepositTerm,
|
||||||
existingProduct.minDepositTermType, existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm,
|
existingProduct.minDepositTermType, existingProduct.maxDepositTermType, existingProduct.inMultiplesOfDepositTerm,
|
||||||
existingProduct.inMultiplesOfDepositTermType, existingProduct.depositTermTypeOptions,
|
existingProduct.inMultiplesOfDepositTermType, existingProduct.minDepositAmount, existingProduct.depositAmount,
|
||||||
|
existingProduct.maxDepositAmount, existingProduct.depositTermTypeOptions,
|
||||||
existingProduct.inMultiplesOfDepositTermTypeOptions);
|
existingProduct.inMultiplesOfDepositTermTypeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,6 +371,7 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
final Collection<EnumOptionData> preClosurePenalInterestOnTypeOptions, final Integer minDepositTerm,
|
final Collection<EnumOptionData> preClosurePenalInterestOnTypeOptions, final Integer minDepositTerm,
|
||||||
final Integer maxDepositTerm, final EnumOptionData minDepositTermType, final EnumOptionData maxDepositTermType,
|
final Integer maxDepositTerm, final EnumOptionData minDepositTermType, final EnumOptionData maxDepositTermType,
|
||||||
final Integer inMultiplesOfDepositTerm, final EnumOptionData inMultiplesOfDepositTermType,
|
final Integer inMultiplesOfDepositTerm, final EnumOptionData inMultiplesOfDepositTermType,
|
||||||
|
final BigDecimal minDepositAmount, final BigDecimal depositAmount, final BigDecimal maxDepositAmount,
|
||||||
final Collection<EnumOptionData> depositTermTypeOptions, Collection<EnumOptionData> inMultiplesOfDepositTermTypeOptions) {
|
final Collection<EnumOptionData> depositTermTypeOptions, Collection<EnumOptionData> inMultiplesOfDepositTermTypeOptions) {
|
||||||
|
|
||||||
super(id, name, shortName, description, currency, nominalAnnualInterestRate, interestCompoundingPeriodType,
|
super(id, name, shortName, description, currency, nominalAnnualInterestRate, interestCompoundingPeriodType,
|
||||||
@@ -381,6 +396,9 @@ public class FixedDepositProductData extends DepositProductData {
|
|||||||
this.maxDepositTermType = maxDepositTermType;
|
this.maxDepositTermType = maxDepositTermType;
|
||||||
this.inMultiplesOfDepositTerm = inMultiplesOfDepositTerm;
|
this.inMultiplesOfDepositTerm = inMultiplesOfDepositTerm;
|
||||||
this.inMultiplesOfDepositTermType = inMultiplesOfDepositTermType;
|
this.inMultiplesOfDepositTermType = inMultiplesOfDepositTermType;
|
||||||
|
this.minDepositAmount = minDepositAmount;
|
||||||
|
this.depositAmount = depositAmount;
|
||||||
|
this.maxDepositAmount = maxDepositAmount;
|
||||||
|
|
||||||
// template
|
// template
|
||||||
this.interestFreePeriodTypeOptions = interestFreePeriodTypeOptions;
|
this.interestFreePeriodTypeOptions = interestFreePeriodTypeOptions;
|
||||||
|
|||||||
+7
-2
@@ -208,7 +208,9 @@ public class DepositProductReadPlatformServiceImpl implements DepositProductRead
|
|||||||
sqlBuilder.append("dptp.min_deposit_term_type_enum as minDepositTermTypeId, ");
|
sqlBuilder.append("dptp.min_deposit_term_type_enum as minDepositTermTypeId, ");
|
||||||
sqlBuilder.append("dptp.max_deposit_term_type_enum as maxDepositTermTypeId, ");
|
sqlBuilder.append("dptp.max_deposit_term_type_enum as maxDepositTermTypeId, ");
|
||||||
sqlBuilder.append("dptp.in_multiples_of_deposit_term as inMultiplesOfDepositTerm, ");
|
sqlBuilder.append("dptp.in_multiples_of_deposit_term as inMultiplesOfDepositTerm, ");
|
||||||
sqlBuilder.append("dptp.in_multiples_of_deposit_term_type_enum as inMultiplesOfDepositTermTypeId ");
|
sqlBuilder.append("dptp.in_multiples_of_deposit_term_type_enum as inMultiplesOfDepositTermTypeId, ");
|
||||||
|
sqlBuilder.append("dptp.min_deposit_amount as minDepositAmount, dptp.deposit_amount as depositAmount, ");
|
||||||
|
sqlBuilder.append("dptp.max_deposit_amount as maxDepositAmount ");
|
||||||
sqlBuilder.append("from m_savings_product sp ");
|
sqlBuilder.append("from m_savings_product sp ");
|
||||||
sqlBuilder.append("left join m_deposit_product_term_and_preclosure dptp on sp.id=dptp.savings_product_id ");
|
sqlBuilder.append("left join m_deposit_product_term_and_preclosure dptp on sp.id=dptp.savings_product_id ");
|
||||||
sqlBuilder.append("join m_currency curr on curr.code = sp.currency_code ");
|
sqlBuilder.append("join m_currency curr on curr.code = sp.currency_code ");
|
||||||
@@ -250,11 +252,14 @@ public class DepositProductReadPlatformServiceImpl implements DepositProductRead
|
|||||||
final Integer inMultiplesOfDepositTermTypeId = JdbcSupport.getInteger(rs, "inMultiplesOfDepositTermTypeId");
|
final Integer inMultiplesOfDepositTermTypeId = JdbcSupport.getInteger(rs, "inMultiplesOfDepositTermTypeId");
|
||||||
final EnumOptionData inMultiplesOfDepositTermType = (inMultiplesOfDepositTermTypeId == null) ? null : SavingsEnumerations
|
final EnumOptionData inMultiplesOfDepositTermType = (inMultiplesOfDepositTermTypeId == null) ? null : SavingsEnumerations
|
||||||
.depositTermFrequencyType(inMultiplesOfDepositTermTypeId);
|
.depositTermFrequencyType(inMultiplesOfDepositTermTypeId);
|
||||||
|
final BigDecimal minDepositAmount = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "minDepositAmount");
|
||||||
|
final BigDecimal depositAmount = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "depositAmount");
|
||||||
|
final BigDecimal maxDepositAmount = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "maxDepositAmount");
|
||||||
|
|
||||||
return FixedDepositProductData.instance(depositProductData, interestFreePeriodApplicable, interestFreeFromPeriod,
|
return FixedDepositProductData.instance(depositProductData, interestFreePeriodApplicable, interestFreeFromPeriod,
|
||||||
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
interestFreeToPeriod, interestFreePeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest,
|
||||||
preClosurePenalInterestOnType, minDepositTerm, maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm,
|
preClosurePenalInterestOnType, minDepositTerm, maxDepositTerm, minDepositTermType, maxDepositTermType, inMultiplesOfDepositTerm,
|
||||||
inMultiplesOfDepositTermType);
|
inMultiplesOfDepositTermType, minDepositAmount, depositAmount, maxDepositAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user