feat(sdlc): 新增 stage_confirm.dspy 需求/设计确认接口
This commit is contained in:
parent
107990bb0a
commit
aa9ca542ca
18
wwwroot/api/stage_confirm.dspy
Normal file
18
wwwroot/api/stage_confirm.dspy
Normal file
@ -0,0 +1,18 @@
|
||||
# stage_confirm.dspy - 需求/设计人工确认节点(owner 确认通过/退回重做)
|
||||
|
||||
user_id = await get_user()
|
||||
if not user_id:
|
||||
return json.dumps({"success": False, "error": "未登录"}, ensure_ascii=False)
|
||||
|
||||
human_task_id = (params_kw or {}).get('human_task_id', '').strip()
|
||||
confirmed = (params_kw or {}).get('confirmed', '')
|
||||
comment = (params_kw or {}).get('comment', '') or ''
|
||||
|
||||
if not human_task_id:
|
||||
return json.dumps({"success": False, "error": "缺少 human_task_id"}, ensure_ascii=False)
|
||||
|
||||
cf = str(confirmed).lower() in ('1', 'true', 'yes', 'on', 'confirm')
|
||||
ok, msg = await confirm_stage_gate(human_task_id, cf, comment, operator_id=user_id)
|
||||
if ok:
|
||||
return json.dumps({"success": True, "message": msg}, ensure_ascii=False)
|
||||
return json.dumps({"success": False, "error": msg}, ensure_ascii=False)
|
||||
Loading…
x
Reference in New Issue
Block a user