fix(shipping-notice): 任务中心OT直链补case_no锚点并修复工作台装配期懒加载竞态
This commit is contained in:
1 parent
65f751daf4
commit
0333d713e0
6 files changed
+136
-26
No files matched your search
@@ -1468,8 +1468,8 @@ def _inject_unified_processing_fields(task: ShippingNotice, data: dict[str, Any]
|
||||
order_task_id → ShippingOrderTask。有 OT 时用领域事实映射为
|
||||
shipping_processing_status(与 shipping_processing_projection 同源),
|
||||
并注入 shipping_processing_stage / progress_version / order_task_no;
|
||||
另附带 review_run_no / owner_agent_id / conversation_id(经 OT.extraction_run),
|
||||
供任务中心「进入订单处理」深链。
|
||||
另附带 review_run_no / review_case_no / owner_agent_id / conversation_id(经 OT.extraction_run
|
||||
与 OT 反查确认 Case),供任务中心「进入订单处理」深链。
|
||||
|
||||
Args:
|
||||
task: ShippingNotice 或 ShippingOrderTask。
|
||||
@@ -1517,6 +1517,19 @@ def _inject_unified_processing_fields(task: ShippingNotice, data: dict[str, Any]
|
||||
data['conversation_id'] = cid
|
||||
if data.get('owner_agent_id') is None and getattr(run, 'owner_agent_id', None) is not None:
|
||||
data['owner_agent_id'] = int(run.owner_agent_id)
|
||||
# [STEP 3] 注入确认 Case 号:工作台以 case_no 绑定工作项,OT 直链缺失该字段时
|
||||
# 选法 2 不会拉 Case,任务详情身份链断裂、五阶段页签全锁(2026-09-17 工作台直链修复)。
|
||||
# confirmed_task_id 唯一约束保证 OT→Case 至多一条,点查代价可忽略。
|
||||
if order_task is not None and not str(data.get('review_case_no') or '').strip():
|
||||
confirmed_case = (
|
||||
ShippingOrderReviewCase.query
|
||||
.filter_by(confirmed_task_id=int(order_task.id))
|
||||
.first()
|
||||
)
|
||||
if confirmed_case is not None:
|
||||
case_no = str(confirmed_case.case_no or '').strip()
|
||||
if case_no:
|
||||
data['review_case_no'] = case_no
|
||||
|
||||
|
||||
def _enrich_task_center_fields(
|
||||
|
||||
Reference in new issue
Block a user