Browse Source

优化二次销售审批流程

master
dimengzhe 1 year ago
parent
commit
4038a8717b
  1. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/LoanSecondarySalesApplyNodeQuery.java
  2. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesveh/LoanSecondarySalesVeh.java
  3. 34
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  4. 3
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesveh/LoanSecondarySalesVehMapper.xml
  5. 67
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/base/common/ItemEditTextInfoCommon.java
  6. 19
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondSalesInitVo.java
  7. 5
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondarySalesFeign.java
  8. 6
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesRest.java
  9. 50
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/LoanSecondarySalesApplyNodeQuery.java

@ -15,4 +15,7 @@ public class LoanSecondarySalesApplyNodeQuery {
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty("车辆评估价格")
private String vehicleEvaluation;
}

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesveh/LoanSecondarySalesVeh.java

@ -29,4 +29,6 @@ public class LoanSecondarySalesVeh extends BaseEntity {
private String modelSid;
@ApiModelProperty("配置sid")
private String configSid;
private String busSid;
}

34
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

@ -226,7 +226,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
Map<String, Object> appMap = new HashMap<>();
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid());
if (loanSecondarySalesCost != null) {
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
if ((loanSecondarySalesCost.getVehicleEvaluation() == null ? BigDecimal.ZERO : loanSecondarySalesCost.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
@ -250,15 +250,19 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
bv.setModelId(loanSecondarySalesApply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid());
if (loanSecondarySalesCost != null) {
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
if ("Activity_0rm74ey".equals(bv.getTaskDefKey())) {//风控处置岗审批
if (StringUtils.isBlank(query.getVehicleEvaluation())) {
return rb.setMsg("请填写评估价格");
}
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid());
if (loanSecondarySalesCost != null) {
if (new BigDecimal(query.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
}
}
}
appMap.put("sid", query.getBusinessSid());
variables.put("app", appMap);
bv.setFormVariables(variables);
@ -292,7 +296,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
variables.put("app", appMap);
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid());
if (loanSecondarySalesCost != null) {
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
if ((loanSecondarySalesCost.getVehicleEvaluation() == null ? BigDecimal.ZERO : loanSecondarySalesCost.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
@ -351,7 +355,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
Map<String, Object> appMap = new HashMap<>();
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid());
if (loanSecondarySalesCost != null) {
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
if ((loanSecondarySalesCost.getVehicleEvaluation() == null ? BigDecimal.ZERO : loanSecondarySalesCost.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
@ -441,10 +445,12 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(businessSid);
loanSecondarySalesCost.setVehicleEvaluation(new BigDecimal(price));
loanSecondarySalesCostService.updateById(loanSecondarySalesCost);
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
if (loanSecondarySalesCost != null) {
if ((loanSecondarySalesCost.getVehicleEvaluation() == null ? BigDecimal.ZERO : loanSecondarySalesCost.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
}
}
}
appMap.put("sid", businessSid);

3
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesveh/LoanSecondarySalesVehMapper.xml

@ -15,7 +15,8 @@
lv.modelName,
lv.busVinSid,
lv.modelSid,
lv.configSid
lv.configSid,
lv.busSid
from loan_secondary_sales_veh lv
where mainSid = #{sid}
</select>

67
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/base/common/ItemEditTextInfoCommon.java

@ -0,0 +1,67 @@
package com.yxt.anrui.terminal.api.base.common;
import java.util.List;
public class ItemEditTextInfoCommon {
// 标题 如:身份证
private String title;
// 类型 1(上传图片)
private int type;
// 是否可空, 可不填 true
private boolean nullAble;
// 保存
private String key;
// 保存图片使用 type=1
private List<String> filesPath;
// 保存文本使用
private String text;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public boolean isNullAble() {
return nullAble;
}
public void setNullAble(boolean nullAble) {
this.nullAble = nullAble;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public List<String> getFilesPath() {
return filesPath;
}
public void setFilesPath(List<String> filesPath) {
this.filesPath = filesPath;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}

19
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondSalesInitVo.java

@ -0,0 +1,19 @@
package com.yxt.anrui.terminal.api.risk.secondarysales;
import com.yxt.anrui.terminal.api.base.common.ItemEditTextInfoCommon;
import lombok.Data;
import java.util.List;
/**
* @description:
* @author: dimengzhe
* @date: 2024/1/29
**/
@Data
public class SecondSalesInitVo {
private String title;
private List<ItemEditTextInfoCommon> list;
}

5
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondarySalesFeign.java

@ -56,4 +56,9 @@ public interface SecondarySalesFeign {
@PutMapping(value = "/delegate")
@ResponseBody
public ResultBean delegate(@RequestBody SecondarySalesDelegateQuery delegateQuery);
@ApiOperation(value = "特殊环节初始化")
@GetMapping(value = "/getFlowOperateTitleBy")
@ResponseBody
ResultBean<SecondSalesInitVo> getFlowOperateTitleBy(@SpringQueryMap SecondarySalesQuery query);
}

6
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesRest.java

@ -1,5 +1,6 @@
package com.yxt.anrui.terminal.biz.risk.secondarysales;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondSalesInitVo;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondarySalesAppVos;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondarySalesFeign;
import com.yxt.anrui.terminal.api.risk.secondarysales.flowable.SecondarySalesDelegateQuery;
@ -59,4 +60,9 @@ public class SecondarySalesRest implements SecondarySalesFeign {
public ResultBean delegate(SecondarySalesDelegateQuery delegateQuery) {
return secondarySalesService.delegate(delegateQuery);
}
@Override
public ResultBean<SecondSalesInitVo> getFlowOperateTitleBy(SecondarySalesQuery query) {
return secondarySalesService.getFlowOperateTitleBy(query);
}
}

50
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java

@ -2,13 +2,17 @@ package com.yxt.anrui.terminal.biz.risk.secondarysales;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.yxt.anrui.fin.api.finbillfile.FinBillFileVo;
import com.yxt.anrui.portal.api.appsubsetversion.AppSubVersionVo;
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.ReturnAppVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.LoanSecondarySalesApplyFeign;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.SecondarySalesAppVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.flowable.*;
import com.yxt.anrui.terminal.api.autoservice.advanceInvoice.ItemEditTextInfo;
import com.yxt.anrui.terminal.api.base.common.CarModelVo;
import com.yxt.anrui.terminal.api.base.common.ItemEditTextInfoCommon;
import com.yxt.anrui.terminal.api.risk.returninbound.ReturnInboundAppVo;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondSalesInitVo;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondarySalesAppVos;
import com.yxt.anrui.terminal.api.risk.secondarysales.SecondarySalesCostAppVo;
import com.yxt.anrui.terminal.api.risk.secondarysales.flowable.SecondarySalesDelegateQuery;
@ -22,10 +26,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @description:
@ -207,4 +208,45 @@ public class SecondarySalesService {
ResultBean delegate = loanSecondarySalesApplyFeign.delegate(delegateQuery1);
return rb.success();
}
public ResultBean<SecondSalesInitVo> getFlowOperateTitleBy(SecondarySalesQuery query) {
ResultBean<SecondSalesInitVo> rb = ResultBean.fireFail();
SecondSalesInitVo secondSalesInitVo = new SecondSalesInitVo();
int next = query.getNext();
LoanSecondarySalesApplyNodeQuery getNodeQuery = new LoanSecondarySalesApplyNodeQuery();
BeanUtil.copyProperties(query, getNodeQuery);
String data = "";
if (next == 0) {
ResultBean<List<LoanSecondarySalesApplyNodeVo>> getPreviousNodesForReject = loanSecondarySalesApplyFeign.getPreviousNodesForReject(getNodeQuery);
if (getPreviousNodesForReject.getSuccess()) {
getPreviousNodesForReject.getData().removeAll(Collections.singleton(null));
data = getPreviousNodesForReject.getData().get(0).getName();
} else {
return rb.setMsg(getPreviousNodesForReject.getMsg());
}
} else if (next == 1) {
ResultBean<List<LoanSecondarySalesApplyNodeVo>> getNextNodesForSubmit = loanSecondarySalesApplyFeign.getNextNodesForSubmit(getNodeQuery);
if (getNextNodesForSubmit.getSuccess()) {
getNextNodesForSubmit.getData().removeAll(Collections.singleton(null));
data = getNextNodesForSubmit.getData().get(0).getName();
} else {
return rb.setMsg(getNextNodesForSubmit.getMsg());
}
} else {
return rb.setMsg("参数错误:next");
}
secondSalesInitVo.setTitle(data);
List<ItemEditTextInfoCommon> itemEditTextInfos = new ArrayList<>();
ItemEditTextInfoCommon itemEditTextInfo = new ItemEditTextInfoCommon();
itemEditTextInfo.setTitle("风控中心车辆评估价");
itemEditTextInfo.setType(2);
itemEditTextInfo.setNullAble(false);
itemEditTextInfo.setKey("vehicleEvaluation");
ResultBean<SecondarySalesAppVos> getSecondarySales = getSecondarySales(query.getBusinessSid());
SecondarySalesAppVos secondarySalesAppVos = getSecondarySales.getData();
itemEditTextInfo.setText(secondarySalesAppVos.getLoanSecondarySalesCost().getVehicleEvaluation());
itemEditTextInfos.add(itemEditTextInfo);
secondSalesInitVo.setList(itemEditTextInfos);
return rb.success().setData(secondSalesInitVo);
}
}

Loading…
Cancel
Save