feat: 对齐导出节点口径与下载信息展示
This commit is contained in:
@@ -161,12 +161,19 @@ def _build_workspace_summary(conversation: Conversation, batch: SubmissionBatch
|
||||
notify_status = node_status_map.get("飞书通知", "待处理")
|
||||
export_status = node_status_map.get("Word 回填导出", "待处理")
|
||||
highest_risk_level = "高" if risk_status in {"已阻断", "待复核"} else "中"
|
||||
export_allowed = "否" if risk_status in {"已阻断", "待复核"} else "是"
|
||||
export_allowed = (
|
||||
"否"
|
||||
if risk_status in {"已阻断", "待复核"} or export_status in {"已阻断", "待复核", "失败"}
|
||||
else "是"
|
||||
)
|
||||
latest_summary = conversation.latest_summary or {}
|
||||
structured_output = latest_summary.get("structured_output") or {}
|
||||
return {
|
||||
"highest_risk_level": highest_risk_level,
|
||||
"export_allowed": export_allowed,
|
||||
"notify_status": notify_status,
|
||||
"export_status": export_status,
|
||||
"download_url": structured_output.get("download_url", ""),
|
||||
"file_count": batch.file_count if batch else 0,
|
||||
"page_count": batch.page_count if batch else 0,
|
||||
}
|
||||
@@ -180,6 +187,7 @@ def _apply_agent_result_to_conversation(conversation: Conversation, result: Agen
|
||||
"answer": result.answer,
|
||||
"status": result.status,
|
||||
"error": result.error,
|
||||
"structured_output": result.structured_output,
|
||||
"notification_payload": result.notification_payload,
|
||||
}
|
||||
conversation.last_run_at = timezone.now()
|
||||
|
||||
Reference in New Issue
Block a user