Browse Source

修改

master
ligaode 6 days ago
parent
commit
3a3bd49854
  1. 13
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyService.java
  2. 84
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanvehclearanceapply/LoanVehClearanceApplyMapper.xml
  3. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanvehclearanceapply/LoanVehClearanceApplyService.java

13
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyService.java

@ -87,19 +87,6 @@ import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
* Project: anrui-riskcenter(车辆交回事前报备申请) <br/>
* File: LoanRestoreReportApplyService.java <br/>
* Class: com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService <br/>
* Description: 车辆交回事前报备申请 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-01-08 11:43:57 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service @Service
public class LoanRestoreReportApplyService extends MybatisBaseService<LoanRestoreReportApplyMapper, LoanRestoreReportApply> { public class LoanRestoreReportApplyService extends MybatisBaseService<LoanRestoreReportApplyMapper, LoanRestoreReportApply> {

84
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanvehclearanceapply/LoanVehClearanceApplyMapper.xml

@ -37,7 +37,7 @@
lv.borrowerName lv.borrowerName
FROM loan_be_collection_veh lv FROM loan_be_collection_veh lv
LEFT JOIN loan_be_collection_apply la LEFT JOIN loan_be_collection_apply la
ON lv.`mainSid` = la.`sid` ON lv.mainSid = la.sid
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>
@ -68,83 +68,37 @@
<select id="initVehListBySaleVehSidYCJK" <select id="initVehListBySaleVehSidYCJK"
resultType="com.yxt.anrui.riskcenter.api.loanvehclearanceveh.LoanVehClearanceVehInit"> resultType="com.yxt.anrui.riskcenter.api.loanvehclearanceveh.LoanVehClearanceVehInit">
SELECT SELECT
a1.`loanContractNo`, a1.loanContractNo,
RIGHT (a1.vinNo, 8) AS vinNo, RIGHT (a1.vinNo, 8) AS vinNo,
a1.vehMark AS carNum, a1.vehMark AS carNum,
a1.`bankName`, a1.bankName,
a1.bankContractNo, a1.bankContractNo,
a1.customer AS custName, a1.customer AS custName,
a1.borrowerName AS loanName, a1.borrowerName AS loanName,
a1.dueDate AS firstBeDate, a1.dueDate AS firstBeDate,
COUNT(a1.sid) AS beOverduePeriod, COUNT(a1.sid) AS beOverduePeriod,
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
0
) + IFNULL(
(SELECT
SUM(fund)
FROM
loan_fund_day
WHERE busSid IN
(SELECT
lrpd.sid
FROM
loan_repayment_plan_details lrpd
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE())),
0
)
) AS beOverdueMoney,
ROUND(
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
0
) + IFNULL(
(SELECT
SUM(fund)
FROM
loan_fund_day
WHERE busSid IN
(SELECT
lrpd.sid
FROM
loan_repayment_plan_details lrpd
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE())),
0
)
) / a1.dueMoney,
1
) AS beOverdueMoneyAndPeriod,
a1.busVinSid AS saleVehSid, a1.busVinSid AS saleVehSid,
a1.salesOrderSid, a1.salesOrderSid,
a1.lockCarMoney a1.lockCarMoney,
a1.nowOverdue
FROM FROM
(SELECT (SELECT
lrpd.sid, lrpd.sid,
lrpd.busVinSid, lrpd.busVinSid,
lrpd.`loanContractNo`, lrpd.loanContractNo,
lrpd.bankContractNo, lrpd.bankContractNo,
lrpd.`vinNo`, lrpd.vinNo,
lrpd.`bankName`, lrpd.bankName,
lrpd.borrowerName, lrpd.borrowerName,
lrpd.dueDate, lrpd.dueDate,
lrpd.vehMark, lrpd.vehMark,
lrpd.dueMoney, lrpd.dueMoney,
( (
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0)) lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS yq_total, ) AS yq_total,
( (
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0)) lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.`dueMoney` AS yq_hsqs, ) / lrpd.dueMoney AS yq_hsqs,
lrpd.customer, lrpd.customer,
ct.mobile, ct.mobile,
lr.createTime, lr.createTime,
@ -161,12 +115,13 @@
AND lbcv.lockCarState = '1' AND lbcv.lockCarState = '1'
AND lbcv.saleVehSid = lrpd.busVinSid AND lbcv.saleVehSid = lrpd.busVinSid
ORDER BY lbcv.createTime DESC ORDER BY lbcv.createTime DESC
LIMIT 1) AS lockCarMoney LIMIT 1) AS lockCarMoney,
if(lrpd.dueDate &lt;= lrpd.updateTime,0,1) as nowOverdue
FROM FROM
`loan_repayment_plan_details` lrpd loan_repayment_plan_details lrpd
LEFT JOIN `loan_repayment_history` lrh LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.`sid` ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid ON lrpd.busVinSid = bv.sid
LEFT JOIN LEFT JOIN
(SELECT (SELECT
@ -177,12 +132,13 @@
ORDER BY createTime DESC ORDER BY createTime DESC
LIMIT 1) lr LIMIT 1) lr
ON lrpd.busVinSid = lr.saleVehSid ON lrpd.busVinSid = lr.saleVehSid
LEFT JOIN anrui_crm.`crm_customer_temp` ct LEFT JOIN anrui_crm.crm_customer_temp ct
ON lrpd.customerSid = ct.sid ON lrpd.customerSid = ct.sid
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE() WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
GROUP BY lrpd.`sid` GROUP BY lrpd.sid
HAVING (yq_total > 0)) a1 HAVING (yq_total > 0)) a1
WHERE a1.busVinSid = #{saleVehSid} WHERE a1.busVinSid = #{saleVehSid}
AND a1.nowOverdue = 0
GROUP BY a1.loanContractNo, GROUP BY a1.loanContractNo,
a1.vinNo, a1.vinNo,
a1.busVinSid a1.busVinSid

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanvehclearanceapply/LoanVehClearanceApplyService.java

@ -57,6 +57,7 @@ import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo; import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; import com.yxt.anrui.riskcenter.api.loanfile.LoanFile;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum;
import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loanvehclearanceapply.*; import com.yxt.anrui.riskcenter.api.loanvehclearanceapply.*;
import com.yxt.anrui.riskcenter.api.loanvehclearanceapply.flowable.*; import com.yxt.anrui.riskcenter.api.loanvehclearanceapply.flowable.*;
@ -64,6 +65,7 @@ import com.yxt.anrui.riskcenter.api.loanvehclearanceveh.*;
import com.yxt.anrui.riskcenter.biz.loanbecollectionveh.LoanBeCollectionVehService; import com.yxt.anrui.riskcenter.biz.loanbecollectionveh.LoanBeCollectionVehService;
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigate.LoanHomevisitInvestigateService; import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigate.LoanHomevisitInvestigateService;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService; import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService;
import com.yxt.anrui.riskcenter.biz.loanvehclearanceveh.LoanVehClearanceVehService; import com.yxt.anrui.riskcenter.biz.loanvehclearanceveh.LoanVehClearanceVehService;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
@ -99,6 +101,8 @@ public class LoanVehClearanceApplyService extends MybatisBaseService<LoanVehClea
@Autowired @Autowired
private LoanVehClearanceVehService loanVehClearanceVehService; private LoanVehClearanceVehService loanVehClearanceVehService;
@Autowired @Autowired
private LoanRestoreReportApplyService loanRestoreReportApplyService;
@Autowired
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign;
@Autowired @Autowired
private BusSalesOrderFeign busSalesOrderFeign; private BusSalesOrderFeign busSalesOrderFeign;
@ -392,6 +396,9 @@ public class LoanVehClearanceApplyService extends MybatisBaseService<LoanVehClea
LoanVehClearanceVehInit loanVehClearanceVehInit = baseMapper.initVehListBySaleVehSidYCJK(saleVehSid); LoanVehClearanceVehInit loanVehClearanceVehInit = baseMapper.initVehListBySaleVehSidYCJK(saleVehSid);
LoanVehClearanceVehDetailsVo loanVehClearanceVehDetailsVo = new LoanVehClearanceVehDetailsVo(); LoanVehClearanceVehDetailsVo loanVehClearanceVehDetailsVo = new LoanVehClearanceVehDetailsVo();
BeanUtil.copyProperties(loanVehClearanceVehInit, loanVehClearanceVehDetailsVo); BeanUtil.copyProperties(loanVehClearanceVehInit, loanVehClearanceVehDetailsVo);
AlrepaidAndArrVo alrepaidAndArr2 = loanRestoreReportApplyService.getAlrepaidAndArr2(saleVehSid);
loanVehClearanceVehDetailsVo.setBeOverdueMoney(alrepaidAndArr2.getCurrentBeMoney());
loanVehClearanceVehDetailsVo.setBeOverdueMoneyAndPeriod(alrepaidAndArr2.getBeOverdueMoneyAndPeriod());
loanVehClearanceVehDetailsVo.setCustomerName(loanVehClearanceVehInit.getCustName()); loanVehClearanceVehDetailsVo.setCustomerName(loanVehClearanceVehInit.getCustName());
loanVehClearanceVehDetailsVo.setBorrowerName(loanVehClearanceVehInit.getLoanName()); loanVehClearanceVehDetailsVo.setBorrowerName(loanVehClearanceVehInit.getLoanName());
List<LoanVehClearanceVehFile> loanVehClearanceVehFiles = new ArrayList<>(); List<LoanVehClearanceVehFile> loanVehClearanceVehFiles = new ArrayList<>();

Loading…
Cancel
Save