From db4f287bf5bccbbdced682728f0b9e38a05701fd Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Tue, 16 Dec 2025 19:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9AJRZQ6F2A=E5=80=9F?= =?UTF-8?q?=E8=B4=B7=E7=94=B3=E8=AF=B7=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BaseReport.vue | 8 +- .../components/ApplicationCountSection.vue | 240 ++++++++++++++++++ .../components/ApplicationTotalSection.vue | 119 +++++++++ .../components/BankInstitutionSection.vue | 174 +++++++++++++ src/ui/JRZQ6F2A/components/BankOrgSection.vue | 174 +++++++++++++ .../components/InstitutionTotalSection.vue | 119 +++++++++ .../components/NBankInstitutionSection.vue | 174 +++++++++++++ .../JRZQ6F2A/components/NBankOrgSection.vue | 174 +++++++++++++ .../ProductTypeDistributionSection.vue | 184 ++++++++++++++ .../RecentIntensiveApplicationSection.vue | 79 ++++++ .../JRZQ6F2A/components/SummaryApplyStats.vue | 67 +++++ src/ui/JRZQ6F2A/index.vue | 128 ++++++++++ src/ui/JRZQ6F2A/utils/dataParser.js | 237 +++++++++++++++++ 13 files changed, 1876 insertions(+), 1 deletion(-) create mode 100644 src/ui/JRZQ6F2A/components/ApplicationCountSection.vue create mode 100644 src/ui/JRZQ6F2A/components/ApplicationTotalSection.vue create mode 100644 src/ui/JRZQ6F2A/components/BankInstitutionSection.vue create mode 100644 src/ui/JRZQ6F2A/components/BankOrgSection.vue create mode 100644 src/ui/JRZQ6F2A/components/InstitutionTotalSection.vue create mode 100644 src/ui/JRZQ6F2A/components/NBankInstitutionSection.vue create mode 100644 src/ui/JRZQ6F2A/components/NBankOrgSection.vue create mode 100644 src/ui/JRZQ6F2A/components/ProductTypeDistributionSection.vue create mode 100644 src/ui/JRZQ6F2A/components/RecentIntensiveApplicationSection.vue create mode 100644 src/ui/JRZQ6F2A/components/SummaryApplyStats.vue create mode 100644 src/ui/JRZQ6F2A/index.vue create mode 100644 src/ui/JRZQ6F2A/utils/dataParser.js diff --git a/src/components/BaseReport.vue b/src/components/BaseReport.vue index 6362f0c..6bc45c6 100644 --- a/src/components/BaseReport.vue +++ b/src/components/BaseReport.vue @@ -552,7 +552,12 @@ const featureMap = { component: defineAsyncComponent(() => import("@/ui/YYSY7D3E/index.vue")), remark: '手机携号转网查询用于检测用户手机号码是否发生过携号转网操作,以及转网前后的运营商信息。携号转网可能影响用户身份验证和信用评估。' }, - + // 借贷意向A + JRZQ6F2A: { + name: "借贷申请", + component: defineAsyncComponent(() => import("@/ui/JRZQ6F2A/index.vue")), + remark: '借贷申请提供全面的借贷申请行为分析,包括申请次数、申请总次数(银行+非银)和申请机构总数(银行+非银)等多维度数据。通过不同时间段的统计分析,全面展示申请人的借贷申请行为。' + }, // 手机在网时长 YYSY8B1C: { name: "手机在网时长", @@ -641,6 +646,7 @@ const featureRiskLevels = { 'JRZQ0A03': 7, // 借贷申请记录 'JRZQ8203': 7, // 借贷行为记录 'JRZQ4B6C': 7, // 信贷表现 + 'JRZQ6F2A': 7, // 借贷申请 'BehaviorRiskScan': 7, // 风险行为扫描 'IVYZ8I9J': 7, // 网络社交异常 'JRZQ8A2D': 9, // 特殊名单验证 diff --git a/src/ui/JRZQ6F2A/components/ApplicationCountSection.vue b/src/ui/JRZQ6F2A/components/ApplicationCountSection.vue new file mode 100644 index 0000000..1bb0829 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/ApplicationCountSection.vue @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/ApplicationTotalSection.vue b/src/ui/JRZQ6F2A/components/ApplicationTotalSection.vue new file mode 100644 index 0000000..e1411ed --- /dev/null +++ b/src/ui/JRZQ6F2A/components/ApplicationTotalSection.vue @@ -0,0 +1,119 @@ + + + + + 申请总次数 (银行+非银) {{ totalCount }}次 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/BankInstitutionSection.vue b/src/ui/JRZQ6F2A/components/BankInstitutionSection.vue new file mode 100644 index 0000000..aeaf1b5 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/BankInstitutionSection.vue @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + {{ item.label }} + + {{ item.value }}次 + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/BankOrgSection.vue b/src/ui/JRZQ6F2A/components/BankOrgSection.vue new file mode 100644 index 0000000..b6fad84 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/BankOrgSection.vue @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + {{ item.label }} + + {{ item.value }}家 + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/InstitutionTotalSection.vue b/src/ui/JRZQ6F2A/components/InstitutionTotalSection.vue new file mode 100644 index 0000000..e525b75 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/InstitutionTotalSection.vue @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/NBankInstitutionSection.vue b/src/ui/JRZQ6F2A/components/NBankInstitutionSection.vue new file mode 100644 index 0000000..5a7ba8f --- /dev/null +++ b/src/ui/JRZQ6F2A/components/NBankInstitutionSection.vue @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + {{ item.label }} + + {{ item.value }}次 + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/NBankOrgSection.vue b/src/ui/JRZQ6F2A/components/NBankOrgSection.vue new file mode 100644 index 0000000..2edfd28 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/NBankOrgSection.vue @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + {{ item.label }} + + {{ item.value }}家 + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/ProductTypeDistributionSection.vue b/src/ui/JRZQ6F2A/components/ProductTypeDistributionSection.vue new file mode 100644 index 0000000..1165d04 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/ProductTypeDistributionSection.vue @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + {{ item.label }} + + + {{ item.value }} 次 + + + + + + + + + + + + +{ +"cells": [], +"metadata": { +"language_info": { +"name": "python" +} +}, +"nbformat": 4, +"nbformat_minor": 2 +} \ No newline at end of file diff --git a/src/ui/JRZQ6F2A/components/RecentIntensiveApplicationSection.vue b/src/ui/JRZQ6F2A/components/RecentIntensiveApplicationSection.vue new file mode 100644 index 0000000..8226fb0 --- /dev/null +++ b/src/ui/JRZQ6F2A/components/RecentIntensiveApplicationSection.vue @@ -0,0 +1,79 @@ + + + + + + + + 最近在银行连续申请次数 + {{ bankCons }} 次 + + + 最近在银行连续申请天数 + {{ bankDays }} 天 + + + 最近在非银连续申请次数 + {{ nbankCons }} 次 + + + 最近在非银连续申请天数 + {{ nbankDays }} 天 + + + 距最近一次在银行机构申请 + {{ bankGap }} 天 + + + 距最近一次在非银机构申请 + {{ nbankGap }} 天 + + + + + 暂未查询到明显的近期集中申请行为。 + + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/components/SummaryApplyStats.vue b/src/ui/JRZQ6F2A/components/SummaryApplyStats.vue new file mode 100644 index 0000000..f20eb7e --- /dev/null +++ b/src/ui/JRZQ6F2A/components/SummaryApplyStats.vue @@ -0,0 +1,67 @@ + + + + 借贷申请统计概览 + + + + + {{ item.value }} + {{ item.unit }} + + + {{ item.label }} + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/index.vue b/src/ui/JRZQ6F2A/index.vue new file mode 100644 index 0000000..a145a32 --- /dev/null +++ b/src/ui/JRZQ6F2A/index.vue @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ui/JRZQ6F2A/utils/dataParser.js b/src/ui/JRZQ6F2A/utils/dataParser.js new file mode 100644 index 0000000..755f8b4 --- /dev/null +++ b/src/ui/JRZQ6F2A/utils/dataParser.js @@ -0,0 +1,237 @@ +/** + * 数据解析工具函数 + * 用于解析借贷申请验证A的返回数据 + */ + +/** + * 获取字段值,处理空值 + */ +export function getValue(value) { + if ( + value === undefined || + value === null || + value === "" || + value === "空" + ) { + return 0; + } + // 如果是字符串数字,转换为数字 + if (typeof value === "string" && /^\d+(\.\d+)?$/.test(value)) { + return parseFloat(value); + } + return value; +} + +/** + * 从原始数据中提取 variableValue + */ +export function extractVariableValue(data) { + try { + return ( + data?.risk_screen_v2?.variables?.find( + (v) => v.variableName === "bairong_applyloan_extend" + )?.variableValue || {} + ); + } catch (error) { + console.error("提取数据失败:", error); + return {}; + } +} + +/** + * 时间段映射 + */ +export const PERIOD_MAP = { + d7: { label: "7天", prefix: "als_d7" }, + d15: { label: "15天", prefix: "als_d15" }, + m1: { label: "1个月", prefix: "als_m1" }, + m3: { label: "3个月", prefix: "als_m3" }, + m6: { label: "6个月", prefix: "als_m6" }, + m12: { label: "12个月", prefix: "als_m12" }, +}; + +/** + * 获取申请次数(按时间段) + */ +export function getApplicationCounts(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + // 计算总申请次数(所有类型的申请次数之和) + const types = [ + "id_pdl_allnum", // 线上小额现金贷 + "id_caon_allnum", // 线上现金分期 + "id_rel_allnum", // 信用卡(类信用卡) + "id_caoff_allnum", // 线下现金分期 + "id_cooff_allnum", // 线下消费分期 + "id_af_allnum", // 汽车金融 + "id_coon_allnum", // 线上消费分期 + "id_oth_allnum", // 其他 + ]; + + let total = 0; + types.forEach((type) => { + const value = getValue(variableValue[`${prefix}_${type}`]); + total += value; + }); + + // 银行机构申请次数 + const bankTotal = getValue(variableValue[`${prefix}_id_bank_allnum`]) || 0; + + // 非银机构申请次数 + const nbankTotal = + getValue(variableValue[`${prefix}_id_nbank_allnum`]) || 0; + + // 如果计算出的total为0,则使用银行+非银的总和 + const finalTotal = total > 0 ? total : bankTotal + nbankTotal; + + return { + total: finalTotal, + bank: bankTotal, + nbank: nbankTotal, + }; +} + +/** + * 获取特殊时段(周末/夜间)申请次数(按时间段,银行+非银) + */ +export function getSpecialPeriodCounts(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + const weekendBank = + getValue(variableValue[`${prefix}_id_bank_week_allnum`]) || 0; + const weekendNbank = + getValue(variableValue[`${prefix}_id_nbank_week_allnum`]) || 0; + const nightBank = + getValue(variableValue[`${prefix}_id_bank_night_allnum`]) || 0; + const nightNbank = + getValue(variableValue[`${prefix}_id_nbank_night_allnum`]) || 0; + + return { + weekend: weekendBank + weekendNbank, + night: nightBank + nightNbank, + }; +} + +/** + * 获取银行机构申请次数详情 + */ +export function getBankApplicationDetails(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + return { + pdl: getValue(variableValue[`${prefix}_id_pdl_allnum`]), // 线上小额现金贷 + caon: getValue(variableValue[`${prefix}_id_caon_allnum`]), // 线上现金分期 + rel: getValue(variableValue[`${prefix}_id_rel_allnum`]), // 信用卡(类信用卡) + caoff: getValue(variableValue[`${prefix}_id_caoff_allnum`]), // 线下现金分期 + cooff: getValue(variableValue[`${prefix}_id_cooff_allnum`]), // 线下消费分期 + af: getValue(variableValue[`${prefix}_id_af_allnum`]), // 汽车金融 + coon: getValue(variableValue[`${prefix}_id_coon_allnum`]), // 线上消费分期 + oth: getValue(variableValue[`${prefix}_id_oth_allnum`]), // 其他 + bank: getValue(variableValue[`${prefix}_id_bank_allnum`]), // 银行机构申请 + tra: getValue(variableValue[`${prefix}_id_bank_tra_allnum`]), // 传统银行申请 + ret: getValue(variableValue[`${prefix}_id_bank_ret_allnum`]), // 网络零售银行申请 + }; +} + +/** + * 获取非银机构申请次数详情 + */ +export function getNBankApplicationDetails(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + return { + nbank: getValue(variableValue[`${prefix}_id_nbank_allnum`]), // 非银机构 + p2p: getValue(variableValue[`${prefix}_id_nbank_p2p_allnum`]), // 改制机构 + mc: getValue(variableValue[`${prefix}_id_nbank_mc_allnum`]), // 小贷机构 + ca: getValue(variableValue[`${prefix}_id_nbank_ca_allnum`]), // 现金类分期机构 + cf: getValue(variableValue[`${prefix}_id_nbank_cf_allnum`]), // 消费类分期机构 + com: getValue(variableValue[`${prefix}_id_nbank_com_allnum`]), // 代偿类分期机构 + oth: getValue(variableValue[`${prefix}_id_nbank_oth_allnum`]), // 其他申请 + nsloan: getValue(variableValue[`${prefix}_id_nbank_nsloan_allnum`]), // 持牌网络小贷机构 + autofin: getValue(variableValue[`${prefix}_id_nbank_autofin_allnum`]), // 持牌汽车金融机构 + sloan: getValue(variableValue[`${prefix}_id_nbank_sloan_allnum`]), // 持牌小贷机构 + cons: getValue(variableValue[`${prefix}_id_nbank_cons_allnum`]), // 持牌消费金融机构 + finlea: getValue(variableValue[`${prefix}_id_nbank_finlea_allnum`]), // 持牌融资租赁机构 + else: getValue(variableValue[`${prefix}_id_nbank_else_allnum`]), // 其他申请 + }; +} + +/** + * 获取银行机构申请机构数详情 + */ +export function getBankOrgDetails(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + return { + pdl: getValue(variableValue[`${prefix}_id_pdl_orgnum`]), + caon: getValue(variableValue[`${prefix}_id_caon_orgnum`]), + rel: getValue(variableValue[`${prefix}_id_rel_orgnum`]), + caoff: getValue(variableValue[`${prefix}_id_caoff_orgnum`]), + cooff: getValue(variableValue[`${prefix}_id_cooff_orgnum`]), + af: getValue(variableValue[`${prefix}_id_af_orgnum`]), + coon: getValue(variableValue[`${prefix}_id_coon_orgnum`]), + oth: getValue(variableValue[`${prefix}_id_oth_orgnum`]), + bank: getValue(variableValue[`${prefix}_id_bank_orgnum`]), + tra: getValue(variableValue[`${prefix}_id_bank_tra_orgnum`]), + ret: getValue(variableValue[`${prefix}_id_bank_ret_orgnum`]), + }; +} + +/** + * 获取非银机构申请机构数详情 + */ +export function getNBankOrgDetails(variableValue, period) { + const { prefix } = PERIOD_MAP[period]; + + return { + nbank: getValue(variableValue[`${prefix}_id_nbank_orgnum`]), + p2p: getValue(variableValue[`${prefix}_id_nbank_p2p_orgnum`]), + mc: getValue(variableValue[`${prefix}_id_nbank_mc_orgnum`]), + ca: getValue(variableValue[`${prefix}_id_nbank_ca_orgnum`]), + cf: getValue(variableValue[`${prefix}_id_nbank_cf_orgnum`]), + com: getValue(variableValue[`${prefix}_id_nbank_com_orgnum`]), + oth: getValue(variableValue[`${prefix}_id_nbank_oth_orgnum`]), + nsloan: getValue(variableValue[`${prefix}_id_nbank_nsloan_orgnum`]), + autofin: getValue(variableValue[`${prefix}_id_nbank_autofin_orgnum`]), + sloan: getValue(variableValue[`${prefix}_id_nbank_sloan_orgnum`]), + cons: getValue(variableValue[`${prefix}_id_nbank_cons_orgnum`]), + finlea: getValue(variableValue[`${prefix}_id_nbank_finlea_orgnum`]), + else: getValue(variableValue[`${prefix}_id_nbank_else_orgnum`]), + }; +} + +/** + * 字段名称映射 + */ +export const FIELD_LABELS = { + // 银行机构申请类型 + bank: { + pdl: "申请线上小额现金贷", + caon: "申请线上现金分期", + rel: "申请信用卡(类信用卡)", + caoff: "申请线下现金分期", + cooff: "申请线下消费分期", + af: "申请汽车金融", + coon: "申请线上消费分期", + oth: "申请其他", + bank: "银行机构申请", + tra: "银行机构-传统银行申请", + ret: "银行机构-网络零售银行申请", + }, + // 非银机构申请类型 + nbank: { + nbank: "非银机构", + p2p: "改制机构", + mc: "小贷机构", + ca: "现金类分期机构", + cf: "消费类分期机构", + com: "代偿类分期机构", + oth: "其他申请", + nsloan: "持牌网络小贷机构", + autofin: "汽车金融", + sloan: "持牌小贷机构", + cons: "持牌消费金融机构", + finlea: "持牌融资租赁机构", + else: "其他申请", + }, +};