Browse Source

Merge remote-tracking branch 'origin/master'

master
God 2 years ago
parent
commit
a8ddd67907
  1. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/calculate/CalculateQuery.java
  2. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherpolicyrecordapply/LoanFinOtherPolicyRecordApplyRest.java
  3. 26
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherpolicyrecordapply/LoanFinOtherPolicyRecordApplyService.java
  4. 30
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicyrecordapply/LoanFinPolicyRecordApplyService.java
  5. 16
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java

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

@ -37,8 +37,8 @@ public class CalculateQuery {
private boolean purchaseTaxCb;
@ApiModelProperty("融资项目总额")
private String loanTotal;
/* @ApiModelProperty("首付款比例")
private String downPayRatio;*/
@ApiModelProperty("首付款比例")
private String downPayRatio;
@ApiModelProperty("首付金额")
private String downPayAmount;
@ApiModelProperty("贷款金额")

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherpolicyrecordapply/LoanFinOtherPolicyRecordApplyRest.java

@ -1,7 +1,6 @@
package com.yxt.anrui.riskcenter.biz.loanfinotherpolicyrecordapply;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.base.api.basediscountpackageapply.BaseDiscountpackageApply;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.riskcenter.api.loanfinotherpolicyrecordapply.*;

26
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherpolicyrecordapply/LoanFinOtherPolicyRecordApplyService.java

@ -578,6 +578,19 @@ public class LoanFinOtherPolicyRecordApplyService extends MybatisBaseService<Loa
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
//终止任务后备案状态改完未备案
LoanFinOtherPolicyRecordApply loanFinOtherPolicyRecordApply = fetchBySid(query.getBusinessSid());
if (loanFinOtherPolicyRecordApply.getNodeState().equals("终止")) {
String policySids = loanFinOtherPolicyRecordApply.getOtherPolicySid();
List<String> strings = Arrays.asList(policySids.split(","));
if (!strings.isEmpty()) {
for (String sid : strings) {
LoanFinOtherPolicy loanFinOtherPolicy = loanFinOtherPolicyService.fetchBySid(sid);
loanFinOtherPolicy.setFilingState(0);
loanFinOtherPolicyService.updateById(loanFinOtherPolicy);
}
}
}
return rb.success().setData(resultBean.getData());
} else {
if (businessTaskId.equals(query.getTaskId())) {
@ -589,6 +602,19 @@ public class LoanFinOtherPolicyRecordApplyService extends MybatisBaseService<Loa
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
//终止任务后备案状态改完未备案
LoanFinOtherPolicyRecordApply loanFinOtherPolicyRecordApply = fetchBySid(query.getBusinessSid());
if (loanFinOtherPolicyRecordApply.getNodeState().equals("终止")) {
String policySids = loanFinOtherPolicyRecordApply.getOtherPolicySid();
List<String> strings = Arrays.asList(policySids.split(","));
if (!strings.isEmpty()) {
for (String sid : strings) {
LoanFinOtherPolicy loanFinOtherPolicy = loanFinOtherPolicyService.fetchBySid(sid);
loanFinOtherPolicy.setFilingState(0);
loanFinOtherPolicyService.updateById(loanFinOtherPolicy);
}
}
}
return rb.success().setData(resultBean.getData());
}
}

30
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicyrecordapply/LoanFinPolicyRecordApplyService.java

@ -237,7 +237,7 @@ public class LoanFinPolicyRecordApplyService extends MybatisBaseService<LoanFinP
LoanFinPolicy loanFinPolicy = loanFinPolicyService.fetchBySid(psid);
BeanUtil.copyProperties(loanFinPolicy, initVo);
initVo.setPolicySid(psid);
// List<LoanFinOtherPolicy> otherPolicy = loanFinOtherPolicyService.getOtherPolicyByMainSid(psid);
// List<LoanFinOtherPolicy> otherPolicy = loanFinOtherPolicyService.getOtherPolicyByMainSid(psid);
List<LoanFinOtherPolicy> otherPolicy = loanFinOtherPolicyService.fetchByMainSid(psid);
otherPolicy.removeAll(Collections.singleton(null));
initVo.setShowOtherPolicy(!otherPolicy.isEmpty());
@ -545,6 +545,21 @@ public class LoanFinPolicyRecordApplyService extends MybatisBaseService<LoanFinP
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
//终止任务后经销商备案状态改完未备案
LoanFinPolicyRecordApply loanFinPolicyRecordApply = fetchBySid(query.getBusinessSid());
if (loanFinPolicyRecordApply.getNodeState().equals("终止")) {
String policySids = loanFinPolicyRecordApply.getPolicySid();
List<String> strings = Arrays.asList(policySids.split(","));
if (!strings.isEmpty()) {
for (String sid : strings) {
LoanFinPolicy loanFinPolicy = loanFinPolicyService.fetchBySid(sid);
loanFinPolicy.setFilingState(0);
loanFinPolicyService.updateById(loanFinPolicy);
}
}
}
return rb.success().setData(resultBean.getData());
} else {
if (businessTaskId.equals(query.getTaskId())) {
@ -556,6 +571,19 @@ public class LoanFinPolicyRecordApplyService extends MybatisBaseService<LoanFinP
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
//终止任务后经销商备案状态改完未备案
LoanFinPolicyRecordApply loanFinPolicyRecordApply = fetchBySid(query.getBusinessSid());
if (loanFinPolicyRecordApply.getNodeState().equals("终止")) {
String policySids = loanFinPolicyRecordApply.getPolicySid();
List<String> strings = Arrays.asList(policySids.split(","));
if (!strings.isEmpty()) {
for (String sid : strings) {
LoanFinPolicy loanFinPolicy = loanFinPolicyService.fetchBySid(sid);
loanFinPolicy.setFilingState(0);
loanFinPolicyService.updateById(loanFinPolicy);
}
}
}
return rb.success().setData(resultBean.getData());
}
}

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

@ -1430,6 +1430,11 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
if (downPayAmountsRatio.compareTo(downPayRatioLeast) < 0) {
return rb.setMsg("实际首付比例不能低于产品政策中的最低首付比例");
}
BigDecimal ratio = loanFinPolicy.getDownPayRatio();
BigDecimal decimal = new BigDecimal(query.getDownPayRatio());
if (decimal.compareTo(ratio) < 0) {
return rb.setMsg("首付比例不能低于产品政策中的首付比例");
}
//总贷款金额
calculateVo.setLoanAmountTotal(loanAmountTotal.setScale(0, BigDecimal.ROUND_HALF_UP).toString());
//期数
@ -1658,9 +1663,9 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
solutionssVo.setSzPrice(busSalesOrdersVo.getSzPrice());
solutionssVo.setFinalPrice(busSalesOrdersVo.getFinalPrice());
BusSalesOrderModel busSalesOrderModel = busSalesOrdersVo.getBusSalesOrderModel();
if(busSalesOrderModel != null){
if (busSalesOrderModel != null) {
solutionssVo.setModelSid(busSalesOrderModel.getModelSid());
}else{
} else {
return rb.setMsg("请先录入车型");
}
if (busSalesOrdersVo.getBusSalesOrder() != null) {
@ -2353,7 +2358,12 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
if (serviceChargeTypeValue != null) {
solutionssVo.setServiceChargeTypeValue(serviceChargeTypeValue.toString());
}
//增加首付比例不能低于政策中首付比例
BigDecimal ratio = loanFinPolicy.getDownPayRatio();
BigDecimal decimal = new BigDecimal(query.getDownPayRatio());
if (decimal.compareTo(ratio) < 0) {
return rb.setMsg("首付比例不能低于产品政策中的首付比例");
}
}
if (query.isOtherPolicyState()) {
//验证贷款金额是否不大于最高贷款金额

Loading…
Cancel
Save