Browse Source

金融方案优化

master
dimengzhe 1 year ago
parent
commit
fe008f4c4b
  1. 8
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java

8
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java

@ -1347,7 +1347,9 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
actualDiscount = actualDiscount.add(loanInterest);
//根据旧利息总额和厂家贴息计算新利息总额
BigDecimal loanInterestNew = loanInterest.subtract(new BigDecimal(factoryDiscount));
actualDiscount = actualDiscount.subtract(loanInterestNew);
if(loanInterestNew.compareTo(BigDecimal.ZERO)<0){
actualDiscount = actualDiscount.subtract(BigDecimal.ZERO);
}
//再根据厂家贴息、旧月还计算新月还金额 = 旧月还金额 减去 厂家贴息 除以 期数
BigDecimal loanPayMoneyNew = loanPayMoney.subtract(new BigDecimal(factoryDiscount).divide(new BigDecimal(loanPeriod), 4, BigDecimal.ROUND_HALF_UP));
//根据新月还rate计算新年利率。
@ -1438,7 +1440,9 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
otherActualDiscount = otherActualDiscount.add(otherPolicyInterest);
//根据旧利息总额和厂家贴息计算新利息总额
BigDecimal otherPolicyInterestNew = otherPolicyInterest.subtract(new BigDecimal(otherDiscount));
otherActualDiscount = otherActualDiscount.subtract(otherPolicyInterestNew);
if(otherPolicyInterestNew.compareTo(BigDecimal.ZERO)<0){
otherActualDiscount = otherActualDiscount.subtract(BigDecimal.ZERO);
}
//再根据厂家贴息、旧月还计算新月还金额 = 旧月还金额 减去 厂家贴息 除以 期数
BigDecimal otherPolicyMonthlyRepayNew = otherPolicyMonthlyRepay.subtract(new BigDecimal(otherDiscount).divide(new BigDecimal(otherPolicyPeriod), 4, BigDecimal.ROUND_HALF_UP));
//根据新月还rate计算新年利率。

Loading…
Cancel
Save