|
|
@ -1616,13 +1616,22 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
calculateVo.setDownPayAmounts(calculateVo.getLoanDownPay()); |
|
|
|
//代收费用合计计算
|
|
|
|
BigDecimal proxyTotal = BigDecimal.ZERO; |
|
|
|
if (StringUtils.isNotBlank(query.getProxyPremium())) { |
|
|
|
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPremium())); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getProxyPurchasetax())) { |
|
|
|
proxyTotal = proxyTotal.add(new BigDecimal(query.getProxyPurchasetax())); |
|
|
|
if("01".equals(query.getDealWayKey())){//公司办理
|
|
|
|
if(query.isPremiumCb() && StringUtils.isNotBlank(query.getPremium())){//保险费
|
|
|
|
query.setProxyPremium(query.getPremium()); |
|
|
|
} |
|
|
|
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); |
|
|
|
receivableTotal = receivableTotal.add(new BigDecimal(calculateVo.getDownPayAmounts())); |
|
|
@ -1681,18 +1690,22 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
calculateVo.setReceivableTotal(receivableTotal.toString()); |
|
|
|
//抵顶费用合计 = 抵顶首年保险费+抵顶购置税
|
|
|
|
BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO); |
|
|
|
//抵顶首年保险费
|
|
|
|
String offsetPremium = query.getOffsetPremium(); |
|
|
|
if (StringUtils.isNotBlank(offsetPremium)) { |
|
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium)); |
|
|
|
} |
|
|
|
//抵顶购置税
|
|
|
|
String offsetPurchasetax = query.getOffsetPurchasetax(); |
|
|
|
if (StringUtils.isNotBlank(offsetPurchasetax)) { |
|
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax)); |
|
|
|
} |
|
|
|
offsetTotal = offsetTotal.add(offsetAccessoriesBig); |
|
|
|
calculateVo.setOffsetTotal(offsetTotal.toString()); |
|
|
|
if("02".equals(query.getDealWayKey())){//自行办理
|
|
|
|
//抵顶首年保险费
|
|
|
|
String offsetPremium = query.getOffsetPremium(); |
|
|
|
if (StringUtils.isNotBlank(offsetPremium)) { |
|
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium)); |
|
|
|
} |
|
|
|
//抵顶购置税
|
|
|
|
String offsetPurchasetax = query.getOffsetPurchasetax(); |
|
|
|
if (StringUtils.isNotBlank(offsetPurchasetax)) { |
|
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax)); |
|
|
|
} |
|
|
|
offsetTotal = offsetTotal.add(offsetAccessoriesBig); |
|
|
|
calculateVo.setOffsetTotal(offsetTotal.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//实收合计 = 应收合计-抵顶合计
|
|
|
|
BigDecimal realTotal = receivableTotal.subtract(offsetTotal); |
|
|
|
calculateVo.setRealTotal(realTotal.toString()); |
|
|
@ -2363,33 +2376,36 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
dealWayValue = dealWayValue.append("办理方式选择:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(dealWayValue.toString(), 2, 2, false)); |
|
|
|
StringBuilder proxyTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { |
|
|
|
proxyTotalValue = proxyTotalValue.append("代收合计:").append(solutionssVo.getProxyTotal()); |
|
|
|
} else { |
|
|
|
proxyTotalValue = proxyTotalValue.append("代收合计:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(proxyTotalValue.toString(), 2, 2, false)); |
|
|
|
//代收首年保险费
|
|
|
|
StringBuilder proxyPremiumValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyPremium())) { |
|
|
|
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append(solutionssVo.getProxyPremium()); |
|
|
|
} else { |
|
|
|
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append("-"); |
|
|
|
} |
|
|
|
//代收购置税
|
|
|
|
StringBuilder proxyPurchasetaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyPurchasetax())) { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append(solutionssVo.getProxyPurchasetax()); |
|
|
|
} else { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append("-"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { |
|
|
|
if (new BigDecimal(solutionssVo.getProxyTotal()).compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
list.add(getValueSpanSize(proxyPremiumValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(proxyPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
if("01".equals(solutionssVo.getDealWayKey())){//公司办理
|
|
|
|
StringBuilder proxyTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { |
|
|
|
proxyTotalValue = proxyTotalValue.append("代收合计:").append(solutionssVo.getProxyTotal()); |
|
|
|
} else { |
|
|
|
proxyTotalValue = proxyTotalValue.append("代收合计:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(proxyTotalValue.toString(), 2, 2, false)); |
|
|
|
//代收首年保险费
|
|
|
|
StringBuilder proxyPremiumValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyPremium())) { |
|
|
|
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append(solutionssVo.getProxyPremium()); |
|
|
|
} else { |
|
|
|
proxyPremiumValue = proxyPremiumValue.append("代收首年保险费:").append("-"); |
|
|
|
} |
|
|
|
//代收购置税
|
|
|
|
StringBuilder proxyPurchasetaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyPurchasetax())) { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append(solutionssVo.getProxyPurchasetax()); |
|
|
|
} else { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append("-"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyTotal())) { |
|
|
|
if (new BigDecimal(solutionssVo.getProxyTotal()).compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
list.add(getValueSpanSize(proxyPremiumValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(proxyPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//应收合计
|
|
|
|
StringBuilder receivableTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getReceivableTotal())) { |
|
|
@ -2398,45 +2414,47 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
receivableTotalValue = receivableTotalValue.append("应收合计:").append("-"); |
|
|
|
} |
|
|
|
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(); |
|
|
|
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 offsetPurchasetaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetPurchasetax())) { |
|
|
|
offsetPurchasetaxValue = offsetPurchasetaxValue.append("购置税抵顶:").append(solutionssVo.getOffsetPurchasetax()); |
|
|
|
} else { |
|
|
|
offsetPurchasetaxValue = offsetPurchasetaxValue.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(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetAccessories())) { |
|
|
|
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append(solutionssVo.getOffsetAccessories()); |
|
|
|
}else{ |
|
|
|
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append("-"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) { |
|
|
|
if (new BigDecimal(solutionssVo.getOffsetTotal()).compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
list.add(getValueSpanSize(offsetPremiumValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(offsetPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(offsetAccessoriesValue.toString(), 1, 0, false)); |
|
|
|
//配件抵顶
|
|
|
|
StringBuilder offsetAccessoriesValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetAccessories())) { |
|
|
|
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append(solutionssVo.getOffsetAccessories()); |
|
|
|
}else{ |
|
|
|
offsetAccessoriesValue = offsetAccessoriesValue.append("配件抵顶:").append("-"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetTotal())) { |
|
|
|
if (new BigDecimal(solutionssVo.getOffsetTotal()).compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
list.add(getValueSpanSize(offsetPremiumValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(offsetPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize(offsetAccessoriesValue.toString(), 1, 0, false)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//实收合计
|
|
|
|
StringBuilder realTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getRealTotal())) { |
|
|
|