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
c9216aa4
Commit
c9216aa4
authored
Nov 20, 2024
by
xiao-hesheng
Browse files
流程一脚本提交
parent
ef29646b
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b7流程十四退库业务_消耗退库_数据库验证.air/a_b7流程十四退库业务_消耗退库_数据库验证.py
View file @
c9216aa4
...
...
@@ -911,6 +911,106 @@ def check_mcms_psi_dept_XH_CK(type1=10,type2=16):
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_his_order
(
type1
=
10
):
print
(
'检查his_order数据'
)
branch_id
=
get_branch_id
()
sql
=
" select * from his_order where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
print
(
actual
)
DR_ID
=
get_id
(
" select id from his_order where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
))
sql
=
"select order_no from his_order where id='%s';"
%
DR_ID
order_no
=
get_id
(
sql
)
target_corp_id
=
get_hosid
()
target_branch_id
=
get_branch_id
()
target_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
target_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
target_stock_id
=
get_stockId_fromdb
(
target_dept_name
+
'库房'
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
2
)
PICK_id
=
get_PICK_id
(
branch_id
,
type1
)
source_id
=
PICK_id
source_corp_id
=
get_hosid
()
source_branch_id
=
get_branch_id
()
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
buyBillId
=
get_buyBillId
(
branch_id
,
type1
)
pickOrderNo
=
get_PICK_order_no
(
branch_id
,
type1
)
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
type1
)
pickBillId
=
get_PICK_id
(
branch_id
,
type1
)
psiDeptOutBillId
=
DR_ID
psiDeptOutOrderNo
=
order_no
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_time
=
get_create_time
(
"select create_time from his_order where id='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from his_order where id='%s';"
%
DR_ID
)
last_modified_user
=
create_user
accounter
=
create_user
account_date
=
process_tuple
(
get_create_time
(
"select account_date from his_order where id='%s';"
%
DR_ID
))
if
type1
==
10
:
his_charge_no
=
get_id
(
" select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
DR_ID
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'his_order1'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
his_charge_no
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type1
==
67
:
his_charge_no
=
get_id
(
" select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
DR_ID
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'his_order2'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
his_charge_no
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
else
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'his_order3'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
print
(
'expected'
,
expected
)
print
(
'aaaaaaaaaaaaaaaaa'
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
#========================================================
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
...
...
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