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
31f1d700
Commit
31f1d700
authored
Sep 13, 2023
by
xiao-hesheng
Browse files
优化脚本
parent
af536952
Changes
7
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-hs/注册医院审核通过.air/注册医院审核通过.py
View file @
31f1d700
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核通过,id2249,id2249-
3
,sit,on,20230907
case_tag:api,mdm-web,注册医院审核通过,id2249,id2249-
4
,sit,on,20230907
主数据平台:注册医院审核通过
主数据平台:注册医院审核通过
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/注册医院审核驳回.air/注册医院审核驳回.py
View file @
31f1d700
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核驳回,id2249,id2249-
4
,sit,on,202309072
case_tag:api,mdm-web,注册医院审核驳回,id2249,id2249-
5
,sit,on,202309072
主数据平台:注册医院审核驳回
主数据平台:注册医院审核驳回
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-pim/产品新增和审核通过.air/产品新增和审核通过.py
View file @
31f1d700
# -*- encoding=utf8 -*-
# -*- encoding=utf8 -*-
from
common.timeUtils
import
timeUtils
from
common.timeUtils
import
timeUtils
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
...
@@ -35,7 +35,7 @@ def Enterprise_audit():
...
@@ -35,7 +35,7 @@ def Enterprise_audit():
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 获取请求头信息
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
@@ -108,7 +108,7 @@ def p_m_a():
...
@@ -108,7 +108,7 @@ def p_m_a():
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 分页查询供应商产品数据接口
# 分页查询供应商产品数据接口
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
...
@@ -224,6 +224,5 @@ def p_m_a():
...
@@ -224,6 +224,5 @@ def p_m_a():
print
(
'username'
,
username
)
print
(
'username'
,
username
)
return
username
,
goodsName
,
module
return
username
,
goodsName
,
module
# p_m_a()
# p_m_a()
from
common.timeUtils
import
timeUtils
from
common.fileUtls
import
FileUtils
FileUtils
().
w_info
(
p_m_a
(),
'产品新增'
)
FileUtils
().
w_info
(
p_m_a
(),
'产品新增'
)
air_case/mdm3-pim/产品规格
新增和审核通过
.air/产品规格
新增和审核通过
.py
→
air_case/mdm3-pim/产品规格
申报
.air/产品规格
申报
.py
View file @
31f1d700
...
@@ -17,23 +17,34 @@ module = "mdm3-pim"
...
@@ -17,23 +17,34 @@ module = "mdm3-pim"
# 登录
# 登录
info
=
FileUtils
().
r_info
(
module
,
'产品新增'
)
info
=
FileUtils
().
r_info
(
module
,
'产品新增'
)
username
=
info
[
'username'
]
username
=
info
[
'username'
]
goodsname
=
info
[
'goodsname'
]
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
#
# 分页查询供应商
产品数据
接口
#
查询已添加
产品数据
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url")
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
#
#
# # 获取请求头信息
# # 获取请求头信息
# headers = commonFuc().get_business_data(module, "json_headers2",
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
# commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
# projectCode)
projectCode
)
# request_body = commonFuc().get_business_data(module, "payload", corpId)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
corpId
,
goodsname
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'查询已添加产品信息'
,
result
)
MGID
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
#产品规格申报===============================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitGoodsSpecsRegist_url"
)
#
#
# # 发送请求
# # 获取请求头信息
# result = commonFuc().http_post(url, request_body, headers)
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload11"
,
MGID
,
goodsname
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'产品规格申报'
,
result
)
data/mdm3-pim/data
View file @
31f1d700
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/"
"getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/"
"handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/"
"handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/"
"submitGoodsSpecsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsSpecsRegist/"
"username": "1679886114521"
"username": "1679886114521"
"password": "a123456!"
"password": "a123456!"
...
@@ -301,7 +302,41 @@ json_headers2: {
...
@@ -301,7 +302,41 @@ json_headers2: {
},
},
"version": 1
"version": 1
}
}
"payload10": {
"pageNum": 1,
"pageSize": 20,
"queryObject": {
"pid": "",
"provId": "%s",
"goodsName": "%s",
"goodsMfrsName": "",
"isAbroad": "",
"purpose": "",
"mgrLevel": "",
"status": 0
}
}
"payload11": {
"registSourceProject": "h0347",
"goodsRegistVO": {
"id": "%s",
"goodsMfrsId": "p56a4",
"goodsName": "%s"
},
"goodsSpecsRegistVOList": [
{
"goodsGg": "20ml",
"miGoodsGg": "20ml",
"miGoodsXh": "20ml",
"goodsUseUnit": "支",
"mi27code": "123456789012243454",
"udiCode": "12345678901234",
"diType":"0",
"rowNum": 1
}
]
}
"name1": "一次性注射器"
"name1": "一次性注射器"
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
...
...
data/mdm3-pim/message
View file @
31f1d700
产品新增:
产品新增:
username: 国药集团公司
&ms2w
username: 国药集团公司
T)^Qj
goodsname: 一次性注射器
jtwfK
goodsname: 一次性注射器
uP^fo
report/summary.html
View file @
31f1d700
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
0
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -72,9 +72,9 @@
...
@@ -72,9 +72,9 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
注册企业锁定认领审核流程
/log.html'
target=
'_blank'
>
注册企业锁定认领审核流程
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
产品规格新增和审核通过
/log.html'
target=
'_blank'
>
产品规格新增和审核通过
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
1.268
</td>
<td
class=
"details-col-elapsed"
>
0.833
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
</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