Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EMUAFactory
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
mayinghao
EMUAFactory
Commits
faf227c7
Commit
faf227c7
authored
Jun 16, 2026
by
mayinghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
d3ba15c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
45 deletions
+77
-45
main.py
main.py
+55
-24
config.py
multipleThread/config.py
+22
-19
thread_upload.py
multipleThread/thread_upload.py
+0
-2
No files found.
main.py
View file @
faf227c7
...
@@ -5,7 +5,7 @@ from login import *
...
@@ -5,7 +5,7 @@ from login import *
import
uuid
import
uuid
import
re
import
re
from
PyQt5.QtWidgets
import
QMessageBox
,
QProgressBar
,
QTableWidget
,
QTableWidgetItem
,
QDesktopWidget
,
QDialog
,
\
from
PyQt5.QtWidgets
import
QMessageBox
,
QProgressBar
,
QTableWidget
,
QTableWidgetItem
,
QDesktopWidget
,
QDialog
,
\
QCheckBox
,
QAbstractItemView
QCheckBox
,
QAbstractItemView
,
QLineEdit
import
requests
import
requests
import
json
import
json
import
datetime
import
datetime
...
@@ -69,6 +69,7 @@ def process_data(data):
...
@@ -69,6 +69,7 @@ def process_data(data):
def
process_data2
(
data
):
def
process_data2
(
data
):
result
=
[]
result
=
[]
print
(
f
"------>>>>{data}"
)
for
j
in
data
[
"obj"
][
"files"
]:
for
j
in
data
[
"obj"
][
"files"
]:
result
.
append
([
j
[
"info"
],
j
[
'addTime'
],
j
[
"name"
]])
result
.
append
([
j
[
"info"
],
j
[
'addTime'
],
j
[
"name"
]])
...
@@ -350,7 +351,7 @@ class OrderDetail(QMainWindow):
...
@@ -350,7 +351,7 @@ class OrderDetail(QMainWindow):
station_name
=
QTableWidgetItem
(
file_info
[
0
])
station_name
=
QTableWidgetItem
(
file_info
[
0
])
file_item
=
QTableWidgetItem
(
file_info
[
1
])
file_item
=
QTableWidgetItem
(
file_info
[
1
])
file_type
=
QTableWidgetItem
(
file_info
[
3
])
file_type
=
QTableWidgetItem
(
file_info
[
3
])
create_time
=
QTableWidgetItem
(
nanoseconds_to_date
(
file_info
[
2
])
)
create_time
=
QTableWidgetItem
(
file_info
[
2
]
)
station_name
.
setTextAlignment
(
Qt
.
AlignCenter
)
station_name
.
setTextAlignment
(
Qt
.
AlignCenter
)
file_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
file_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
...
@@ -737,6 +738,15 @@ class DeviceTableModel_product(QAbstractTableModel):
...
@@ -737,6 +738,15 @@ class DeviceTableModel_product(QAbstractTableModel):
print
(
self
.
_filtered_data
)
print
(
self
.
_filtered_data
)
self
.
endResetModel
()
self
.
endResetModel
()
def
search_data
(
self
,
search_text
):
"""根据商品名称搜索数据"""
self
.
beginResetModel
()
if
not
search_text
:
self
.
_filtered_data
=
self
.
_data
.
copy
()
else
:
self
.
_filtered_data
=
[
device
for
device
in
self
.
_data
if
search_text
.
lower
()
in
device
[
1
]
.
lower
()]
self
.
endResetModel
()
@
property
@
property
def
filtered_data
(
self
):
def
filtered_data
(
self
):
return
self
.
_filtered_data
return
self
.
_filtered_data
...
@@ -957,7 +967,7 @@ class TableDialog(QDialog):
...
@@ -957,7 +967,7 @@ class TableDialog(QDialog):
self
.
table
.
setItem
(
row
,
1
,
name_item
)
self
.
table
.
setItem
(
row
,
1
,
name_item
)
# 填充年龄列
# 填充年龄列
age_item
=
QTableWidgetItem
(
nanoseconds_to_date
(
age
)
)
age_item
=
QTableWidgetItem
(
age
)
age_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
age_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
self
.
table
.
setItem
(
row
,
2
,
age_item
)
self
.
table
.
setItem
(
row
,
2
,
age_item
)
...
@@ -1155,8 +1165,9 @@ class productInfoWindow(QMainWindow):
...
@@ -1155,8 +1165,9 @@ class productInfoWindow(QMainWindow):
headers
=
{
'token'
:
token
,
headers
=
{
'token'
:
token
,
'User-Agent'
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
'User-Agent'
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
response
=
requests
.
pos
t
(
product_manager_url
,
headers
=
headers
,
data
=
datas
)
response
=
requests
.
ge
t
(
product_manager_url
,
headers
=
headers
,
data
=
datas
)
data1
=
response
.
json
()
data1
=
response
.
json
()
print
(
data1
)
product_info
=
data1
[
"obj"
][
"pList"
][
"result"
]
product_info
=
data1
[
"obj"
][
"pList"
][
"result"
]
# 总订单数量
# 总订单数量
pages
=
data1
[
"obj"
][
"pList"
][
"pages"
]
pages
=
data1
[
"obj"
][
"pList"
][
"pages"
]
...
@@ -1197,10 +1208,20 @@ class productInfoWindow(QMainWindow):
...
@@ -1197,10 +1208,20 @@ class productInfoWindow(QMainWindow):
self
.
page_num_label
=
QLabel
(
"选择页码"
)
self
.
page_num_label
=
QLabel
(
"选择页码"
)
self
.
page_list_combo
=
QComboBox
()
self
.
page_list_combo
=
QComboBox
()
self
.
page_list_combo
.
setFixedSize
(
80
,
20
)
self
.
page_list_combo
.
setFixedSize
(
80
,
20
)
# 搜索框
self
.
search_label
=
QLabel
(
"搜索商品:"
)
self
.
search_input
=
QLineEdit
()
self
.
search_input
.
setPlaceholderText
(
"输入商品名称搜索"
)
self
.
search_input
.
setFixedSize
(
150
,
20
)
self
.
search_input
.
textChanged
.
connect
(
self
.
search_devices
)
self
.
filter_layout
.
addWidget
(
self
.
filter_label
)
self
.
filter_layout
.
addWidget
(
self
.
filter_label
)
self
.
filter_layout
.
addWidget
(
self
.
brand_combo
)
self
.
filter_layout
.
addWidget
(
self
.
brand_combo
)
self
.
filter_layout
.
addWidget
(
self
.
page_num_label
)
self
.
filter_layout
.
addWidget
(
self
.
page_num_label
)
self
.
filter_layout
.
addWidget
(
self
.
page_list_combo
)
self
.
filter_layout
.
addWidget
(
self
.
page_list_combo
)
self
.
filter_layout
.
addWidget
(
self
.
search_label
)
self
.
filter_layout
.
addWidget
(
self
.
search_input
)
self
.
filter_layout
.
addStretch
()
self
.
filter_layout
.
addStretch
()
self
.
refresh_button
=
QPushButton
(
"刷新页面"
)
self
.
refresh_button
=
QPushButton
(
"刷新页面"
)
self
.
refresh_button
.
setContentsMargins
(
0
,
0
,
60
,
0
)
self
.
refresh_button
.
setContentsMargins
(
0
,
0
,
60
,
0
)
...
@@ -1225,9 +1246,9 @@ class productInfoWindow(QMainWindow):
...
@@ -1225,9 +1246,9 @@ class productInfoWindow(QMainWindow):
# 设置表格属性
# 设置表格属性
header
=
self
.
table_view
.
horizontalHeader
()
header
=
self
.
table_view
.
horizontalHeader
()
header
.
resizeSection
(
0
,
2
0
0
)
header
.
resizeSection
(
0
,
2
5
0
)
header
.
resizeSection
(
1
,
3
5
0
)
header
.
resizeSection
(
1
,
3
0
0
)
header
.
resizeSection
(
2
,
3
5
0
)
header
.
resizeSection
(
2
,
3
0
0
)
header
.
resizeSection
(
3
,
200
)
header
.
resizeSection
(
3
,
200
)
header
.
resizeSection
(
4
,
200
)
header
.
resizeSection
(
4
,
200
)
...
@@ -1345,7 +1366,7 @@ class productInfoWindow(QMainWindow):
...
@@ -1345,7 +1366,7 @@ class productInfoWindow(QMainWindow):
good_name
=
QTableWidgetItem
(
key
)
good_name
=
QTableWidgetItem
(
key
)
file_item
=
QTableWidgetItem
(
file_info
[
0
])
file_item
=
QTableWidgetItem
(
file_info
[
0
])
file_type
=
QTableWidgetItem
(
file_info
[
1
])
file_type
=
QTableWidgetItem
(
file_info
[
1
])
create_time
=
QTableWidgetItem
(
nanoseconds_to_date
(
file_info
[
2
])
)
create_time
=
QTableWidgetItem
(
file_info
[
2
]
)
good_name
.
setTextAlignment
(
Qt
.
AlignCenter
)
good_name
.
setTextAlignment
(
Qt
.
AlignCenter
)
file_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
file_item
.
setTextAlignment
(
Qt
.
AlignCenter
)
create_time
.
setTextAlignment
(
Qt
.
AlignCenter
)
create_time
.
setTextAlignment
(
Qt
.
AlignCenter
)
...
@@ -1519,6 +1540,11 @@ class productInfoWindow(QMainWindow):
...
@@ -1519,6 +1540,11 @@ class productInfoWindow(QMainWindow):
self
.
model
.
filter_data
(
manufacturer
)
self
.
model
.
filter_data
(
manufacturer
)
self
.
update_operation_buttons
()
self
.
update_operation_buttons
()
def
search_devices
(
self
,
search_text
):
"""根据商品名称搜索设备"""
self
.
model
.
search_data
(
search_text
)
self
.
update_operation_buttons
()
def
update_operation_buttons
(
self
):
def
update_operation_buttons
(
self
):
"""更新所有行的操作按钮"""
"""更新所有行的操作按钮"""
self
.
combos
.
clear
()
self
.
combos
.
clear
()
...
@@ -1535,15 +1561,19 @@ class productInfoWindow(QMainWindow):
...
@@ -1535,15 +1561,19 @@ class productInfoWindow(QMainWindow):
if
combo
:
if
combo
:
value
=
combo
.
currentText
()
value
=
combo
.
currentText
()
version_id
=
self
.
model
.
filtered_data
[
row
][
-
1
][
value
]
version_id
=
self
.
model
.
filtered_data
[
row
][
-
1
][
value
]
response
=
requests
.
post
(
product_callback_url
,
data
=
{
"id"
:
self
.
model
.
filtered_data
[
row
][
0
],
"product_version_id"
:
version_id
})
global
token
headers
=
{
'token'
:
token
,
'User-Agent'
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
response
=
requests
.
post
(
product_callback_url
,
data
=
{
"id"
:
self
.
model
.
filtered_data
[
row
][
0
],
"product_version_id"
:
version_id
},
headers
=
headers
)
data
=
response
.
json
()
data
=
response
.
json
()
print
(
f
"------+++>>>>{data}"
)
res
=
process_data2
(
data
)
res
=
process_data2
(
data
)
dialog
=
TableDialog
(
self
,
res
)
dialog
=
TableDialog
(
self
,
res
)
dialog
.
exec_
()
# 模态对话框
dialog
.
exec_
()
# 模态对话框
def
add_operation_buttons
(
self
,
row
):
def
add_operation_buttons
(
self
,
row
):
version_list
=
self
.
model
.
_filtered_data
[
row
][
-
1
]
version_list
=
self
.
model
.
_filtered_data
[
row
][
5
]
version_keys
=
list
(
version_list
.
keys
())
version_keys
=
list
(
version_list
.
keys
())
if
version_list
else
[]
combo
=
QComboBox
()
combo
=
QComboBox
()
combo
.
addItems
(
version_keys
)
combo
.
addItems
(
version_keys
)
...
@@ -1736,9 +1766,8 @@ class EqipInfoWindow(QMainWindow):
...
@@ -1736,9 +1766,8 @@ class EqipInfoWindow(QMainWindow):
for
p
in
order_property
:
for
p
in
order_property
:
if
p
==
"demand_finish_time"
or
p
==
"expect_finish_time"
:
if
p
==
"demand_finish_time"
or
p
==
"expect_finish_time"
:
if
j
[
p
]
is
not
None
:
if
j
[
p
]
is
not
None
:
timestamp
=
j
[
p
]
/
1000
str_date
=
datetime
.
datetime
.
utcfromtimestamp
(
timestamp
)
.
strftime
(
"
%
Y-
%
m-
%
d"
)
single_order
.
append
(
j
[
p
])
single_order
.
append
(
str_date
)
else
:
else
:
single_order
.
append
(
""
)
single_order
.
append
(
""
)
elif
p
==
"order_status"
:
elif
p
==
"order_status"
:
...
@@ -1928,6 +1957,7 @@ class EqipInfoWindow(QMainWindow):
...
@@ -1928,6 +1957,7 @@ class EqipInfoWindow(QMainWindow):
response
=
requests
.
post
(
order_detail_url
,
headers
=
headers
,
data
=
datas
)
response
=
requests
.
post
(
order_detail_url
,
headers
=
headers
,
data
=
datas
)
if
response
.
text
!=
""
:
if
response
.
text
!=
""
:
data1
=
response
.
json
()
data1
=
response
.
json
()
print
(
data1
)
all_orders
=
[]
all_orders
=
[]
if
len
(
data1
[
"obj"
][
"allChilds"
])
==
0
:
if
len
(
data1
[
"obj"
][
"allChilds"
])
==
0
:
QMessageBox
.
information
(
self
,
"提示"
,
"该项没有其他子订单"
)
QMessageBox
.
information
(
self
,
"提示"
,
"该项没有其他子订单"
)
...
@@ -1936,30 +1966,31 @@ class EqipInfoWindow(QMainWindow):
...
@@ -1936,30 +1966,31 @@ class EqipInfoWindow(QMainWindow):
for
j
in
data1
[
"obj"
][
"allChilds"
]:
for
j
in
data1
[
"obj"
][
"allChilds"
]:
if
j
[
"expect_finishtime"
]
is
not
None
:
if
j
[
"expect_finishtime"
]
is
not
None
:
expect_date
=
self
.
nanoseconds_to_date
(
j
[
"expect_finishtime"
])
expect_date
=
j
[
"expect_finishtime"
]
else
:
else
:
expect_date
=
""
expect_date
=
""
if
j
[
"actual_finishtime"
]
is
not
None
:
if
j
[
"actual_finishtime"
]
is
not
None
:
actual_time
=
self
.
nanoseconds_to_date
(
j
[
"actual_finishtime"
])
actual_time
=
j
[
"actual_finishtime"
]
else
:
else
:
actual_time
=
""
actual_time
=
""
order_id
=
j
[
"id"
]
order_id
=
j
[
"id"
]
station_true_name
=
j
[
"station_ture_name"
]
station_true_name
=
j
[
"station_ture_name"
]
print
(
f
"{j}---->"
)
if
j
[
"userName"
]
is
None
:
if
"userName"
not
in
j
:
j
[
"userName"
]
=
""
j
[
"userName"
]
=
""
if
j
[
"trueName"
]
is
None
:
if
"userTrueName"
not
in
j
:
j
[
"
t
rueName"
]
=
""
j
[
"
userT
rueName"
]
=
""
full_name
=
j
[
"userName"
]
+
j
[
"
t
rueName"
]
full_name
=
j
[
"userName"
]
+
j
[
"
userT
rueName"
]
order_status
=
self
.
order_status_code
[
j
[
"order_status"
]]
order_status
=
self
.
order_status_code
[
j
[
"order_status"
]]
tzFiles
=
[]
tzFiles
=
[]
print
(
j
[
'tzFiles'
])
if
len
(
j
[
"tzFiles"
])
>
0
:
if
len
(
j
[
"tzFiles"
])
>
0
:
for
file
in
j
[
"tzFiles"
]:
for
file
in
j
[
"tzFiles"
]:
tzFiles
.
append
([
station_true_name
,
file
[
'info'
],
nanoseconds_to_date
(
file
[
'addTime'
])
,
"图纸文件"
])
tzFiles
.
append
([
station_true_name
,
file
[
'info'
],
file
[
'addTime'
]
,
"图纸文件"
])
if
len
(
j
[
"lcFiles"
])
>
0
:
if
len
(
j
[
"lcFiles"
])
>
0
:
for
file
in
j
[
"lcFiles"
]:
for
file
in
j
[
"lcFiles"
]:
tzFiles
.
append
([
station_true_name
,
file
[
'info'
],
nanoseconds_to_date
(
file
[
'addTime'
])
,
"BOM文件"
])
tzFiles
.
append
([
station_true_name
,
file
[
'info'
],
file
[
'addTime'
]
,
"BOM文件"
])
all_orders
.
append
([
order_id
,
station_true_name
,
full_name
,
order_status
,
expect_date
,
actual_time
,
tzFiles
])
all_orders
.
append
([
order_id
,
station_true_name
,
full_name
,
order_status
,
expect_date
,
actual_time
,
tzFiles
])
self
.
detail_page
=
OrderDetail
(
all_orders
,
self
.
devices
[
original_index
][
0
])
self
.
detail_page
=
OrderDetail
(
all_orders
,
self
.
devices
[
original_index
][
0
])
self
.
detail_page
.
destroyed
.
connect
(
self
.
handle_close
)
self
.
detail_page
.
destroyed
.
connect
(
self
.
handle_close
)
...
@@ -2049,7 +2080,7 @@ class LoginWindow(QMainWindow):
...
@@ -2049,7 +2080,7 @@ class LoginWindow(QMainWindow):
try
:
try
:
response
=
requests
.
post
(
login_url
,
data
=
myobj
)
response
=
requests
.
post
(
login_url
,
data
=
myobj
)
data
=
response
.
json
()
data
=
response
.
json
()
if
data
[
'
res
Msg'
]
==
"登录成功"
:
if
data
[
'
succeed
Msg'
]
==
"登录成功"
:
global
user_now
,
token
global
user_now
,
token
user_now
=
account
user_now
=
account
global
token
global
token
...
...
multipleThread/config.py
View file @
faf227c7
...
@@ -5,7 +5,7 @@ import os
...
@@ -5,7 +5,7 @@ import os
config_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
'config.yaml'
)
config_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
'config.yaml'
)
with
open
(
config_path
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
config_path
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
config
=
yaml
.
safe_load
(
f
)
config
=
yaml
.
safe_load
(
f
)
version
=
config
.
get
(
'version'
,
'
test
'
)
version
=
config
.
get
(
'version'
,
'
release
'
)
aliyun_key
=
"LTAI3qeEHR5SP2ph"
aliyun_key
=
"LTAI3qeEHR5SP2ph"
aliyun_secret
=
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
aliyun_secret
=
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
...
@@ -19,31 +19,34 @@ part_size = 5 * 1024 * 1024
...
@@ -19,31 +19,34 @@ part_size = 5 * 1024 * 1024
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
# 回调地址
# 回调地址
if
version
==
"test"
:
if
version
==
"test"
:
callback_url
=
"http://uat.vue.emku.laidecloud.com/console/productOrder/filePthSave.ajax"
callback_url
=
"https://emukutest.laidecloud.com/api/v1/productOrder/filePthSave.ajax"
goods_callback_url
=
"http://uat.vue.emku.laidecloud.com/console/productOrder/goodsFilePthSave.ajax"
goods_callback_url
=
"https://emukutest.laidecloud.com/api/v1/productOrder/goodsFilePthSave.ajax"
login_url
=
'http://uat.vue.emku.laidecloud.com/console/pc/userLoginByToken.ajax'
login_url
=
'https://emukutest.laidecloud.com/api/v1/pc/userLoginByToken.ajax'
# order信息地址
# order信息地址
order_info_url
=
"http
://uat.vue.laidecloud.com/console
/productOrder/experimentOrderList.ajax"
order_info_url
=
"http
s://emukutest.laidecloud.com/api/v1
/productOrder/experimentOrderList.ajax"
# order detail
# order detail
order_detail_url
=
"http
://uat.vue.laidecloud.com/console
/productOrder/uploadorderdetail.ajax"
order_detail_url
=
"http
s://emukutest.laidecloud.com/api/v1
/productOrder/uploadorderdetail.ajax"
product_manager_url
=
"http
://uat.vue.emku.laidecloud.com/console
/goods/goods_list.ajax"
product_manager_url
=
"http
s://emukutest.laidecloud.com/api/v1
/goods/goods_list.ajax"
product_callback_url
=
"http
://uat.vue.emku.laidecloud.com/console
/seller/getFiles.ajax"
product_callback_url
=
"http
s://emukutest.laidecloud.com/api/v1
/seller/getFiles.ajax"
#获取上传文件列表
#获取上传文件列表
fileupload_url
=
"http
://uat.vue.emku.laidecloud.com/console
/productOrder/onupload.ajax"
fileupload_url
=
"http
s://emukutest.laidecloud.com/api/v1
/productOrder/onupload.ajax"
download_url
=
"http
://uat.vue.emku.laidecloud.com/console
/productOrder/downloadFile.ajax"
download_url
=
"http
s://emukutest.laidecloud.com/api/v1
/productOrder/downloadFile.ajax"
else
:
else
:
callback_url
=
"https://emku.laidecloud.com/console/productOrder/filePthSave.ajax"
callback_url
=
"https://www.emku.laidecloud.com/api/v1/productOrder/filePthSave.ajax"
login_url
=
'https://emku.laidecloud.com/console/pc/userLoginByToken.ajax'
login_url
=
'https://www.emku.laidecloud.com/console/pc/userLoginByToken.ajax'
login_url
=
'https://www.emku.laidecloud.com/api/v1/pc/userLoginByToken.ajax'
# order信息地址
# order信息地址
order_info_url
=
"https://
emku.laidecloud.com/console/
productOrder/experimentOrderList.ajax"
order_info_url
=
"https://
www.emku.laidecloud.com/api/v1
productOrder/experimentOrderList.ajax"
# order detail
# order detail
order_detail_url
=
"https://
emku.laidecloud.com/console
/productOrder/uploadorderdetail.ajax"
order_detail_url
=
"https://
www.emku.laidecloud.com/api/v1
/productOrder/uploadorderdetail.ajax"
product_manager_url
=
"http
://emku.laidecloud.com/console
/goods/goods_list.ajax"
product_manager_url
=
"http
s://www.emku.laidecloud.com/api/v1
/goods/goods_list.ajax"
product_callback_url
=
"https://
emku.laidecloud.com/console
/seller/getFiles.ajax"
product_callback_url
=
"https://
www.emku.laidecloud.com/api/v1
/seller/getFiles.ajax"
# 获取上传文件列表
# 获取上传文件列表
fileupload_url
=
"https://
emku.laidecloud.com/console
/productOrder/onupload.ajax"
fileupload_url
=
"https://
www.emku.laidecloud.com/api/v1
/productOrder/onupload.ajax"
goods_callback_url
=
"https://
emku.laidecloud.com/console
/productOrder/goodsFilePthSave.ajax"
goods_callback_url
=
"https://
www.emku.laidecloud.com/api/v1
/productOrder/goodsFilePthSave.ajax"
download_url
=
"https://
emku.laidecloud.com/console
/productOrder/downloadFile.ajax"
download_url
=
"https://
www.emku.laidecloud.com/api/v1
/productOrder/downloadFile.ajax"
multipleThread/thread_upload.py
View file @
faf227c7
...
@@ -194,7 +194,6 @@ class Upload_Thread(QObject):
...
@@ -194,7 +194,6 @@ class Upload_Thread(QObject):
response
=
requests
.
post
(
product_callback_url
,
data
=
{
"id"
:
self
.
order_id
,
"product_version_id"
:
version_id
},
headers
=
headers
)
response
=
requests
.
post
(
product_callback_url
,
data
=
{
"id"
:
self
.
order_id
,
"product_version_id"
:
version_id
},
headers
=
headers
)
data
=
response
.
json
()
data
=
response
.
json
()
res
=
process_data
(
data
)
res
=
process_data
(
data
)
print
(
res
)
self
.
finishSignal2
.
emit
(
res
,
self
.
order_id
)
self
.
finishSignal2
.
emit
(
res
,
self
.
order_id
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
f
"wrong 1{e}"
)
print
(
f
"wrong 1{e}"
)
...
@@ -205,7 +204,6 @@ class Upload_Thread(QObject):
...
@@ -205,7 +204,6 @@ class Upload_Thread(QObject):
print
(
"-----1"
)
print
(
"-----1"
)
response
=
requests
.
post
(
callback_url
,
data
=
datas
,
headers
=
headers
)
response
=
requests
.
post
(
callback_url
,
data
=
datas
,
headers
=
headers
)
res
=
response
.
json
()
res
=
response
.
json
()
print
(
res
[
"obj"
])
self
.
finishSignal
.
emit
()
self
.
finishSignal
.
emit
()
# except Exception as e:
# except Exception as e:
# print("wrong 2")
# print("wrong 2")
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