feat: add discrete material plan data cleaning tool

Implement a new automation script and utility to handle the cleaning of
discrete material plan maintenance data.

- Add main_clean.py as the primary entry point, configuring the cleaner
  instance and reading order IDs.
- Add DiscreteMaterialPlanCleaner in utils/ utilizing Playwright to automate
  browser interactions.
- Implement logic for user authentication (login/logout), UI setup for
  queries, and processing individual orders.
- Include verbose logging and debug mode support for troubleshooting.
This commit is contained in:
Misaka_Company
2026-01-22 15:55:38 +08:00
parent 24acc39411
commit 8708709cac
2 changed files with 217 additions and 0 deletions

27
main_clean.py Normal file
View File

@@ -0,0 +1,27 @@
"""
主程序 - 使用离散备料计划维护数据清理工具
"""
import os
from utils.离散备料计划维护数据清理 import DiscreteMaterialPlanCleaner
def main():
# 创建清理器
cleaner = DiscreteMaterialPlanCleaner(
username="BLDpengqiangqiang",
password="Cqbld123456.",
headless=False,
verbose=True
)
# 设置文件路径
order_id_file = os.path.join(os.path.dirname(__file__), "orderID.txt")
# 执行清理
cleaner.clean(order_id_file)
input("按回车退出...")
if __name__ == "__main__":
main()