|
@@ -112,16 +112,16 @@
|
|
|
<select id="getselect" parameterType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel"
|
|
|
resultType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel">
|
|
|
select
|
|
|
- t1.rwa - (t1.UNFINISH_EAD*t2.LOAN_WEIGHT)
|
|
|
- ,t1.UNFINISH_EAD*t2.LOAN_WEIGHT
|
|
|
- ,t1.EAD - t1.UNFINISH_EAD
|
|
|
- ,t3.AFTER_EXEMPTION_MITIGANT_WEIGHT
|
|
|
- ,t1.UNFINISH_EAD
|
|
|
- ,t1.LOAN_WEIGHT
|
|
|
- ,null
|
|
|
- ,t1.CHARGE_FEE
|
|
|
- ,t1.this_balance
|
|
|
- ,t1.RESERVE
|
|
|
+ t1.rwa - (t1.UNFINISH_EAD*t2.LOAN_WEIGHT) as mitigantCoverageRwa -- rwa - 未缓释的rwa
|
|
|
+ ,t1.UNFINISH_EAD*t2.LOAN_WEIGHT as unmitigantRwa -- 未缓释的rwa
|
|
|
+ ,t1.EAD - t1.UNFINISH_EAD as mitigantCoveragePartitionRiskExpose -- 缓释前的风险暴露 - 为缓释的风险暴露
|
|
|
+ ,t3.AFTER_EXEMPTION_MITIGANT_WEIGHT as afterExemptionMitigantWeight
|
|
|
+ ,t1.UNFINISH_EAD as unfinishEad
|
|
|
+ ,t1.LOAN_WEIGHT as loanWeight
|
|
|
+ ,null as ccf
|
|
|
+ ,t1.CHARGE_FEE as chargeFee
|
|
|
+ ,t1.this_balance as thisBalance
|
|
|
+ ,t1.RESERVE as reserve
|
|
|
from RWA_APM_BUS_RS_ONBUSINESSRWA t1
|
|
|
left join RWA_APM_BUS_RS_ARTIFICIALRESULT t2 -- 风险暴露分类人工认定历史表
|
|
|
on t1.LOAN_REFERENCE_NO = t2.LOAN_REFERENCE_NO
|
|
@@ -131,6 +131,27 @@
|
|
|
and t3.data_date = #{term}
|
|
|
where t1.data_date = #{term}
|
|
|
and t1.LOAN_REFERENCE_NO = #{loanReferenceNo}
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ t1.rwa - (t1.UNFINISH_EAD*t2.LOAN_WEIGHT) as mitigantCoverageRwa -- rwa - 未缓释的rwa
|
|
|
+ ,t1.UNFINISH_EAD*t2.LOAN_WEIGHT as unmitigantRwa -- 未缓释的rwa
|
|
|
+ ,t1.EAD - t1.UNFINISH_EAD as mitigantCoveragePartitionRiskExpose -- 缓释前的风险暴露 - 为缓释的风险暴露
|
|
|
+ ,t3.AFTER_EXEMPTION_MITIGANT_WEIGHT as afterExemptionMitigantWeight
|
|
|
+ ,t1.UNFINISH_EAD as unfinishEad
|
|
|
+ ,t1.LOAN_WEIGHT as loanWeight
|
|
|
+ ,t1.ccf as ccf
|
|
|
+ ,t1.CHARGE_FEE as chargeFee
|
|
|
+ ,t1.balance as thisBalance
|
|
|
+ ,t1.RESERVE as reserve
|
|
|
+ from RWA_APM_BUS_RS_OFFBUSINESSRWA t1
|
|
|
+ left join RWA_APM_BUS_RS_ARTIFICIALRESULT t2 -- 风险暴露分类人工认定历史表
|
|
|
+ on t1.LOAN_REFERENCE_NO = t2.LOAN_REFERENCE_NO
|
|
|
+ and t2.data_date = #{term}
|
|
|
+ left join RWA_TDM_BUS_PROCESS_REGULARRCSWERGHT t3
|
|
|
+ on t1.LOAN_REFERENCE_NO = t3.DEBTITEM_NO
|
|
|
+ and t3.data_date = #{term}
|
|
|
+ where t1.data_date = #{term}
|
|
|
+ and t1.LOAN_REFERENCE_NO = #{loanReferenceNo}
|
|
|
</select>
|
|
|
|
|
|
<delete id="delete" parameterType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel">
|