Consolidate roster to roster.xlsx and refresh attribution

Every roster the user sends arrives under a different filename, which
forced a code change each time. The roster now lives at a fixed
roster.xlsx; the three superseded copies are removed (git history keeps
them, and each was a strict subset of this one).

This roster claims all 14 previously unattributed Adpingids, so the
report has no unattributed spend. It also moves 5617321 from 周梓君 to
詹涵粤; that id has never spent, so only the 负责 counts shift.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
FANGKK
2026-09-16 17:49:00 +08:00
co-authored by Claude Opus 5
parent 3c21689b8f
commit d0a9cec70d
6 changed files with 17 additions and 101 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ books = [(f, openpyxl.load_workbook(f, data_only=True)) for f in SRC_FILES]
# 优先用独立的 投手.xlsx(月度数据文件已不再带「投手」sheet); # 优先用独立的 投手.xlsx(月度数据文件已不再带「投手」sheet);
# 没有它时退回到最新一个仍带该 sheet 的月度文件。 # 没有它时退回到最新一个仍带该 sheet 的月度文件。
# 花名册候选,按优先级从高到低;命中第一个就用它。 # 花名册候选,按优先级从高到低;命中第一个就用它。
ROSTER_PATTERNS = ['投手List*.xlsx', '武汉自投投放下单*.xlsx', '投手.xlsx'] # 花名册统一放在 roster.xlsx —— 用户每次发来的新表(文件名各异)都覆盖到这个名字,
# 这样不必每换一个文件名就改一次代码。
ROSTER_PATTERNS = ['roster.xlsx']
roster_file, roster = None, None roster_file, roster = None, None
for pat in ROSTER_PATTERNS: for pat in ROSTER_PATTERNS:
hits = sorted(glob.glob(os.path.join(HERE, pat))) hits = sorted(glob.glob(os.path.join(HERE, pat)))
+14 -100
View File
@@ -7,16 +7,16 @@
"prev_range": "2026/09/10-2026/09/12", "prev_range": "2026/09/10-2026/09/12",
"note": "投放人以「投手」表 Media Buyer 列为准,@某某 已与某某合并计算;未填写投放人的 Adpingid 不计入;exclude.json 所列包名已排除。Package 后缀为该 Package 花费最高的投放地区,Adpingid 为该地区内花费最高的 Adping。" "note": "投放人以「投手」表 Media Buyer 列为准,@某某 已与某某合并计算;未填写投放人的 Adpingid 不计入;exclude.json 所列包名已排除。Package 后缀为该 Package 花费最高的投放地区,Adpingid 为该地区内花费最高的 Adping。"
}, },
"grand_total": 13331.6094, "grand_total": 13387.3437,
"week34_id_count": 132, "week34_id_count": 149,
"buyers": [ "buyers": [
{ {
"name": "黄政", "name": "黄政",
"@name": "黄政", "@name": "黄政",
"total": 3835.971, "total": 3848.9397,
"prev_total": 3515.7645, "prev_total": 3515.7645,
"active_ids": 40, "active_ids": 41,
"owned_ids": 147, "owned_ids": 149,
"pkgs": [ "pkgs": [
{ {
"pkg": "com.amazon.mShop.android.shopping", "pkg": "com.amazon.mShop.android.shopping",
@@ -58,10 +58,10 @@
{ {
"name": "谭超", "name": "谭超",
"@name": "谭超", "@name": "谭超",
"total": 2968.486, "total": 2969.706,
"prev_total": 3088.426, "prev_total": 3088.426,
"active_ids": 22, "active_ids": 28,
"owned_ids": 129, "owned_ids": 137,
"pkgs": [ "pkgs": [
{ {
"pkg": "com.kwai.bulldog", "pkg": "com.kwai.bulldog",
@@ -89,7 +89,7 @@
"geo": "RU", "geo": "RU",
"label": "com.vitastudio.mahjong_RU", "label": "com.vitastudio.mahjong_RU",
"adping": "91496148", "adping": "91496148",
"spend": 337.3 "spend": 338.52
}, },
{ {
"pkg": "tech.jm", "pkg": "tech.jm",
@@ -151,7 +151,7 @@
"total": 2025.6114, "total": 2025.6114,
"prev_total": 2109.5657, "prev_total": 2109.5657,
"active_ids": 30, "active_ids": 30,
"owned_ids": 125, "owned_ids": 124,
"pkgs": [ "pkgs": [
{ {
"pkg": "ru.ozon.app.android", "pkg": "ru.ozon.app.android",
@@ -193,10 +193,10 @@
{ {
"name": "詹涵粤", "name": "詹涵粤",
"@name": "詹涵粤", "@name": "詹涵粤",
"total": 1975.6368, "total": 2017.1824,
"prev_total": 2021.8295, "prev_total": 2021.8295,
"active_ids": 16, "active_ids": 26,
"owned_ids": 151, "owned_ids": 162,
"pkgs": [ "pkgs": [
{ {
"pkg": "com.king.candycrushsaga", "pkg": "com.king.candycrushsaga",
@@ -236,91 +236,5 @@
] ]
} }
], ],
"unmatched": [ "unmatched": []
{
"adping": "91565960",
"pkg": "com.puzzlegames.puzzlebrickslegend",
"spend": 12.9687
},
{
"adping": "91565967",
"pkg": "(未知)",
"spend": 12.3676
},
{
"adping": "91565966",
"pkg": "(未知)",
"spend": 11.1248
},
{
"adping": "91565968",
"pkg": "(未知)",
"spend": 5.9756
},
{
"adping": "91565965",
"pkg": "(未知)",
"spend": 4.6184
},
{
"adping": "12306671",
"pkg": "com.nagwa.classes",
"spend": 3.4
},
{
"adping": "91565961",
"pkg": "(未知)",
"spend": 1.8304
},
{
"adping": "91565962",
"pkg": "(未知)",
"spend": 1.63
},
{
"adping": "91565949",
"pkg": "com.vitastudio.mahjong",
"spend": 0.75
},
{
"adping": "91565963",
"pkg": "(未知)",
"spend": 0.3248
},
{
"adping": "91565944",
"pkg": "com.vitastudio.mahjong",
"spend": 0.3
},
{
"adping": "91565946",
"pkg": "com.vitastudio.mahjong",
"spend": 0.17
},
{
"adping": "91565964",
"pkg": "(未知)",
"spend": 0.154
},
{
"adping": "12304863",
"pkg": "ru.zhuck.webapp",
"spend": 0.12
},
{
"adping": "91565943",
"pkg": "com.vitastudio.mahjong",
"spend": 0.0
},
{
"adping": "91565945",
"pkg": "com.vitastudio.mahjong",
"spend": 0.0
},
{
"adping": "91551845",
"pkg": "com.vitastudio.mahjong",
"spend": 0.0
}
]
} }
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.