feat: 增加批量重新采集和安全重新采购 (#138 #139)

This commit is contained in:
chengma
2026-08-11 10:42:51 +08:00
parent 7aa49c0e29
commit 598c808093
12 changed files with 420 additions and 60 deletions
+20 -1
View File
@@ -5,7 +5,7 @@
from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Dict, Mapping, Optional
from typing import Any, Dict, Mapping, Optional, Tuple
class TaskType(str, Enum):
@@ -104,6 +104,25 @@ class TaskFilters:
keyword: str = ""
@dataclass(frozen=True)
class TaskRerunPlan:
"""批量重新执行预检结果;界面只展示计数,不自行判断安全条件。"""
target_type: TaskType
selected_count: int
eligible_task_ids: Tuple[str, ...]
filtered_task_ids: Tuple[str, ...]
blocked: Tuple[Tuple[str, str], ...]
@dataclass(frozen=True)
class TaskRerunBatch:
"""交给固定设备线程串行处理的批量命令。"""
target_type: TaskType
task_ids: Tuple[str, ...]
@dataclass(frozen=True)
class TaskSummary:
"""任务表格使用的轻量数据,不包含完整 JSON。"""