From 4038a8717b586dc58a1c1ca32ec22e4a471e73ab Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Mon, 29 Jan 2024 18:20:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=8C=E6=AC=A1=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSecondarySalesApplyNodeQuery.java | 3 + .../LoanSecondarySalesVeh.java | 2 + .../LoanSecondarySalesApplyService.java | 34 ++++++---- .../LoanSecondarySalesVehMapper.xml | 3 +- .../base/common/ItemEditTextInfoCommon.java | 67 +++++++++++++++++++ .../secondarysales/SecondSalesInitVo.java | 19 ++++++ .../secondarysales/SecondarySalesFeign.java | 5 ++ .../secondarysales/SecondarySalesRest.java | 6 ++ .../secondarysales/SecondarySalesService.java | 50 ++++++++++++-- 9 files changed, 170 insertions(+), 19 deletions(-) create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/base/common/ItemEditTextInfoCommon.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondSalesInitVo.java diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/LoanSecondarySalesApplyNodeQuery.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/LoanSecondarySalesApplyNodeQuery.java index 4185bc4f4e..84fb99e136 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/LoanSecondarySalesApplyNodeQuery.java +++ b/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; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesveh/LoanSecondarySalesVeh.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesveh/LoanSecondarySalesVeh.java index c2a631cf20..e9159bbc21 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesveh/LoanSecondarySalesVeh.java +++ b/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; } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java index d7a5e2b7eb..c1d19688d4 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java +++ b/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 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 variables = new HashMap<>(); Map 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 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 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 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); diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesveh/LoanSecondarySalesVehMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesveh/LoanSecondarySalesVehMapper.xml index a2bcecc52c..309dfde1cf 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesveh/LoanSecondarySalesVehMapper.xml +++ b/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} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/base/common/ItemEditTextInfoCommon.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/base/common/ItemEditTextInfoCommon.java new file mode 100644 index 0000000000..dd7f9004d9 --- /dev/null +++ b/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 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 getFilesPath() { + return filesPath; + } + + public void setFilesPath(List filesPath) { + this.filesPath = filesPath; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondSalesInitVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondSalesInitVo.java new file mode 100644 index 0000000000..31d67b5371 --- /dev/null +++ b/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 list; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondarySalesFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondarySalesFeign.java index b4010a7e5a..45338c80ed 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/secondarysales/SecondarySalesFeign.java +++ b/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 getFlowOperateTitleBy(@SpringQueryMap SecondarySalesQuery query); } diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesRest.java index 75b6357594..7314f00e79 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesRest.java +++ b/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 getFlowOperateTitleBy(SecondarySalesQuery query) { + return secondarySalesService.getFlowOperateTitleBy(query); + } } diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java index ed1bcd4f64..ef796c645a 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java +++ b/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 getFlowOperateTitleBy(SecondarySalesQuery query) { + ResultBean 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> 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> 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 itemEditTextInfos = new ArrayList<>(); + ItemEditTextInfoCommon itemEditTextInfo = new ItemEditTextInfoCommon(); + itemEditTextInfo.setTitle("风控中心车辆评估价"); + itemEditTextInfo.setType(2); + itemEditTextInfo.setNullAble(false); + itemEditTextInfo.setKey("vehicleEvaluation"); + ResultBean getSecondarySales = getSecondarySales(query.getBusinessSid()); + SecondarySalesAppVos secondarySalesAppVos = getSecondarySales.getData(); + itemEditTextInfo.setText(secondarySalesAppVos.getLoanSecondarySalesCost().getVehicleEvaluation()); + itemEditTextInfos.add(itemEditTextInfo); + secondSalesInitVo.setList(itemEditTextInfos); + return rb.success().setData(secondSalesInitVo); + } }