|
@ -191,6 +191,11 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
return rb.setMsg("请输入保险金额"); |
|
|
return rb.setMsg("请输入保险金额"); |
|
|
} |
|
|
} |
|
|
loanSolutions.setPremiumCb(1); |
|
|
loanSolutions.setPremiumCb(1); |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getOffsetPremium())) { |
|
|
|
|
|
if(new BigDecimal(dto.getOffsetPremium()).compareTo(new BigDecimal(premium))>0){ |
|
|
|
|
|
return rb.setMsg("抵顶首年保险费不能超过保险费用"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanSolutions.setPremiumCb(0); |
|
|
loanSolutions.setPremiumCb(0); |
|
@ -206,12 +211,17 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
return rb.setMsg("请输入购置税"); |
|
|
return rb.setMsg("请输入购置税"); |
|
|
} |
|
|
} |
|
|
loanSolutions.setPurchaseTaxCb(1); |
|
|
loanSolutions.setPurchaseTaxCb(1); |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getOffsetPurchasetax())) { |
|
|
|
|
|
if(new BigDecimal(dto.getOffsetPurchasetax()).compareTo(new BigDecimal(purchaseTax))>0){ |
|
|
|
|
|
return rb.setMsg("抵顶购置税不能超过购置税"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanSolutions.setPurchaseTaxCb(0); |
|
|
loanSolutions.setPurchaseTaxCb(0); |
|
|
} |
|
|
} |
|
|
//是否勾选车损上浮
|
|
|
//是否勾选车损上浮
|
|
|
if (dto.isVehDamageFloatCb()) { |
|
|
/* if (dto.isVehDamageFloatCb()) { |
|
|
//车损上浮
|
|
|
//车损上浮
|
|
|
String vehDamageFloat = dto.getVehDamageFloat(); |
|
|
String vehDamageFloat = dto.getVehDamageFloat(); |
|
|
if (StringUtils.isNotBlank(vehDamageFloat)) { |
|
|
if (StringUtils.isNotBlank(vehDamageFloat)) { |
|
@ -224,7 +234,7 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
} else { |
|
|
} else { |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO)); |
|
|
loanSolutions.setVehDamageFloatCb(0); |
|
|
loanSolutions.setVehDamageFloatCb(0); |
|
|
} |
|
|
}*/ |
|
|
loanSolutions.setLoanTotal(loanTotal); |
|
|
loanSolutions.setLoanTotal(loanTotal); |
|
|
//产品贷款金额
|
|
|
//产品贷款金额
|
|
|
BigDecimal loanAmount = new BigDecimal(BigInteger.ZERO); |
|
|
BigDecimal loanAmount = new BigDecimal(BigInteger.ZERO); |
|
@ -509,19 +519,23 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO); |
|
|
BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO); |
|
|
//抵顶首年保险费
|
|
|
//抵顶首年保险费
|
|
|
String offsetPremium = dto.getOffsetPremium(); |
|
|
String offsetPremium = dto.getOffsetPremium(); |
|
|
if (StringUtils.isNotBlank(offsetPremium)) { |
|
|
if(dto.isPremiumCb()){ |
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium)); |
|
|
if (StringUtils.isNotBlank(offsetPremium)) { |
|
|
loanSolutionsDetail.setOffsetPremium(new BigDecimal(offsetPremium)); |
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium)); |
|
|
} else { |
|
|
loanSolutionsDetail.setOffsetPremium(new BigDecimal(offsetPremium)); |
|
|
loanSolutionsDetail.setOffsetPremium(BigDecimal.ZERO); |
|
|
} else { |
|
|
|
|
|
loanSolutionsDetail.setOffsetPremium(BigDecimal.ZERO); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
//抵顶购置税
|
|
|
if (dto.isPurchaseTaxCb()) { |
|
|
String offsetPurchasetax = dto.getOffsetPurchasetax(); |
|
|
//抵顶购置税
|
|
|
if (StringUtils.isNotBlank(offsetPurchasetax)) { |
|
|
String offsetPurchasetax = dto.getOffsetPurchasetax(); |
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax)); |
|
|
if (StringUtils.isNotBlank(offsetPurchasetax)) { |
|
|
loanSolutionsDetail.setOffsetPurchasetax(new BigDecimal(offsetPurchasetax)); |
|
|
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax)); |
|
|
} else { |
|
|
loanSolutionsDetail.setOffsetPurchasetax(new BigDecimal(offsetPurchasetax)); |
|
|
loanSolutionsDetail.setOffsetPurchasetax(BigDecimal.ZERO); |
|
|
} else { |
|
|
|
|
|
loanSolutionsDetail.setOffsetPurchasetax(BigDecimal.ZERO); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
//实收合计 = 应收合计-抵顶合计
|
|
|
//实收合计 = 应收合计-抵顶合计
|
|
|
BigDecimal realTotal = receivableTotal.subtract(offsetTotal); |
|
|
BigDecimal realTotal = receivableTotal.subtract(offsetTotal); |
|
|