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
3671452b
Commit
3671452b
authored
Oct 16, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
2d87da11
a7f3c925
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_a3_流程三_产品导入和审批.air/a_a3_流程三_产品导入和审批.py
View file @
3671452b
...
@@ -398,6 +398,7 @@ def main():
...
@@ -398,6 +398,7 @@ def main():
except
:
except
:
print
(
'新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题'
)
print
(
'新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题'
)
commonFuc
().
check_text_exist_result_text
(
'产品新增失败'
,
'产品新增成功'
)
commonFuc
().
check_text_exist_result_text
(
'产品新增失败'
,
'产品新增成功'
)
sys
.
exit
(
0
)
else
:
else
:
# 删除今天之前的产品信息(包含内外网)
# 删除今天之前的产品信息(包含内外网)
# delData().Del_goods_info_all()
# delData().Del_goods_info_all()
...
...
air_case/b6_spd3_core_business_flow_database_check/a_a3_流程三_产品导入和审批_数据库验证.air/a_a3_流程三_产品导入和审批_数据库验证.py
View file @
3671452b
...
@@ -157,22 +157,24 @@ try:
...
@@ -157,22 +157,24 @@ try:
# ==============分割线 暂时注释===============
# ==============分割线 暂时注释===============
add_goods
()
# 直销高值
add_goods
()
# 直销高值
select1
(
'message1'
)
select1
(
'message1'
)
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
1
)
#审核前的产品信息
check_mcms_goods_info
(
1
)
#审核前的产品信息
apply
()
#审批产品
apply
()
#审批产品
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
1
)
#审核后的产品信息
check_mcms_goods_info_after_approval
(
1
)
#审核后的产品信息
add_goods1
()
# 直销低值
add_goods1
()
# 直销低值
select1
(
'message2'
)
select1
(
'message2'
)
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
2
)
# 审核前的产品信息
check_mcms_goods_info
(
2
)
# 审核前的产品信息
apply
()
apply
()
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
2
)
#审核后的产品信息
check_mcms_goods_info_after_approval
(
2
)
#审核后的产品信息
add_goods2
()
# 直销试剂
add_goods2
()
# 直销试剂
select1
(
'message3'
)
select1
(
'message3'
)
time
.
sleep
(
6
)
check_mcms_goods_info
(
3
)
# 审核前的产品信息
check_mcms_goods_info
(
3
)
# 审核前的产品信息
apply
()
apply
()
time
.
sleep
(
6
)
check_mcms_goods_info_after_approval
(
3
)
# 审核后的产品信息
check_mcms_goods_info_after_approval
(
3
)
# 审核后的产品信息
add_goods3
()
# 集配
add_goods3
()
# 集配
select1
(
'message4'
)
select1
(
'message4'
)
...
@@ -184,9 +186,11 @@ try:
...
@@ -184,9 +186,11 @@ try:
supplyProvHosGoods_add_DI
()
supplyProvHosGoods_add_DI
()
# ==============分割线 暂时注释===============
# ==============分割线 暂时注释===============
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
except
Exception
as
e
:
print
(
"发生异常:"
,
str
(
e
))
print
(
'新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题'
)
print
(
'新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题'
)
commonFuc
().
check_text_exist_result_text
(
'产品新增失败'
,
'产品新增成功'
)
commonFuc
().
check_text_exist_result_text
(
'产品新增失败'
,
'产品新增成功'
)
sys
.
exit
(
0
)
else
:
else
:
# 删除今天之前的产品信息(包含内外网)
# 删除今天之前的产品信息(包含内外网)
# delData().Del_goods_info_all()
# delData().Del_goods_info_all()
...
...
air_case/b6_spd3_core_business_flow_database_check/a_a4_流程四_基础模块设置_数据库验证.air/a_a4_流程四_基础模块设置_数据库验证.py
View file @
3671452b
...
@@ -522,17 +522,18 @@ try:
...
@@ -522,17 +522,18 @@ try:
time
.
sleep
(
6
)
time
.
sleep
(
6
)
# 检查院区数据,科室数据,库房,新增用户数据
# 检查院区数据,科室数据,库房,新增用户数据
check_basics_set_info
()
check_basics_set_info
()
time
.
sleep
(
3
)
time
.
sleep
(
6
)
# 检查mcms_dept_goods_info表数据,验证科室添加的产品信息
# 检查mcms_dept_goods_info表数据,验证科室添加的产品信息
check_mcms_dept_goods_info
()
check_mcms_dept_goods_info
()
grants_user
()
# 给用户授权
grants_user
()
# 给用户授权
time
.
sleep
(
6
)
# 检查授权数据
# 检查授权数据
check_sys_user_mgr_range
()
check_sys_user_mgr_range
()
set_dept_lead1
()
# 设置一级科室负责人
set_dept_lead1
()
# 设置一级科室负责人
time
.
sleep
(
3
)
time
.
sleep
(
6
)
check_dept_leader
()
check_dept_leader
()
add_StockArea
()
# 添加库区
add_StockArea
()
# 添加库区
time
.
sleep
(
3
)
time
.
sleep
(
6
)
#检查库区数据
#检查库区数据
check_StockArea
()
check_StockArea
()
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
...
...
common/db/sql/sql_del_branch_info.py
View file @
3671452b
...
@@ -852,6 +852,9 @@ class delData(object):
...
@@ -852,6 +852,9 @@ class delData(object):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
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);"
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);"
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):
...
@@ -869,14 +872,14 @@ class delData(object):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd_ybtest_hdi"
,
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd_ybtest_hdi"
,
charset
=
"utf8"
)
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
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);"
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
1
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
1
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
(
sql1
)
cursor
.
execute
(
sql2
)
cursor
.
execute
(
sql2
)
cursor
.
execute
(
sql3
)
cursor
.
execute
(
sql3
)
cursor
.
execute
(
"commit;"
)
cursor
.
execute
(
"commit;"
)
print
(
'外网产品信息删除成功
'
)
print
(
'外网产品信息删除成功'
)
cursor
.
close
()
cursor
.
close
()
def
check_goods_info
(
self
,
hos_goods_id
):
def
check_goods_info
(
self
,
hos_goods_id
):
...
...
main1/main_text.py
View file @
3671452b
...
@@ -384,7 +384,13 @@ def main_text():
...
@@ -384,7 +384,13 @@ def main_text():
count
=
tk
.
simpledialog
.
askstring
(
"输入循环次数"
,
"循环次数:"
,
initialvalue
=
"%s"
%
c
)
count
=
tk
.
simpledialog
.
askstring
(
"输入循环次数"
,
"循环次数:"
,
initialvalue
=
"%s"
%
c
)
return
count
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
外网企业注册审批'
,
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
)
Button
(
root
,
text
=
'流程二
\n
供货关系申请审批'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow2
).
grid
(
row
=
2
,
column
=
2
)
...
@@ -410,14 +416,16 @@ def main_text():
...
@@ -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
=
'流程十八
\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
=
'一键执行'
,
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
,
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
)
column
=
2
)
Button
(
root
,
text
=
'流程五开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow5_flow18
).
grid
(
row
=
5
,
column
=
4
)
Button
(
root
,
text
=
'删除当前
\n
院区业务
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_current_brachdata
).
grid
(
row
=
5
,
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
6
)
column
=
4
)
Button
(
root
,
text
=
'流程十一开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow11_flow18
).
grid
(
row
=
5
,
column
=
8
)
Button
(
root
,
text
=
'流程五开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow5_flow18
).
grid
(
row
=
5
,
column
=
6
)
# Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2, command=download_data).grid(row=5,
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
8
)
# column=10)
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
)
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