Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amazon_reports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
amazon_reports
Commits
074d87a5
Commit
074d87a5
authored
Feb 27, 2025
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(spa_search): 补充无报告信息发票的输出数据- 为没有报告信息的发票添加默认数据结构
-确保所有发票都有输出数据,避免因缺少信息而导致的错误- 优化日志警告信息,提醒用户某些发票缺少报告信息
parent
8dc775b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
spa_search.py
src/spa_search.py
+17
-0
No files found.
src/spa_search.py
View file @
074d87a5
...
...
@@ -198,6 +198,22 @@ def main():
# 获取当前发票的 item 列表
item_dict
=
export_item_read_data
(
invoice_id
)
if
item_dict
is
None
:
push_data
=
{
'ad_date'
:
coop
.
get
(
'Invoice date'
,
""
),
# spa费用数据日期
'erp_sku'
:
""
,
# ERP SKU
'ad_amount'
:
coop
.
get
(
'Original balance'
,
""
),
# spa费用金额
'ad_amount_currency'
:
""
,
# spa费用币制
'funding_type'
:
coop
.
get
(
'Funding Type'
,
""
),
# 资金类型
'transaction_type'
:
""
,
# 交易类型
'group_name'
:
""
,
# 组别 运营一组 运营二组
'group_code'
:
""
,
# 组别 T1 T2
'asin'
:
""
,
# ASIN
'shop_code'
:
shop_code
,
# 店铺code
'type'
:
2
,
# 1 sheet1 2 其他sheet
'parent_id'
:
"Sheet1"
,
'order_no'
:
""
,
# 订单号
}
sheet_data
.
append
([
push_data
])
log
.
warning
(
f
"{invoice_id} 暂无报告信息"
)
continue
...
...
@@ -394,6 +410,7 @@ def test(file_name, result_file_name):
# 保存排序后的数据到 result.xls
df
.
to_excel
(
'result.xlsx'
,
index
=
False
)
if
__name__
==
'__main__'
:
try
:
country
=
helper
.
get_input_with_default
(
"国家(目前支持[DE,FR,JP,CA,UK,US])"
,
"US"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment