feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a9fbac2fc
commit
d2b3d74def
571 files changed
+78064
-24681
No files matched your search
@@ -1,9 +1,10 @@
|
||||
"""
|
||||
models/shipping_excel_template.py
|
||||
|
||||
用途:定义版本化发货 Excel 模板及不可变任务导出产物。
|
||||
依赖:models.base.Base、库存源、订单 Schema、发货任务与库存快照模型。
|
||||
逻辑:库存源只绑定已发布模板版本;每次生成均新增 Artifact 并锁定输入版本与校验和。
|
||||
用途:定义版本化发货 Excel 模板及不可变 Notice 导出产物。
|
||||
依赖:models.base.Base、库存源、订单 Schema、ShippingNotice 与库存快照模型。
|
||||
逻辑:库存源只绑定已发布模板版本;每次生成均新增 Artifact 并锁定输入版本与校验和;
|
||||
co8e9f0a1b2c 已删除 export artifact 的 batch_id 列。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -47,19 +48,17 @@ class ShippingExcelTemplate(Base):
|
||||
|
||||
|
||||
class ShippingExportArtifact(Base):
|
||||
"""一次任务导出的不可变产物及生成输入快照。"""
|
||||
"""一次 Notice 导出的不可变产物及生成输入快照。"""
|
||||
|
||||
__tablename__ = 'shipping_export_artifacts'
|
||||
__tablename__ = 'shipping_notice_export_artifacts'
|
||||
__table_args__ = (
|
||||
UniqueConstraint('artifact_no', name='uq_shipping_export_artifacts_no'),
|
||||
Index('ix_shipping_export_artifacts_task_created', 'task_id', 'created_at'),
|
||||
Index('ix_shipping_export_artifacts_batch_created', 'batch_id', 'created_at'),
|
||||
UniqueConstraint('artifact_no', name='uq_shipping_notice_export_artifacts_no'),
|
||||
Index('ix_shipping_notice_export_artifacts_task_created', 'task_id', 'created_at'),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
artifact_no: Mapped[str] = mapped_column(String(64), nullable=False)
|
||||
task_id: Mapped[int] = mapped_column(ForeignKey('shipping_tasks.id'), nullable=False, index=True)
|
||||
batch_id: Mapped[Optional[int]] = mapped_column(ForeignKey('shipping_batches.id'), nullable=True)
|
||||
task_id: Mapped[int] = mapped_column(ForeignKey('shipping_notices.id'), nullable=False, index=True)
|
||||
template_id: Mapped[int] = mapped_column(ForeignKey('shipping_excel_templates.id'), nullable=False)
|
||||
order_schema_version_id: Mapped[int] = mapped_column(ForeignKey('shipping_order_schema_versions.id'), nullable=False)
|
||||
order_extraction_id: Mapped[int] = mapped_column(ForeignKey('shipping_order_extractions.id'), nullable=False)
|
||||
@@ -74,4 +73,4 @@ class ShippingExportArtifact(Base):
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, nullable=False)
|
||||
|
||||
template: Mapped[ShippingExcelTemplate] = relationship()
|
||||
task: Mapped['ShippingTask'] = relationship()
|
||||
task: Mapped['ShippingNotice'] = relationship()
|
||||
Reference in new issue
Block a user