feat(regulatory): 完善复核前端入口

This commit is contained in:
2026-06-07 09:40:18 +08:00
parent d39e3fe2d5
commit 4e46f27c28
5 changed files with 110 additions and 21 deletions

View File

@@ -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: