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
4c1279b8
Commit
4c1279b8
authored
Jul 19, 2024
by
xiao-hesheng
Browse files
数据库验证流程十一脚本编写
parent
d29b23a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air/a_b4流程十一请领业务流_二级库向直送_数据库验证.py
View file @
4c1279b8
...
@@ -1532,7 +1532,7 @@ def check_mcms_check_batch(type,check_no,order_no,hos_goods_id):
...
@@ -1532,7 +1532,7 @@ def check_mcms_check_batch(type,check_no,order_no,hos_goods_id):
source_detail_id
=
distr_detail_id
source_detail_id
=
distr_detail_id
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
sql
=
"select id from
mcms_pkg
where
pkg
_type='%s'order by create_time desc LIMIT 1;"
%
bill_mode
sql
=
"select id from
hdi_barcode
where
code
_type='%s'order by create_time desc LIMIT 1;"
%
bill_mode
barcode_id
=
get_id
(
sql
)
barcode_id
=
get_id
(
sql
)
create_user
=
get_login_user_uxid
()
create_user
=
get_login_user_uxid
()
create_time
=
get_create_time
(
"select create_time from mcms_check_batch where pid='%s'"
%
check_no
)
create_time
=
get_create_time
(
"select create_time from mcms_check_batch where pid='%s'"
%
check_no
)
...
@@ -1541,21 +1541,21 @@ def check_mcms_check_batch(type,check_no,order_no,hos_goods_id):
...
@@ -1541,21 +1541,21 @@ def check_mcms_check_batch(type,check_no,order_no,hos_goods_id):
if
type
==
1
:
if
type
==
1
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch'
,
id
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch'
,
id
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
mdm_goods_code
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
)
elif
type
==
2
:
elif
type
==
2
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch1'
,
id
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch1'
,
id
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
mdm_goods_code
,
mdm_goods_code
,
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
)
else
:
else
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch2'
,
id
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_check_batch2'
,
id
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
pid
,
order_no
,
source_detail_id
,
distr_detail_id
,
hos_goods_id
,
mdm_goods_code
,
mdm_goods_code
,
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
goods_code
,
barcode_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
)
# 对比预期值和实际值是否一致
# 对比预期值和实际值是否一致
# comparison_result(actual, expected)
# comparison_result(actual, expected)
...
@@ -1591,66 +1591,66 @@ try:
...
@@ -1591,66 +1591,66 @@ try:
from
a_b4流程十一请领业务流_二级库向直送
import
check_accept_order
from
a_b4流程十一请领业务流_二级库向直送
import
check_accept_order
for
i
in
range
(
1
):
for
i
in
range
(
1
):
#
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
#
goods_move2() # 设置产品出库渠道为直送
goods_move2
()
# 设置产品出库渠道为直送
# #
#
低值
# # 低值
#
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
],
1
)
#
check_mcms_dept_buy_car(1)
check_mcms_dept_buy_car
(
1
)
# #
#
高值
# # 高值
#
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
],
2
)
#
check_mcms_dept_buy_car(2)
check_mcms_dept_buy_car
(
2
)
# #
#
试剂
# # 试剂
#
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
],
3
)
#
check_mcms_dept_buy_car(3)
check_mcms_dept_buy_car
(
3
)
#
BuyCarSubmit() # 请领车提交
BuyCarSubmit
()
# 请领车提交
#
#
list_data = ['16', '20', '66']
list_data
=
[
'16'
,
'20'
,
'66'
]
#
for i in list_data:
for
i
in
list_data
:
#
check_mcms_dept_buy(int(i))
check_mcms_dept_buy
(
int
(
i
))
#
mcms_dept_buy_detail(int(i))
mcms_dept_buy_detail
(
int
(
i
))
#
for i in range(6): # 三个单据共审批6次
for
i
in
range
(
6
):
# 三个单据共审批6次
#
approval_center()
approval_center
()
#
list_data = ['16', '20', '66']
list_data
=
[
'16'
,
'20'
,
'66'
]
#
for i in list_data:
for
i
in
list_data
:
#
check_mcms_dept_buy_approval_after(int(i))
check_mcms_dept_buy_approval_after
(
int
(
i
))
#
mcms_dept_buy_detail_approval_after(int(i))
mcms_dept_buy_detail_approval_after
(
int
(
i
))
#
#
time.sleep(20)
time
.
sleep
(
20
)
#
#
检查自动生成的采购计划数据
# 检查自动生成的采购计划数据
#
list_data = ['16', '20', '66']
list_data
=
[
'16'
,
'20'
,
'66'
]
#
for i in list_data:
for
i
in
list_data
:
#
check_mcms_mcms_pur_plan(int(i))
check_mcms_mcms_pur_plan
(
int
(
i
))
#
#
采购模块处理
# 采购模块处理
#
purchase_module_process()
purchase_module_process
()
#
#
#
三个单据共审批三次
# 三个单据共审批三次
#
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号试剂', 'message12'))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
#
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号', 'message7'))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
#
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号高值', 'message11'))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
#
time.sleep(20)
time
.
sleep
(
20
)
#
list_data = ['16', '20', '66']
list_data
=
[
'16'
,
'20'
,
'66'
]
#
for i in list_data:
for
i
in
list_data
:
#
check_mcms_purchase(int(i))
check_mcms_purchase
(
int
(
i
))
#
#
#检查同步到外网的采购订单数据跟内网的是否一致
#检查同步到外网的采购订单数据跟内网的是否一致
#
check_mcms_purchase_out_and_in(1)
check_mcms_purchase_out_and_in
(
1
)
#
print('检查同步到外网的采购订单数据跟内网的是否一致')
print
(
'检查同步到外网的采购订单数据跟内网的是否一致'
)
#
check_mcms_purchase_out_and_in(2)
check_mcms_purchase_out_and_in
(
2
)
#
order_dp(1) # 1低值
order_dp
(
1
)
# 1低值
#
time.sleep(6)
time
.
sleep
(
6
)
#
order_dp(2) # 2高值
order_dp
(
2
)
# 2高值
#
time.sleep(6)
time
.
sleep
(
6
)
#
order_dp(3) # 3试剂
order_dp
(
3
)
# 3试剂
#
time.sleep(6)
time
.
sleep
(
6
)
#
time.sleep(20)
time
.
sleep
(
20
)
#
list_data = ['16', '20', '66']
list_data
=
[
'16'
,
'20'
,
'66'
]
#
for i in list_data:
for
i
in
list_data
:
#
time.sleep(6)
time
.
sleep
(
6
)
#
check_hdi_distr(int(i))
check_hdi_distr
(
int
(
i
))
#
#
time.sleep(20)
time
.
sleep
(
20
)
#
check_accept_order(1) # 低值
check_accept_order
(
1
)
# 低值
#
time.sleep(6)
time
.
sleep
(
6
)
# 上面暂时注释========================================
# 上面暂时注释========================================
check_mcms_check
(
1
)
# 调用函数检查验收单数据库写值
check_mcms_check
(
1
)
# 调用函数检查验收单数据库写值
...
...
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