|
@@ -8,6 +8,7 @@
|
|
resultType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel"
|
|
resultType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel"
|
|
parameterType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel">
|
|
parameterType="com.sundata.product.rwa.internal.model.MultiDimensionalCreditRiskModel">
|
|
select
|
|
select
|
|
|
|
+ TERM AS reportDate,
|
|
LOAN_REFERENCE_NO AS loanReferenceNo,
|
|
LOAN_REFERENCE_NO AS loanReferenceNo,
|
|
CONT_NO AS contNo,
|
|
CONT_NO AS contNo,
|
|
MGMT_BRANCH_NO AS mgmtBranchNo,
|
|
MGMT_BRANCH_NO AS mgmtBranchNo,
|
|
@@ -15,17 +16,17 @@
|
|
CUST_NAME AS custName,
|
|
CUST_NAME AS custName,
|
|
BUS_TYPE AS busType,
|
|
BUS_TYPE AS busType,
|
|
case
|
|
case
|
|
- when CUST_NO in (select CUST_NO from ) RWA_TDM_BUS_PROCESS_SMALLANDMICRO
|
|
|
|
|
|
+ when CUST_NO in (select CUST_NO from RWA_TDM_BUS_PROCESS_SMALLANDMICRO)
|
|
then '是'
|
|
then '是'
|
|
else '否'
|
|
else '否'
|
|
end AS micro,
|
|
end AS micro,
|
|
case
|
|
case
|
|
- when CUST_NO in (select CUST_NO from ) RWA_TDM_BUS_PROCESS_SMALLANDMEDIUM
|
|
|
|
|
|
+ when CUST_NO in (select CUST_NO from RWA_TDM_BUS_PROCESS_SMALLANDMEDIUM )
|
|
then '是'
|
|
then '是'
|
|
else '否'
|
|
else '否'
|
|
end AS medium,
|
|
end AS medium,
|
|
case
|
|
case
|
|
- when CUST_NO in (select CUST_NO from ) RWA_TDM_BUS_PROCESS_REGULATEDRETAIL
|
|
|
|
|
|
+ when CUST_NO in (select CUST_NO from RWA_TDM_BUS_PROCESS_REGULATEDRETAIL )
|
|
then '是'
|
|
then '是'
|
|
else '否'
|
|
else '否'
|
|
end AS regulatoryRetail,
|
|
end AS regulatoryRetail,
|
|
@@ -99,7 +100,7 @@
|
|
where QUALFIED_CREDIT_TOOL_TYPE = 'S001') t2 -- 现金类资产
|
|
where QUALFIED_CREDIT_TOOL_TYPE = 'S001') t2 -- 现金类资产
|
|
on t.LOAN_REFERENCE_NO = t2.LOAN_REFERENCE_NO
|
|
on t.LOAN_REFERENCE_NO = t2.LOAN_REFERENCE_NO
|
|
|
|
|
|
- left jin
|
|
|
|
|
|
+ left join
|
|
(select
|
|
(select
|
|
LOAN_REFERENCE_NO,
|
|
LOAN_REFERENCE_NO,
|
|
CONT_NO,
|
|
CONT_NO,
|
|
@@ -161,22 +162,40 @@
|
|
|
|
|
|
left join
|
|
left join
|
|
(select
|
|
(select
|
|
- LOAN_REFERENCE_NO -- 债项编号
|
|
|
|
- RISK_EXPOSURE_CODE -- 系统认定风险暴露分类代码
|
|
|
|
- LOAN_WEIGHT -- 系统认定风险权重
|
|
|
|
- RISK_EXPOSURE_CODE_ARTIFICIAL -- 人工认定风险暴露分类代码
|
|
|
|
|
|
+ LOAN_REFERENCE_NO, -- 债项编号
|
|
|
|
+ RISK_EXPOSURE_CODE, -- 系统认定风险暴露分类代码
|
|
|
|
+ LOAN_WEIGHT, -- 系统认定风险权重
|
|
|
|
+ RISK_EXPOSURE_CODE_ARTIFICIAL, -- 人工认定风险暴露分类代码
|
|
LOAN_WEIGHT_ARTIFICIAL -- 人工认定风险权重
|
|
LOAN_WEIGHT_ARTIFICIAL -- 人工认定风险权重
|
|
from RWA_APM_BUS_RS_ARTIFICIALRESULT ) t8 -- 风险暴露分类人工认定历史表
|
|
from RWA_APM_BUS_RS_ARTIFICIALRESULT ) t8 -- 风险暴露分类人工认定历史表
|
|
on t.LOAN_REFERENCE_NO = t8.LOAN_REFERENCE_NO
|
|
on t.LOAN_REFERENCE_NO = t8.LOAN_REFERENCE_NO
|
|
<where>
|
|
<where>
|
|
- <if test="model.ruleNo != null and '' != model.ruleNo">
|
|
|
|
- RULE_NO like concat(concat('%',#{model.ruleNo}),'%')
|
|
|
|
|
|
+ <if test="model.reportDate != null and '' != model.reportDate">
|
|
|
|
+ TERMM like concat(concat('%',#{model.reportDate}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.mgmtBranchNo != null and '' != model.mgmtBranchNo">
|
|
|
|
+ and MGMT_BRANCH_NO like concat(concat('%',#{model.mgmtBranchNo}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.busLine != null and '' != model.busLine">
|
|
|
|
+ and BUS_LINE like concat(concat('%',#{model.busLine}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.busType != null and '' != model.busType">
|
|
|
|
+ BUS_TYPE like concat(concat('%',#{model.busType}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.onOffFlag != null and '' != model.onOffFlag">
|
|
|
|
+ and ON_OFF_FLAG like concat(concat('%',#{model.onOffFlag}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.productType != null and '' != model.productType">
|
|
|
|
+ and t1.PRODUCT_TYPE like concat(concat('%',#{model.productType}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="model.productName != null and '' != model.productName">
|
|
|
|
+ PRODUCT_NAME like concat(concat('%',#{model.productName}),'%')
|
|
</if>
|
|
</if>
|
|
- <if test="model.ruleName != null and '' != model.ruleName">
|
|
|
|
- and RULE_NAME like concat(concat('%',#{model.ruleName}),'%')
|
|
|
|
|
|
+ <if test="model.custNo != null and '' != model.custNo">
|
|
|
|
+ and CUST_NO like concat(concat('%',#{model.custNo}),'%')
|
|
</if>
|
|
</if>
|
|
- <if test="model.subjectCodes != null and '' != model.subjectCodes">
|
|
|
|
- and SUBJECT_CODES like concat(concat('%',#{model.subjectCodes}),'%')
|
|
|
|
|
|
+ <if test="model.loanReferenceNo != null and '' != model.loanReferenceNo">
|
|
|
|
+ and LOAN_REFERENCE_NO like concat(concat('%',#{model.loanReferenceNo}),'%')
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|