Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
cb4f39aa
Commit
cb4f39aa
authored
Oct 16, 2024
by
xiao-hesheng
Browse files
流程五脚本提交
parent
96bd2a48
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_a3_流程三_产品导入和审批_数据库验证.air/a_a3_流程三_产品导入和审批_数据库验证.py
View file @
cb4f39aa
...
...
@@ -157,22 +157,24 @@ try:
# ==============分割线 暂时注释===============
add_goods
()
# 直销高值
select1
(
'message1'
)
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
1
)
#审核前的产品信息
apply
()
#审批产品
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
1
)
#审核后的产品信息
add_goods1
()
# 直销低值
select1
(
'message2'
)
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
2
)
# 审核前的产品信息
apply
()
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
2
)
#审核后的产品信息
add_goods2
()
# 直销试剂
select1
(
'message3'
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
3
)
# 审核前的产品信息
apply
()
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
3
)
# 审核后的产品信息
add_goods3
()
# 集配
select1
(
'message4'
)
...
...
common/db/sql/sql_del_branch_info.py
View file @
cb4f39aa
...
...
@@ -852,6 +852,9 @@ class delData(object):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
hosGoodsId1
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
]
hosGoodsId2
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
]
hosGoodsId3
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
]
# 删除产品信息
sql1
=
"delete from mcms_goods_info where goods_name like '%一次性注射器%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL 5 day);"
sql2
=
"delete from mcms_goods_info where goods_name like '%新型冠状病毒检测试剂%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL 5 day);"
...
...
@@ -869,14 +872,14 @@ class delData(object):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd_ybtest_hdi"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
sql1
=
"delete from mcms_goods_info where goods_name like '%一次性注射器%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
1
day);"
sql2
=
"delete from mcms_goods_info where goods_name like '%新型冠状病毒检测试剂%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
1
day);"
sql3
=
"delete from mcms_goods_info where goods_name like '%高值牙钻机%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
1
day);"
sql1
=
"delete from mcms_goods_info where goods_name like '%一次性注射器%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
5
day);"
sql2
=
"delete from mcms_goods_info where goods_name like '%新型冠状病毒检测试剂%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
5
day);"
sql3
=
"delete from mcms_goods_info where goods_name like '%高值牙钻机%'and goods_spec ='G-31891'and create_time < DATE_SUB(CURDATE(),INTERVAL
5
day);"
cursor
.
execute
(
sql1
)
cursor
.
execute
(
sql2
)
cursor
.
execute
(
sql3
)
cursor
.
execute
(
"commit;"
)
print
(
'外网产品信息删除成功
'
)
print
(
'外网产品信息删除成功'
)
cursor
.
close
()
def
check_goods_info
(
self
,
hos_goods_id
):
...
...
main1/main_text.py
View file @
cb4f39aa
...
...
@@ -384,7 +384,13 @@ def main_text():
count
=
tk
.
simpledialog
.
askstring
(
"输入循环次数"
,
"循环次数:"
,
initialvalue
=
"%s"
%
c
)
return
count
def
del_goods_info
():
print
(
'删除五天前的所有产品信息'
)
result
=
confirm
()
if
result
==
True
:
result1
=
confirm1
()
if
result1
==
True
:
delData
().
Del_goods_info_all
()
# 文本显示的位置。
Button
(
root
,
text
=
'流程一
\n
外网企业注册审批'
,
width
=
16
,
height
=
8
,
command
=
flow1
).
grid
(
row
=
2
,
column
=
0
)
Button
(
root
,
text
=
'流程二
\n
供货关系申请审批'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow2
).
grid
(
row
=
2
,
column
=
2
)
...
...
@@ -410,14 +416,16 @@ def main_text():
Button
(
root
,
text
=
'流程十八
\n
中心库业务_拆包功能'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow18
).
grid
(
row
=
4
,
column
=
10
)
Button
(
root
,
text
=
'一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow0
).
grid
(
row
=
5
,
column
=
0
)
Button
(
root
,
text
=
'删除指定
\n
院区数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_brachdata_from_brachid
).
grid
(
row
=
5
,
column
=
0
)
Button
(
root
,
text
=
'删除当前
\n
院区业务
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_current_brachdata
).
grid
(
row
=
5
,
column
=
2
)
Button
(
root
,
text
=
'流程五开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow5_flow18
).
grid
(
row
=
5
,
column
=
4
)
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
6
)
Button
(
root
,
text
=
'流程十一开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow11_flow18
).
grid
(
row
=
5
,
column
=
8
)
# Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2, command=download_data).grid(row=5,
# column=10)
Button
(
root
,
text
=
'删除当前
\n
院区业务
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_current_brachdata
).
grid
(
row
=
5
,
column
=
4
)
Button
(
root
,
text
=
'流程五开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow5_flow18
).
grid
(
row
=
5
,
column
=
6
)
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
8
)
Button
(
root
,
text
=
'流程十一开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
10
,
height
=
2
,
command
=
flow11_flow18
).
grid
(
row
=
6
,
column
=
0
)
Button
(
root
,
text
=
'从jenkins
\n
下载data
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
download_data
).
grid
(
row
=
6
,
column
=
2
)
Button
(
root
,
text
=
'删除5天前
\n
产品数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
3
,
command
=
del_goods_info
).
grid
(
row
=
6
,
column
=
4
)
Button
(
root
,
text
=
'退 出'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
exit
).
grid
(
row
=
5
,
column
=
10
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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