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
e2d80585
Commit
e2d80585
authored
Oct 09, 2024
by
xiao-hesheng
Browse files
流程五脚本提交
parent
99fa5809
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算_数据库验证.air/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算_数据库验证.py
View file @
e2d80585
...
...
@@ -679,10 +679,12 @@ def check_mcms_out_balance_detail(type=1, pid=""):
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
bar_id
=
get_id
(
"select bar_id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;"
%
(
pid
))
bar_code
=
get_id
(
"select bar_code from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;"
%
(
pid
))
from_id
=
get_id
(
"select id from mcms_
psi_batch where hos_goods_id='%s' order by CREATE_TIME desc
LIMIT 1;"
%
(
hos_goods_
id
))
"select
from_
id from
mcms_
out_balance_detail where pid='%s' order by id
LIMIT 1;"
%
(
p
id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
...
...
@@ -702,10 +704,10 @@ def check_mcms_out_balance_detail(type=1, pid=""):
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='
C
K_
TH
' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='
R
K_
YS
' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_
091
8_1'
,
id
,
'check_mcms_out_balance_detail_
100
8_1'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
...
...
@@ -802,7 +804,7 @@ def check_mcms_out_balance_detail2(type=1, pid=""):
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_
091
8_2'
,
id
,
'check_mcms_out_balance_detail_
100
8_2'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
...
...
@@ -904,7 +906,7 @@ def check_mcms_out_balance_approve_after(type=1, OBh_ID=""):
check_user
=
create_user
check_time
=
get_create_time
(
"select check_time from mcms_out_balance where id='%s';"
%
id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_
091
9'
,
id
,
'check_mcms_out_balance_
100
9'
,
id
,
order_no
,
branch_id
,
hos_id
,
prov_id
,
prov_name
,
settle_month
,
settle_start_time
,
settle_end_time
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
check_user
,
check_time
...
...
@@ -976,12 +978,16 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
# from_id = get_id(
# "select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (hos_goods_id))
# from_order_no = get_id(
# "select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
# hos_goods_id))
from_id
=
get_id
(
"select id from mcms_
psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_
id
))
"select
from_
id from
mcms_
out_balance_detail where id='%s';"
%
(
id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
"select from_order_no from mcms_out_balance_detail where id='%s';"
%
(
id
))
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance_detail where id='%s';"
%
id
)
...
...
@@ -1000,7 +1006,7 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_
091
9_1'
,
id
,
'check_mcms_out_balance_detail_
100
9_1'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
...
...
@@ -1155,10 +1161,10 @@ try:
# OBD_ID = settle()# 生成结算单
# print(OBD_ID)
# time.sleep(6)
OBD_ID
=
'OBh03472024100
8
0005'
check_mcms_out_balance
(
1
,
OBD_ID
)
# 检查审批前的结算数据
# 调用审批结算单
approval_center
(
OBD_ID
)
OBD_ID
=
'OBh03472024100
9
0005'
#
check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
#
#
调用审批结算单
#
approval_center(OBD_ID)
time
.
sleep
(
6
)
check_mcms_out_balance_approve_after
(
1
,
OBD_ID
)
# 检查审批后的结算数据
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
...
...
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