Enhance suitability assessment and documentation

- Implemented `check_suitability` method in `CoreReadOnlyRepository` for suitability determination based on customer and product risk levels.
- Added `build_suitability_log_row` function in `suitability.py` for mapping suitability check results to `risk_suitability_log`.
- Updated `AGENTS.md`, `ENVIRONMENT.md`, and `FLOW.md` to reflect changes in suitability assessment processes and documentation.
- Revised `FRAMEWORK.md` and `MEMORY.md` to clarify project structure and data flow related to suitability checks.
- Expanded `TODO.md` with tasks related to logging and auditing suitability assessments.
This commit is contained in:
2026-09-07 11:15:30 +08:00
parent 1ddd44a6cb
commit 3fb0ceb334
44 changed files with 7479 additions and 250 deletions
+17 -8
View File
@@ -31,11 +31,20 @@ INSERT INTO core_trade (trade_id, customer_id, product_id, trade_type, amount, q
('TRD-20260904-021', 'CUST-1023', 'PROD-005828', 'subscribe', 9000.00, 9000.0000, '2026-09-04 14:30:00.000'),
('TRD-20260904-022', 'CUST-1024', 'PROD-161726', 'subscribe', 35000.00, 35000.0000, '2026-09-04 15:00:00.000');
INSERT INTO core_cash_flow (customer_id, flow_type, amount, remark, occurred_at) VALUES
('CUST-9527', 'in', 50000.00, '银行转入', '2026-08-01 09:00:00.000'),
('CUST-9527', 'out', 10000.00, '申购扣款', '2026-08-01 10:15:00.000'),
('CUST-3001', 'in', 600000.00, '大额转入', '2026-09-03 09:30:00.000'),
('CUST-1010', 'in', 30000.00, '工资结余', '2026-09-01 08:00:00.000'),
('CUST-1018', 'in', 100000.00, '退休年金', '2026-09-03 10:30:00.000'),
('CUST-1002', 'out', 8000.00, '赎回到账', '2026-09-02 11:30:00.000'),
('CUST-1020', 'in', 120000.00, '经营收入', '2026-09-02 10:00:00.000');
-- AML 样例(RW-001 大额现金 / RW-014 第三方代付 / RW-008 非正常时段)
INSERT INTO core_trade (
trade_id, customer_id, product_id, trade_type, amount, qty,
channel, is_cash, payer_name, is_third_party_pay, traded_at
) VALUES
('TRD-20260905-001', 'CUST-DEMO-B', 'PROD-PRIV01', 'subscribe', 500000.00, NULL, 'online', 0, NULL, 0, '2026-09-05 10:00:00.000'),
('TRD-20260905-002', 'CUST-DEMO-C', 'PROD-WMG001', 'subscribe', 200000.00, NULL, 'counter', 1, NULL, 0, '2026-09-05 11:00:00.000'),
('TRD-20260905-003', 'CUST-DEMO-E', 'PROD-161725', 'subscribe', 80000.00, NULL, 'mobile', 0, '李四', 1, '2026-09-05 02:30:00.000');
INSERT INTO core_cash_flow (customer_id, flow_type, flow_subtype, amount, channel, remark, occurred_at) VALUES
('CUST-9527', 'in', 'deposit', 50000.00, 'online', '银行转入', '2026-08-01 09:00:00.000'),
('CUST-9527', 'out', 'subscribe', 10000.00, 'online', '申购扣款', '2026-08-01 10:15:00.000'),
('CUST-3001', 'in', 'transfer_in', 600000.00, 'online', '大额转入', '2026-09-03 09:30:00.000'),
('CUST-1010', 'in', 'deposit', 30000.00, 'online', '工资结余', '2026-09-01 08:00:00.000'),
('CUST-1018', 'in', 'deposit', 100000.00, 'counter', '退休年金', '2026-09-03 10:30:00.000'),
('CUST-1002', 'in', 'redeem', 8000.00, 'online', '赎回到账', '2026-09-02 11:30:00.000'),
('CUST-1020', 'in', 'transfer_in', 120000.00, 'online', '经营收入', '2026-09-02 10:00:00.000');