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
e3eb560d
Commit
e3eb560d
authored
Jan 13, 2025
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0fcf37a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
easy_storage.exe
dist/easy_storage.exe
+0
-0
payment.py
src/payment.py
+33
-1
No files found.
dist/easy_storage.exe
View file @
e3eb560d
No preview for this file type
src/payment.py
View file @
e3eb560d
...
...
@@ -13,10 +13,11 @@ from DrissionPage import ChromiumPage
from
DrissionPage.errors
import
ElementNotFoundError
from
lxml
import
etree
from
helper
import
helper
,
excel
,
file
,
domain
,
logger
,
redisx
from
helper
import
helper
,
excel
,
file
,
domain
,
logger
,
redisx
,
rabbitmq
country
=
None
payeeCode
=
None
shop_code
=
None
log
=
logger
.
ConsoleLog
()
rdb
=
redisx
.
RedisClient
()
...
...
@@ -404,11 +405,42 @@ def main():
price_pay_summary
=
pd
.
concat
(
all_price_pay_data
,
ignore_index
=
True
)
excel
.
save_xls
(
price_pay_summary
,
new_file_name
,
"Price导出明细"
)
# 推送消息
push_data_queue
(
new_file_name
)
def
push_data_queue
(
file_name
):
# rabbit = rabbitmq.RabbitMQClient(host='39.108.185.244', port=5672, username='test', password='khd123456')
rabbit
=
rabbitmq
.
RabbitMQClient
(
host
=
'47.107.31.4'
,
port
=
5672
,
username
=
'khd_rabbitmq'
,
password
=
'KHDrq2024
%
,,'
)
rabbit
.
connect
(
queue
=
'return_robot'
,
routing_key
=
'return_robot'
,
exchange
=
'reports'
)
data
=
pd
.
read_excel
(
file_name
)
for
_
,
item_row
in
data
.
iterrows
():
push_data
=
{
'payment_number'
:
item_row
.
get
(
'Payment Number'
,
''
),
# 订单id
'order_date'
:
item_row
.
get
(
'Invoice Date'
,
''
),
# 发票时间
'payment_date'
:
item_row
.
get
(
'Payment Date'
,
''
),
# 支付时间
'order_no'
:
item_row
.
get
(
'Invoice Number'
,
0
),
# 订单号
'payment_type'
:
item_row
.
get
(
'Description'
,
''
),
# Description
'platform_payable_amount'
:
item_row
.
get
(
'Invoice Amount'
,
''
),
# 平台应付金额
'fee_amount'
:
item_row
.
get
(
"Terms Discount Taken"
,
''
),
# 手续费
'actual_payment'
:
item_row
.
get
(
'Amount Paid'
,
''
),
# 实际支付金额
'currency'
:
item_row
.
get
(
'Invoice Currency'
,
''
),
# 货币
'shop_code'
:
shop_code
,
# 店铺code
'group_name'
:
item_row
.
get
(
'Group Name'
,
""
),
# 组别 运营一组 运营二组
'group_code'
:
item_row
.
get
(
'Group Code'
,
""
),
# 组别 T1 T2
}
# 推送数据
rabbit
.
send_message
(
push_data
)
if
__name__
==
'__main__'
:
try
:
country
=
helper
.
get_input_with_default
(
"国家(目前支持[DE,FR,JP,CA,UK,US])"
,
"US"
)
payeeCode
=
helper
.
get_input_with_default
(
"payeeCode"
,
"VECET"
)
shop_code
=
helper
.
get_input_with_default
(
"店铺编码"
,
"US-VC"
)
domain
.
domain_page
(
page
,
country
)
main
()
page
.
close
()
...
...
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