feat: 客商档案新增合规客商风险与金蝶黑名单落库字段及列表筛选

This commit is contained in:
刘泉佳
2026-10-30 11:33:04 +08:00
parent 6e5b6958ea
commit 91d94f7ac0
6 changed files with 220 additions and 1 deletions
@@ -54,6 +54,11 @@
<result column="kingdee_status" property="kingdeeStatus"/>
<result column="kingdee_fail_reason" property="kingdeeFailReason"/>
<result column="kingdee_sync_time" property="kingdeeSyncTime"/>
<result column="hcs_risk_level" property="hcsRiskLevel"/>
<result column="hcs_black_status" property="hcsBlackStatus"/>
<result column="hcs_risk_time" property="hcsRiskTime"/>
<result column="kingdee_black_category" property="kingdeeBlackCategory"/>
<result column="kingdee_black_reason" property="kingdeeBlackReason"/>
</resultMap>
<select id="selectCustomerArchivePage" resultMap="customerArchiveResultMap">
@@ -108,6 +113,11 @@
kingdee_status,
kingdee_fail_reason,
kingdee_sync_time,
hcs_risk_level,
hcs_black_status,
hcs_risk_time,
kingdee_black_category,
kingdee_black_reason,
(
SELECT s.review_status
FROM blade_customer_credit_score s
@@ -171,6 +181,23 @@
<if test="customer.createTimeEnd != null">
AND create_time &lt;= #{customer.createTimeEnd}
</if>
<!-- 客商风险筛选:黑名单优先,等级筛选排除黑名单避免重复命中 -->
<if test="customer.customerRisk != null and customer.customerRisk != ''">
<choose>
<when test="customer.customerRisk == 'blacklist'">
AND hcs_black_status = 'yes'
</when>
<when test="customer.customerRisk == 'high'">
AND hcs_risk_level = '2' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
</when>
<when test="customer.customerRisk == 'middle'">
AND hcs_risk_level = '1' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
</when>
<otherwise>
AND hcs_risk_level = '0' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
</otherwise>
</choose>
</if>
ORDER BY create_time DESC
</select>