|
|
|
@ -11,6 +11,7 @@ |
|
|
|
|
|
|
|
|
|
<resultMap id="CopyForMeMap" type="com.daqing.financial.guarantee.model.response.CopyForMeResponse"> |
|
|
|
|
<result column="presenter_id" property="applicantId"/> |
|
|
|
|
<result column="applicant" property="applicant"/> |
|
|
|
|
<result column="name" property="clientName"/> |
|
|
|
|
<result column="create_time" property="applicationDate"/> |
|
|
|
|
<result column="process_id" property="taskNode"/> |
|
|
|
@ -34,15 +35,14 @@ |
|
|
|
|
resultMap="CopyForMeMap"> |
|
|
|
|
SELECT |
|
|
|
|
aai.presenter_id,aai.business_code,aai.create_time,aai.approval_id,aai.status, |
|
|
|
|
aai.business_type,aai.bank,aai.business_type, |
|
|
|
|
cc.name,cc.phone,cf.process_id, |
|
|
|
|
cf.update_time as approve_date,cf.detail_id,cf.business_id, |
|
|
|
|
bps.business_status, |
|
|
|
|
lcc.loan_money,lcc.loan_tern,lcc.passing_time,lcc.file |
|
|
|
|
aai.business_type,aai.bank,cc.name,cc.phone,cf.process_id,cf.update_time as approve_date, |
|
|
|
|
cf.detail_id,cf.business_id,bps.business_status,lcc.loan_money,lcc.loan_tern, |
|
|
|
|
lcc.passing_time,lcc.file,dq_financial_hrms.hrms_employee.name as applicant |
|
|
|
|
FROM |
|
|
|
|
dg_copy_user cu |
|
|
|
|
JOIN dg_copy_for cf ON cu.copy_id = cf.id |
|
|
|
|
LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id |
|
|
|
|
LEFT JOIN dq_financial_hrms.hrms_employee on aai.presenter_id = dq_financial_hrms.hrms_employee.user_id |
|
|
|
|
LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id |
|
|
|
|
left join dg_loan_committee_consider lcc on cf.business_id = lcc.business_id |
|
|
|
|
LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id |
|
|
|
@ -52,7 +52,7 @@ |
|
|
|
|
AND cf.update_time BETWEEN #{startTime} and #{endTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="clientName != null and clientName != ''"> |
|
|
|
|
AND cc.name LIKE '%' #{clientName} '%' |
|
|
|
|
AND concat(cc.name LIKE '%' #{clientName} '%' or dq_financial_hrms.hrms_employee.name LIKE '%' #{clientName} '%') |
|
|
|
|
</if> |
|
|
|
|
order by aai.create_time desc |
|
|
|
|
limit #{page},#{size} |
|
|
|
@ -65,6 +65,7 @@ |
|
|
|
|
dg_copy_user cu |
|
|
|
|
JOIN dg_copy_for cf ON cu.copy_id = cf.id |
|
|
|
|
LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id |
|
|
|
|
LEFT JOIN dq_financial_hrms.hrms_employee on aai.presenter_id = dq_financial_hrms.hrms_employee.user_id |
|
|
|
|
LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id |
|
|
|
|
left join dg_loan_committee_consider lcc on cf.business_id = lcc.business_id |
|
|
|
|
LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id |
|
|
|
@ -74,7 +75,7 @@ |
|
|
|
|
AND cf.update_time BETWEEN #{startTime} and #{endTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="clientName != null and clientName != ''"> |
|
|
|
|
AND cc.name LIKE '%' #{clientName} '%' |
|
|
|
|
AND concat(cc.name LIKE '%' #{clientName} '%' or dq_financial_hrms.hrms_employee.name LIKE '%' #{clientName} '%') |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|