f
This commit is contained in:
@@ -3862,29 +3862,32 @@ func buildLeasingRiskAssessment(apiData map[string]interface{}, log *zap.Logger)
|
|||||||
assessment[fieldNameNight] = fmt.Sprintf("%s/%s", idNightAllnum, cellNightAllnum)
|
assessment[fieldNameNight] = fmt.Sprintf("%s/%s", idNightAllnum, cellNightAllnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 仅使用近12月(Last12,对应 m12)的总次数作为判断依据,
|
// 仅使用近12月(Last12,对应 m12)的次数作为判断依据,
|
||||||
// 因为近3月等短周期已经被近12月统计包含,避免重复放大
|
// totalCount 取身份证维度和手机号维度中的较大值,而不是两者相加
|
||||||
totalCount := 0
|
totalCount := 0
|
||||||
|
|
||||||
idKey12 := "alc_m12_id_allnum"
|
idKey12 := "alc_m12_id_allnum"
|
||||||
cellKey12 := "alc_m12_cell_allnum"
|
cellKey12 := "alc_m12_cell_allnum"
|
||||||
|
|
||||||
|
idCount := 0
|
||||||
|
cellCount := 0
|
||||||
|
|
||||||
// 身份证维度(近12月)
|
// 身份证维度(近12月)
|
||||||
if v, ok := jrzq1d09Map[idKey12]; ok {
|
if v, ok := jrzq1d09Map[idKey12]; ok {
|
||||||
switch vv := v.(type) {
|
switch vv := v.(type) {
|
||||||
case string:
|
case string:
|
||||||
if vv != "" && vv != "0" {
|
if vv != "" && vv != "0" {
|
||||||
if parsed, err := strconv.Atoi(vv); err == nil {
|
if parsed, err := strconv.Atoi(vv); err == nil {
|
||||||
totalCount += parsed
|
idCount = parsed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case float64:
|
case float64:
|
||||||
if vv > 0 {
|
if vv > 0 {
|
||||||
totalCount += int(vv)
|
idCount = int(vv)
|
||||||
}
|
}
|
||||||
case int:
|
case int:
|
||||||
if vv > 0 {
|
if vv > 0 {
|
||||||
totalCount += vv
|
idCount = vv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3895,20 +3898,27 @@ func buildLeasingRiskAssessment(apiData map[string]interface{}, log *zap.Logger)
|
|||||||
case string:
|
case string:
|
||||||
if vv != "" && vv != "0" {
|
if vv != "" && vv != "0" {
|
||||||
if parsed, err := strconv.Atoi(vv); err == nil {
|
if parsed, err := strconv.Atoi(vv); err == nil {
|
||||||
totalCount += parsed
|
cellCount = parsed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case float64:
|
case float64:
|
||||||
if vv > 0 {
|
if vv > 0 {
|
||||||
totalCount += int(vv)
|
cellCount = int(vv)
|
||||||
}
|
}
|
||||||
case int:
|
case int:
|
||||||
if vv > 0 {
|
if vv > 0 {
|
||||||
totalCount += vv
|
cellCount = vv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 使用身份证和手机号两个维度中的较大值作为近12月总次数
|
||||||
|
if idCount >= cellCount {
|
||||||
|
totalCount = idCount
|
||||||
|
} else {
|
||||||
|
totalCount = cellCount
|
||||||
|
}
|
||||||
|
|
||||||
// 根据近12月总申请次数设置风险标识:
|
// 根据近12月总申请次数设置风险标识:
|
||||||
// - totalCount == 0 -> 0 无风险 / 未查得
|
// - totalCount == 0 -> 0 无风险 / 未查得
|
||||||
// - 0 < totalCount <= 10 -> 2 低风险(有少量租赁申请)
|
// - 0 < totalCount <= 10 -> 2 低风险(有少量租赁申请)
|
||||||
|
|||||||
Reference in New Issue
Block a user