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
e49dbfbc
Commit
e49dbfbc
authored
Jul 29, 2024
by
xiao-hesheng
Browse files
数据库验证流程十三脚本编写
parent
c0de37f9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air/a_b5流程十二请领业务流_二级库向二级库_数据库验证.py
View file @
e49dbfbc
...
@@ -834,7 +834,7 @@ def check_mcms_psi_dept_in(type=16):
...
@@ -834,7 +834,7 @@ def check_mcms_psi_dept_in(type=16):
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
def
main
()
:
pro_path
=
commonFuc
().
get_pro_path2
()
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
print
(
'pro_path'
,
pro_path
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b5流程十二请领业务流_二级库向二级库.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b5流程十二请领业务流_二级库向二级库.air'
)
...
@@ -864,9 +864,9 @@ try:
...
@@ -864,9 +864,9 @@ try:
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
],
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
],
get_stockAreaId2_new_fromDb
(
deptName5
,
2
))
get_stockAreaId2_new_fromDb
(
deptName5
,
2
))
#新建科室产品分配
#
新建科室产品分配
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
])
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
])
#编辑产品请领目标为二级检验科002
#
编辑产品请领目标为二级检验科002
currentDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
]
currentDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
]
targetDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
targetDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
edit_goods_target
(
currentDeptId
,
targetDeptId
)
edit_goods_target
(
currentDeptId
,
targetDeptId
)
...
@@ -908,11 +908,14 @@ try:
...
@@ -908,11 +908,14 @@ try:
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
# # 上面暂时注释========================
# # 上面暂时注释========================
#检查入库单
#
检查入库单
check_mcms_psi_dept_in
(
16
)
check_mcms_psi_dept_in
(
16
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
try
:
main
()
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
print
(
f
"发生错误:
{
e
}
"
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air/a_b6流程十三请领业务流_三级库向二级库_数据库验证.py
View file @
e49dbfbc
...
@@ -820,13 +820,12 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id1):
...
@@ -820,13 +820,12 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id1):
else
:
else
:
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
def
main
()
:
pro_path
=
commonFuc
().
get_pro_path2
()
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
print
(
'pro_path'
,
pro_path
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
from
a_b6流程十三请领业务流_三级库向二级库
import
edit_goods_target
,
second_dept_Request
from
a_b6流程十三请领业务流_三级库向二级库
import
edit_goods_target
,
second_dept_Request
from
a_b6流程十三请领业务流_三级库向二级库
import
BuyCarSubmit
,
pick_execute
from
a_b6流程十三请领业务流_三级库向二级库
import
BuyCarSubmit
,
pick_execute
# # 设置部门用户
# # 设置部门用户
...
@@ -840,7 +839,7 @@ try:
...
@@ -840,7 +839,7 @@ try:
# 设置库区联系人
# 设置库区联系人
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid3"
],
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid3"
],
get_stockAreaId2_new_fromDb
(
deptName3
,
3
))
# 设置库区联系人
get_stockAreaId2_new_fromDb
(
deptName3
,
3
))
# 设置库区联系人
#三级科室产品分配
#
三级科室产品分配
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
])
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
])
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
# 设置登录账号默认权限是三级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
# 设置登录账号默认权限是三级库
...
@@ -863,8 +862,8 @@ try:
...
@@ -863,8 +862,8 @@ try:
for
i
in
range
(
6
):
# 三个单据共审批6次
for
i
in
range
(
6
):
# 三个单据共审批6次
approval_center
()
approval_center
()
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
#设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
#
设置登录账号默认权限是二级库
#二级科室领用出库
#
二级科室领用出库
# 低值拣货执行
# 低值拣货执行
pick_execute
()
pick_execute
()
...
@@ -877,7 +876,7 @@ try:
...
@@ -877,7 +876,7 @@ try:
check_mcms_psi_dept
(
16
)
check_mcms_psi_dept
(
16
)
check_mcms_psi_dept
(
20
)
check_mcms_psi_dept
(
20
)
check_mcms_psi_dept
(
66
)
check_mcms_psi_dept
(
66
)
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
#设置登录账号默认权限是三级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
#
设置登录账号默认权限是三级库
# 上面暂时注释===================================
# 上面暂时注释===================================
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
...
@@ -888,5 +887,8 @@ try:
...
@@ -888,5 +887,8 @@ try:
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
try
:
main
()
except
:
except
:
commonFuc
().
check_text_exist_result_text
(
'error '
,
'1'
)
commonFuc
().
check_text_exist_result_text
(
'error '
,
'1'
)
air_case/b6_spd3_core_business_flow_database_check/a_b7流程十四退库业务_消耗退库_数据库验证.air/a_b7流程十四退库业务_消耗退库_数据库验证.py
View file @
e49dbfbc
This diff is collapsed.
Click to expand it.
main1/main_text2.py
View file @
e49dbfbc
...
@@ -127,22 +127,22 @@ def main_text():
...
@@ -127,22 +127,22 @@ def main_text():
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
from
a_b4流程十一请领业务流_二级库向直送_数据库验证
import
main
from
a_b4流程十一请领业务流_二级库向直送_数据库验证
import
main
#
print('流程11执行完毕','flow11执行完毕')
print
(
'流程11执行完毕'
,
'flow11执行完毕'
)
# sys.exit(0)
# sys.exit(0)
def
flow12
():
def
flow12
():
print
(
'调用流程十二'
)
print
(
'调用流程十二'
)
sys
.
path
.
append
(
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
#
from a_b5流程十二请领业务流_二级库向二级库_数据库验证 import main
from
a_b5流程十二请领业务流_二级库向二级库_数据库验证
import
main
#
print('流程12执行完毕', 'flow12执行完毕')
print
(
'流程12执行完毕'
,
'flow12执行完毕'
)
# sys.exit(0)
# sys.exit(0)
def
flow13
():
def
flow13
():
print
(
'调用流程十三'
)
print
(
'调用流程十三'
)
sys
.
path
.
append
(
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
#
from a_b6流程十三请领业务流_三级库向二级库_数据库验证 import main
from
a_b6流程十三请领业务流_三级库向二级库_数据库验证
import
main
print
(
'流程13执行完毕'
,
'flow13执行完毕'
)
print
(
'流程13执行完毕'
,
'flow13执行完毕'
)
# sys.exit(0)
# sys.exit(0)
def
flow14
():
def
flow14
():
...
...
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