feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-08-06 10:18:37 +08:00
1 parent 3a9fbac2fc
commit d2b3d74def
571 files changed
+78064 -24681

No files matched your search

@@ -15,8 +15,8 @@ import pytest
from app import db
from app.models import (
FileAsset, ShippingCase, ShippingCustomer, ShippingCustomerShadowMatch,
ShippingCustomerShadowResolution, ShippingCustomerSite, ShippingNoticeCandidate,
ShippingNoticeDocument, ShippingNoticeIntake, ShippingOrderExtraction, ShippingOrderField,
ShippingCustomerShadowResolution, ShippingCustomerSite, ShippingOrderCandidate,
ShippingOrderDocument, ShippingOrderIntake, ShippingOrderExtraction, ShippingOrderField,
ShippingOrderFieldDecision, ShippingOrderFieldValue, ShippingOrderSchema,
ShippingOrderSchemaVersion, User,
)
@@ -38,19 +38,19 @@ def _seed_candidate(*, sender: str = ''):
)
db.session.add(asset)
db.session.flush()
intake = ShippingNoticeIntake(
intake = ShippingOrderIntake(
intake_no=f'SNI-{user.id}', asset_id=asset.id, user_id=user.id, parser_version='v6', parse_status='parsed',
structured_result_json={'email': {'from': sender}},
)
db.session.add(intake)
db.session.flush()
document = ShippingNoticeDocument(
document = ShippingOrderDocument(
intake_id=intake.id, asset_id=asset.id, document_type='attachment', attachment_key='file',
filename='notice.pdf', classification='order_notice', parse_status='parsed', extracted_text='template text',
)
db.session.add(document)
db.session.flush()
candidate = ShippingNoticeCandidate(
candidate = ShippingOrderCandidate(
candidate_no=f'SNC-{user.id}', intake_id=intake.id, primary_document_id=document.id,
candidate_key='document:1', validation_status='ready',
structured_result_json={'business_summary': {'customer_name': 'RAW LLM VALUE MUST NOT BE USED'}},