v1.5.5 Bug 修复:模板路径修正 + 上边 Name 独立行

BUG-005: 模板搜索路径优先查找 Code/src/Template/ 目录
BUG-006: 上边 Name 移至 row 0,完全独立于其他边

- 37/37 测试全部通过
- docs: 更新 bugs.md(BUG-005/BUG-006 状态)
- docs: 更新 tasks.md(T028 打包进行中→已完成)
- docs: 添加 modification-assessment-v1.5.5.md
- CHANGELOG.md: 追加 v1.5.5 版本日志
This commit is contained in:
2026-06-12 02:55:13 +08:00
parent e582b454d3
commit 88a231424c
10 changed files with 542 additions and 122 deletions

View File

@@ -34,46 +34,54 @@ def wait_for_exit():
# ── Path helpers ────────────────────────────────────────────────────
def _find_pinlist_template_path() -> str | None:
"""查找根目录下的 PinList-Template.xlsx。
"""查找 PinList-Template.xlsx。
MAP→List 输出使用 PinList 模板。
搜索顺序:
1. 与 run.bat 同级的根目录
2. 当前工作目录
1. Code/src/Template/ 目录(首要位置)
2. 项目根目录(向后兼容)
3. 当前工作目录
"""
src_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(src_dir)) # pinmap-to-pinlist/
template_path = os.path.join(root_dir, "PinList-Template.xlsx")
# 1. Code/src/Template/ 目录
template_path = os.path.join(src_dir, "Template", "PinList-Template.xlsx")
if os.path.exists(template_path):
return template_path
# 2. 项目根目录(向后兼容)
root_dir = os.path.dirname(os.path.dirname(src_dir))
template_path = os.path.join(root_dir, "PinList-Template.xlsx")
if os.path.exists(template_path):
return template_path
# 3. 当前工作目录
cwd_template = os.path.join(os.getcwd(), "PinList-Template.xlsx")
if os.path.exists(cwd_template):
return cwd_template
return None
def _find_pinmap_template_path() -> str | None:
"""查找根目录下的 PinMAP-Template.xlsx。
"""查找 PinMAP-Template.xlsx。
List→MAP 输出使用 PinMAP 模板。
搜索顺序:
1. 与 run.bat 同级的根目录
2. 当前工作目录
1. Code/src/Template/ 目录(首要位置)
2. 项目根目录(向后兼容)
3. 当前工作目录
"""
src_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(src_dir)) # pinmap-to-pinlist/
template_path = os.path.join(root_dir, "PinMAP-Template.xlsx")
# 1. Code/src/Template/ 目录
template_path = os.path.join(src_dir, "Template", "PinMAP-Template.xlsx")
if os.path.exists(template_path):
return template_path
# 2. 项目根目录(向后兼容)
root_dir = os.path.dirname(os.path.dirname(src_dir))
template_path = os.path.join(root_dir, "PinMAP-Template.xlsx")
if os.path.exists(template_path):
return template_path
# 3. 当前工作目录
cwd_template = os.path.join(os.getcwd(), "PinMAP-Template.xlsx")
if os.path.exists(cwd_template):
return cwd_template
return None