血缘锚定法: task_type字段+迁移+三大接口写入+TreeCanvas基于task_type布局
This commit is contained in:
@ -112,6 +112,7 @@ def _to_flat_response(task: Task) -> TaskResponse:
|
||||
status=task.status,
|
||||
notify_parent_on_complete=task.notify_parent_on_complete,
|
||||
is_rework=task.is_rework,
|
||||
task_type=task.task_type,
|
||||
remark=task.remark,
|
||||
reject_reason=task.reject_reason,
|
||||
received_at=task.received_at,
|
||||
@ -143,6 +144,7 @@ def _to_response(task: Task) -> TaskResponse:
|
||||
status=task.status,
|
||||
notify_parent_on_complete=task.notify_parent_on_complete,
|
||||
is_rework=task.is_rework,
|
||||
task_type=task.task_type,
|
||||
remark=task.remark,
|
||||
reject_reason=task.reject_reason,
|
||||
received_at=task.received_at,
|
||||
@ -335,6 +337,7 @@ async def recall_task(
|
||||
task_name=task.task_name,
|
||||
assignee_id=operator_id,
|
||||
status=TASK_STATUS_WIP,
|
||||
task_type="RECOVERY",
|
||||
notify_parent_on_complete=False,
|
||||
is_rework=False,
|
||||
remark=f"撤回「{task.task_name}」后重新接手",
|
||||
@ -377,6 +380,7 @@ async def spawn_subtask(
|
||||
task_name=data.task_name,
|
||||
assignee_id=data.assignee_id,
|
||||
status=TASK_STATUS_PENDING,
|
||||
task_type="SPAWN",
|
||||
notify_parent_on_complete=False,
|
||||
is_rework=False,
|
||||
remark=data.remark or None,
|
||||
@ -671,6 +675,7 @@ async def transfer_task(
|
||||
task_name=task_name,
|
||||
assignee_id=assignee_id,
|
||||
status=TASK_STATUS_PENDING,
|
||||
task_type="TRANSFER",
|
||||
notify_parent_on_complete=False,
|
||||
is_rework=False,
|
||||
remark=request.note or None,
|
||||
|
||||
Reference in New Issue
Block a user