feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程
清理废弃的shipping xfa ocr automark相关代码和job配置 新增收料报表管理的前端页面、路由和侧边栏入口 新增后端收料报表配置接口、数据库模型和RPA脚本 优化发货通知流程的重试策略,将shipping相关job默认不自动重试 移除废弃的库存源确认相关逻辑,更新流程门禁规则 重构订单模板的值适配器模块,新增坐标OCR值适配器 清理前端shipping菜单和action的废弃选项 更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
1 parent
260465b72d
commit
1b6483a4ea
466 files changed
+32115
-33796
No files matched your search
@@ -368,3 +368,23 @@ def test_runtime_attachment_budget_preserves_order_and_marks_overflow(app):
|
||||
assert rows[0]['layout_snapshot']['marker'] == 'first.pdf'
|
||||
assert rows[1]['layout_snapshot']['marker'] == 'second.pdf'
|
||||
assert rows[2]['layout_snapshot']['status'] == 'skipped_budget'
|
||||
def test_runtime_builds_xfa_visual_layout_without_creating_unfrozen_value_source_capability(app) -> None:
|
||||
"""关键断言:runtime 只构建共享视觉 Layout;datasets 身份只能由正式 Layout Job 冻结。"""
|
||||
candidate = _candidate()
|
||||
with app.app_context(), patch(
|
||||
'app.services.shipping_notice.document_layout.runtime.MinerUClient',
|
||||
) as mineru, patch(
|
||||
'app.services.shipping_notice.document_layout.runtime.parse_mineru_candidate',
|
||||
return_value=candidate,
|
||||
):
|
||||
app.config['SHIPPING_NOTICE_LAYOUT_MINERU_ENABLED'] = True
|
||||
app.config['SHIPPING_NOTICE_LAYOUT_MINERU_BASE_URL'] = 'http://mineru.test'
|
||||
mineru.return_value.parse_file_async.return_value = {'ok': True}
|
||||
snapshot = build_mineru_table_snapshot(
|
||||
filename='order.pdf', content=b'%PDF-xfa', document_id=9, content_hash='c' * 64,
|
||||
)
|
||||
|
||||
assert snapshot['status'] == 'ready'
|
||||
assert 'xfa_capability' not in snapshot
|
||||
assert snapshot['tables']
|
||||
mineru.return_value.parse_file_async.assert_called_once()
|
||||
Reference in new issue
Block a user