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
66b97cc1
Commit
66b97cc1
authored
Jul 23, 2024
by
xiao-hesheng
Browse files
数据库验证流程十二脚本编写
parent
fb41b191
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air/a_b5流程十二请领业务流_二级库向二级库_数据库验证.py
View file @
66b97cc1
...
...
@@ -328,7 +328,7 @@ def check_mcms_psi_dept(type=16):
pickBillId
=
get_PICK_id
(
branch_id
,
type
)
psiDeptOutBillId
=
DR_ID
psiDeptOutOrderNo
=
order_no
create_user
=
get_login_user_uxid
(
)
create_user
=
get_login_user_uxid
_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
]
)
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept where id='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept where id='%s';"
%
DR_ID
)
last_modified_user
=
create_user
...
...
@@ -350,7 +350,7 @@ def check_mcms_psi_dept(type=16):
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
else
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_dept
_buy5_
3'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
'mcms_
psi_
dept3'
,
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
,
buyBillId
,
pickOrderNo
,
buyOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
...
...
@@ -437,11 +437,13 @@ try:
# 上面暂时注释========================
#检查出库单
# check_mcms_psi_dept(16)
check_mcms_psi_dept
(
20
)
#
check_mcms_psi_dept(20)
check_mcms_psi_dept
(
66
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
except
Exception
as
e
:
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
common/db/sql/sql_tools.py
View file @
66b97cc1
...
...
@@ -170,6 +170,18 @@ def get_id(sql):
cursor
.
close
()
return
new_str1
def
get_login_user_uxid_bydb
(
username
):
db
,
cursor
=
get_sql_conn
()
cursor
.
execute
(
"select id from sys_user where user_code='%s'"
%
username
)
results
=
cursor
.
fetchone
()
str1
=
str
(
results
)
new_str1
=
str1
.
replace
(
',)'
,
''
)
new_str1
=
new_str1
.
replace
(
'('
,
''
)
new_str1
=
new_str1
.
replace
(
','
,
''
)
new_str1
=
new_str1
.
replace
(
"'"
,
''
)
# print(new_str1)
cursor
.
close
()
return
new_str1
def
get_dept_buy_id
(
sql
):
db
,
cursor
=
get_sql_conn
()
...
...
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