feat(shipping_notice): 新增货代订单全流程业务模块及配套基建
本次提交新增货代订单处理全流程的完整业务能力、数据库迁移与测试用例: 1. 统一追加式审计事件体系,支持全链路不可篡改的业务追溯 2. 货代任务撤销、版本替代管控逻辑,规范已上传订单的合规版本更替 3. 订单抽取路由审计、模板自动冻结资格、路由计数等核心业务基建 4. EML订单补充表解析契约与合并逻辑,完善订单补全能力 5. Chatflow只读能力令牌校验机制,保障工具调用安全 6. 人工复核证据校验服务,规范人工审核的证据留存 所有变更均配套完整的单元测试与迁移契约测试,支持受控回退
This commit is contained in:
1 parent
90f77634d6
commit
1f3ecb87b7
128 files changed
+3635
-2074
No files matched your search
@@ -392,6 +392,14 @@ def test_fingerprint_strong_with_customer_name_po_reservation():
|
||||
assert fp['components'].get('customer_name') == 'ACME'
|
||||
|
||||
|
||||
def test_fingerprint_keeps_same_customer_po_when_reservation_changes():
|
||||
"""关键断言:Reservation/数量变化是同一 PO 的内容修订,不能改变版本链身份。"""
|
||||
base = {'customer_code': 'C1', 'po_number': 'PO-VERSION', 'reservation_ids': ['10000001'], 'lines': [{'reservation_id': '10000001', 'part_number': 'A', 'qty': 1}]}
|
||||
resend = {'customer_code': 'C1', 'po_number': 'PO-VERSION', 'reservation_ids': ['10000002'], 'lines': [{'reservation_id': '10000002', 'part_number': 'A', 'qty': 2}]}
|
||||
assert build_business_fingerprint(base)['fingerprint'] == build_business_fingerprint(resend)['fingerprint']
|
||||
assert build_content_fingerprint(base)['fingerprint'] != build_content_fingerprint(resend)['fingerprint']
|
||||
|
||||
|
||||
def test_pending_review_hit_is_same_active_blocking(app, dedup_user):
|
||||
"""pending_review 属活跃态:业务指纹命中应为 same_active_task 且 blocking。"""
|
||||
with app.app_context():
|
||||
|
||||
Reference in new issue
Block a user