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
9de115b1
Commit
9de115b1
authored
Apr 01, 2024
by
xiao-hesheng
Browse files
新增带量采购目录脚本
parent
1bde27c3
Changes
10
Hide whitespace changes
Inline
Side-by-side
air_case/b3_herp3_purchase/a_l7_带量采购目录_列表查询_条件查询_精确查询_计划状态.air/a_l7_带量采购目录_列表查询_条件查询_精确查询_计划状态.py
View file @
9de115b1
...
...
@@ -46,7 +46,7 @@ def test1():
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_l7_带量采购目录_列表查询_条件查询_精确查询_计划状态
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
# 从文件中获取产品名称
info
=
FileUtils
().
r_info8
(
module
,
"产品明细信息"
,
'message6'
)
# print('info', info)
...
...
@@ -60,13 +60,13 @@ def test1():
goodsName
=
i
[
'goodsName'
]
goodsGeneralName
=
i
[
'goodsGeneralName'
]
break
list2
=
[
hosGoodsCode
,
goodsName
,
goodsGeneralName
]
list2
=
[
hosGoodsCode
,
goodsName
,
goodsGeneralName
]
# # #获取日期
date1
=
timeUtils
().
get_time_hms
(
2
)
date2
=
timeUtils
().
get_time_add
(
1
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_13"
,
projectname
,
i
,
date1
,
date2
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_13"
,
projectname
,
i
,
date1
,
date2
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
...
...
@@ -75,16 +75,16 @@ def test1():
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
1
:
if
code
==
0
and
total
==
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
#以此选择计划状态进行查询
str
=
commonFuc
().
get_business_data
(
module
,
'status2'
)
#
以此选择计划状态进行查询
str
=
commonFuc
().
get_business_data
(
module
,
'status2'
)
list2
=
list
(
str
.
split
(
","
))
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_14"
,
i
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_14"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
...
...
@@ -93,9 +93,10 @@ def test1():
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
>=
0
:
if
code
==
0
and
total
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称.air/a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称,id2297,id2297-118,sit,on
内网:a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称
用例名称:a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_l8_带量采购目录_列表查询_条件查询_模糊查询_项目名称
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
list2
=
commonFuc
().
get_str
(
projectname
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_10"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称.air/a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称,id2297,id2297-119,sit,on
内网:a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称
用例名称:a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_l9_带量采购目录_列表查询_条件查询_模糊查询_产品名称
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
# 从文件中获取产品名称
info
=
FileUtils
().
r_info8
(
module
,
"产品明细信息"
,
'message6'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
# print('list_a', list_a)
hosGoodsCode
=
'hosGoodsCode'
goodsName
=
'goodsName'
goodsGeneralName
=
'goodsGeneralName'
for
i
in
list_a
:
hosGoodsCode
=
i
[
'hosGoodsCode'
]
goodsName
=
i
[
'goodsName'
]
goodsGeneralName
=
i
[
'goodsGeneralName'
]
break
list2
=
[
hosGoodsCode
,
goodsName
,
goodsGeneralName
]
for
i
in
list2
:
list3
=
commonFuc
().
get_str
(
i
)
for
j
in
list3
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_11"
,
projectname
,
j
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称.air/a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称,id2297,id2297-120,sit,on
内网:a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称
用例名称:a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_m0_带量采购目录_列表查询_条件查询_异常查询_项目名称
str
=
commonFuc
().
get_business_data
(
module
,
'data3'
)
list2
=
list
(
str
.
split
(
","
))
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_10"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称.air/a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称,id2297,id2297-121,sit,on
内网:a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称
用例名称:a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_m1_带量采购目录_列表查询_条件查询_异常查询_产品名称
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
# 从文件中获取产品名称
info
=
FileUtils
().
r_info8
(
module
,
"产品明细信息"
,
'message6'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
# print('list_a', list_a)
hosGoodsCode
=
'hosGoodsCode'
goodsName
=
'goodsName'
goodsGeneralName
=
'goodsGeneralName'
for
i
in
list_a
:
hosGoodsCode
=
i
[
'hosGoodsCode'
]
goodsName
=
i
[
'goodsName'
]
goodsGeneralName
=
i
[
'goodsGeneralName'
]
break
list2
=
[
hosGoodsCode
,
goodsName
,
goodsGeneralName
]
str
=
commonFuc
().
get_business_data
(
module
,
'data3'
)
list2
=
list
(
str
.
split
(
","
))
for
j
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_11"
,
projectname
,
j
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_m2_带量采购目录_列表查询_条件查询_异常查询_计划日期.air/a_m2_带量采购目录_列表查询_条件查询_异常查询_计划日期.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_l6_带量采购目录_列表查询_条件查询_精确查询_日期,id2297,id2297-122,sit,on
内网:a_l6_带量采购目录_列表查询_条件查询_精确查询_日期
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_l6_带量采购目录_列表查询_条件查询_精确查询_日期
用例名称:a_l6_带量采购目录_列表查询_条件查询_精确查询_日期
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# a_l6_带量采购目录_列表查询_条件查询_精确查询_日期
projectname
=
commonFuc
().
get_business_data
(
module
,
"projectname"
)
# 从文件中获取产品名称
info
=
FileUtils
().
r_info8
(
module
,
"产品明细信息"
,
'message6'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
# print('list_a', list_a)
hosGoodsCode
=
'hosGoodsCode'
goodsName
=
'goodsName'
goodsGeneralName
=
'goodsGeneralName'
for
i
in
list_a
:
hosGoodsCode
=
i
[
'hosGoodsCode'
]
goodsName
=
i
[
'goodsName'
]
goodsGeneralName
=
i
[
'goodsGeneralName'
]
break
list2
=
[
hosGoodsCode
,
goodsName
,
goodsGeneralName
]
# # #获取日期
date1
=
timeUtils
().
get_time_hms
(
2
)
date2
=
timeUtils
().
get_time_add
(
1
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_12"
,
projectname
,
i
,
date2
,
date1
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
air_case/b3_herp3_purchase/a_m3_带量采购目录_列表_分页查询.air/a_m3_带量采购目录_列表_分页查询.py
0 → 100644
View file @
9de115b1
# -*- encoding=utf8 -*-
from
common.db.sql.sql_del_branch_info
import
delData
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_m3_带量采购目录_列表_分页查询,id2297,id2297-123,sit,on
内网:a_m3_带量采购目录_列表_分页查询
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_m3_带量采购目录_列表_分页查询
用例名称:a_m3_带量采购目录_列表_分页查询
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_vbp_listPage_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# 分页查询
str
=
commonFuc
().
get_business_data
(
module
,
'data6'
)
list2
=
list
(
str
.
split
(
","
))
print
(
'list2'
,
list2
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload22_15"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
pageSize
=
commonFuc
().
analysis_json
(
'pageSize'
,
data
)
if
code
==
0
and
pageSize
==
int
(
i
):
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
#删除数据
delData
().
Delete_ld_directory
()
\ No newline at end of file
common/db/sql/sql_del_branch_info.py
View file @
9de115b1
...
...
@@ -165,7 +165,23 @@ class delData(object):
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
print
(
'临采任务子表信息删除成功 '
)
print
(
'临采任务主表信息删除成功 '
)
cursor
.
close
()
def
Delete_ld_directory
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
# 删除用户信息
sql
=
"delete from mcms_vbp_detail where pid in(select id from mcms_vbp where project_name like '%自动化测试%');"
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
print
(
'带量项目子表信息删除成功 '
)
sql
=
"delete from mcms_vbp where project_name like '%自动化测试%';"
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
print
(
'带量项目主表信息删除成功 '
)
cursor
.
close
()
# delData().Delete_branch_by_id()
# delData().Delete_goods_change_info()
...
...
data/b3_herp3_purchase/data
View file @
9de115b1
...
...
@@ -173,6 +173,7 @@ json_headers2: {
"payload22_12": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","projectName":"%s","goodsName":"%s","startTime":"%s","endTime":"%s"}}
"payload22_13": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","projectName":"%s","goodsName":"%s","tbStatus":20,"startTime":"%s","endTime":"%s"}}
"payload22_14": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","projectName":"","goodsName":"","tbStatus":"%s","startTime":"","endTime":""}}
"payload22_15": {"pageNum":1,"pageSize":"%s","queryObject":{"orderNo":"","projectName":"","goodsName":"","tbStatus":"","startTime":"","endTime":""}}
checkDict2: {"code": 0,'msg': None,'data':1}
report/summary.html
View file @
9de115b1
...
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
5
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
2
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -72,9 +72,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_
l7
_带量采购目录_列表
查询_条件查询_精确查询_计划状态
/log.html'
target=
'_blank'
>
a_
l7
_带量采购目录_列表
查询_条件查询_精确查询_计划状态
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_
m3
_带量采购目录_列表
_分页查询
/log.html'
target=
'_blank'
>
a_
m3
_带量采购目录_列表
_分页查询
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
5.21
7
</td>
<td
class=
"details-col-elapsed"
>
2.67
7
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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