Files
playwrite/validate_material_status.py
Misaka_Company 2ca53f6a55 style: normalize code formatting across the codebase
- Standardize quote style (single to double quotes)
- Improve code formatting consistency
- Apply formatting to utilities, GUI components, and tools
- Update imports and docstrings for consistency

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 14:56:35 +08:00

50 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
物料状态校验脚本
校验订单中的物料状态,匹配待删除物料
"""
import os
import sys
# 添加项目根目录到 sys.path
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_root not in sys.path:
sys.path.insert(0, project_root)
from utils.material_status_validator import MaterialStatusValidator
def main():
"""主函数"""
# 创建校验器实例
validator = MaterialStatusValidator(
username="BLDpengqiangqiang",
password="Cqbld123456.",
headless=True,
verbose=True,
)
# 设置文件路径
production_id_file = "D:/python/playwrite/ProductionID.txt"
output_file = "D:/python/playwrite/data/物料状态校验结果.xlsx"
# 执行校验
print("=" * 60)
print("物料状态校验工具")
print("=" * 60)
# 方式1: 从头开始(提取数据 + 校验)
validator.validate(production_id_file, output_file=output_file)
# 方式2: 如果已经有Excel文件可以直接校验
# excel_file = "D:/python/playwrite/data/离散备料计划维护_合并.xlsx"
# validator.validate_from_existing_excel(excel_file, output_file=output_file)
print("\n" + "=" * 60)
print("校验完成!")
print("=" * 60)
if __name__ == "__main__":
main()