Commit 622daf9f authored by xiao-hesheng's avatar xiao-hesheng
Browse files

供货关系申请_客户类型(医院)_登录_医院登录获取医院id

供货关系申请_客户类型(医院)_登录_企业登录
供货关系申请_客户类型(医院)_供销关系申请提交
parent 90bf8231
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,a1供货关系申请_客户类型_医院_登录_医院登录获取医院id,id2255,id2255-1,sit,on
主数据平台:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
def h_login():
module = "mdm3_cm"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_hs\\注册医院审核通过.air')
using(pro_path+r'\\air_case\\mdm3_es\\注册医院审核通过.air')
from 注册医院审核通过 import reg_and_audit_hospital
h_name=reg_and_audit_hospital()
"""
场景:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
用例名称:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
输入:用户名,密码
输出:"rtn_msg": token
"""
#供货关系申请_客户类型_医院_登录_医院登录获取医院id
username = h_name
# print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password)
# 获取token和projectCode
token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
return token,projectCode,uxid,corpId
h_login()
\ No newline at end of file
# -*- encoding=utf8 -*-
from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,a2供货关系申请_客户类型_医院_登录_企业登录,id2255,id2255-2,sit,on
主数据平台:a2供货关系申请_客户类型_医院_登录_企业登录
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
def e_login():
module = "mdm3_cm"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air')
from a8产品新增和审核通过 import Enterprise_audit
username=Enterprise_audit()
"""
场景:a2供货关系申请_客户类型_医院_登录_企业登录
用例名称:a2供货关系申请_客户类型_医院_登录_企业登录
输入:用户名,密码
输出:"rtn_msg": token
"""
#a2供货关系申请_客户类型_医院_登录_企业登录
# print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password)
# 获取token和projectCode
token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
return token,projectCode,uxid,corpId
e_login()
\ No newline at end of file
# -*- encoding=utf8 -*-
from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,a3供货关系申请_客户类型_医院_供销关系申请提交,id2255,id2255-3,sit,on
主数据平台:a3供货关系申请_客户类型_医院_供销关系申请提交
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
def supply_and_marketing_apply():
module = "mdm3_cm"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air')
using(pro_path+r'\\air_case\\mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air')
from a2供货关系申请_客户类型_医院_登录_企业登录 import e_login
token,projectCode,uxid,corpId=e_login()
#获取医院corpId
sys.path.append(pro_path + r'\\air_case\\mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
using(pro_path + r'\\air_case\\mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
from a1供货关系申请_客户类型_医院_登录_医院登录获取医院id import h_login
h_token,h_projectCode,h_uxid,h_corpId=h_login()
"""
场景:a3供货关系申请_客户类型_医院_供销关系申请提交
用例名称:a3供货关系申请_客户类型_医院_供销关系申请提交
输入:h_corpId,contactUser,contactWay
输出:"rtn_msg": ok
"""
# module = "mdm3_cm"
#a3供货关系申请_客户类型_医院_供销关系申请提交
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submitSupplyRelation_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
contactUser=commonFuc().randomString(5)
contactWay=contactUser
request_body = commonFuc().get_business_data(module, "payload",h_corpId,contactUser,contactWay)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result',result)
# #获取接口返回数据
#
check_dict= commonFuc().get_business_data(module, "checkDict")
commonFuc().check_result(check_dict,result)
supply_and_marketing_apply()
\ No newline at end of file
......@@ -9,85 +9,86 @@ case_tag:api,mdm-web,注册医院审核通过,id2249,id2249-4,sit,on,20230907
主数据平台:注册医院审核通过
"""
from common.common_func import commonFuc
def reg_and_audit_hospital():
module = "mdm3_hs"
# 注册医院
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "insertHosRegistInfo_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
commonFuc().get_business_data(module, "json_contentType"))
print(headers)
h_name = commonFuc().get_business_data(module, "name1") # 获取前缀name
h_name = h_name + commonFuc().randomString(5) # 随机数生成拼接医院名称
request_body = commonFuc().get_business_data(module, "payload", h_name, h_name, h_name, h_name, h_name, h_name, h_name,
h_name)
print(request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print(result)
module = "mdm3_hs"
# 医院审核接口_查询数据_开始
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload2", h_name)
# 发送请求
result1 = commonFuc().http_post(url, request_body, headers)
# 获取接口返回数据
id1 = commonFuc().analysis_json('id', result1)
# print('id1',id1)
code = commonFuc().analysis_json('code', result1)
# print('code',code)
# 断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
# 断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code, result1)
# ===============医院注册提交接口_查询数据_结束
# 注册医院
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "insertHosRegistInfo_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
commonFuc().get_business_data(module, "json_contentType"))
print(headers)
h_name = commonFuc().get_business_data(module, "name1") # 获取前缀name
h_name = h_name + commonFuc().randomString(5) # 随机数生成拼接医院名称
request_body = commonFuc().get_business_data(module, "payload", h_name, h_name, h_name, h_name, h_name, h_name, h_name,
h_name)
print(request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print(result)
# 医院审核接口_查询数据_开始
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload2", h_name)
# 发送请求
result1 = commonFuc().http_post(url, request_body, headers)
# 获取接口返回数据
id1 = commonFuc().analysis_json('id', result1)
# print('id1',id1)
code = commonFuc().analysis_json('code', result1)
# print('code',code)
# 断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
# 断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code, result1)
# ===============医院注册提交接口_查询数据_结束
# 锁定医院
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
commonFuc().get_business_data(module, "json_contentType"))
# 调用函数获取时间
now = timeUtils().get_time_hms()
request_body = commonFuc().get_business_data(module, "payload3", id1, uxid, now)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('abc',result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
# print(check_dict)
# #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# #=============== 锁定结束
#
# 锁定医院
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
commonFuc().get_business_data(module, "json_contentType"))
# 调用函数获取时间
now = timeUtils().get_time_hms()
request_body = commonFuc().get_business_data(module, "payload3", id1, uxid, now)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('abc',result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
# print(check_dict)
# #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# #=============== 锁定结束
#
# #医院注册_审核通过_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "checkHosRegistInfo_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload4", id1, now, now, h_name, uxid, h_name, h_name, h_name,
h_name, h_name, h_name, h_name, now, now, uxid)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# #获取接口返回数据
# code = commonFuc().analysis_json('code', result)
check_dict2 = commonFuc().get_business_data(module, "checkDict2")
#
# #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict2, result)
# #===============医院注册提交接口_审核通过_结束
# #医院注册_审核通过_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "checkHosRegistInfo_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload4", id1, now, now, h_name, uxid, h_name, h_name, h_name,
h_name, h_name, h_name, h_name, now, now, uxid)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# #获取接口返回数据
# code = commonFuc().analysis_json('code', result)
check_dict2 = commonFuc().get_business_data(module, "checkDict2")
#
# #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict2, result)
# #===============医院注册提交接口_审核通过_结束
return h_name
reg_and_audit_hospital()
\ No newline at end of file
......@@ -11,7 +11,7 @@ __author__ = "xiaohesheng"
case_tag:api,mdm-web,查询器械注册人,id2254,id2254-2,sit,on
主数据平台:器械注册人申报
"""
module = "mdm3_ir"
"""
场景:器械注册人申报
......@@ -19,6 +19,7 @@ module = "mdm3_ir"
输入:name
输出:"rtn_msg": "ok"
"""
module = "mdm3_ir"
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
......
......@@ -52,3 +52,5 @@ result = commonFuc().http_post(url, request_body, headers)
checkDict=commonFuc().get_business_data(module,'checkDict')
commonFuc().check_result(checkDict, result)
......@@ -8,7 +8,7 @@ import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,器械注册人审核驳回,id2254aa,id2254-0,sit,on
case_tag:api,mdm-web,器械注册人审核驳回,id2254,id2254-10,sit,on
主数据平台:器械注册人审核驳回
"""
module = "mdm3_ir"
......@@ -18,17 +18,21 @@ pro_path=commonFuc().get_pro_path()
#申报
sys.path.append(pro_path+r'\\air_case\\mdm3_ir\\a2器械注册人申报.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a2器械注册人申报.air')
from a2器械注册人申报 import *
# from a2器械注册人申报 import *
import a2器械注册人申报
#查询id
sys.path.append(pro_path+r'\\air_case\\mdm3_ir\\a2查询获取器械注册人id.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a2查询获取器械注册人id.air')
from a2查询获取器械注册人id import *
# from a2查询获取器械注册人id import *
import a2查询获取器械注册人id
#认领锁定
sys.path.append(pro_path+r'\\air_case\\mdm3_ir\\a器械注册人锁定.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a器械注册人锁定.air')
from a器械注册人锁定 import *
CRID=global_var_CRID
# from a器械注册人锁定 import *
import a器械注册人锁定
CRID=器械注册人锁定.global_var_CRID
print(CRID,'aaaaaaaaaaaaaaaaaaa')
"""
场景:器械注册人审核驳回
......
"username": "1679886114521"
"password": "a123456!"
"submitSupplyRelation_url": "/test2api/mdmService/supplyRelation/submitSupplyRelation/"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
json_headers2: {
"Content-Type": "%s",
"token": "%s",
"X-APP-CODE":"%s"
}
"payload": {
"id": "",
"provName": "",
"hosName": "",
"invitationCode": "",
"hosId": "%s",
"clientType": "1",
"provId": "",
"contactUser": "%s",
"contactWay": "%s",
"version": ""
}
checkDict: {"code": 0,'msg': None,'data':1}
\ No newline at end of file
......@@ -4,8 +4,8 @@
"queryListPage_url": "/test2api/mdmService/companyRegistBill/queryListPage"
"queryAlCompanyRegistInfo_url": "/test2api/mdmService/companyRegistBill/queryAlCompanyRegistInfo"
"upCompanyList_url": "/test2api/mdmService/mdmCompany/upCompanyList"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill"
"updateByIdCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/updateById"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill/"
"updateByIdCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/updateById/"
"username": "1679886114521"
"password": "a123456!"
......
产品新增:
username: 国药集团公司qpbQW
goodsname: 一次性注射器6uLwp
username: 国药集团公司bK0sq
goodsname: 一次性注射器Wftdo
......@@ -54,9 +54,9 @@
</tr>
<tr width="600">
<td class='details-col-elapsed'>9</td>
<td class='details-col-elapsed'>9</td>
<td class='details-col-elapsed'>0分6</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分10</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -72,65 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a1查询器械注册人/log.html' target='_blank'>a1查询器械注册人</a></td>
<td class="details-col-elapsed"><a href='../log/a3供货关系申请_客户类型_医院_供销关系申请提交/log.html' target='_blank'>a3供货关系申请_客户类型_医院_供销关系申请提交</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.78</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a2器械注册人申报/log.html' target='_blank'>a2器械注册人申报</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.376</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a2查询获取器械注册人id/log.html' target='_blank'>a2查询获取器械注册人id</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.761</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a器械注册人认领/log.html' target='_blank'>a器械注册人认领</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.759</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a器械注册人锁定/log.html' target='_blank'>a器械注册人锁定</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.375</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/b器械注册人_审核通过/log.html' target='_blank'>b器械注册人_审核通过</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.799</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/c添加器械注册人_获取列表数据/log.html' target='_blank'>c添加器械注册人_获取列表数据</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.334</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/d添加器械注册人_查询数据/log.html' target='_blank'>d添加器械注册人_查询数据</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.951</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/e添加器械注册人/log.html' target='_blank'>e添加器械注册人</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.793</td>
<td class="details-col-elapsed">10.489</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment