fix(regulatory): 轮询时加载条件确认卡

This commit is contained in:
2026-06-07 11:27:12 +08:00
parent b8d711729d
commit 72f18167c5
4 changed files with 119 additions and 3 deletions

View File

@@ -23,8 +23,7 @@ def batch_status(request, batch_id: int):
workflow_type="regulatory_review",
workflow_batch_id=batch.pk,
).order_by("id")
return JsonResponse(
{
payload = {
"batch": {
"id": batch.pk,
"workflow_type": "regulatory_review",
@@ -46,7 +45,14 @@ def batch_status(request, batch_id: int):
for node in nodes
],
}
)
if batch.status == RegulatoryReviewBatch.Status.WAITING_USER and (batch.condition_json or {}).get("candidates"):
payload["condition_confirmation"] = {
"batch_id": batch.pk,
"batch_no": batch.batch_no,
"confirm_url": f"/api/review-agent/regulatory-review/{batch.pk}/conditions/",
"candidates": batch.condition_json["candidates"],
}
return JsonResponse(payload)
@require_http_methods(["POST"])