Browse Source

Merge remote-tracking branch 'origin/master'

master
God 1 year ago
parent
commit
7b468cdcc4
  1. 1
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  2. 7
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyDetailsVo.java
  3. 7
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyDto.java
  4. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java
  5. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/CompleteLoanSecondarySalesApplyDto.java
  6. 9
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCost.java
  7. 10
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCostVo.java
  8. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyMapper.xml
  9. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyRest.java
  10. 134
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  11. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.java
  12. 8
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.xml
  13. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostService.java
  14. 76
      doc/databases/risk_center.sql

1
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -74,6 +74,7 @@ public enum ProcDefEnum {
LOANRETUENINBOUNDAPPLY("交回车辆入库申请", "process_h0i1vnn8:1:7945004"),
LOANSUBLETAPPLY("交回车辆二次转租申请", "process_lu7pdwzs:1:7940004"),
LOANOUTBOUNDVEHAPPLY("交回车辆出库申请", "process_14spbdx8:1:7982504"),
LOANSECONDSALEAPPLY("交车车辆二次销售申请", "process_6kb1z0pe:3:8060012"),
/******************************测试流程id*********************************************/

7
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyDetailsVo.java

@ -28,8 +28,12 @@ public class LoanSecondarySalesApplyDetailsVo {
private String createDate;
@ApiModelProperty("客户名称")
private String customerName;
@ApiModelProperty("客户sid")
private String customerSid;
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("贷款人sid")
private String loanSid;
@ApiModelProperty("贷款合同编号")
private String loanContractNo;
@ApiModelProperty("资方")
@ -87,5 +91,8 @@ public class LoanSecondarySalesApplyDetailsVo {
private String files;
@ApiModelProperty("销售订单sid")
private String salesOrderSid;
}

7
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyDto.java

@ -28,6 +28,10 @@ public class LoanSecondarySalesApplyDto {
private String createDate;
@ApiModelProperty("客户名称")
private String customerName;
@ApiModelProperty("客户sid")
private String customerSid;
@ApiModelProperty("贷款人sid")
private String loanSid;
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("贷款合同编号")
@ -80,4 +84,7 @@ public class LoanSecondarySalesApplyDto {
private String userSid;
private String orgPath;
@ApiModelProperty("销售订单sid")
private String salesOrderSid;
}

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java

@ -42,7 +42,7 @@ public interface LoanSecondarySalesApplyFeign {
@ApiOperation("详情初始化")
@PostMapping("/details")
ResultBean<LoanSecondarySalesApplyDetailsVo> details(LoanSecondarySalesApplyDetailsQuery query);
ResultBean<LoanSecondarySalesApplyDetailsVo> details(@RequestBody LoanSecondarySalesApplyDetailsQuery query);
@ApiOperation("删除/批量删除")
@DeleteMapping("/delBySids")

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/CompleteLoanSecondarySalesApplyDto.java

@ -32,4 +32,6 @@ public class CompleteLoanSecondarySalesApplyDto {
@ApiModelProperty(value = "业务sid")
@NotBlank(message = "参数错误:businessSid")
private String businessSid;
@ApiModelProperty("车辆评估价格")
private String vehicleEvaluation;
}

9
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCost.java

@ -29,30 +29,37 @@ public class LoanSecondarySalesCost extends BaseEntity {
private BigDecimal bankSettleCost;
@ApiModelProperty("资方结清费用承担方")
private String bankSettleCostAssume;
private String bankSettleCostAssumeKey;
@ApiModelProperty("车辆违章费用")
private BigDecimal vehicleViolationCost;
@ApiModelProperty("车辆违章费用承担方")
private String vehicleViolationCostAssume;
private String vehicleViolationCostAssumeKey;
@ApiModelProperty("年检费")
private BigDecimal inspectYearCost;
@ApiModelProperty("年检费承担方")
private String inspectYearCostAssume;
private String inspectYearCostAssumeKey;
@ApiModelProperty("保险费")
private BigDecimal insureCost;
@ApiModelProperty("保险费承担方")
private String insureCostAssume;
private String insureCostAssumeKey;
@ApiModelProperty("过户费")
private BigDecimal ownershipCost;
@ApiModelProperty("过户费承担方")
private String ownershipCostAssume;
private String ownershipCostAssumeKey;
@ApiModelProperty("停车费")
private BigDecimal stopCost;
@ApiModelProperty("停车费承担方")
private String stopCostAssume;
private String stopCostAssumeKey;
@ApiModelProperty("其他费用")
private BigDecimal otherCost;
@ApiModelProperty("其他费用承担方")
private String otherCostAssume;
private String otherCostAssumeKey;
@ApiModelProperty("费用说明")
private String costDescription;
@ApiModelProperty("预计亏损金额")
@ -61,6 +68,8 @@ public class LoanSecondarySalesCost extends BaseEntity {
private String debtDisposal;
@ApiModelProperty("附件")
private String files;
@ApiModelProperty("车辆评估")
private BigDecimal vehicleEvaluation;
}

10
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCostVo.java

@ -28,30 +28,37 @@ public class LoanSecondarySalesCostVo {
private String bankSettleCost;
@ApiModelProperty("资方结清费用承担方")
private String bankSettleCostAssume;
private String bankSettleCostAssumeKey;
@ApiModelProperty("车辆违章费用")
private String vehicleViolationCost;
@ApiModelProperty("车辆违章费用承担方")
private String vehicleViolationCostAssume;
private String vehicleViolationCostAssumeKey;
@ApiModelProperty("年检费")
private String inspectYearCost;
@ApiModelProperty("年检费承担方")
private String inspectYearCostAssume;
private String inspectYearCostAssumeKey;
@ApiModelProperty("保险费")
private String insureCost;
@ApiModelProperty("保险费承担方")
private String insureCostAssume;
private String insureCostAssumeKey;
@ApiModelProperty("过户费")
private String ownershipCost;
@ApiModelProperty("过户费承担方")
private String ownershipCostAssume;
private String ownershipCostAssumeKey;
@ApiModelProperty("停车费")
private String stopCost;
@ApiModelProperty("停车费承担方")
private String stopCostAssume;
private String stopCostAssumeKey;
@ApiModelProperty("其他费用")
private String otherCost;
@ApiModelProperty("其他费用承担方")
private String otherCostAssume;
private String otherCostAssumeKey;
@ApiModelProperty("费用说明")
private String costDescription;
@ApiModelProperty("预计亏损金额")
@ -61,4 +68,7 @@ public class LoanSecondarySalesCostVo {
@ApiModelProperty("附件")
private List<UrlQuery> files = new ArrayList<>();
@ApiModelProperty("车辆评估")
private String vehicleEvaluation;
}

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyMapper.xml

@ -83,7 +83,7 @@
la.nper,
la.currentPeriod,
la.alRepaidMoneyConPeriod,
la.beOverdueMoneyAndPeriod
la.beOverdueMoneyAndPeriod,la.loanSid,la.customerSid,la.salesOrderSid
from loan_secondary_sales_apply la
where sid = #{sid}
</select>

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyRest.java

@ -60,7 +60,7 @@ public class LoanSecondarySalesApplyRest implements LoanSecondarySalesApplyFeign
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId("");
return loanSecondarySalesApplyService.complete(bv);
return loanSecondarySalesApplyService.complete(bv,query.getVehicleEvaluation());
}
@Override

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

@ -35,13 +35,21 @@ import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTr
import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.*;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.flowable.*;
import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost;
import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCostVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesveh.LoanSecondarySalesVeh;
import com.yxt.anrui.riskcenter.api.loansecondarysalesveh.LoanSecondarySalesVehVo;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturninboundapply.LoanReturnInboundApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturnvehledger.LoanReturnVehLedgerService;
import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostMapper;
import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostService;
import com.yxt.anrui.riskcenter.biz.loansecondarysalesveh.LoanSecondarySalesVehService;
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsMapper;
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService;
import com.yxt.anrui.riskcenter.biz.loansolutionsdetail.LoanSolutionsDetailService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
@ -56,6 +64,7 @@ import org.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
@ -92,6 +101,14 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
private LoanReturnVehLedgerService loanReturnVehLedgerService;
@Autowired
private LoanReturnInboundApplyService loanReturnInboundApplyService;
@Autowired
private LoanRestoreReportApplyService loanRestoreReportApplyService;
@Autowired
private LoanSolutionsMapper loanSolutionsMapper;
@Autowired
private LoanSolutionsDetailService loanSolutionsDetailService;
@Autowired
private LoanSecondarySalesCostMapper loanSecondarySalesCostMapper;
public PagerVo<LoanSecondarySalesApplyVo> listPageVo(PagerQuery<LoanSecondarySalesApplyQuery> pq) {
LoanSecondarySalesApplyQuery query = pq.getParams();
@ -364,12 +381,26 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
return rb.success();
}
public ResultBean complete(BusinessVariables bv) {
public ResultBean complete(BusinessVariables bv, String price) {
ResultBean rb = ResultBean.fireFail();
String businessSid = bv.getBusinessSid();
LoanSecondarySalesApply loanSecondarySalesApply = fetchBySid(businessSid);
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
if ("Activity_0rm74ey".equals(bv.getTaskDefKey())) {//风控处置岗审批
if (StringUtils.isBlank(price)) {
return rb.setMsg("请填写评估价格");
}
//保存评估价格
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);
}
}
appMap.put("sid", businessSid);
variables.put("app", appMap);
bv.setFormVariables(variables);
@ -441,7 +472,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
bv.setFormVariables(variables);
if (r == 1) {
//ToDo:流程定义id
bv.setModelId(ProcDefEnum.LOANRETUENINBOUNDAPPLY.getProDefId());
bv.setModelId(ProcDefEnum.LOANSECONDSALEAPPLY.getProDefId());
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv);
if (!voResultBean.getSuccess()) {
return rb.setMsg(voResultBean.getMsg());
@ -485,7 +516,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
bv.setTaskDefKey(loanSecondarySalesApply.getTaskDefKey());
bv.setComment("重新提交");
bv.setInstanceId(dto.getInstanceId());
return complete(bv);
return complete(bv, "");
}
return rb;
}
@ -538,7 +569,33 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
loanSecondarySalesCostService.saveCost(loanSecondarySalesCost, sid);
}
} else {
LoanSecondarySalesApply loanSecondarySalesApply = fetchBySid(sid);
if (loanSecondarySalesApply == null) {
return rb.setMsg("该申请不存在");
}
dto.setUserSid(loanSecondarySalesApply.getCreateBySid());
BeanUtil.copyProperties(dto, loanSecondarySalesApply, "sid");
List<UrlQuery> filss = dto.getFilesList();
if (!filss.isEmpty()) {
List<String> filesList = filss.stream().map(v -> v.getUrl()).collect(Collectors.toList());
if (!filesList.isEmpty()) {
String files = String.join(",", filesList).replaceAll(fileUploadComponent.getUrlPrefix(), "");
loanSecondarySalesApply.setFiles(files);
}
} else {
loanSecondarySalesApply.setFiles("");
}
//保存车辆
List<LoanSecondarySalesVehVo> loanSecondarySalesVehVoList = dto.getLoanSecondarySalesVehVoList();
loanSecondarySalesVehVoList.removeAll(Collections.singleton(null));
if (!loanSecondarySalesVehVoList.isEmpty()) {
loanSecondarySalesVehService.saveVeh(loanSecondarySalesVehVoList, sid);
}
LoanSecondarySalesCostVo loanSecondarySalesCost = dto.getLoanSecondarySalesCost();
if (loanSecondarySalesCost != null) {
loanSecondarySalesCostService.saveCost(loanSecondarySalesCost, sid);
}
baseMapper.updateById(loanSecondarySalesApply);
}
return rb.success().setData(sid);
}
@ -593,8 +650,6 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
return rb.setMsg("请选择车辆");
}
String busVinSid = "";
String vinNo = "";
String saleOrderSid = "";
List<String> vinNoLists = new ArrayList<>();
List<String> bankContractNoList = new ArrayList<>();
List<LoanSecondarySalesVehVo> loanSecondarySalesVehVoList = new ArrayList<>();
@ -611,19 +666,66 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
}
busVinSid = loanReturnInboundApply.getBusVinSid();
if ("主车".equals(loanReturnVehLedger.getVehType())) {
if ("未处置".equals(loanReturnVehLedger.getVehType())) {
if ("未处置".equals(loanReturnVehLedger.getDisposal())) {
loanSecondarySalesVehVo.setBusVinSid(loanReturnVehLedger.getBusVinSid());
loanSecondarySalesVehVo.setVinNo(loanReturnVehLedger.getVinNo());
loanSecondarySalesVehVo.setVehMark(loanReturnVehLedger.getVehMark());
loanSecondarySalesVehVo.setModelName(loanReturnVehLedger.getVehModel());
loanSecondarySalesVehVo.setModelSid(loanReturnVehLedger.getVehModelSid());
loanSecondarySalesVehVo.setConfigSid(loanReturnVehLedger.getConfigSid());
loanSecondarySalesVehVo.setBusVinSid(busVinSid);
loanSecondarySalesVehVo.setVehType(loanReturnVehLedger.getVehType());
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo);
loanSecondarySalesApplyDetailsVo.setCustomerName(loanReturnVehLedger.getCustomer());
loanSecondarySalesApplyDetailsVo.setLoanName(loanReturnVehLedger.getBorrowerName());
loanSecondarySalesApplyDetailsVo.setCustomerSid(loanReturnVehLedger.getCustomerSid());
loanSecondarySalesApplyDetailsVo.setLoanSid(loanReturnVehLedger.getBorrowerSid());
loanSecondarySalesApplyDetailsVo.setLoanContractNo(loanReturnInboundApply.getLoanContractNo());
loanSecondarySalesApplyDetailsVo.setBankName(loanReturnInboundApply.getBankName());
loanSecondarySalesApplyDetailsVo.setBankContractNo(loanReturnInboundApply.getBankContractNo());
loanSecondarySalesApplyDetailsVo.setLocationName(loanReturnVehLedger.getLocation());
loanSecondarySalesApplyDetailsVo.setSalesOrderSid(loanReturnVehLedger.getSaleOrderSid());
loanSecondarySalesApplyDetailsVo.setFirstDate(loanReturnInboundApply.getFirstDate());
if (StringUtils.isNotBlank(loanReturnInboundApply.getFiles())) {
List<UrlQuery> list = new ArrayList<>();
if (StringUtils.isNotBlank(loanReturnInboundApply.getFiles())) {
List<String> fileList = Arrays.asList(loanReturnInboundApply.getFiles().split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList());
for (int j = 0; j < fileList.size(); j++) {
UrlQuery urlQuery = new UrlQuery();
urlQuery.setUrl(fileList.get(j));
list.add(urlQuery);
}
loanSecondarySalesApplyDetailsVo.setFilesList(list);
}
}
LoanSecondarySalesCostVo loanSecondarySalesCost = new LoanSecondarySalesCostVo();
AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr(busVinSid);
if (alrepaidAndArrVo != null) {
BeanUtil.copyProperties(alrepaidAndArrVo, loanSecondarySalesApplyDetailsVo);
BigDecimal bigDecimal = BigDecimal.ZERO;
if (StringUtils.isNotBlank(alrepaidAndArrVo.getCurrentBeMoney())) {
bigDecimal = bigDecimal.add(new BigDecimal(alrepaidAndArrVo.getCurrentBeMoney()));
}
if (StringUtils.isNotBlank(alrepaidAndArrVo.getUnexpiredMoney())) {
bigDecimal = bigDecimal.add(new BigDecimal(alrepaidAndArrVo.getUnexpiredMoney()));
}
loanSecondarySalesCost.setArrearsAll(bigDecimal.toString());
}
loanSecondarySalesApplyDetailsVo.setLoanSecondarySalesCost(loanSecondarySalesCost);
//根据销售订单查询金额方案
LoanSolutions loanSolutions = loanSolutionsMapper.selectBySaleOrderSid(loanReturnVehLedger.getSaleOrderSid());
if (loanSolutions != null) {
LoanSolutionsDetail loanSolutionsDetail = loanSolutionsDetailService.selectLoanSid(loanSolutions.getSid());
if (loanSolutionsDetail != null) {
loanSecondarySalesCost.setLoanDeposit(loanSolutionsDetail.getBondAmounts().toString());
}
}
}
//根据主车查询挂车信息
LoanReturnVehLedger loanReturnVehLedgerT = loanReturnVehLedgerService.selectByPSid(loanReturnVehLedger.getSid());
if ("未处置".equals(loanReturnVehLedgerT.getVehType())) {
if ("未处置".equals(loanReturnVehLedgerT.getDisposal())) {
loanSecondarySalesVehVo = new LoanSecondarySalesVehVo();
loanSecondarySalesVehVo.setVehType(loanReturnVehLedgerT.getVehType());
loanSecondarySalesVehVo.setVehMark(loanReturnVehLedgerT.getVehMark());
@ -632,15 +734,29 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo);
}
}
if ("挂车".equals(loanReturnVehLedger.getVehType())) {
if ("未处置".equals(loanReturnVehLedger.getVehType())) {
if ("未处置".equals(loanReturnVehLedger.getDisposal())) {
loanSecondarySalesVehVo = new LoanSecondarySalesVehVo();
loanSecondarySalesVehVo.setVehType(loanReturnVehLedger.getVehType());
loanSecondarySalesVehVo.setVehMark(loanReturnVehLedger.getVehMark());
loanSecondarySalesVehVo.setVinNo(loanReturnVehLedger.getVinNo());
loanSecondarySalesVehVo.setModelName(loanReturnVehLedger.getVehModel());
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo);
loanSecondarySalesApplyDetailsVo.setCustomerName(loanReturnVehLedger.getCustomer());
loanSecondarySalesApplyDetailsVo.setLoanName(loanReturnVehLedger.getBorrowerName());
loanSecondarySalesApplyDetailsVo.setCustomerSid(loanReturnVehLedger.getCustomerSid());
loanSecondarySalesApplyDetailsVo.setLoanSid(loanReturnVehLedger.getBorrowerSid());
loanSecondarySalesApplyDetailsVo.setLoanContractNo(loanReturnInboundApply.getLoanContractNo());
loanSecondarySalesApplyDetailsVo.setBankName(loanReturnInboundApply.getBankName());
loanSecondarySalesApplyDetailsVo.setBankContractNo(loanReturnInboundApply.getBankContractNo());
loanSecondarySalesApplyDetailsVo.setLocationName(loanReturnVehLedger.getLocation());
loanSecondarySalesApplyDetailsVo.setSalesOrderSid(loanReturnVehLedger.getSaleOrderSid());
AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr(busVinSid);
if (alrepaidAndArrVo != null) {
BeanUtil.copyProperties(alrepaidAndArrVo, loanSecondarySalesApplyDetailsVo);
}
}
}
}

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.java

@ -15,4 +15,5 @@ public interface LoanSecondarySalesCostMapper extends BaseMapper<LoanSecondarySa
int deleteByMainSid(String s);
LoanSecondarySalesCostVo selectByMainSid(String sid);
LoanSecondarySalesCost selectMainSid(String sid);
}

8
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostMapper">
<delete id="deleteByMainSid">
delete
from loan_secondary_sales_veh
from loan_secondary_sales_cost
where mainSid = #{s}
</delete>
@ -13,4 +13,10 @@
FROM loan_secondary_sales_cost
where mainSid = #{sid}
</select>
<select id="selectMainSid" resultType="com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost">
select *
from loan_secondary_sales_cost
where mainSid = #{sid}
</select>
</mapper>

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostService.java

@ -31,6 +31,7 @@ public class LoanSecondarySalesCostService extends MybatisBaseService<LoanSecond
return baseMapper.selectByMainSid(sid);
}
public void saveCost(LoanSecondarySalesCostVo loanSecondarySalesCost, String sid) {
baseMapper.deleteByMainSid(sid);
LoanSecondarySalesCost loanSecondarySalesCost1 = new LoanSecondarySalesCost();

76
doc/databases/risk_center.sql

@ -1618,40 +1618,48 @@ CREATE TABLE `loan_secondary_sales_veh`
DROP TABLE IF EXISTS `loan_secondary_sales_cost`;
CREATE TABLE `loan_secondary_sales_cost`
(
`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',
`mainSid` varchar(64) DEFAULT NULL COMMENT '主表sid',
`arrearsAll` decimal(10, 2) DEFAULT NULL COMMENT '欠款合计',
`loanDeposit` decimal(10, 2) DEFAULT NULL COMMENT '贷款保证金',
`vehPrice` decimal(10, 2) DEFAULT NULL COMMENT '车辆售价',
`collectionCost` decimal(10, 2) DEFAULT NULL COMMENT '催收费用',
`bankSettleCost` decimal(10, 2) DEFAULT NULL COMMENT '资方结清费用',
`bankSettleCostAssume` varchar(64) DEFAULT NULL COMMENT '资方结清费用承担方',
`vehicleViolationCost` decimal(10, 2) DEFAULT NULL COMMENT '车辆违章费用',
`vehicleViolationCostAssume` varchar(64) DEFAULT NULL COMMENT '车辆违章费用承担方',
`inspectYearCost` decimal(10, 2) DEFAULT NULL COMMENT '年检费',
`inspectYearCostAssume` varchar(64) DEFAULT NULL COMMENT '年检费承担方',
`insureCost` decimal(10, 2) DEFAULT NULL COMMENT '保险费',
`insureCostAssume` varchar(64) DEFAULT NULL COMMENT '保险费承担方',
`ownershipCost` decimal(10, 2) DEFAULT NULL COMMENT '过户费',
`ownershipCostAssume` varchar(64) DEFAULT NULL COMMENT '过户费承担方',
`stopCost` decimal(10, 2) DEFAULT NULL COMMENT '停车费',
`stopCostAssume` varchar(64) DEFAULT NULL COMMENT '停车费承担方',
`otherCost` decimal(10, 2) DEFAULT NULL COMMENT '其他费用',
`otherCostAssume` varchar(64) DEFAULT NULL COMMENT '其他费用承担方',
`costDescription` text DEFAULT NULL COMMENT '费用说明',
`lossPrice` decimal(10, 2) DEFAULT NULL COMMENT '预计亏损金额',
`debtDisposal` text DEFAULT NULL COMMENT '后续欠款处置方向',
`files` text 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',
`mainSid` varchar(64) DEFAULT NULL COMMENT '主表sid',
`arrearsAll` decimal(10, 2) DEFAULT NULL COMMENT '欠款合计',
`loanDeposit` decimal(10, 2) DEFAULT NULL COMMENT '贷款保证金',
`vehPrice` decimal(10, 2) DEFAULT NULL COMMENT '车辆售价',
`collectionCost` decimal(10, 2) DEFAULT NULL COMMENT '催收费用',
`bankSettleCost` decimal(10, 2) DEFAULT NULL COMMENT '资方结清费用',
`bankSettleCostAssume` varchar(64) DEFAULT NULL COMMENT '资方结清费用承担方',
`bankSettleCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '资方结清费用承担方',
`vehicleViolationCost` decimal(10, 2) DEFAULT NULL COMMENT '车辆违章费用',
`vehicleViolationCostAssume` varchar(64) DEFAULT NULL COMMENT '车辆违章费用承担方',
`vehicleViolationCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '车辆违章费用承担方',
`inspectYearCost` decimal(10, 2) DEFAULT NULL COMMENT '年检费',
`inspectYearCostAssume` varchar(64) DEFAULT NULL COMMENT '年检费承担方',
`inspectYearCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '年检费承担方',
`insureCost` decimal(10, 2) DEFAULT NULL COMMENT '保险费',
`insureCostAssume` varchar(64) DEFAULT NULL COMMENT '保险费承担方',
`insureCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '保险费承担方',
`ownershipCost` decimal(10, 2) DEFAULT NULL COMMENT '过户费',
`ownershipCostAssume` varchar(64) DEFAULT NULL COMMENT '过户费承担方',
`ownershipCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '过户费承担方',
`stopCost` decimal(10, 2) DEFAULT NULL COMMENT '停车费',
`stopCostAssume` varchar(64) DEFAULT NULL COMMENT '停车费承担方',
`stopCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '停车费承担方',
`otherCost` decimal(10, 2) DEFAULT NULL COMMENT '其他费用',
`otherCostAssume` varchar(64) DEFAULT NULL COMMENT '其他费用承担方',
`otherCostAssumeKey` varchar(64) DEFAULT NULL COMMENT '其他费用承担方',
`costDescription` text DEFAULT NULL COMMENT '费用说明',
`lossPrice` decimal(10, 2) DEFAULT NULL COMMENT '预计亏损金额',
`debtDisposal` text DEFAULT NULL COMMENT '后续欠款处置方向',
`files` text DEFAULT NULL COMMENT '附件',
`vehicleEvaluation` decimal(10, 2) DEFAULT NULL COMMENT '车辆评估价格',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB

Loading…
Cancel
Save