feat(regulatory): 完善复核前端入口
This commit is contained in:
@@ -79,6 +79,27 @@ def confirm_conditions(request, batch_id: int):
|
||||
progress=100,
|
||||
message="适用条件已确认",
|
||||
)
|
||||
record_event(
|
||||
batch,
|
||||
"condition_confirmed",
|
||||
{"conditions": batch.condition_json["confirmed_conditions"], "resume_from": "rule_scope"},
|
||||
)
|
||||
start_regulatory_review_workflow(
|
||||
batch,
|
||||
async_run=getattr(settings, "REGULATORY_REVIEW_ASYNC", True),
|
||||
)
|
||||
batch.refresh_from_db()
|
||||
return JsonResponse(
|
||||
{
|
||||
"batch": {
|
||||
"id": batch.pk,
|
||||
"workflow_type": "regulatory_review",
|
||||
"batch_no": batch.batch_no,
|
||||
"status": batch.status,
|
||||
"condition_json": batch.condition_json,
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@require_http_methods(["POST"])
|
||||
@@ -160,27 +181,6 @@ def review_issues(request, batch_id: int):
|
||||
return JsonResponse({"error": "file_summary_batch_id 不存在或未成功。"}, status=400)
|
||||
record = review_missing_issues(batch=batch, issue_ids=[int(item) for item in issue_ids], file_summary_batch=summary_batch)
|
||||
return JsonResponse({"review_record": record})
|
||||
record_event(
|
||||
batch,
|
||||
"condition_confirmed",
|
||||
{"conditions": batch.condition_json["confirmed_conditions"], "resume_from": "rule_scope"},
|
||||
)
|
||||
start_regulatory_review_workflow(
|
||||
batch,
|
||||
async_run=getattr(settings, "REGULATORY_REVIEW_ASYNC", True),
|
||||
)
|
||||
batch.refresh_from_db()
|
||||
return JsonResponse(
|
||||
{
|
||||
"batch": {
|
||||
"id": batch.pk,
|
||||
"workflow_type": "regulatory_review",
|
||||
"batch_no": batch.batch_no,
|
||||
"status": batch.status,
|
||||
"condition_json": batch.condition_json,
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def _format_risk_summary(risk_summary: dict) -> str:
|
||||
|
||||
@@ -140,6 +140,8 @@ def build_workflow_cards(conversation: Conversation) -> list[dict[str, object]]:
|
||||
"risk_label": _format_risk_label(batch.risk_summary or {}),
|
||||
"condition_json": batch.condition_json or {},
|
||||
"condition_candidates": (batch.condition_json or {}).get("candidates") or {},
|
||||
"notification_count": batch.notifications.count(),
|
||||
"review_record_count": batch.artifacts.filter(metadata__artifact="review_record").count(),
|
||||
"created_at": batch.created_at,
|
||||
"nodes": list(
|
||||
WorkflowNodeRun.objects.filter(
|
||||
|
||||
Reference in New Issue
Block a user