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
93ddcb5c
Commit
93ddcb5c
authored
Jul 16, 2024
by
xiao-hesheng
Browse files
数据库验证流程十一脚本编写
parent
136fe6f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/public1/public1/public1.py
View file @
93ddcb5c
...
...
@@ -589,36 +589,39 @@ def get_udi1(type=1): # 库存明细查询获取条码
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
# pkgcode = data1['pkgCodeSee']
# pkgcode1 = pkgcode[0:20]
# pkgcode2 = pkgcode[21:len(pkgcode)]
# print(pkgcode1, pkgcode2)
# 013530000003170010333\x1D112404261724110221UT240426000001802
# print('aaaaaaaaaaaaaaaaa', data1[0]['pkgCodeSee'])
# pkgcode='pkgcode'
print
(
'条码库存result'
,
result
)
pkgCodeSee
=
'pkgCodeSee'
for
i
in
data1
:
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
print
(
'lockStatus'
,
lockStatus
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
pkgcode
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
# # 将条码信息写入文件
list_a
=
[]
list_b
=
[]
list_c
=
[]
list_a
.
append
(
i
)
list_b
.
append
(
i
)
list_c
.
append
(
i
)
# print('list_a', len(list_a), list_a)
info
=
(
list_a
,
list_b
,
list_c
)
titlename
=
(
'list_a'
,
'list_b'
,
'list_c'
)
# 将条码信息写入文件
FileUtils
().
w_info8
(
info
,
module
,
'条码信息'
,
titlename
,
'message18'
)
break
return
pkgCodeSee
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
>=
1
:
# pkgcode = data1['pkgCodeSee']
# pkgcode1 = pkgcode[0:20]
# pkgcode2 = pkgcode[21:len(pkgcode)]
# print(pkgcode1, pkgcode2)
# 013530000003170010333\x1D112404261724110221UT240426000001802
# print('aaaaaaaaaaaaaaaaa', data1[0]['pkgCodeSee'])
# pkgcode='pkgcode'
print
(
'条码库存result'
,
result
)
pkgCodeSee
=
'pkgCodeSee'
for
i
in
data1
:
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
print
(
'lockStatus'
,
lockStatus
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
pkgcode
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
# # 将条码信息写入文件
list_a
=
[]
list_b
=
[]
list_c
=
[]
list_a
.
append
(
i
)
list_b
.
append
(
i
)
list_c
.
append
(
i
)
# print('list_a', len(list_a), list_a)
info
=
(
list_a
,
list_b
,
list_c
)
titlename
=
(
'list_a'
,
'list_b'
,
'list_c'
)
# 将条码信息写入文件
FileUtils
().
w_info8
(
info
,
module
,
'条码信息'
,
titlename
,
'message18'
)
break
return
pkgCodeSee
else
:
print
(
'没有库存,没有库存没有库存没有库存没有库存'
)
# for i in data1:
# lockStatus = commonFuc().analysis_json('lockStatus', i)
# if lockStatus == 0:
...
...
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