feat(shipping-notice): 新增临时库存管理功能,支持创建会话、获取分析结果及字段映射建议

This commit is contained in:
hugo committed 2026-07-18 11:41:02 +08:00
1 parent 46eb63f5bb
commit e9bdd81f1a
320 files changed
+28361 -10487

No files matched your search

@@ -15,6 +15,7 @@ from app.models import (
ShippingCustomer,
ShippingCustomerIdentifier,
ShippingCustomerShadowResolution,
ShippingCustomerShadowMatch,
ShippingNoticeCandidate,
ShippingNoticeDocument,
ShippingNoticeIntake,
@@ -90,6 +91,7 @@ def test_shadow_resolution_uses_strong_evidence_without_binding_case(app):
assert resolution.status == 'unique_candidate'
assert resolution.top_customer_id == customer.id
assert resolution.top_score == 100.0
assert db.session.query(ShippingCustomerShadowMatch).filter_by(customer_id=customer.id).count() == 1
assert case.customer_id is None
assert case.business_no is None
assert get_shadow_quality_report()['auto_bound_count'] == 0
@@ -107,6 +109,7 @@ def test_shadow_resolution_reports_ambiguous_and_unmatched(app):
assert ambiguous.status == 'ambiguous'
assert ambiguous.top_customer_id is None
assert len(ambiguous.candidate_matches_json) == 2
assert len(ambiguous.matches) == 2
assert unmatched.status == 'unmatched'
assert unmatched.candidate_matches_json == []