新增新增贷款查询和导出

This commit is contained in:
wjj
2026-07-03 10:01:17 +08:00
parent 8b9226643c
commit bb41fd7e89
14 changed files with 794 additions and 0 deletions

View File

@@ -67,6 +67,28 @@
<result property="transferDate" column="transfer_date"/>
</resultMap>
<resultMap id="IncreaseLendingListItemResultMap"
type="com.ruoyi.ccdi.project.domain.vo.CcdiProjectIncreaseLendingListItemVO">
<result property="staffId" column="staff_id"/>
<result property="staffName" column="staff_name"/>
<result property="staffIdCard" column="staff_id_card"/>
<result property="deptName" column="dept_name"/>
<result property="contractNo" column="contract_no"/>
<result property="lendingOrgNo" column="lending_org_no"/>
<result property="borrowerName" column="borrower_name"/>
<result property="borrowerCertNo" column="borrower_cert_no"/>
<result property="loanProduct" column="loan_product"/>
<result property="contractAmount" column="contract_amount"/>
<result property="loanBalance" column="loan_balance"/>
<result property="loanStartDate" column="loan_start_date"/>
<result property="loanEndDate" column="loan_end_date"/>
<result property="status" column="status"/>
<result property="fiveClassification" column="five_classification"/>
<result property="customerManagerId" column="customer_manager_id"/>
<result property="customerManagerName" column="customer_manager_name"/>
<result property="approver" column="approver"/>
</resultMap>
<resultMap id="FamilyAssetLiabilityDetailResultMap"
type="com.ruoyi.ccdi.project.domain.vo.CcdiProjectFamilyAssetLiabilityDetailVO">
<association property="incomeDetail"
@@ -806,4 +828,95 @@
)
</select>
<select id="selectIncreaseLendingPage" resultMap="IncreaseLendingListItemResultMap">
select
trim(loan.customer_manager_id) as staff_id,
coalesce(staff.name, loan.customer_manager_name) as staff_name,
staff.id_card as staff_id_card,
dept.dept_name,
loan.nfaacono as contract_no,
loan.nfaabrno as lending_org_no,
loan.borrower_name,
loan.borrower_cert_no,
loan.loan_product,
loan.contract_amount,
loan.loan_balance,
date_format(loan.loan_start_date, '%Y-%m-%d') as loan_start_date,
date_format(loan.loan_end_date, '%Y-%m-%d') as loan_end_date,
loan.status,
loan.five_classification,
loan.customer_manager_id,
loan.customer_manager_name,
loan.approver
from ccdi_increase_lending loan
left join ccdi_base_staff staff
on trim(loan.customer_manager_id) = cast(staff.staff_id as char)
left join sys_dept dept
on dept.dept_id = staff.dept_id
<where>
<if test="query.staffId != null and query.staffId != ''">
and trim(loan.customer_manager_id) = #{query.staffId}
</if>
<if test="query.staffIdCard != null and query.staffIdCard != ''">
and staff.id_card = #{query.staffIdCard}
</if>
<if test="query.approver != null and query.approver != ''">
and trim(loan.approver) = #{query.approver}
</if>
<if test="query.loanStartDate != null and query.loanStartDate != ''">
and loan.loan_start_date &gt;= #{query.loanStartDate}
</if>
<if test="query.loanEndDate != null and query.loanEndDate != ''">
and loan.loan_start_date &lt;= #{query.loanEndDate}
</if>
</where>
order by loan.loan_start_date desc, loan.nfaacono desc
</select>
<select id="selectIncreaseLendingExportList"
resultType="com.ruoyi.ccdi.project.domain.excel.CcdiProjectIncreaseLendingExcel">
select
trim(loan.customer_manager_id) as staff_id,
coalesce(staff.name, loan.customer_manager_name) as staff_name,
staff.id_card as staff_id_card,
dept.dept_name,
loan.nfaacono as contract_no,
loan.nfaabrno as lending_org_no,
loan.borrower_name,
loan.borrower_cert_no,
loan.loan_product,
loan.contract_amount,
loan.loan_balance,
date_format(loan.loan_start_date, '%Y-%m-%d') as loan_start_date,
date_format(loan.loan_end_date, '%Y-%m-%d') as loan_end_date,
loan.status,
loan.five_classification,
loan.customer_manager_id,
loan.customer_manager_name,
loan.approver
from ccdi_increase_lending loan
left join ccdi_base_staff staff
on trim(loan.customer_manager_id) = cast(staff.staff_id as char)
left join sys_dept dept
on dept.dept_id = staff.dept_id
<where>
<if test="query.staffId != null and query.staffId != ''">
and trim(loan.customer_manager_id) = #{query.staffId}
</if>
<if test="query.staffIdCard != null and query.staffIdCard != ''">
and staff.id_card = #{query.staffIdCard}
</if>
<if test="query.approver != null and query.approver != ''">
and trim(loan.approver) = #{query.approver}
</if>
<if test="query.loanStartDate != null and query.loanStartDate != ''">
and loan.loan_start_date &gt;= #{query.loanStartDate}
</if>
<if test="query.loanEndDate != null and query.loanEndDate != ''">
and loan.loan_start_date &lt;= #{query.loanEndDate}
</if>
</where>
order by loan.loan_start_date desc, loan.nfaacono desc
</select>
</mapper>