Commit Graph

7 Commits

Author SHA1 Message Date
Misaka_Company
8d51c5b368 feat: add delete execution feature with progress tracking and dryrun mode
- Add ExecutionConfig for dryrun settings in config schema
- Create DeleteProgressWindow widget for real-time progress display
- Integrate delete execution flow in MaterialValidationTab with threading
- Add dryrun checkbox for admin users in settings
- Add progress callback support to DiscreteMaterialPlanCleaner
- Add markdown report generation with statistics
- Include tkinterweb and markdown2 dependencies for report rendering

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-26 13:02:48 +08:00
Misaka_Company
63601a994f feat: add dryrun parameter to skip save operations
Add dryrun boolean parameter to DiscreteMaterialPlanCleaner.
When dryrun=True, the save_button_locator.click() is skipped,
allowing preview of changes without actually saving.

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-26 10:09:05 +08:00
Misaka_Company
167fa2893f feat: support multiple managers in DiscreteMaterialPlanCleaner
- Add get_materials_to_delete_by_managers() function in db/materials_to_delete.py
  - Supports querying by single manager, multiple managers, or all managers
  - Uses IN clause for multi-manager queries
- Refactor DiscreteMaterialPlanCleaner to accept manager_names parameter
  - Accepts str, List[str], or None (for all managers)
  - Automatically normalizes parameter types in __init__
  - Updates preload_data() with appropriate log messages

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-26 10:01:48 +08:00
Misaka
c5f48eb7c8 style: format code in discrete material cleaner
Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-25 22:38:36 +08:00
Misaka_Company
0a2c3c55c6 feat: add wait mechanisms for delete and save operations in discrete material cleaner
This change adds robust wait mechanisms to prevent race conditions when
performing delete and save operations in the ERP system.

Changes:
- Add row number change detection after delete to confirm completion
- Add save button disappearance detection to confirm save completion
- Add row number range check (7000-8000) to skip specific rows
- Enable previously commented save button click
- Improve logging with detailed status messages
- Add timeout handling (10s for delete, 60s for save)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-25 11:45:31 +08:00
Misaka
de25841364 style: apply code formatting to discrete_material_plan_cleaner.py
Apply consistent code formatting including:
- Single quotes to double quotes for string literals
- Multi-line formatting for long expressions
- Trailing whitespace cleanup
- Blank line adjustments for PEP 8 compliance

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-24 22:23:34 +08:00
Misaka_Company
19dfe5b09e refactor: rename Chinese-named Python files to English
Rename utility files to use English names for better cross-platform compatibility:
- utils/离散备料计划维护数据提取.py → utils/discrete_material_plan_extractor.py
- utils/离散备料计划维护数据清理.py → utils/discrete_material_plan_cleaner.py

Update all import statements across the codebase and documentation references.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-24 17:35:23 +08:00