feat(shipping-notice): 实现滚动履约功能,优化发货通知流程与代码清理

清理废弃的ShippingCase相关代码与依赖,统一使用ShippingNotice直接关联客户数据。调整库存网关依赖规则,支持仅对库存满足或已人工放行的订单行生成发货Excel,实现滚动履约逻辑。
This commit is contained in:
hugo committed 2026-08-26 02:47:07 +08:00
1 parent 7cfd5d167e
commit 1e5aedb9ed
235 files changed
+11394 -9613

No files matched your search

@@ -93,6 +93,25 @@ def test_layout_snapshot_checksum_and_idempotent_current_version(app):
assert current_layout_snapshot(document)['marker'] == 'v1'
def test_ready_pdf_layout_requires_coordinate_evidence_asset(app, monkeypatch):
"""关键断言:PDF 坐标证据资产保存失败时,布局不得伪装为 ready。"""
with app.app_context():
document = _document()
monkeypatch.setattr(layout_lifecycle, '_persist_coordinate_evidence_asset', lambda **_: None)
snapshot = {
**_snapshot(),
'tables': [{'table_id': 'table-1', 'page_no': 1, 'html': '<table><tr><td>x</td></tr></table>'}],
'coordinate_evidence': {
'pages': {'1': {'width': 100, 'height': 100}},
'page_glyphs': {'1': [{'text': 'x'}]},
'tables': {'table-1': [{'text': 'x'}]},
},
}
version = record_inline_layout_snapshot(document, snapshot)
assert version.status == 'failed'
assert 'shipping_document_layout_coordinate_evidence_persist_failed' in version.issues_json
def test_inline_derived_xfa_layout_localizes_structure_analysis_identity(app):
"""坐标补证派生 Layout 必须克隆 XFA Analysis,样本可安全冻结到新版本。"""
with app.app_context():