merge: 并入同事的场外申购/推广/行情/NL2SQL 线(11 提交、334 文件)
冲突仅 3 个文件,全部取并集(双方都没有需要丢弃的改动): - app/main.py:import 双方路由(我方 knowledge_management + 同事的 offsite_fund/ promotion_material);include_router 段本已自动合并 - app/service/agent/bootstrap.py:import 与工具注册均取并集 (query_customer_profile + query_financial_data 都注册) - tests/integration/test_config_release_mysql.py:outbox 清理同时保留 架构师的 event_type 限定(防误删其它域 outbox 行)与同事新增的 peer_release_id 同事这轮带入:11 个 alembic 迁移(建 offsite_* / promotion_* 等表)、 场外申购与推广素材 Agent、financial NL2SQL 工具。 注意:本库尚无 offsite_*/promotion_* 表,跑相关测试前需要执行 alembic upgrade。 边界核对:同事的场外代码未写入场内交易表(fin_sim_order/fin_capital_flow/fin_cash_ledger), 符合 AGENTS.md 规则 8。
This commit is contained in:
@@ -469,7 +469,26 @@ class CustomerServiceAgent(BaseAgent):
|
||||
# "还没测评/已过期",不能写成"您的等级为无"这种客户看不懂的句子。
|
||||
lines = ["您目前没有在有效期内的风险测评结果。"]
|
||||
if decision.get("allowed"):
|
||||
lines.insert(0, f"{product}为 {level_name},在您的风险承受能力范围内,可以购买。")
|
||||
# "在您的风险承受能力范围内"只对 C ≥ R 成立。矩阵允许的越级档(C1→R2、
|
||||
# C2→R3)和豁免档(C3→R4、C4→R5)都**超出**了客户等级,一律说成"范围内"
|
||||
# 是把监管口径讲错:客户会以为自己的测评等级本来就覆盖这只产品。
|
||||
if isinstance(customer_level, int) and customer_level >= risk_level:
|
||||
lines.insert(
|
||||
0,
|
||||
f"{product}为 {level_name},在您的风险承受能力范围内,可以购买。",
|
||||
)
|
||||
elif decision.get("reason_code") == "SUITABLE_WITH_DISCLOSURE":
|
||||
lines.insert(
|
||||
0,
|
||||
f"{product}为 {level_name},高于您的风险承受能力等级。"
|
||||
"按照投资者适当性管理规定,签署产品风险揭示书后可以购买。",
|
||||
)
|
||||
else:
|
||||
lines.insert(
|
||||
0,
|
||||
f"{product}为 {level_name},虽然高于您的风险测评等级,"
|
||||
"但仍在《个人投资者适当性管理指南》匹配矩阵允许购买的范围内。",
|
||||
)
|
||||
if decision.get("required_disclosure"):
|
||||
lines.append("购买前需签署产品风险揭示书,具体请咨询您的客户经理。")
|
||||
if decision.get("requires_recording"):
|
||||
|
||||
Reference in New Issue
Block a user