feat(xq0085): 团购核对支持对比表与门店归属(v1.1.0)

This commit is contained in:
2026-11-27 17:18:36 +08:00
parent 764188caa5
commit 26842c3ed3
34 changed files with 7091 additions and 424 deletions
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
"""从共享盘复制「昨天」的表到本地副本(**共享盘全程只读,绝不回写**)。
源在共享盘,目标在本机 ``WORK_DIR/_work/``,文件名日期同步替换::
源在共享盘,目标在本机过程表目录(``<根>\\过程表``,各分支共用),文件名日期同步替换::
源(共享盘,只读)
1111/TG/2026年11月/11.10/美团11.10.xlsx / 抖音11.10.xlsx
1111/TG/2026年11月/11.10/马敏团购总表11.10.xlsx
目标(本地副本)
D:\\资料\\财务\\新美大平台核对\\_work\\美团11.11.xlsx
D:\\资料\\财务\\新美大平台核对\\_work\\抖音11.11.xlsx
D:\\资料\\财务\\新美大平台核对\\_work\\马敏团购总表11.11.xlsx
目标(本地副本 = 过程表)
D:\\资料\\财务\\团购数据核对\\过程表\\美团11.11.xlsx
D:\\资料\\财务\\团购数据核对\\过程表\\抖音11.11.xlsx
D:\\资料\\财务\\团购数据核对\\过程表\\马敏团购总表11.11.xlsx
两张核对表复制到本地后,后续所有处理都只改本地副本。
两张核对表与总表复制到本地后,后续所有处理都只改本地副本;马敏总表只此一份,
美团/抖音两条分支先后贴入同一副本,不会按分支分叉。
"""
import os
import re
@@ -72,7 +73,7 @@ def copy_prev_table(share_root='', keyword='', ext='', day=None, local_dir='', d
prev = target - timedelta(days=1)
src_path = _pick_source(day_dir(root, prev), kw, prev, suffix)
dst_dir = str(local_dir or os.path.join(config.WORK_DIR, config.DAILY_WORK_DIR))
dst_dir = str(local_dir or config.WORK_DIR)
dst_path = os.path.join(dst_dir, table_name(kw, target, suffix))
result = {'ok': False, 'message': '', 'src': src_path, 'dst': dst_path, 'skipped': False}