feat(freight-rpa): 库存/收料改名在手/入站,报表归属RPA,类名统一FreightRpa
把 shipping 侧 inventory/receipt 词根迁到 onhand/inbound,29 张表与 枚举/权限/前端/i18n 同步改名;在手与入站报表配置及文件改由 freight_rpa 持有,发货与调拨仅按 source_code 消费;ORM 类加 FreightRpa 前缀, 上传动作改为 freight_rpa_upload。含类名与上传动作改名规格文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ffc0d4a430
commit
39fe3c05f2
453 files changed
+17945
-8646
No files matched your search
@@ -5,7 +5,7 @@
|
||||
配置表 TransferTypeConfig(类型配置化,ADR 0002)与库存异动档
|
||||
TransferMovementLedger(外部系统入站/出站记录镜像,ADR 0001)。
|
||||
依赖:models.base.Base、SQLAlchemy 2.0 ORM;审计事件为只追加(ORM 门禁);
|
||||
source_file_id 外键指向 shipping_receipt_report_files(ShippingReceiptReport 原样归档,入站证据)。
|
||||
source_file_id 外键指向 freight_rpa_inbound_report_files(FreightRpaInboundReportFile 原样归档,入站证据)。
|
||||
逻辑:Run 是异步真相源;InvoiceItem 按(matching_id, invoice_no)唯一防止重复建单;
|
||||
Document(单)实现「五元组一组一单」,同组未完结单唯一由部分唯一索引在
|
||||
DB 层强制(D15 防双单兜底);单:Attempt=1:N,外键在 Attempt 侧(D14);
|
||||
@@ -606,7 +606,7 @@ class TransferMovementLedger(Base):
|
||||
record_kind: Mapped[str] = mapped_column(String(16), nullable=False)
|
||||
# 来源文件溯源:ON DELETE SET NULL(文件清理后档事实留存)。
|
||||
source_file_id: Mapped[Optional[int]] = mapped_column(
|
||||
ForeignKey('shipping_receipt_report_files.id', ondelete='SET NULL'), nullable=True,
|
||||
ForeignKey('freight_rpa_inbound_report_files.id', ondelete='SET NULL'), nullable=True,
|
||||
)
|
||||
file_version: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
|
||||
file_sha256: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
|
||||
@@ -622,9 +622,9 @@ class TransferMovementLedger(Base):
|
||||
)
|
||||
executed_doc_no: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
|
||||
|
||||
# 溯源关系:档案行 → ShippingReceiptReport 原样归档文件(单向,不回挂; ShippingReceiptReportFile
|
||||
# 溯源关系:档案行 → FreightRpaInboundReportFile 原样归档文件(单向,不回挂;FreightRpaInboundReportFile
|
||||
# 不感知调拨域,避免跨域 back_populates 环)。
|
||||
source_file: Mapped[Optional['ShippingReceiptReportFile']] = relationship()
|
||||
source_file: Mapped[Optional['FreightRpaInboundReportFile']] = relationship()
|
||||
|
||||
|
||||
@event.listens_for(TransferAuditEvent, 'before_update')
|
||||
|
||||
Reference in new issue
Block a user