Refactor discrete material cleaner to improve maintainability and testability: - Introduce dependency injection pattern for service components - Add interfaces (IPageNavigator, IMaterialExtractor, IDeletionChecker) - Extract PageNavigator service for page navigation logic - Extract MaterialExtractor service for data extraction - Extract DatabaseDeletionChecker service for deletion logic - Add MaterialInfo data model for structured data - Centralize configuration (CleanerConfig, UIConstants) - Implement separation of concerns across services layer Also includes comprehensive execution mechanism documentation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
21 lines
374 B
Python
21 lines
374 B
Python
"""
|
|
清理器配置
|
|
管理离散备料计划清理器的运行配置
|
|
"""
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class CleanerConfig:
|
|
"""清理器配置"""
|
|
|
|
username: str
|
|
password: str
|
|
manager_name: str
|
|
headless: bool = False
|
|
verbose: bool = True
|
|
debug_mode: bool = False
|
|
debug_order: Optional[int] = None
|