Browse Source

修改

master
dimengzhe 3 days ago
parent
commit
17a3fd02c3
  1. 174
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java

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

@ -1616,13 +1616,22 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
calculateVo.setDownPayAmounts(calculateVo.getLoanDownPay()); calculateVo.setDownPayAmounts(calculateVo.getLoanDownPay());
//代收费用合计计算 //代收费用合计计算
BigDecimal proxyTotal = BigDecimal.ZERO; BigDecimal proxyTotal = BigDecimal.ZERO;
if (StringUtils.isNotBlank(query.getProxyPremium())) { if("01".equals(query.getDealWayKey())){//公司办理
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPremium())); if(query.isPremiumCb() && StringUtils.isNotBlank(query.getPremium())){//保险费
} query.setProxyPremium(query.getPremium());
if (StringUtils.isNotBlank(query.getProxyPurchasetax())) { }
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPurchasetax())); if(query.isPurchaseTaxCb() && StringUtils.isNotBlank(query.getPurchaseTax())){//购置税
query.setProxyPurchasetax(query.getProxyPurchasetax());
}
if (StringUtils.isNotBlank(query.getProxyPremium())) {
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPremium()));
}
if (StringUtils.isNotBlank(query.getProxyPurchasetax())) {
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPurchasetax()));
}
calculateVo.setProxyTotal(proxyTotal.toString());
} }
calculateVo.setProxyTotal(proxyTotal.toString());
//应收合计 = 融资首付+贷款保证金+保险保证金+落户保证金+服务费+代收意外险+补车价+上牌费+运管费+其它费用 //应收合计 = 融资首付+贷款保证金+保险保证金+落户保证金+服务费+代收意外险+补车价+上牌费+运管费+其它费用
BigDecimal receivableTotal = new BigDecimal(BigInteger.ZERO); BigDecimal receivableTotal = new BigDecimal(BigInteger.ZERO);
receivableTotal = receivableTotal.add(new BigDecimal(calculateVo.getDownPayAmounts())); receivableTotal = receivableTotal.add(new BigDecimal(calculateVo.getDownPayAmounts()));
@ -1681,18 +1690,22 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
calculateVo.setReceivableTotal(receivableTotal.toString()); calculateVo.setReceivableTotal(receivableTotal.toString());
//抵顶费用合计 = 抵顶首年保险费+抵顶购置税 //抵顶费用合计 = 抵顶首年保险费+抵顶购置税
BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO); BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO);
//抵顶首年保险费 if("02".equals(query.getDealWayKey())){//自行办理
String offsetPremium = query.getOffsetPremium(); //抵顶首年保险费
if (StringUtils.isNotBlank(offsetPremium)) { String offsetPremium = query.getOffsetPremium();
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium)); if (StringUtils.isNotBlank(offsetPremium)) {
} offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium));
//抵顶购置税 }
String offsetPurchasetax = query.getOffsetPurchasetax(); //抵顶购置税
if (StringUtils.isNotBlank(offsetPurchasetax)) { String offsetPurchasetax = query.getOffsetPurchasetax();
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax)); if (StringUtils.isNotBlank(offsetPurchasetax)) {
} offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax));
offsetTotal = offsetTotal.add(offsetAccessoriesBig); }
calculateVo.setOffsetTotal(offsetTotal.toString()); offsetTotal = offsetTotal.add(offsetAccessoriesBig);
calculateVo.setOffsetTotal(offsetTotal.toString());
}
//实收合计 = 应收合计-抵顶合计 //实收合计 = 应收合计-抵顶合计
BigDecimal realTotal = receivableTotal.subtract(offsetTotal); BigDecimal realTotal = receivableTotal.subtract(offsetTotal);
calculateVo.setRealTotal(realTotal.toString()); calculateVo.setRealTotal(realTotal.toString());
@ -2363,33 +2376,36 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
dealWayValue = dealWayValue.append("办理方式选择:").append("-"); dealWayValue = dealWayValue.append("办理方式选择:").append("-");
} }
list.add(getValueSpanSize(dealWayValue.toString(), 2, 2, false)); list.add(getValueSpanSize(dealWayValue.toString(), 2, 2, false));
StringBuilder proxyTotalValue = new StringBuilder(); if("01".equals(solutionssVo.getDealWayKey())){//公司办理
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { StringBuilder proxyTotalValue = new StringBuilder();
proxyTotalValue = proxyTotalValue.append("代收合计:").append(solutionssVo.getProxyTotal()); if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) {
} else { proxyTotalValue = proxyTotalValue.append("代收合计:").append(solutionssVo.getProxyTotal());
proxyTotalValue = proxyTotalValue.append("代收合计:").append("-"); } else {
} proxyTotalValue = proxyTotalValue.append("代收合计:").append("-");
list.add(getValueSpanSize(proxyTotalValue.toString(), 2, 2, false)); }
//代收首年保险费 list.add(getValueSpanSize(proxyTotalValue.toString(), 2, 2, false));
StringBuilder proxyPremiumValue = new StringBuilder(); //代收首年保险费
if (StringUtils.isNotBlank(solutionssVo.getProxyPremium())) { StringBuilder proxyPremiumValue = new StringBuilder();
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append(solutionssVo.getProxyPremium()); if (StringUtils.isNotBlank(solutionssVo.getProxyPremium())) {
} else { proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append(solutionssVo.getProxyPremium());
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append("-"); } else {
} proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append("-");
//代收购置税 }
StringBuilder proxyPurchasetaxValue = new StringBuilder(); //代收购置税
if (StringUtils.isNotBlank(solutionssVo.getProxyPurchasetax())) { StringBuilder proxyPurchasetaxValue = new StringBuilder();
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append(solutionssVo.getProxyPurchasetax()); if (StringUtils.isNotBlank(solutionssVo.getProxyPurchasetax())) {
} else { proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append(solutionssVo.getProxyPurchasetax());
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append("-"); } else {
} proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append("-");
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { }
if (new BigDecimal(solutionssVo.getProxyTotal()).compareTo(BigDecimal.ZERO) > 0) { if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) {
list.add(getValueSpanSize(proxyPremiumValue.toString(), 1, 0, false)); if (new BigDecimal(solutionssVo.getProxyTotal()).compareTo(BigDecimal.ZERO) > 0) {
list.add(getValueSpanSize(proxyPurchasetaxValue.toString(), 1, 0, false)); list.add(getValueSpanSize(proxyPremiumValue.toString(), 1, 0, false));
list.add(getValueSpanSize(proxyPurchasetaxValue.toString(), 1, 0, false));
}
} }
} }
//应收合计 //应收合计
StringBuilder receivableTotalValue = new StringBuilder(); StringBuilder receivableTotalValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getReceivableTotal())) { if (StringUtils.isNotBlank(solutionssVo.getReceivableTotal())) {
@ -2398,45 +2414,47 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
receivableTotalValue = receivableTotalValue.append("应收合计:").append("-"); receivableTotalValue = receivableTotalValue.append("应收合计:").append("-");
} }
list.add(getValueSpanSize(receivableTotalValue.toString(), 2, 0, true)); list.add(getValueSpanSize(receivableTotalValue.toString(), 2, 0, true));
if("02".equals(solutionssVo.getDealWayKey())){//自行办理
//抵顶费用合计
StringBuilder offsetTotalValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) {
offsetTotalValue = offsetTotalValue.append("抵顶费用合计:").append(solutionssVo.getOffsetTotal());
} else {
offsetTotalValue = offsetTotalValue.append("抵顶费用合计:").append("-");
}
list.add(getValueSpanSize(offsetTotalValue.toString(), 2, 2, false));
//抵顶首年保险费
StringBuilder offsetPremiumValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetPremium())) {
offsetPremiumValue = offsetPremiumValue.append("首年保险费抵顶:").append(solutionssVo.getOffsetPremium());
} else {
offsetPremiumValue = offsetPremiumValue.append("首年保险费抵顶:").append("-");
}
//抵顶费用合计 //抵顶购置税
StringBuilder offsetTotalValue = new StringBuilder(); StringBuilder offsetPurchasetaxValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) { if (StringUtils.isNotBlank(solutionssVo.getOffsetPurchasetax())) {
offsetTotalValue = offsetTotalValue.append("抵顶费用合计:").append(solutionssVo.getOffsetTotal()); offsetPurchasetaxValue = offsetPurchasetaxValue.append("购置税抵顶:").append(solutionssVo.getOffsetPurchasetax());
} else { } else {
offsetTotalValue = offsetTotalValue.append("抵顶费用合计:").append("-"); offsetPurchasetaxValue = offsetPurchasetaxValue.append("购置税抵顶:").append("-");
} }
list.add(getValueSpanSize(offsetTotalValue.toString(), 2, 2, false));
//抵顶首年保险费
StringBuilder offsetPremiumValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetPremium())) {
offsetPremiumValue = offsetPremiumValue.append("首年保险费抵顶:").append(solutionssVo.getOffsetPremium());
} else {
offsetPremiumValue = offsetPremiumValue.append("首年保险费抵顶:").append("-");
}
//抵顶购置税
StringBuilder offsetPurchasetaxValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetPurchasetax())) {
offsetPurchasetaxValue = offsetPurchasetaxValue.append("购置税抵顶:").append(solutionssVo.getOffsetPurchasetax());
} else {
offsetPurchasetaxValue = offsetPurchasetaxValue.append("购置税抵顶:").append("-");
}
//配件抵顶 //配件抵顶
StringBuilder offsetAccessoriesValue = new StringBuilder(); StringBuilder offsetAccessoriesValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOffsetAccessories())) { if (StringUtils.isNotBlank(solutionssVo.getOffsetAccessories())) {
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append(solutionssVo.getOffsetAccessories()); offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append(solutionssVo.getOffsetAccessories());
}else{ }else{
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append("-"); offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append("-");
} }
if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) { if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) {
if (new BigDecimal(solutionssVo.getOffsetTotal()).compareTo(BigDecimal.ZERO) > 0) { if (new BigDecimal(solutionssVo.getOffsetTotal()).compareTo(BigDecimal.ZERO) > 0) {
list.add(getValueSpanSize(offsetPremiumValue.toString(), 1, 0, false)); list.add(getValueSpanSize(offsetPremiumValue.toString(), 1, 0, false));
list.add(getValueSpanSize(offsetPurchasetaxValue.toString(), 1, 0, false)); list.add(getValueSpanSize(offsetPurchasetaxValue.toString(), 1, 0, false));
list.add(getValueSpanSize(offsetAccessoriesValue.toString(), 1, 0, false)); list.add(getValueSpanSize(offsetAccessoriesValue.toString(), 1, 0, false));
}
} }
} }
//实收合计 //实收合计
StringBuilder realTotalValue = new StringBuilder(); StringBuilder realTotalValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getRealTotal())) { if (StringUtils.isNotBlank(solutionssVo.getRealTotal())) {

Loading…
Cancel
Save