feat(shipping-notice): 添加 MinerU 订单附件表格结构化功能,更新环境配置和数据模型以支持新布局解析和文档模板管理

This commit is contained in:
hugo committed 2026-07-22 18:52:43 +08:00
1 parent c4095b08da
commit c35223d49d
148 files changed
+15709 -1353

No files matched your search

+5 -5
View File
@@ -488,11 +488,11 @@ def test_retry_rpa_force_refresh_clears_derived_inventory_state(app, client, tmp
with app.app_context():
task = ShippingTask.query.filter_by(task_no=task_id).first()
assert task is not None
_attach_dynamic_order(task, part_number='A001', reservation_id='R-1', quantity=1)
_attach_dynamic_order(task, part_number='A001', reservation_id='12345', quantity=1)
task.process_status = "inventory_ready"
task.review_status = None
task.pending_human_reason = "inv_unavail"
task.inventory_lines_json = [{"part_number": "OLD", "reservation_id": "R-1", "available_qty": 3}]
task.inventory_lines_json = [{"part_number": "OLD", "reservation_id": "12345", "available_qty": 3}]
task.match_status = "fulfillable"
task.shortage_json = {"lines": []}
task.line_results_json = [{"part_number": "OLD", "status": "ok"}]
@@ -570,7 +570,7 @@ def test_rpa_pending_timeout_recheck_marks_task_needs_human_after_single_attempt
with app.app_context():
task = ShippingTask.query.filter_by(task_no=task_id).first()
assert task is not None
_attach_dynamic_order(task, part_number='A001', reservation_id='R-1', quantity=1)
_attach_dynamic_order(task, part_number='A001', reservation_id='12345', quantity=1)
task.process_status = "waiting_inventory"
task.pending_human_reason = PH_RPA_PENDING
task.step_payload_json = {
@@ -634,7 +634,7 @@ def test_retry_rpa_after_exhausted_starts_new_attempt_window(app, client, tmp_pa
with app.app_context():
task = ShippingTask.query.filter_by(task_no=task_id).first()
assert task is not None
_attach_dynamic_order(task, part_number='A001', reservation_id='R-1', quantity=1)
_attach_dynamic_order(task, part_number='A001', reservation_id='12345', quantity=1)
task.process_status = "waiting_inventory"
task.pending_human_reason = PH_RPA_EXHAUSTED
task.step_payload_json = {
@@ -718,7 +718,7 @@ def test_batch_retry_marks_timed_out_rpa_pending_task_as_exhausted(app, client,
with app.app_context():
task = ShippingTask.query.filter_by(task_no=task_id).first()
assert task is not None
_attach_dynamic_order(task, part_number='A001', reservation_id='R-1', quantity=1)
_attach_dynamic_order(task, part_number='A001', reservation_id='12345', quantity=1)
task.process_status = "waiting_inventory"
task.pending_human_reason = PH_RPA_PENDING
task.step_payload_json = {