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
282bfa60
Commit
282bfa60
authored
Dec 23, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
队列消息
parent
2740b6b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
spa_search.py
src/spa_search.py
+7
-4
No files found.
src/spa_search.py
View file @
282bfa60
...
...
@@ -235,6 +235,7 @@ def process_large_items(item_list, relation_data):
relation
=
relation_data
.
get
(
asin
,
{})
processed_item
=
item
.
copy
()
processed_item
.
pop
(
"Title"
)
processed_item
.
pop
(
"Asin"
)
processed_item
[
'Asin'
]
=
asin
processed_item
[
'ERP SKU'
]
=
relation
.
get
(
"erp_sku"
)
...
...
@@ -258,12 +259,14 @@ def process_small_items(item_list, coop, relation_data):
rebate
=
item
.
get
(
"Rebate In Agreement Currency"
,
None
)
vendor_funding
=
item
.
get
(
"Vendor Funding In Agreement Currency"
,
None
)
processed_item
=
coop
.
copy
()
# 复制 coop 数据
processed_item
=
coop
.
copy
()
processed_item
.
pop
(
"Agreement title"
)
processed_item
[
"Order Date"
]
=
item
.
get
(
"Order Date"
)
processed_item
[
"Agreement Currency"
]
=
item
.
get
(
"Agreement Currency"
)
processed_item
[
"Asin"
]
=
asin
processed_item
[
"ERP SKU"
]
=
relation
.
get
(
"erp_sku"
)
processed_item
[
"Group Name"
]
=
relation
.
get
(
"name"
)
processed_item
[
"Original balance"
]
=
rebate
or
vendor_funding
processed_items
.
append
(
processed_item
)
return
processed_items
...
...
@@ -308,11 +311,11 @@ def push_data_queue(file_name):
push_data
=
{
'ad_date'
:
item_row
.
get
(
'Order Date'
,
""
),
# spa费用数据日期
'erp_sku'
:
item_row
.
get
(
'ERP SKU'
,
""
),
# ERP SKU
'ad_amount'
:
item_row
.
get
(
'Or
der Dat
e'
,
""
),
# spa费用金额
'ad_amount'
:
item_row
.
get
(
'Or
iginal balanc
e'
,
""
),
# spa费用金额
'ad_amount_currency'
:
item_row
.
get
(
'Agreement Currency'
,
""
),
# spa费用币制
'amount_type'
:
item_row
.
get
(
'Order Date'
,
""
),
# 费用类型
'group_name'
:
item_row
.
get
(
'Group Name'
,
""
),
# 组别 运营一组 运营二组
'group_code'
:
item_row
.
get
(
'
Order Dat
e'
,
""
),
# 组别 T1 T2
'group_code'
:
item_row
.
get
(
'
Group Cod
e'
,
""
),
# 组别 T1 T2
'asin'
:
item_row
.
get
(
'Asin'
,
""
),
# ASIN
'shop_code'
:
shop_code
,
# 店铺code
'type'
:
2
,
# 1 sheet1 2 其他sheet
...
...
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