清理废弃的shipping xfa ocr automark相关代码和job配置 新增收料报表管理的前端页面、路由和侧边栏入口 新增后端收料报表配置接口、数据库模型和RPA脚本 优化发货通知流程的重试策略,将shipping相关job默认不自动重试 移除废弃的库存源确认相关逻辑,更新流程门禁规则 重构订单模板的值适配器模块,新增坐标OCR值适配器 清理前端shipping菜单和action的废弃选项 更新相关文档和测试用例,调整.gitignore忽略规则
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
"""DBS 收料报表导出适配器。"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
import dsv_report_export
|
|
|
|
|
|
def export_receipt_report(page: Any, unit: dict[str, Any], *, entry_url: str, first_in_profile: bool) -> Any:
|
|
"""在既有 DBS 登录态内执行收料路径、Warehouse 与受控非日期条件。"""
|
|
source = {
|
|
'entry_url': entry_url,
|
|
'report_path_json': dict(unit.get('report_path_json') or {}),
|
|
'parameters': list(unit.get('query_parameters_json') or []),
|
|
'__download_dir': str(unit.get('__download_dir') or ''),
|
|
}
|
|
warehouse_id = str(unit.get('warehouse_id') or '').strip()
|
|
if not warehouse_id:
|
|
raise RuntimeError('DBS receipt unit requires warehouse_id')
|
|
source['parameters'].append({
|
|
'name': 'Warehouse', 'mode': 'single', 'values': [warehouse_id],
|
|
'required': True, 'select_all': False,
|
|
})
|
|
if first_in_profile:
|
|
dsv_report_export.ensure_dsv_session(page, entry_url)
|
|
return dsv_report_export.export_dsv_inventory_source(page, {'action': 'receipt_export_batch'}, source)
|