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
@@ -4,7 +4,7 @@ services/shipping_notice/attachment_selection.py
|
||||
用途:基于 Intake 快览事实生成可审计的附件选择计划。
|
||||
依赖:ShippingOrderIntake、标准库正则与哈希;只读取 structured_result_json,不回读 Document/布局结果。
|
||||
逻辑:发送阶段调用本文件,把当前批次附件目录转换为“为何选择/为何跳过”的稳定计划;
|
||||
后续深度解析、预算扩展与审计都应复用这份快照,而不是重新猜测附件优先级。
|
||||
所有预算内附件先物化为同一 Run 的 Unit,Worker 再按并发预算执行,避免把排队误建模为扩批。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -150,8 +150,8 @@ def build_attachment_selection_snapshot(
|
||||
|
||||
Args:
|
||||
intakes: 当前发送批次的 Intake;必须已经通过上传快览。
|
||||
max_initial_attachments: 首轮自动选择上限。
|
||||
max_initial_concurrency: 首轮并发上限。
|
||||
max_initial_attachments: 兼容旧快照的首轮附件字段;新计划不以它限制 Unit 创建。
|
||||
max_initial_concurrency: Worker 最大并发,仅限制执行,不限制 Unit 创建。
|
||||
expansion_batch_size: 后续每轮扩展的附件上限。
|
||||
max_total_attachments: 单次邮件深度解析总附件预算上限。
|
||||
|
||||
@@ -232,17 +232,13 @@ def build_attachment_selection_snapshot(
|
||||
if byte_budget and planned_bytes + size > byte_budget:
|
||||
row['skip_reason_codes'] = ['budget_total_bytes']
|
||||
continue
|
||||
if index < max_initial_attachments:
|
||||
# [STEP 1] 同一发送批次内的预算内附件必须全部创建 Unit。执行并发由
|
||||
# max_initial_concurrency 在物化/Worker 层控制,不能借“首轮选择”延迟附件身份。
|
||||
if index < max_total_attachments:
|
||||
row['selected'] = True
|
||||
row['selection_batch'] = 1
|
||||
planned_bytes += size
|
||||
continue
|
||||
if index < max_total_attachments:
|
||||
row['planned_selection_batch'] = (
|
||||
2 + ((index - max_initial_attachments) // max(1, int(expansion_batch_size or 1)))
|
||||
)
|
||||
planned_bytes += size
|
||||
continue
|
||||
row['skip_reason_codes'] = ['budget_total_limit']
|
||||
|
||||
group_counts: dict[str, int] = defaultdict(int)
|
||||
|
||||
Reference in new issue
Block a user