feat(rohs-check): 新增 RoHS 对话轮次注册与检核批次绑定功能

This commit is contained in:
hugo committed 2026-06-15 16:30:17 +08:00
1 parent 9cba517bff
commit fa0cdee8df
20 files changed
+1050 -201

No files matched your search

+3 -2
View File
@@ -7,13 +7,13 @@ backend/edkb_system/skills/loader_excel.py
"""
from __future__ import annotations
import os
from pathlib import Path
from openpyxl import load_workbook, Workbook
from edkb_system.contracts import Context
from edkb_system.skills.soffice_util import convert_with_soffice, soffice_candidates
from edkb_system.skills.excel_bridge import convert_with_excel
def _convert_xls_to_xlsx_python(path: Path, output: Path) -> Path:
@@ -64,6 +64,8 @@ def _convert_xls_to_xlsx(path: Path, out_dir: Path) -> Path:
# 2. Windows 环境下尝试 Excel COM
if os.name == "nt":
try:
from edkb_system.skills.excel_bridge import convert_with_excel
return convert_with_excel(path, output)
except Exception as exc:
errors.append(f"Excel COM conversion failed: {exc}")
@@ -93,7 +95,6 @@ def _trim_trailing_empty(vals: list[str]) -> list[str]:
def run(input_data: dict, context: Context) -> list[dict]:
import os
file_path = Path(input_data["file_path"])
work_dir = Path(input_data["work_dir"])
if file_path.suffix.lower() == ".xls":