Browse Source

移动端金融方案

master
dimengzhe 2 years ago
parent
commit
9018cbe3ae
  1. 3
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java
  2. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  3. 10
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  4. 17
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutions.java
  5. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutionsFeign.java
  6. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutionsFeignFallback.java
  7. 14
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDetailsVo.java
  8. 38
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDto.java
  9. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsdetail/LoanSolutionsDetail.java
  10. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsotherpolicy/LoanSolutionsOtherpolicy.java
  11. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsRest.java
  12. 407
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java
  13. 13
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionsDetailsVo.java
  14. 12
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionsDto.java
  15. 77
      doc/databases/risk_center.sql

3
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java

@ -2227,13 +2227,14 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
}
}
baseMapper.updateById(commonContract);
}
if("2".equals(appOrderDetailsVo.getPayTypeKey())){
return rb.setMsg("贷款合同附件请线下处理").setCode("1000001");
}
} catch (Exception e) {
e.printStackTrace();
log.error("生成文件失败:=========================="+e.getMessage());
return rb.setMsg("生成文件失败");
}
return rb.success().setData(list);

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -3708,7 +3708,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
//为三方金融和担保贷款
if ("2".equals(busSalesOrder.getFinancePlan()) || "2".equals(busSalesOrder.getPayTypeKey())) {
//根据销售订单sid查询金融方案
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetails(bv.getBusinessSid());
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailss(bv.getBusinessSid());
SolutionsDetailsVo solutionsDetailsVo = solutionsDetailsVoResultBean.getData();
if (solutionsDetailsVo != null) {
if (StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey())) {

10
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -754,19 +754,19 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
finCollectionConfirmation.setStaffDeptSid(createDeptSid);
finCollectionConfirmation.setStaffDeptName(deptName);
if ("03".equals(dto.getCollectionTypeKey()) || "05".equals(dto.getCollectionTypeKey())) {
if (StringUtils.isNotBlank(dto.getCollectionBankNum())) {
if (StringUtils.isBlank(dto.getCollectionBankNum())) {
return rb.setMsg("收款银行账号不能为空");
}
if (StringUtils.isNotBlank(dto.getReceivingName())) {
if (StringUtils.isBlank(dto.getReceivingName())) {
return rb.setMsg("收款银行名称不能为空");
}
if (StringUtils.isNotBlank(dto.getCollectionBank())) {
if (StringUtils.isBlank(dto.getCollectionBank())) {
return rb.setMsg("收款银行不能为空");
}
if (StringUtils.isNotBlank(dto.getPayAccount())) {
if (StringUtils.isBlank(dto.getPayAccount())) {
return rb.setMsg("付款账号后4位不能为空");
}
if (StringUtils.isNotBlank(dto.getPayBank())) {
if (StringUtils.isBlank(dto.getPayBank())) {
return rb.setMsg("付款银行不能为空");
}
}

17
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutions.java

@ -34,7 +34,7 @@ public class LoanSolutions extends BaseEntity {
@ApiModelProperty("类型key")
private String typeKey;
@ApiModelProperty("是否打包")
private Integer isPack;
private String isPack;
@ApiModelProperty("产品政策")
private String policyName;
@ApiModelProperty("产品政策sid")
@ -60,7 +60,7 @@ public class LoanSolutions extends BaseEntity {
@ApiModelProperty("贷款金额")
private BigDecimal loanAmount;
@ApiModelProperty("贷款期数")
private Integer loanPeriod;
private String loanPeriod;
@ApiModelProperty("保证金比例")
private String bondRatio;
@ApiModelProperty("保证金金额")
@ -73,6 +73,19 @@ public class LoanSolutions extends BaseEntity {
private BigDecimal loanPayMoney;
@ApiModelProperty("贷款利息")
private BigDecimal loanInterest;
@ApiModelProperty("是否有融资票据")
private int accessoriesAmountCb;
@ApiModelProperty("是否有挂车")
private int trailerAmountCb;
@ApiModelProperty("是否有购置税")
private int purchaseTaxCb;
@ApiModelProperty("是否有保险")
private int premiumCb;
@ApiModelProperty("是否有车损上浮")
private int vehDamageFloatCb;
@ApiModelProperty("是否勾选其它融")
private int otherPolicyState;

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutionsFeign.java

@ -40,6 +40,10 @@ public interface LoanSolutionsFeign {
@PostMapping("/save")
ResultBean save(@RequestBody SolutionsDto dto);
@ApiOperation("根据销售订单sid查询金融方案")
@GetMapping("/selectDetailss")
ResultBean<SolutionsDetailsVo> selectDetailss(String businessSid);
/* @ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<LoanSolutionsVo>> listPage(@RequestBody PagerQuery<LoanSolutionsQuery> pq);

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/LoanSolutionsFeignFallback.java

@ -30,6 +30,11 @@ public class LoanSolutionsFeignFallback implements LoanSolutionsFeign {
return null;
}
@Override
public ResultBean<SolutionsDetailsVo> selectDetailss(String businessSid) {
return null;
}
/* @Override
public ResultBean<PagerVo<LoanSolutionsVo>> listPage(PagerQuery<LoanSolutionsQuery> pq) {
ResultBean rb = ResultBean.fireFail();

14
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDetailsVo.java

@ -19,7 +19,7 @@ public class SolutionsDetailsVo implements Vo {
private boolean finPlanState;
//金融方案主表
@ApiModelProperty("类型:01自营非担保,02外部金融")
private String type;
@ApiModelProperty("类型:01自营非担保,02外部金融")
@ -63,6 +63,18 @@ public class SolutionsDetailsVo implements Vo {
private String loanPayMoney;
@ApiModelProperty("贷款利息")
private String loanInterest;
@ApiModelProperty("是否有融资票据")
private boolean accessoriesAmountCb;
@ApiModelProperty("是否有挂车")
private boolean trailerAmountCb;
@ApiModelProperty("是否有购置税")
private boolean purchaseTaxCb;
@ApiModelProperty("是否有保险")
private boolean premiumCb;
@ApiModelProperty("是否有车损上浮")
private boolean vehDamageFloatCb;
@ApiModelProperty("是否勾选其它融")
private boolean otherPolicyState;
//其他融

38
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDto.java

@ -15,10 +15,14 @@ public class SolutionsDto implements Dto {
//金融方案主表
@ApiModelProperty("销售订单sid")
private String saleOrderSid;
@ApiModelProperty("类型:01自营非担保,02外部金融")
private String type;
@ApiModelProperty("类型:01自营非担保,02外部金融")
private String typeKey;
private Integer isPack;
@ApiModelProperty("是否打包:1是0否")
private String isPack;
@ApiModelProperty("产品政策名称")
private String policyName;
@ApiModelProperty("主车发票价")
@ -36,6 +40,17 @@ public class SolutionsDto implements Dto {
@ApiModelProperty("融资项目总额")
private String loanTotal;
@ApiModelProperty("是否有融资票据")
private boolean accessoriesAmountCb;
@ApiModelProperty("是否有挂车")
private boolean trailerAmountCb;
@ApiModelProperty("是否有购置税")
private boolean purchaseTaxCb;
@ApiModelProperty("是否有保险")
private boolean premiumCb;
@ApiModelProperty("是否有车损上浮")
private boolean vehDamageFloatCb;
@ApiModelProperty("首付款比例")
private String downPayRatio;
@ApiModelProperty("首付金额")
@ -43,7 +58,7 @@ public class SolutionsDto implements Dto {
@ApiModelProperty("贷款金额")
private String loanAmount;
@ApiModelProperty("贷款期数")
private int loanPeriod;
private String loanPeriod;
@ApiModelProperty("贷款保证金比例")
private String bondRatio;
@ApiModelProperty("贷款保证金金额")
@ -56,37 +71,38 @@ public class SolutionsDto implements Dto {
private String loanPayMoney;
@ApiModelProperty("利息总额")
private String loanInterest;
@ApiModelProperty("是否勾选其它融")
private boolean otherPolicyState;
//其他融
@ApiModelProperty("其它融名称")
private String otherPolicyName;
@ApiModelProperty("其它融贷款金额")
private String otherPolicyAmount;
@ApiModelProperty("其它融期数")
private Integer otherPolicyPeriod;
private String otherPolicyPeriod;
@ApiModelProperty("其它融月还")
private String otherPolicyMonthlyRepay;
@ApiModelProperty("其它融利息总额")
private String otherPolicyInterest;
/* @ApiModelProperty("'融资首付")
@ApiModelProperty("'融资首付")
private String loanDownPay;
@ApiModelProperty("总贷款金额")
private String loanAmountTotal;
@ApiModelProperty("期数")
private Integer period;
private String period;
@ApiModelProperty("月还金额")
private String monthlyRepay;
@ApiModelProperty("利息总额")
private String interest;*/
private String interest;
@ApiModelProperty("预计首期还款日")
private String returnTime;
//金融方案费用明细
/* @ApiModelProperty("融资首付")
private String downPayAmounts;*/
@ApiModelProperty("融资首付")
private String downPayAmounts;
@ApiModelProperty("贷款保证金")
private String bondAmounts;
@ApiModelProperty("保险保证金")
@ -117,8 +133,8 @@ public class SolutionsDto implements Dto {
private String offsetPremium;
@ApiModelProperty("抵顶购置税")
private String offsetPurchasetax;
/* @ApiModelProperty("抵顶费用合计")
private String offsetTotal;*/
@ApiModelProperty("抵顶费用合计")
private String offsetTotal;
@ApiModelProperty("应收合计")
private String receivableTotal;
@ApiModelProperty("实收合计")

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsdetail/LoanSolutionsDetail.java

@ -32,7 +32,7 @@ public class LoanSolutionsDetail extends BaseEntity {
@ApiModelProperty("融资首付")
private BigDecimal downPayAmount;
@ApiModelProperty("贷款保证金")
private BigDecimal bondAmount;
private BigDecimal bondAmounts;
@ApiModelProperty("保险保证金")
private BigDecimal depositPremium;
@ApiModelProperty("落户保证金")

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsotherpolicy/LoanSolutionsOtherpolicy.java

@ -59,7 +59,7 @@ public class LoanSolutionsOtherpolicy extends BaseEntity {
@ApiModelProperty("其它融金额")
private BigDecimal otherPolicyAmount;
@ApiModelProperty("其它融期数")
private Integer otherPolicyPeriod;
private String otherPolicyPeriod;
@ApiModelProperty("其它融月还")
private BigDecimal otherPolicyMonthlyRepay;
@ApiModelProperty("其它融利息总额")

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsRest.java

@ -40,6 +40,11 @@ public class LoanSolutionsRest implements LoanSolutionsFeign {
return loanSolutionsService.saveDto(dto);
}
@Override
public ResultBean<SolutionsDetailsVo> selectDetailss(String businessSid) {
return loanSolutionsService.selectDetailss(businessSid);
}
/* @Override
public ResultBean<PagerVo<LoanSolutionsVo>> listPage(@RequestBody PagerQuery<LoanSolutionsQuery> pq) {
ResultBean rb = ResultBean.fireFail();

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

@ -46,16 +46,16 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
ResultBean<SolutionsDetailsVo> rb = ResultBean.fireFail();
SolutionsDetailsVo solutionsDetailsVo = new SolutionsDetailsVo();
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(saleOrderSid);
if(loanSolutions != null){
if (loanSolutions != null) {
BeanUtil.copyProperties(loanSolutions, solutionsDetailsVo);
//查询其它融以及金融费用明细是否存在
LoanSolutionsOtherpolicy loanSolutionsOtherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid());
if(loanSolutionsOtherpolicy != null){
BeanUtil.copyProperties(loanSolutionsOtherpolicy,solutionsDetailsVo);
if (loanSolutionsOtherpolicy != null) {
BeanUtil.copyProperties(loanSolutionsOtherpolicy, solutionsDetailsVo);
}
LoanSolutionsDetail loanSolutionsDetail = loanSolutionsDetailService.selectLoanSid(loanSolutions.getSid());
if(loanSolutionsDetail != null){
BeanUtil.copyProperties(loanSolutionsDetail,solutionsDetailsVo);
if (loanSolutionsDetail != null) {
BeanUtil.copyProperties(loanSolutionsDetail, solutionsDetailsVo);
}
}
//根据销售订单sid查询销售订单的信息
@ -65,10 +65,10 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
if ("1".equals(appOrderDetailsVo.getPayTypeKey())) {
if ("2".equals(appOrderDetailsVo.getFinancePlan())) {
solutionsDetailsVo.setFinPlanState(true);
}else{
} else {
solutionsDetailsVo.setFinPlanState(false);
}
}else{
} else {
solutionsDetailsVo.setFinPlanState(false);
}
}
@ -80,182 +80,326 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
public ResultBean saveDto(SolutionsDto dto) {
ResultBean rb = ResultBean.fireFail();
//查询金融方案
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(dto.getSaleOrderSid());
if (loanSolutions != null) {
//删除该销售订单的
baseMapper.deleteByOrderSid(dto.getSaleOrderSid());
loanSolutionsOtherpolicyService.deleteByLoanSid(loanSolutions.getSid());
loanSolutionsDetailService.deleteByLoanSid(loanSolutions.getSid());
}
//保存金融方案
loanSolutions = new LoanSolutions();
//自营非担保和贷款的需要填写金融方案
if ("01".equals(dto.getTypeKey()) || StringUtils.isBlank(dto.getTypeKey())) {
//是否打包
String isPack = dto.getIsPack();
//产品政策名称
String policyName = dto.getPolicyName();
//融资项目总额 = 主车发票价+融资票据+挂车+保险+购置税+车损上浮
BigDecimal loanTotal = new BigDecimal(BigInteger.ZERO);
//主车发票价
String mainVehicleAmount = dto.getMainVehicleAmount();
if (StringUtils.isNotBlank(mainVehicleAmount)) {
loanTotal = loanTotal.add(new BigDecimal(mainVehicleAmount));
loanSolutions.setMainVehicleAmount(new BigDecimal(mainVehicleAmount));
} else {
return rb.setMsg("主车发票价不能为空");
}
//融资票据
String accessoriesAmount = dto.getAccessoriesAmount();
if (StringUtils.isNotBlank(accessoriesAmount)) {
loanTotal = loanTotal.add(new BigDecimal(accessoriesAmount));
}
//挂车
String trailerAmount = dto.getTrailerAmount();
if (StringUtils.isNotBlank(trailerAmount)) {
loanTotal = loanTotal.add(new BigDecimal(trailerAmount));
}
//购置税
String purchaseTax = dto.getPurchaseTax();
if (StringUtils.isNotBlank(purchaseTax)) {
loanTotal = loanTotal.add(new BigDecimal(purchaseTax));
}
//保险金额
String premium = dto.getPremium();
if (StringUtils.isNotBlank(premium)) {
loanTotal = loanTotal.add(new BigDecimal(premium));
}
//车损上浮
String vehDamageFloat = dto.getVehDamageFloat();
if (StringUtils.isNotBlank(vehDamageFloat)) {
loanTotal = loanTotal.add(new BigDecimal(vehDamageFloat));
}
//首付款比例
String downPayRatio = dto.getDownPayRatio();
//首付金额
BigDecimal downPayAmount = new BigDecimal(BigInteger.ZERO);
//首付金额 = 融资项目总*首付比例(可调整)
if (StringUtils.isBlank(downPayRatio)) {
return rb.setMsg("首付款比例不能为空");
//是否勾选融资票据
if (dto.isAccessoriesAmountCb()) {
//融资票据
String accessoriesAmount = dto.getAccessoriesAmount();
if (StringUtils.isNotBlank(accessoriesAmount)) {
loanTotal = loanTotal.add(new BigDecimal(accessoriesAmount));
loanSolutions.setAccessoriesAmount(new BigDecimal(accessoriesAmount));
} else {
return rb.setMsg("请输入融资票据");
}
loanSolutions.setAccessoriesAmountCb(1);
} else {
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO));
loanSolutions.setAccessoriesAmountCb(0);
}
//是否勾选挂车
if (dto.isTrailerAmountCb()) {
//挂车
String trailerAmount = dto.getTrailerAmount();
if (StringUtils.isNotBlank(trailerAmount)) {
loanTotal = loanTotal.add(new BigDecimal(trailerAmount));
loanSolutions.setTrailerAmount(new BigDecimal(trailerAmount));
} else {
return rb.setMsg("请输入挂车金额");
}
loanSolutions.setTrailerAmountCb(1);
} else {
if (StringUtils.isBlank(dto.getDownPayAmount())) {
downPayAmount = loanTotal.multiply(new BigDecimal(downPayRatio)).divide(new BigDecimal("100"));
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO));
loanSolutions.setTrailerAmountCb(0);
}
//是否勾选保险
if (dto.isPremiumCb()) {
//保险
String premium = dto.getPremium();
if (StringUtils.isNotBlank(premium)) {
loanTotal = loanTotal.add(new BigDecimal(premium));
loanSolutions.setPremium(new BigDecimal(premium));
} else {
downPayAmount = new BigDecimal(dto.getDownPayAmount());
return rb.setMsg("请输入保险金额");
}
loanSolutions.setPremiumCb(1);
} else {
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO));
loanSolutions.setPremiumCb(0);
}
int loanPeriod = dto.getLoanPeriod();
//产品贷款金额 = 融资项目总额-首付金额
BigDecimal loanAmount = loanTotal.subtract(downPayAmount);
//贷款保证金比例
String bondRatio = dto.getBondRatio();
//贷款保证金 = 贷款金额*贷款保证金比例(可调整)
BigDecimal bondAmount = new BigDecimal(BigInteger.ZERO);
if (StringUtils.isBlank(bondRatio)) {
return rb.setMsg("贷款保证金比例不能为空");
//是否勾选购置税
if (dto.isPurchaseTaxCb()) {
//购置税
String purchaseTax = dto.getPurchaseTax();
if (StringUtils.isNotBlank(purchaseTax)) {
loanTotal = loanTotal.add(new BigDecimal(purchaseTax));
loanSolutions.setPurchaseTax(new BigDecimal(purchaseTax));
} else {
return rb.setMsg("请输入购置税");
}
loanSolutions.setPurchaseTaxCb(1);
} else {
if (StringUtils.isBlank(dto.getBondAmount())) {
bondAmount = loanAmount.multiply(new BigDecimal(bondRatio)).divide(new BigDecimal("100"));
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO));
loanSolutions.setPurchaseTaxCb(0);
}
//是否勾选车损上浮
if (dto.isVehDamageFloatCb()) {
//车损上浮
String vehDamageFloat = dto.getVehDamageFloat();
if (StringUtils.isNotBlank(vehDamageFloat)) {
loanTotal = loanTotal.add(new BigDecimal(vehDamageFloat));
loanSolutions.setVehDamageFloat(new BigDecimal(vehDamageFloat));
} else {
bondAmount = new BigDecimal(dto.getBondAmount());
return rb.setMsg("请输入车损上浮金额");
}
loanSolutions.setVehDamageFloatCb(1);
} else {
loanTotal = loanTotal.add(new BigDecimal(BigInteger.ZERO));
loanSolutions.setVehDamageFloatCb(0);
}
loanSolutions.setLoanTotal(loanTotal);
//产品贷款金额
BigDecimal loanAmount = new BigDecimal(BigInteger.ZERO);
BigDecimal downPayAmount = new BigDecimal(BigInteger.ZERO);
//首付金额填写、首付款比例计算。首付款比例 = 首付金额/融资总额*100
if (StringUtils.isNotBlank(dto.getDownPayAmount())) {
//首付金额
downPayAmount = downPayAmount.add(new BigDecimal(dto.getDownPayAmount()));
//首付款比例
String downPayRatio = "";
BigDecimal downPayRatio1 = downPayAmount.divide(loanTotal).multiply(new BigDecimal("100"));
downPayRatio = downPayRatio1.toString() + "%";
//产品贷款金额 = 融资项目总额-首付金额
loanAmount = loanTotal.subtract(downPayAmount);
loanSolutions.setDownPayAmount(downPayAmount);
loanSolutions.setDownPayRatio(downPayRatio);
} else {
loanAmount = loanTotal;
}
loanSolutions.setLoanAmount(loanAmount);
//产品期数
String loanPeriod = dto.getLoanPeriod();
if (StringUtils.isBlank(loanPeriod)) {
return rb.setMsg("主方案期数不能为空");
}
loanSolutions.setLoanPeriod(loanPeriod);
//贷款保证金填写、贷款保证金比例计算。贷款保证金比例 = 贷款保证金/贷款金额*100
if (StringUtils.isNotBlank(dto.getBondAmount())) {
//贷款保证金
BigDecimal bondAmount = new BigDecimal(dto.getBondAmount());
//贷款保证金比例
String bondRatio = "";
BigDecimal bondRatio1 = bondAmount.divide(loanAmount).multiply(new BigDecimal("100"));
bondRatio = bondRatio1.toString() + "%";
loanSolutions.setBondAmount(bondAmount);
loanSolutions.setBondRatio(bondRatio);
}
//厂家贴息
String factoryDiscount = dto.getFactoryDiscount();
//年利率 =
if (StringUtils.isNotBlank(factoryDiscount)) {
loanSolutions.setFactoryDiscount(new BigDecimal(factoryDiscount));
}
//年利率
String policyYearRatio = dto.getPolicyYearRatio();
loanSolutions.setPolicyYearRatio(policyYearRatio);
//月还金额
String loanPayMoney = dto.getLoanPayMoney();
//利息总额 = 贷款利息总额+利息总额
BigDecimal interest = new BigDecimal(BigInteger.ZERO);
if (StringUtils.isNotBlank(loanPayMoney)) {
loanSolutions.setLoanPayMoney(new BigDecimal(loanPayMoney));
}
//利息总额
//利息总额
BigDecimal interest = new BigDecimal(BigInteger.ZERO);
String loanInterest = dto.getLoanInterest();
if (StringUtils.isNotBlank(loanInterest)) {
interest = interest.add(new BigDecimal(loanInterest));
}
//==================================其它融
//其它融名称
String otherPolicyName = dto.getOtherPolicyName();
//其它融贷款金额
BigDecimal otherPolicyAmount = new BigDecimal(BigInteger.ZERO);
if (StringUtils.isNotBlank(dto.getOtherPolicyAmount())) {
otherPolicyAmount = new BigDecimal(dto.getOtherPolicyAmount());
}
//其它融期数
int otherPolicyPeriod = dto.getOtherPolicyPeriod();
//其它融月还
String otherPolicyMonthlyRepay = dto.getOtherPolicyMonthlyRepay();
//其它融利息总额
String otherPolicyInterest = dto.getOtherPolicyInterest();
if (StringUtils.isNotBlank(otherPolicyInterest)) {
interest = interest.add(new BigDecimal(otherPolicyInterest));
}
//==================================方案汇总
//融资首付 = 首付金额-其它融贷款金额
BigDecimal loanDownPay = downPayAmount.subtract(otherPolicyAmount);
//期数 = 其它融期数/剩余期数
int periods = loanPeriod - otherPolicyPeriod;
String period = otherPolicyInterest + "/" + periods;
//总贷款金额 = 产品贷款金额+其它融贷款金额
BigDecimal loanAmountTotal = loanAmount.add(otherPolicyAmount);
//月还金额 = 总月还/贷款月还
String monthlyRepay = dto.getLoanPayMoney() + "/" + dto.getOtherPolicyMonthlyRepay();
//预计首期还款日
String returnTime = dto.getReturnTime();
//====================================应收明细
loanSolutions.setLoanInterest(new BigDecimal(loanInterest));
interest.add(new BigDecimal(loanInterest));
}
BigDecimal otherPolicyAmount1 = new BigDecimal(BigInteger.ZERO);
int ii = 0;
//=================================其它融
//勾选其它融
LoanSolutionsOtherpolicy loanSolutionsOtherpolicy = new LoanSolutionsOtherpolicy();
if (dto.isOtherPolicyState()) {
//其它融名称
if (StringUtils.isNotBlank(dto.getOtherPolicyName())) {
loanSolutionsOtherpolicy.setOtherPolicyName(dto.getOtherPolicyName());
}
//贷款金额
String otherPolicyAmount = dto.getOtherPolicyAmount();
if (StringUtils.isNotBlank(otherPolicyAmount)) {
otherPolicyAmount1 = otherPolicyAmount1.add(new BigDecimal(otherPolicyAmount));
}
loanSolutionsOtherpolicy.setOtherPolicyAmount(otherPolicyAmount1);
String otherPolicyPeriod = dto.getOtherPolicyPeriod();
if (StringUtils.isNotBlank(otherPolicyPeriod)) {
loanSolutionsOtherpolicy.setOtherPolicyPeriod(otherPolicyPeriod);
ii = ii + Integer.valueOf(otherPolicyPeriod);
}
//其它融月还
String otherPolicyMonthlyRepay = dto.getOtherPolicyMonthlyRepay();
if (StringUtils.isNotBlank(otherPolicyMonthlyRepay)) {
loanSolutionsOtherpolicy.setOtherPolicyMonthlyRepay(new BigDecimal(otherPolicyMonthlyRepay));
}
//其它融利息总额
String otherPolicyInterest = dto.getOtherPolicyInterest();
if (StringUtils.isNotBlank(otherPolicyInterest)) {
loanSolutionsOtherpolicy.setOtherPolicyInterest(new BigDecimal(otherPolicyInterest));
interest = interest.add(new BigDecimal(otherPolicyInterest));
}
//方案汇总==========================================
//融资首付 = 首付金额-其它融贷款金额
BigDecimal loanDownPay = new BigDecimal(BigInteger.ZERO);
loanDownPay = loanDownPay.add(downPayAmount).subtract(otherPolicyAmount1);
loanSolutionsOtherpolicy.setLoanDownPay(loanDownPay);
//总贷款金额 = 主方案贷款金额+其它融贷款金额
BigDecimal loanAmountTotal = new BigDecimal(BigInteger.ZERO);
loanAmountTotal = loanAmountTotal.add(loanAmount).add(otherPolicyAmount1);
loanSolutionsOtherpolicy.setLoanAmountTotal(loanAmountTotal);
//期数 = 其它融期数拼接剩余期数(6/18)
int i = Integer.valueOf(loanPeriod) - Integer.valueOf(otherPolicyPeriod);
String period = otherPolicyPeriod + "/" + i;
loanSolutionsOtherpolicy.setPeriod(period);
//月还金额 = 总月还/贷款月还
String monthlyRepay = dto.getLoanPayMoney() + "/" + dto.getOtherPolicyMonthlyRepay();
//预计首期还款日
String returnTime = dto.getReturnTime();
loanSolutionsOtherpolicy.setMonthlyRepay(monthlyRepay);
loanSolutionsOtherpolicy.setReturnTime(returnTime);
//利息总额
loanSolutionsOtherpolicy.setInterest(interest);
loanSolutions.setOtherPolicyState(1);
} else {
//方案汇总
//融资首付 = 首付金额-其它融贷款金额
BigDecimal loanDownPay = new BigDecimal(BigInteger.ZERO);
loanDownPay = loanDownPay.add(downPayAmount).subtract(otherPolicyAmount1);
loanSolutionsOtherpolicy.setLoanDownPay(loanDownPay);
//总贷款金额 = 主方案贷款金额+其它融贷款金额
BigDecimal loanAmountTotal = new BigDecimal(BigInteger.ZERO);
loanAmountTotal = loanAmountTotal.add(loanAmount).add(otherPolicyAmount1);
loanSolutionsOtherpolicy.setLoanAmountTotal(loanAmountTotal);
//期数 = 其它融期数拼接剩余期数(6/18)
int i = Integer.valueOf(loanPeriod) - ii;
String period = ii + "/" + i;
loanSolutionsOtherpolicy.setPeriod(period);
//月还金额 = 总月还/贷款月还
String monthlyRepay = dto.getLoanPayMoney() + "/" + dto.getOtherPolicyMonthlyRepay();
//预计首期还款日
String returnTime = dto.getReturnTime();
loanSolutionsOtherpolicy.setMonthlyRepay(monthlyRepay);
loanSolutionsOtherpolicy.setReturnTime(returnTime);
//利息总额
loanSolutionsOtherpolicy.setInterest(interest);
loanSolutions.setOtherPolicyState(0);
}
baseMapper.insert(loanSolutions);
loanSolutionsOtherpolicyService.insert(loanSolutionsOtherpolicy);
//=========================应收明细
LoanSolutionsDetail loanSolutionsDetail = new LoanSolutionsDetail();
//应收合计 = 融资首付+贷款保证金+保险保证金+落户保证金+服务费+代收意外险+补车价+上牌费+运管费+其它费用
BigDecimal receivableTotal = new BigDecimal(BigInteger.ZERO);
//融资首付 = 首付金额-其它融贷款金额
BigDecimal downPayAmounts = new BigDecimal(BigInteger.ZERO);
downPayAmounts = loanDownPay;
downPayAmounts = downPayAmounts.add(downPayAmount).subtract(otherPolicyAmount1);
loanSolutionsDetail.setDownPayAmount(downPayAmounts);
//贷款保证金
String bondAmounts = dto.getBondAmounts();
if (StringUtils.isNotBlank(bondAmounts)) {
receivableTotal = receivableTotal.add(new BigDecimal(bondAmounts));
loanSolutionsDetail.setBondAmounts(new BigDecimal(bondAmounts));
}
//保险保证金
String depositPremium = dto.getDepositPremium();
if (StringUtils.isNotBlank(depositPremium)) {
receivableTotal = receivableTotal.add(new BigDecimal(depositPremium));
loanSolutionsDetail.setDepositPremium(new BigDecimal(depositPremium));
}
//落户保证金
String depositSettle = dto.getDepositSettle();
if (StringUtils.isNotBlank(depositSettle)) {
receivableTotal = receivableTotal.add(new BigDecimal(depositPremium));
loanSolutionsDetail.setDepositSettle(new BigDecimal(depositSettle));
}
//服务费
String serviceAmount = dto.getServiceAmount();
if (StringUtils.isNotBlank(serviceAmount)) {
receivableTotal = receivableTotal.add(new BigDecimal(serviceAmount));
loanSolutionsDetail.setServiceAmount(new BigDecimal(serviceAmount));
}
//代收意外险
String proxyAccidentPremium = dto.getProxyAccidentPremium();
if (StringUtils.isNotBlank(proxyAccidentPremium)) {
receivableTotal = receivableTotal.add(new BigDecimal(proxyAccidentPremium));
loanSolutionsDetail.setProxyAccidentPremium(new BigDecimal(proxyAccidentPremium));
}
//上牌费
String registerAmount = dto.getRegisterAmount();
if (StringUtils.isNotBlank(registerAmount)) {
receivableTotal = receivableTotal.add(new BigDecimal(registerAmount));
loanSolutionsDetail.setRegisterAmount(new BigDecimal(registerAmount));
}
//运管费
String operationAmount = dto.getOperationAmount();
if (StringUtils.isNotBlank(operationAmount)) {
receivableTotal = receivableTotal.add(new BigDecimal(operationAmount));
loanSolutionsDetail.setOperationAmount(new BigDecimal(operationAmount));
}
//补车价
String vehOtherPrice = dto.getVehOtherPrice();
if (StringUtils.isNotBlank(vehOtherPrice)) {
receivableTotal = receivableTotal.add(new BigDecimal(vehOtherPrice));
loanSolutionsDetail.setVehOtherPrice(new BigDecimal(vehOtherPrice));
}
//其它费用
String otherAmount = dto.getOtherAmount();
if (StringUtils.isNotBlank(otherAmount)) {
receivableTotal = receivableTotal.add(new BigDecimal(otherAmount));
loanSolutionsDetail.setOtherAmount(new BigDecimal(otherAmount));
}
//其它费用说明
String otherAmountRemark = dto.getOtherAmountRemark();
loanSolutionsDetail.setOtherAmountRemark(otherAmountRemark);
//办理方式选择
String dealWay = dto.getDealWay();
loanSolutionsDetail.setDealWay(dealWay);
//代收首年保险费
String proxyPremium = dto.getProxyPremium();
if (StringUtils.isNotBlank(proxyPremium)) {
receivableTotal = receivableTotal.add(new BigDecimal(proxyPremium));
loanSolutionsDetail.setProxyPremium(new BigDecimal(proxyPremium));
}
//代收购置费
String proxyPurchasetax = dto.getProxyPurchasetax();
if (StringUtils.isNotBlank(proxyPurchasetax)) {
receivableTotal = receivableTotal.add(new BigDecimal(proxyPurchasetax));
loanSolutionsDetail.setProxyPurchasetax(new BigDecimal(proxyPurchasetax));
}
//抵顶费用合计 = 抵顶首年保险费+抵顶购置税
BigDecimal offsetTotal = new BigDecimal(BigInteger.ZERO);
@ -263,11 +407,13 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
String offsetPremium = dto.getOffsetPremium();
if (StringUtils.isNotBlank(offsetPremium)) {
offsetTotal = offsetTotal.add(new BigDecimal(offsetPremium));
loanSolutionsDetail.setOffsetPremium(new BigDecimal(offsetPremium));
}
//抵顶购置税
String offsetPurchasetax = dto.getOffsetPurchasetax();
if (StringUtils.isNotBlank(offsetPurchasetax)) {
offsetTotal = offsetTotal.add(new BigDecimal(offsetPurchasetax));
loanSolutionsDetail.setOffsetPurchasetax(new BigDecimal(offsetPurchasetax));
}
//实收合计 = 应收合计-抵顶合计
BigDecimal realTotal = receivableTotal.subtract(offsetTotal);
@ -275,64 +421,18 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
String vehTotalPrice = dto.getVehTotalPrice();
//名义留购价
String nominalPrice = dto.getNominalPrice();
//查询金融方案
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(dto.getSaleOrderSid());
if (loanSolutions != null) {
//删除该销售订单的
baseMapper.deleteByOrderSid(dto.getSaleOrderSid());
loanSolutionsOtherpolicyService.deleteByLoanSid(loanSolutions.getSid());
loanSolutionsDetailService.deleteByLoanSid(loanSolutions.getSid());
}
BeanUtil.copyProperties(dto, loanSolutions);
//融资项目总额
loanSolutions.setLoanTotal(loanTotal);
//首付金额
loanSolutions.setDownPayAmount(downPayAmount);
//产品贷款金额
loanSolutions.setLoanAmount(loanAmount);
//贷款保证金
loanSolutions.setBondAmount(bondAmount);
baseMapper.insert(loanSolutions);
//其他融
LoanSolutionsOtherpolicy loanSolutionsOtherpolicy = new LoanSolutionsOtherpolicy();
loanSolutionsOtherpolicy.setSolutionsSid(loanSolutions.getSid());
BeanUtil.copyProperties(dto, loanSolutionsOtherpolicy);
//其它融贷款金额
loanSolutionsOtherpolicy.setOtherPolicyAmount(otherPolicyAmount);
//方案汇总:融资首付
loanSolutionsOtherpolicy.setLoanDownPay(loanDownPay);
//总贷款金额
loanSolutionsOtherpolicy.setLoanAmountTotal(loanAmountTotal);
//期数
loanSolutionsOtherpolicy.setPeriod(period);
//月还金额
loanSolutionsOtherpolicy.setMonthlyRepay(monthlyRepay);
//利息总额
loanSolutionsOtherpolicy.setInterest(interest);
loanSolutionsOtherpolicyService.insert(loanSolutionsOtherpolicy);
//费用明细
LoanSolutionsDetail loanSolutionsDetail = new LoanSolutionsDetail();
loanSolutionsDetail.setSolutionsSid(loanSolutions.getSid());
BeanUtil.copyProperties(dto, loanSolutionsDetail);
loanSolutionsDetail.setDownPayAmount(downPayAmounts);
//抵顶费用合计
loanSolutionsDetail.setOffsetTotal(offsetTotal);
//应收合计
loanSolutionsDetail.setReceivableTotal(receivableTotal);
//实收合计
loanSolutionsDetail.setRealTotal(realTotal);
loanSolutionsDetail.setReceivableTotal(receivableTotal);
loanSolutionsDetail.setOffsetTotal(offsetTotal);
if (StringUtils.isNotBlank(vehTotalPrice)) {
loanSolutionsDetail.setVehTotalPrice(new BigDecimal(vehTotalPrice));
}
if (StringUtils.isNotBlank(nominalPrice)) {
loanSolutionsDetail.setNominalPrice(new BigDecimal(nominalPrice));
}
loanSolutionsDetailService.insert(loanSolutionsDetail);
} else {//外部金融的只需要录入厂家贴息
//查询金融方案
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(dto.getSaleOrderSid());
if (loanSolutions != null) {
//删除该销售订单的
baseMapper.deleteByOrderSid(dto.getSaleOrderSid());
loanSolutionsOtherpolicyService.deleteByLoanSid(loanSolutions.getSid());
loanSolutionsDetailService.deleteByLoanSid(loanSolutions.getSid());
}
//查询金融方案
loanSolutions = new LoanSolutions();
BeanUtil.copyProperties(dto, loanSolutions);
@ -340,6 +440,17 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
}
return rb.success();
}
public ResultBean<SolutionsDetailsVo> selectDetailss(String businessSid) {
ResultBean<SolutionsDetailsVo> rb = ResultBean.fireFail();
SolutionsDetailsVo solutionsDetailsVo = new SolutionsDetailsVo();
LoanSolutions loanSolutions = baseMapper.selectBySaleOrderSid(businessSid);
if (loanSolutions == null) {
return rb;
}
BeanUtil.copyProperties(loanSolutions, solutionsDetailsVo);
return rb.success().setData(solutionsDetailsVo);
}
/* @Autowired
private LoanSolutionsTopService loanSolutionsTopService;
@Autowired

13
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionsDetailsVo.java

@ -21,7 +21,7 @@ public class AppSolutionsDetailsVo implements Vo {
private String type;
private String typeKey;
@ApiModelProperty("是否打包,0不打包,1打包")
private Integer isPack;
private String isPack;
@ApiModelProperty("产品政策名称")
private String policyName;
@ApiModelProperty("主车发票价")
@ -39,6 +39,17 @@ public class AppSolutionsDetailsVo implements Vo {
@ApiModelProperty("融资项目总额")
private String loanTotal;
@ApiModelProperty("是否有融资票据")
private boolean accessoriesAmountCb;
@ApiModelProperty("是否有挂车")
private boolean trailerAmountCb;
@ApiModelProperty("是否有购置税")
private boolean purchaseTaxCb;
@ApiModelProperty("是否有保险")
private boolean premiumCb;
@ApiModelProperty("是否有车损上浮")
private boolean vehDamageFloatCb;
@ApiModelProperty("首付款比例")
private String downPayRatio;
@ApiModelProperty("首付金额")

12
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionsDto.java

@ -18,7 +18,7 @@ public class AppSolutionsDto implements Dto {
private String type;
private String typeKey;
@ApiModelProperty("是否打包,0不打包,1打包")
private Integer isPack;
private String isPack;
@ApiModelProperty("产品政策名称")
private String policyName;
@ApiModelProperty("主车发票价")
@ -35,6 +35,16 @@ public class AppSolutionsDto implements Dto {
private String vehDamageFloat;
@ApiModelProperty("融资项目总额")
private String loanTotal;
@ApiModelProperty("是否有融资票据")
private boolean accessoriesAmountCb;
@ApiModelProperty("是否有挂车")
private boolean trailerAmountCb;
@ApiModelProperty("是否有购置税")
private boolean purchaseTaxCb;
@ApiModelProperty("是否有保险")
private boolean premiumCb;
@ApiModelProperty("是否有车损上浮")
private boolean vehDamageFloatCb;
@ApiModelProperty("首付款比例")
private String downPayRatio;

77
doc/databases/risk_center.sql

@ -899,40 +899,47 @@ CREATE TABLE `loan_solutions_top`
DROP TABLE IF EXISTS `loan_solutions`;
CREATE TABLE `loan_solutions`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`salesOrderSid` VARCHAR(64) DEFAULT NULL COMMENT '销售订单sid',
`type` VARCHAR(64) DEFAULT NULL COMMENT '类型',
`typeKey` VARCHAR(64) DEFAULT NULL COMMENT '类型key',
`isPack` int(32) DEFAULT NULL COMMENT '是否打包',
`policyName` varchar(255) DEFAULT NULL COMMENT '产品政策',
`policySid` varchar(64) DEFAULT NULL COMMENT '产品政策sid',
`loanTotal` decimal(10, 2) DEFAULT NULL COMMENT '融资项目总额',
`mainVehicleAmount` decimal(10, 2) DEFAULT NULL COMMENT '主车发票价',
`accessoriesAmount` decimal(10, 2) DEFAULT NULL COMMENT '融资票据',
`trailerAmount` decimal(10, 2) DEFAULT NULL COMMENT '挂车金额',
`purchaseTax` decimal(10, 2) DEFAULT NULL COMMENT '购置税',
`premium` decimal(10, 2) DEFAULT NULL COMMENT '保险金额',
`vehDamageFloat` decimal(10, 2) DEFAULT NULL COMMENT '车损上浮',
`downPayRatio` varchar(100) DEFAULT NULL COMMENT '首付款比例',
`downPayAmount` decimal(10, 2) DEFAULT NULL COMMENT '首付金额',
`loanAmount` decimal(10, 2) DEFAULT NULL COMMENT '贷款金额',
`loanPeriod` int(10) DEFAULT NULL COMMENT '贷款期数',
`bondRatio` varchar(100) DEFAULT NULL COMMENT '保证金比例(%)',
`bondAmount` decimal(10, 2) DEFAULT NULL COMMENT '保证金金额',
`factoryDiscount` decimal(10, 2) DEFAULT NULL COMMENT '厂家贴息',
`policyYearRatio` decimal(10, 3) DEFAULT NULL COMMENT '政策年利率(%)',
`loanPayMoney` decimal(10, 2) DEFAULT NULL COMMENT '贷款月还',
`loanInterest` decimal(10, 2) DEFAULT NULL COMMENT '贷款利息',
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`salesOrderSid` VARCHAR(64) DEFAULT NULL COMMENT '销售订单sid',
`type` VARCHAR(64) DEFAULT NULL COMMENT '类型',
`typeKey` VARCHAR(64) DEFAULT NULL COMMENT '类型key',
`isPack` varchar(64) DEFAULT NULL COMMENT '是否打包',
`policyName` varchar(255) DEFAULT NULL COMMENT '产品政策',
`policySid` varchar(64) DEFAULT NULL COMMENT '产品政策sid',
`loanTotal` decimal(10, 2) DEFAULT NULL COMMENT '融资项目总额',
`mainVehicleAmount` decimal(10, 2) DEFAULT NULL COMMENT '主车发票价',
`accessoriesAmount` decimal(10, 2) DEFAULT NULL COMMENT '融资票据',
`trailerAmount` decimal(10, 2) DEFAULT NULL COMMENT '挂车金额',
`purchaseTax` decimal(10, 2) DEFAULT NULL COMMENT '购置税',
`premium` decimal(10, 2) DEFAULT NULL COMMENT '保险金额',
`vehDamageFloat` decimal(10, 2) DEFAULT NULL COMMENT '车损上浮',
`downPayRatio` varchar(200) DEFAULT NULL COMMENT '首付款比例',
`downPayAmount` decimal(10, 2) DEFAULT NULL COMMENT '首付金额',
`loanAmount` decimal(10, 2) DEFAULT NULL COMMENT '贷款金额',
`loanPeriod` varchar(32) DEFAULT NULL COMMENT '贷款期数',
`bondRatio` varchar(100) DEFAULT NULL COMMENT '保证金比例(%)',
`bondAmount` decimal(10, 2) DEFAULT NULL COMMENT '保证金金额',
`factoryDiscount` decimal(10, 2) DEFAULT NULL COMMENT '厂家贴息',
`policyYearRatio` decimal(10, 3) DEFAULT NULL COMMENT '政策年利率(%)',
`loanPayMoney` decimal(10, 2) DEFAULT NULL COMMENT '贷款月还',
`loanInterest` decimal(10, 2) DEFAULT NULL COMMENT '贷款利息',
`accessoriesAmountCb` int(10) DEFAULT NULL COMMENT '是否有融资票据:0否,1是',
`trailerAmountCb` int(10) DEFAULT NULL COMMENT '是否有挂车:0否,1是',
`purchaseTaxCb` int(10) DEFAULT NULL COMMENT '是否有购置税:0否,1是',
`premiumCb` int(10) DEFAULT NULL COMMENT '是否有保险:0否,1是',
`vehDamageFloatCb` int(10) DEFAULT NULL COMMENT '是否有车损上浮:0否,1是',
`otherPolicyState` int(10) DEFAULT NULL COMMENT '是否有其它融:0否,1是',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
@ -961,7 +968,7 @@ CREATE TABLE `loan_solutions_otherPolicy`
`otherPolicyInterest` decimal(10, 2) DEFAULT NULL COMMENT '其它融利息总额',
`loanDownPay` decimal(10, 2) DEFAULT NULL COMMENT '融资首付',
`loanAmountTotal` decimal(10, 2) DEFAULT NULL COMMENT '总贷款金额',
`period` varchar(64) DEFAULT NULL COMMENT '期数',
`period` varchar(64) DEFAULT NULL COMMENT '期数',
`monthlyRepay` decimal(10, 2) DEFAULT NULL COMMENT '月还金额',
`interest` decimal(10, 2) DEFAULT NULL COMMENT '利息总额',
`returnTime` varchar(64) DEFAULT NULL COMMENT '预计首期还款日',

Loading…
Cancel
Save