fix: 预处理文件输出到配置目录而非源文件目录

烟草/杨碧月/蓉城易购的预处理文件(预处理之后_xxx)之前写入源文件所在目录,
现在改为写入配置的 output_folder 目录。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 02:14:14 +08:00
parent 6f96bf50ac
commit 5cf9a98d9a
2 changed files with 18 additions and 7 deletions
+3 -2
View File
@@ -132,8 +132,9 @@ class TobaccoService:
final_cols = ['商品条码', '商品名称', '数量', '单价', '金额']
df_final = df[final_cols].copy()
# 保存预处理文件
out_dir = os.path.dirname(file_path)
# 保存预处理文件到输出目录(而非源文件目录)
out_dir = self.output_dir
os.makedirs(out_dir, exist_ok=True)
base = os.path.basename(file_path)
final_path = os.path.join(out_dir, f"预处理之后_{base}")
df_final.to_excel(final_path, index=False)