|
|
@ -1,20 +1,24 @@ |
|
|
|
package com.yxt.anrui.riskcenter.biz.loansolutions; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrdersVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.OrderSolutionVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderPriceInfoVo; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.LoanFinOtherPolicy; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.SolutionDetailsDto; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDto; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.*; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.calculate.CalculateQuery; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.calculate.CalculateVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanfinotherPolicy.LoanFinOtherPolicyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanfinpolicy.LoanFinPolicyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansolutionsdetail.LoanSolutionsDetailService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansolutionsotherpolicy.LoanSolutionsOtherpolicyService; |
|
|
@ -22,12 +26,12 @@ import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigInteger; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
@ -57,6 +61,8 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
private FlowTaskFeign flowTaskFeign; |
|
|
|
@Autowired |
|
|
|
private LoanFinPolicyService loanFinPolicyService; |
|
|
|
@Autowired |
|
|
|
private LoanFinOtherPolicyService loanFinOtherPolicyService; |
|
|
|
|
|
|
|
public ResultBean<SolutionsDetailsVo> selectDetails(String saleOrderSid) { |
|
|
|
ResultBean<SolutionsDetailsVo> rb = ResultBean.fireFail(); |
|
|
@ -1399,6 +1405,621 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper |
|
|
|
return resultBean; |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<SolutionssVo> selectDetails2(String busSid) { |
|
|
|
ResultBean<SolutionssVo> rb = ResultBean.fireFail(); |
|
|
|
SolutionssVo solutionssVo = new SolutionssVo(); |
|
|
|
//根据关联sid查询是否存在金融方案
|
|
|
|
LoanSolutions loanSolutions = baseMapper.selectByApplySid(busSid); |
|
|
|
boolean isTrue = false; |
|
|
|
if (loanSolutions != null) { |
|
|
|
BeanUtil.copyProperties(loanSolutions, solutionssVo); |
|
|
|
if (loanSolutions.getTrailerAmount() != null) { |
|
|
|
solutionssVo.setGcPrice(loanSolutions.getTrailerAmount().toString()); |
|
|
|
} |
|
|
|
LoanSolutionsOtherpolicy loanSolutionsOtherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid()); |
|
|
|
if (loanSolutionsOtherpolicy != null) { |
|
|
|
BeanUtil.copyProperties(loanSolutionsOtherpolicy, solutionssVo); |
|
|
|
} |
|
|
|
LoanSolutionsDetail loanSolutionsDetail = loanSolutionsDetailService.selectLoanSid(loanSolutions.getSid()); |
|
|
|
if (loanSolutionsDetail != null) { |
|
|
|
BeanUtil.copyProperties(loanSolutionsDetail, solutionssVo); |
|
|
|
} |
|
|
|
isTrue = true; |
|
|
|
} |
|
|
|
//查询销售订单的状态
|
|
|
|
ResultBean<BusSalesOrdersVo> resultBean = busSalesOrderFeign.getSalesOrderOne(busSid); |
|
|
|
if (resultBean.getData() != null) { |
|
|
|
BusSalesOrdersVo busSalesOrdersVo = resultBean.getData(); |
|
|
|
solutionssVo.setSzPrice(busSalesOrdersVo.getSzPrice()); |
|
|
|
solutionssVo.setFinalPrice(busSalesOrdersVo.getFinalPrice()); |
|
|
|
if (busSalesOrdersVo.getBusSalesOrder() != null) { |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrdersVo.getBusSalesOrder(); |
|
|
|
//全款且为三方金融
|
|
|
|
if ("1".equals(busSalesOrder.getPayTypeKey()) && "2".equals(busSalesOrder.getFinancePlan())) { |
|
|
|
solutionssVo.setShowMore(false); |
|
|
|
solutionssVo.setFactoryDiscountUse("抵车款"); |
|
|
|
} else if ("2".equals(busSalesOrder.getPayTypeKey())) {//贷款
|
|
|
|
solutionssVo.setShowMore(true); |
|
|
|
solutionssVo.setFactoryDiscountUse("抵利息"); |
|
|
|
if (isTrue) { |
|
|
|
if (StringUtils.isNotBlank(loanSolutions.getPolicySid()) && loanSolutions.getOtherPolicyState() == 0) { |
|
|
|
LoanFinOtherPolicy loanFinOtherPolicy = loanFinOtherPolicyService.selectByMainSid(loanSolutions.getPolicySid()); |
|
|
|
if (loanFinOtherPolicy != null) { |
|
|
|
solutionssVo.setOtherPolicyName(loanFinOtherPolicy.getOtherPolicyName()); |
|
|
|
solutionssVo.setOtherPolicySid(loanFinOtherPolicy.getSid()); |
|
|
|
solutionssVo.setOtherPolicyPeriod(String.valueOf(loanFinOtherPolicy.getPeriod())); |
|
|
|
solutionssVo.setOtherPolicyYearRatio(loanFinOtherPolicy.getYearRatio().toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (isTrue) { |
|
|
|
List<SolutionListVo> formList = getFormList(solutionssVo); |
|
|
|
solutionssVo.setFinanceForms(formList); |
|
|
|
} |
|
|
|
solutionssVo.setBusSid(busSid); |
|
|
|
return rb.success().setData(solutionssVo); |
|
|
|
} |
|
|
|
|
|
|
|
public List<SolutionListVo> getFormList(SolutionssVo solutionssVo) { |
|
|
|
List<SolutionListVo> list = new ArrayList<>(); |
|
|
|
boolean isShowMore = solutionssVo.isShowMore(); |
|
|
|
if (isShowMore) { |
|
|
|
//是否打包
|
|
|
|
StringBuilder isPackValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getIsPack())) { |
|
|
|
if ("1".equals(solutionssVo.getIsPack())) { |
|
|
|
isPackValue = isPackValue.append("是否打包:").append("是"); |
|
|
|
} else { |
|
|
|
isPackValue = isPackValue.append("是否打包:").append("否"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
isPackValue = isPackValue.append("是否打包:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(isPackValue.toString(), 2, 0, false)); |
|
|
|
//资方及产品政策
|
|
|
|
StringBuilder polivyNameValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPolicyName())) { |
|
|
|
polivyNameValue = polivyNameValue.append("资方及产品政策:").append(solutionssVo.getPolicyName()); |
|
|
|
} else { |
|
|
|
polivyNameValue = polivyNameValue.append("资方及产品政策:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(polivyNameValue.toString(), 2, 0, false)); |
|
|
|
//标题
|
|
|
|
list.add(getValueSpanSize("融资项目", 2, 1, true)); |
|
|
|
//融资项目总额
|
|
|
|
StringBuilder loanTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanTotal())) { |
|
|
|
loanTotalValue = loanTotalValue.append("融资项目总额:").append(solutionssVo.getLoanTotal()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanTotalValue = loanTotalValue.append("融资项目总额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanTotalValue.toString(), 2, 0, false)); |
|
|
|
//主车发票价
|
|
|
|
StringBuilder mainVehicleAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getMainVehicleAmount())) { |
|
|
|
mainVehicleAmountValue = mainVehicleAmountValue.append("\t").append("主车发票价:").append(solutionssVo.getMainVehicleAmount()); |
|
|
|
} else { |
|
|
|
mainVehicleAmountValue = mainVehicleAmountValue.append("\t").append("主车发票价:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(mainVehicleAmountValue.toString(), 1, 0, false)); |
|
|
|
//融资票据
|
|
|
|
StringBuilder accessoriesAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getAccessoriesAmount())) { |
|
|
|
accessoriesAmountValue = accessoriesAmountValue.append("\t").append("配件:").append(solutionssVo.getAccessoriesAmount()); |
|
|
|
|
|
|
|
} else { |
|
|
|
accessoriesAmountValue = accessoriesAmountValue.append("\t").append("配件:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(accessoriesAmountValue.toString(), 1, 0, false)); |
|
|
|
//挂车
|
|
|
|
StringBuilder trailerAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getTrailerAmount())) { |
|
|
|
trailerAmountValue = trailerAmountValue.append("\t").append("挂车:").append(solutionssVo.getTrailerAmount()); |
|
|
|
|
|
|
|
} else { |
|
|
|
trailerAmountValue = trailerAmountValue.append("\t").append("挂车:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(trailerAmountValue.toString(), 1, 0, false)); |
|
|
|
//保险
|
|
|
|
StringBuilder premiumValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPremium())) { |
|
|
|
premiumValue = premiumValue.append("\t").append("保险:").append(solutionssVo.getPremium()); |
|
|
|
|
|
|
|
} else { |
|
|
|
premiumValue = premiumValue.append("\t").append("保险:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(premiumValue.toString(), 1, 0, false)); |
|
|
|
//购置税
|
|
|
|
StringBuilder purchaseTaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPurchaseTax())) { |
|
|
|
purchaseTaxValue = purchaseTaxValue.append("\t").append("购置税:").append(solutionssVo.getPurchaseTax()); |
|
|
|
} else { |
|
|
|
purchaseTaxValue = purchaseTaxValue.append("\t").append("购置税:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(purchaseTaxValue.toString(), 2, 0, false)); |
|
|
|
//首付比例
|
|
|
|
StringBuilder downPayRatioValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDownPayRatio())) { |
|
|
|
downPayRatioValue = downPayRatioValue.append("首付比例(%):").append(solutionssVo.getDownPayRatio()); |
|
|
|
|
|
|
|
} else { |
|
|
|
downPayRatioValue = downPayRatioValue.append("首付比例(%):").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(downPayRatioValue.toString(), 1, 0, false)); |
|
|
|
//首付金额
|
|
|
|
StringBuilder downPayAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDownPayAmount())) { |
|
|
|
downPayAmountValue = downPayAmountValue.append("首付金额:").append(solutionssVo.getDownPayAmount()); |
|
|
|
|
|
|
|
} else { |
|
|
|
downPayAmountValue = downPayAmountValue.append("首付金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(downPayAmountValue.toString(), 1, 0, false)); |
|
|
|
|
|
|
|
//产品贷款金额
|
|
|
|
StringBuilder loanAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanAmount())) { |
|
|
|
loanAmountValue = loanAmountValue.append("产品贷款金额:").append(solutionssVo.getLoanAmount()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanAmountValue = loanAmountValue.append("产品贷款金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanAmountValue.toString(), 1, 0, false)); |
|
|
|
//产品期数
|
|
|
|
StringBuilder loanPeriodValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanPeriod())) { |
|
|
|
loanPeriodValue = loanPeriodValue.append("产品期数:").append(solutionssVo.getLoanPeriod()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanPeriodValue = loanPeriodValue.append("产品期数:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanPeriodValue.toString(), 1, 0, false)); |
|
|
|
//贷款保证金比例
|
|
|
|
StringBuilder bondRatioValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getBondRatio())) { |
|
|
|
bondRatioValue = bondRatioValue.append("贷款保证金比例:").append(solutionssVo.getBondRatio()); |
|
|
|
|
|
|
|
} else { |
|
|
|
bondRatioValue = bondRatioValue.append("贷款保证金比例:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(bondRatioValue.toString(), 1, 0, false)); |
|
|
|
//贷款保证金
|
|
|
|
StringBuilder bondAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getBondAmount())) { |
|
|
|
bondAmountValue = bondAmountValue.append("贷款保证金:").append(solutionssVo.getBondAmount()); |
|
|
|
} else { |
|
|
|
bondAmountValue = bondAmountValue.append("贷款保证金:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(bondAmountValue.toString(), 1, 0, false)); |
|
|
|
//厂家贴息
|
|
|
|
StringBuilder factoryDiscountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getFactoryDiscount())) { |
|
|
|
factoryDiscountValue = factoryDiscountValue.append("厂家贴息:").append(solutionssVo.getFactoryDiscount()); |
|
|
|
} else { |
|
|
|
factoryDiscountValue = factoryDiscountValue.append("厂家贴息:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(factoryDiscountValue.toString(), 1, 0, false)); |
|
|
|
//厂家贴息用途
|
|
|
|
StringBuilder factoryDiscountUseValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getFactoryDiscountUse())) { |
|
|
|
factoryDiscountUseValue = factoryDiscountUseValue.append("厂家贴息用途:").append(solutionssVo.getFactoryDiscountUse()); |
|
|
|
|
|
|
|
} else { |
|
|
|
factoryDiscountUseValue = factoryDiscountUseValue.append("厂家贴息用途:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(factoryDiscountUseValue.toString(), 1, 0, false)); |
|
|
|
//年利率
|
|
|
|
StringBuilder policyYearRatioValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPolicyYearRatio())) { |
|
|
|
policyYearRatioValue = policyYearRatioValue.append("年利率:").append(solutionssVo.getPolicyYearRatio()); |
|
|
|
|
|
|
|
} else { |
|
|
|
policyYearRatioValue = policyYearRatioValue.append("年利率:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(policyYearRatioValue.toString(), 1, 0, false)); |
|
|
|
//利息总额
|
|
|
|
StringBuilder loanInterestValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanInterest())) { |
|
|
|
loanInterestValue = loanInterestValue.append("利息总额:").append(solutionssVo.getLoanInterest()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanInterestValue = loanInterestValue.append("利息总额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanInterestValue.toString(), 1, 0, false)); |
|
|
|
//月还金额
|
|
|
|
StringBuilder loanPayMoneyValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanPayMoney())) { |
|
|
|
loanPayMoneyValue = loanPayMoneyValue.append("月还金额:").append(solutionssVo.getLoanPayMoney()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanPayMoneyValue = loanPayMoneyValue.append("月还金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanPayMoneyValue.toString(), 2, 0, false)); |
|
|
|
if (solutionssVo.isOtherPolicyState()) { |
|
|
|
list.add(getValueSpanSize("其它融", 2, 1, true)); |
|
|
|
//其它融名称
|
|
|
|
StringBuilder otherPolicyNameValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyName())) { |
|
|
|
otherPolicyNameValue = otherPolicyNameValue.append("其它融名称:").append(solutionssVo.getOtherPolicyName()); |
|
|
|
|
|
|
|
} else { |
|
|
|
otherPolicyNameValue = otherPolicyNameValue.append("其它融名称:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyNameValue.toString(), 2, 0, false)); |
|
|
|
//贷款金额
|
|
|
|
StringBuilder otherPolicyAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyAmount())) { |
|
|
|
otherPolicyAmountValue = otherPolicyAmountValue.append("贷款金额:").append(solutionssVo.getOtherPolicyAmount()); |
|
|
|
|
|
|
|
} else { |
|
|
|
otherPolicyAmountValue = otherPolicyAmountValue.append("贷款金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyAmountValue.toString(), 1, 0, false)); |
|
|
|
//期数
|
|
|
|
StringBuilder otherPolicyPeriodValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyPeriod())) { |
|
|
|
otherPolicyPeriodValue = otherPolicyPeriodValue.append("期数:").append(solutionssVo.getOtherPolicyPeriod()); |
|
|
|
|
|
|
|
} else { |
|
|
|
otherPolicyPeriodValue = otherPolicyPeriodValue.append("期数:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyPeriodValue.toString(), 1, 0, false)); |
|
|
|
|
|
|
|
//年利率
|
|
|
|
StringBuilder otherPolicyYearRatioValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyYearRatio())) { |
|
|
|
otherPolicyYearRatioValue = otherPolicyYearRatioValue.append("年利率:").append(solutionssVo.getOtherPolicyYearRatio()); |
|
|
|
} else { |
|
|
|
otherPolicyYearRatioValue = otherPolicyYearRatioValue.append("年利率:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyYearRatioValue.toString(), 1, 0, false)); |
|
|
|
//利息总额
|
|
|
|
StringBuilder otherPolicyInterestValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyInterest())) { |
|
|
|
otherPolicyInterestValue = otherPolicyInterestValue.append("利息总额:").append(solutionssVo.getOtherPolicyInterest()); |
|
|
|
} else { |
|
|
|
otherPolicyInterestValue = otherPolicyInterestValue.append("利息总额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyInterestValue.toString(), 1, 0, false)); |
|
|
|
//月还金额
|
|
|
|
StringBuilder otherPolicyMonthlyRepayValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyMonthlyRepay())) { |
|
|
|
otherPolicyMonthlyRepayValue = otherPolicyMonthlyRepayValue.append("月还金额:").append(solutionssVo.getOtherPolicyMonthlyRepay()); |
|
|
|
|
|
|
|
} else { |
|
|
|
otherPolicyMonthlyRepayValue = otherPolicyMonthlyRepayValue.append("月还金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherPolicyMonthlyRepayValue.toString(), 2, 0, false)); |
|
|
|
} |
|
|
|
//方案汇总
|
|
|
|
list.add(getValueSpanSize("方案汇总", 2, 1, true)); |
|
|
|
//融资首付
|
|
|
|
StringBuilder loanDownPayValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getLoanDownPay())) { |
|
|
|
loanDownPayValue = loanDownPayValue.append("融资首付:").append(solutionssVo.getLoanDownPay()); |
|
|
|
} else { |
|
|
|
loanDownPayValue = loanDownPayValue.append("融资首付:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanDownPayValue.toString(), 1, 0, false)); |
|
|
|
StringBuilder downPayAmountsRatioValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDownPayAmountsRatio())) { |
|
|
|
downPayAmountsRatioValue = downPayAmountsRatioValue.append("实际首付比例:").append(solutionssVo.getDownPayAmountsRatio()); |
|
|
|
} else { |
|
|
|
downPayAmountsRatioValue = downPayAmountsRatioValue.append("实际首付比例:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(downPayAmountsRatioValue.toString(), 1, 0, false)); |
|
|
|
//总贷款金额
|
|
|
|
StringBuilder loanAmountTotalValue = new StringBuilder(); |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(solutionssVo.getLoanAmountTotal())) { |
|
|
|
loanAmountTotalValue = loanAmountTotalValue.append("总贷款金额:").append(solutionssVo.getLoanAmountTotal()); |
|
|
|
|
|
|
|
} else { |
|
|
|
loanAmountTotalValue = loanAmountTotalValue.append("总贷款金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanAmountTotalValue.toString(), 1, 0, false)); |
|
|
|
//期数
|
|
|
|
StringBuilder periodValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPeriod())) { |
|
|
|
periodValue = periodValue.append("期数:").append(solutionssVo.getPeriod()); |
|
|
|
|
|
|
|
} else { |
|
|
|
periodValue = periodValue.append("期数:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(periodValue.toString(), 1, 0, false)); |
|
|
|
//月还金额
|
|
|
|
StringBuilder monthlyRepayValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getMonthlyRepay())) { |
|
|
|
monthlyRepayValue = monthlyRepayValue.append("月还金额:").append(solutionssVo.getMonthlyRepay()); |
|
|
|
} else { |
|
|
|
monthlyRepayValue = monthlyRepayValue.append("月还金额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(monthlyRepayValue.toString(), 1, 0, false)); |
|
|
|
//利息总额
|
|
|
|
StringBuilder interestValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getInterest())) { |
|
|
|
interestValue = interestValue.append("利息总额:").append(solutionssVo.getInterest()); |
|
|
|
} else { |
|
|
|
interestValue = interestValue.append("利息总额:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(interestValue.toString(), 1, 0, false)); |
|
|
|
//预计首期还款日
|
|
|
|
StringBuilder returnTimeValue = new StringBuilder(); |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(solutionssVo.getReturnTime())) { |
|
|
|
returnTimeValue = returnTimeValue.append("预计首期还款日:").append(solutionssVo.getReturnTime()); |
|
|
|
} else { |
|
|
|
returnTimeValue = returnTimeValue.append("预计首期还款日:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(returnTimeValue.toString(), 1, 0, false)); |
|
|
|
//应收明细
|
|
|
|
list.add(getValueSpanSize("应收明细", 2, 1, true)); |
|
|
|
//融资首付
|
|
|
|
StringBuilder downPayAmountsValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDownPayAmounts())) { |
|
|
|
downPayAmountsValue = downPayAmountsValue.append("融资首付:").append(solutionssVo.getDownPayAmounts()); |
|
|
|
} else { |
|
|
|
downPayAmountsValue = downPayAmountsValue.append("融资首付:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(downPayAmountsValue.toString(), 1, 0, false)); |
|
|
|
//贷款保证金
|
|
|
|
StringBuilder bondAmountsValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getBondAmounts())) { |
|
|
|
bondAmountsValue = bondAmountsValue.append("贷款保证金:").append(solutionssVo.getBondAmounts()); |
|
|
|
} else { |
|
|
|
bondAmountsValue = bondAmountsValue.append("贷款保证金:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(bondAmountsValue.toString(), 1, 0, false)); |
|
|
|
//保险保证金
|
|
|
|
StringBuilder depositPremiumValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDepositPremium())) { |
|
|
|
depositPremiumValue = depositPremiumValue.append("保险保证金:").append(solutionssVo.getDepositPremium()); |
|
|
|
} else { |
|
|
|
depositPremiumValue = depositPremiumValue.append("保险保证金:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(depositPremiumValue.toString(), 1, 0, false)); |
|
|
|
//落户保证金
|
|
|
|
StringBuilder depositSettleValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDepositSettle())) { |
|
|
|
depositSettleValue = depositSettleValue.append("落户保证金:").append(solutionssVo.getDepositSettle()); |
|
|
|
} else { |
|
|
|
depositSettleValue = depositSettleValue.append("落户保证金:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(depositSettleValue.toString(), 1, 0, false)); |
|
|
|
//服务费
|
|
|
|
StringBuilder serviceAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getServiceAmount())) { |
|
|
|
serviceAmountValue = serviceAmountValue.append("服务费:").append(solutionssVo.getServiceAmount()); |
|
|
|
} else { |
|
|
|
serviceAmountValue = serviceAmountValue.append("服务费:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(serviceAmountValue.toString(), 1, 0, false)); |
|
|
|
//代收意外险
|
|
|
|
StringBuilder proxyAccidentPremiumValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyAccidentPremium())) { |
|
|
|
proxyAccidentPremiumValue = proxyAccidentPremiumValue.append("代收意外险:").append(solutionssVo.getProxyAccidentPremium()); |
|
|
|
} else { |
|
|
|
proxyAccidentPremiumValue = proxyAccidentPremiumValue.append("代收意外险:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(proxyAccidentPremiumValue.toString(), 1, 0, false)); |
|
|
|
//上牌费
|
|
|
|
StringBuilder registerAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getRegisterAmount())) { |
|
|
|
registerAmountValue = registerAmountValue.append("上牌费:").append(solutionssVo.getRegisterAmount()); |
|
|
|
} else { |
|
|
|
registerAmountValue = registerAmountValue.append("上牌费:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(registerAmountValue.toString(), 1, 0, false)); |
|
|
|
//运管费
|
|
|
|
StringBuilder operationAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOperationAmount())) { |
|
|
|
operationAmountValue = operationAmountValue.append("运管费:").append(solutionssVo.getOperationAmount()); |
|
|
|
} else { |
|
|
|
operationAmountValue = operationAmountValue.append("运管费:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(operationAmountValue.toString(), 1, 0, false)); |
|
|
|
//补车价
|
|
|
|
StringBuilder vehOtherPriceValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getVehOtherPrice())) { |
|
|
|
vehOtherPriceValue = vehOtherPriceValue.append("补车价:").append(solutionssVo.getVehOtherPrice()); |
|
|
|
} else { |
|
|
|
vehOtherPriceValue = vehOtherPriceValue.append("补车价:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(vehOtherPriceValue.toString(), 1, 0, false)); |
|
|
|
//其它费用
|
|
|
|
StringBuilder otherAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherAmount())) { |
|
|
|
otherAmountValue = otherAmountValue.append("其它费用:").append(solutionssVo.getOtherAmount()); |
|
|
|
} else { |
|
|
|
otherAmountValue = otherAmountValue.append("其它费用:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherAmountValue.toString(), 1, 0, false)); |
|
|
|
//其它费用说明
|
|
|
|
StringBuilder otherAmountRemarkValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOtherAmountRemark())) { |
|
|
|
otherAmountRemarkValue = otherAmountRemarkValue.append("其它费用说明:").append(solutionssVo.getOtherAmountRemark()); |
|
|
|
} else { |
|
|
|
otherAmountRemarkValue = otherAmountRemarkValue.append("其它费用说明:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(otherAmountRemarkValue.toString(), 1, 0, false)); |
|
|
|
//办理方式选择
|
|
|
|
StringBuilder dealWayValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDealWay())) { |
|
|
|
dealWayValue = dealWayValue.append("办理方式选择:").append(solutionssVo.getDealWay()); |
|
|
|
} else { |
|
|
|
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.getOffsetTotal()); |
|
|
|
} 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("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(proxyPremiumValue.toString(), 1, 0, false)); |
|
|
|
//代收购置税
|
|
|
|
StringBuilder proxyPurchasetaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getProxyPurchasetax())) { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append(solutionssVo.getProxyPurchasetax()); |
|
|
|
} else { |
|
|
|
proxyPurchasetaxValue = proxyPurchasetaxValue.append("代收购置税:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(proxyPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
//应收合计
|
|
|
|
StringBuilder receivableTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getReceivableTotal())) { |
|
|
|
receivableTotalValue = receivableTotalValue.append("应收合计:").append(solutionssVo.getReceivableTotal()); |
|
|
|
} else { |
|
|
|
receivableTotalValue = receivableTotalValue.append("应收合计:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(receivableTotalValue.toString(), 2, 0, true)); |
|
|
|
|
|
|
|
//抵顶费用合计
|
|
|
|
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("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(offsetPremiumValue.toString(), 1, 0, false)); |
|
|
|
//抵顶购置税
|
|
|
|
StringBuilder offsetPurchasetaxValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getOffsetPurchasetax())) { |
|
|
|
offsetPurchasetaxValue = offsetPurchasetaxValue.append("抵顶购置税:").append(solutionssVo.getOffsetPurchasetax()); |
|
|
|
} else { |
|
|
|
offsetPurchasetaxValue = offsetPurchasetaxValue.append("抵顶购置税:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(offsetPurchasetaxValue.toString(), 1, 0, false)); |
|
|
|
//实收合计
|
|
|
|
StringBuilder realTotalValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getRealTotal())) { |
|
|
|
realTotalValue = realTotalValue.append("实收合计:").append(solutionssVo.getRealTotal()); |
|
|
|
} else { |
|
|
|
realTotalValue = realTotalValue.append("实收合计:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(realTotalValue.toString(), 2, 0, true)); |
|
|
|
list.add(getValueSpanSize("", 2, 0, false)); |
|
|
|
//车辆总价
|
|
|
|
StringBuilder vehTotalPriceValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getVehTotalPrice())) { |
|
|
|
vehTotalPriceValue = vehTotalPriceValue.append("车辆总价:").append(solutionssVo.getVehTotalPrice()); |
|
|
|
} else { |
|
|
|
vehTotalPriceValue = vehTotalPriceValue.append("车辆总价:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(vehTotalPriceValue.toString(), 2, 0, false)); |
|
|
|
//名义留购价
|
|
|
|
StringBuilder nominalPriceValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getNominalPrice())) { |
|
|
|
nominalPriceValue = nominalPriceValue.append("名义留购价:").append(solutionssVo.getNominalPrice()); |
|
|
|
} else { |
|
|
|
nominalPriceValue = nominalPriceValue.append("名义留购价:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(nominalPriceValue.toString(), 2, 0, false)); |
|
|
|
|
|
|
|
} else { |
|
|
|
//资方及产品政策
|
|
|
|
StringBuilder polivyNameValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getPolicyName())) { |
|
|
|
polivyNameValue = polivyNameValue.append("资方及产品政策:").append(solutionssVo.getPolicyName()); |
|
|
|
} else { |
|
|
|
polivyNameValue = polivyNameValue.append("资方及产品政策:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(polivyNameValue.toString(), 2, 0, false)); |
|
|
|
list.add(getValueSpanSize("融资项目", 2, 1, true)); |
|
|
|
//厂家贴息
|
|
|
|
StringBuilder factoryDiscountValue = new StringBuilder(); |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(solutionssVo.getFactoryDiscount())) { |
|
|
|
factoryDiscountValue = factoryDiscountValue.append("厂家贴息:").append(solutionssVo.getFactoryDiscount()); |
|
|
|
} else { |
|
|
|
factoryDiscountValue = factoryDiscountValue.append("厂家贴息:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(factoryDiscountValue.toString(), 1, 0, false)); |
|
|
|
//厂家贴息用途
|
|
|
|
StringBuilder factoryDiscountUseValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getFactoryDiscountUse())) { |
|
|
|
factoryDiscountUseValue = factoryDiscountUseValue.append("厂家贴息用途:").append(solutionssVo.getFactoryDiscountUse()); |
|
|
|
} else { |
|
|
|
factoryDiscountUseValue = factoryDiscountUseValue.append("厂家贴息用途:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(factoryDiscountUseValue.toString(), 1, 0, false)); |
|
|
|
//贴息抵车款
|
|
|
|
StringBuilder factoryDiscountUseMoneyValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getDiscountCar())) { |
|
|
|
factoryDiscountUseMoneyValue = factoryDiscountUseValue.append("贴息抵车款:").append(solutionssVo.getDiscountCar()); |
|
|
|
} else { |
|
|
|
factoryDiscountUseMoneyValue = factoryDiscountUseValue.append("贴息抵车款:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(factoryDiscountUseMoneyValue.toString(), 1, 0, false)); |
|
|
|
list.add(getValueSpanSize("应收明细", 2, 1, true)); |
|
|
|
//服务费
|
|
|
|
StringBuilder serviceAmountValue = new StringBuilder(); |
|
|
|
if (StringUtils.isNotBlank(solutionssVo.getServiceAmount())) { |
|
|
|
serviceAmountValue = serviceAmountValue.append("服务费:").append(solutionssVo.getServiceAmount()); |
|
|
|
} else { |
|
|
|
serviceAmountValue = serviceAmountValue.append("服务费:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(serviceAmountValue.toString(), 2, 0, false)); |
|
|
|
|
|
|
|
} |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 金融方案的拼接 |
|
|
|
* |
|
|
|
* @param value 拼接内容 |
|
|
|
* @param spanSize 格数 |
|
|
|
* @param type 类型:0 最普通的 1 标题的 2是 加上划线的 |
|
|
|
* @param bold 是否加粗:true是,false否 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private SolutionListVo getValueSpanSize(String value, Integer spanSize, Integer type, boolean bold) { |
|
|
|
SolutionListVo orderSolutionVo = new SolutionListVo(); |
|
|
|
orderSolutionVo.setValue(value); |
|
|
|
orderSolutionVo.setSpanSize(spanSize); |
|
|
|
orderSolutionVo.setType(type); |
|
|
|
orderSolutionVo.setBold(bold); |
|
|
|
return orderSolutionVo; |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<SolutionssVo> details2(SolutionssQuery query) { |
|
|
|
ResultBean<SolutionssVo> rb = ResultBean.fireFail(); |
|
|
|
SolutionssVo solutionssVo = new SolutionssVo(); |
|
|
|
BeanUtil.copyProperties(query, solutionssVo); |
|
|
|
if (query.isShowMore()) { |
|
|
|
CalculateQuery calculateQuery = new CalculateQuery(); |
|
|
|
BeanUtil.copyProperties(query, calculateQuery); |
|
|
|
ResultBean<CalculateVo> resultBean = calculate(calculateQuery); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
CalculateVo calculateVo = resultBean.getData(); |
|
|
|
BeanUtil.copyProperties(calculateVo, solutionssVo); |
|
|
|
} |
|
|
|
List<SolutionListVo> formList = getFormList(solutionssVo); |
|
|
|
solutionssVo.setFinanceForms(formList); |
|
|
|
return rb.success().setData(solutionssVo); |
|
|
|
} |
|
|
|
|
|
|
|
/* @Autowired |
|
|
|
private LoanSolutionsTopService loanSolutionsTopService; |
|
|
|
@Autowired |
|
|
|