Commit 307bf74e authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化注册企业锁定认领审核流程脚本

parent 8c52dc32
......@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
"""
暂未调试脚本
case_tag:api,mdm-web企业审核,用例集id2234,sit,on,10086
case_tag:api,mdm-web企业审核,用例集id22345,sit,on,10086
主数据平台:注册企业审核认领流程
"""
......@@ -20,11 +20,11 @@ headers = commonFuc().get_business_data(module, "json_headers",
print(headers)
name = commonFuc().get_business_data(module, "name1") # 获取前缀name
cname = name + commonFuc().randomString(5) # 随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload2", cname, cname, cname, cname, cname, cname)
request_body = commonFuc().get_business_data(module, "payload", cname, cname, cname, cname, cname, cname)
print(request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# 获取id
# 获取接口返回id
id1 = commonFuc().analysis_json('id', result)
# 企业注册提交接口_认领
......@@ -32,13 +32,13 @@ url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateB
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token
# 获取token和projectCode
token,projectCode = login_system(username, password).get_token()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
request_body = commonFuc().get_business_data(module, "payload",id1)
request_body = commonFuc().get_business_data(module, "payload1",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
......@@ -46,13 +46,56 @@ result = commonFuc().http_post(url, request_body, headers)
#获取预期结果
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, "queryListPage_url")
request_body = commonFuc().get_business_data(module, "payload2",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_锁定_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryAlCompanyRegistInfo_url")
request_body = commonFuc().get_business_data(module, "payload3",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
#===============企业注册提交接口_锁定_结束
#企业注册提交接口_查询数据_结束
#企业审核接口_再次查询数据_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "upCompanyList_url")
request_body = commonFuc().get_business_data(module, "payload4",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_审核通过_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
request_body = commonFuc().get_business_data(module, "payload5",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(name,result)
commonFuc().check_result(check_dict1, result)
#===============企业注册提交接口_审核通过_结束
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
暂未调试脚本
case_tag:api,mdm-web公立医院注册,用例集id2234,sit,on,10086
主数据平台:公立医院注册
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
module = "mdm3-hs"
# 注册企业
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "insertHosRegistInfo_url")
# #获取请求头信息
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
暂未调试脚本
case_tag:api,mdm-web私立医院注册,用例集id2234,sit,on,10086
主数据平台:私立医院注册
"""
......@@ -353,6 +353,7 @@ class commonFuc(object):
结果检查,检查文本内容是否存在于返回结果中
"""
Flag = False
check_text=str(check_text)
# print('bbbbbbbbbbbbbbbbbbbbbbbbb'+str(result.values()))
if check_text in str(result.values()):
Flag = True
......
"CompanyRegist_url": "/test2api/mdmService/companyRegistBill/insertCompanyRegist"
"username": "1679886114521"
"password": "a123456!"
# 企业注册提交接口_认领
"updateById_url": "/test2api/mdmService/companyRegistBill/updateById"
"queryListPage_url": "/test2api/mdmService/companyRegistBill/queryListPage"
"queryAlCompanyRegistInfo_url": "/test2api/mdmService/companyRegistBill/queryAlCompanyRegistInfo"
"upCompanyList_url": "/test2api/mdmService/mdmCompany/upCompanyList"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill"
"username": "1679886114521"
"password": "a123456!"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
......@@ -14,257 +19,39 @@ json_headers2: {
"X-APP-CODE":"%s",
"X-SESSION-ID":"%s"
}
"payload": {
"payload1": {
"id": "%s",
"isLocked": 1
}
#企业注册接口-器械注册人-正常注册-所有输入项填写
"payload2": {
"pageNum": 1,
"pageSize": 10,
"queryObject": {
"cname": "%s",
"auditStatus": "10"
}
"compFunction": "2,3,4",
"compFunctionArr": [
"2",
"3",
"4"
],
"cname": "%s",
"shortName": "%s",
"isAbroad": "0",
"addrCodeList": [
"11",
"1101",
"110101"
],
"area": "北京市市辖区东城区",
"code": "110101",
"userName": "%s",
"address": "007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007007",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "张三李四",
"registContactWay": "13800138000",
"email": "xhs007@sina.com",
"registSourceProject": "%s",
"legal": "张三李四",
"erpCode": "%s",
"dataEntrance": "注册",
"compKind": "1",
"upCompanyId": "p00cesc",
"companyRegistBizscopeVos": [
{
"bizScopeCode": "01",
"bizScopeCodeName": "有源手术器械",
"bizScopeType": 2
},
{
"bizScopeCode": "6801",
"bizScopeCodeName": "基础外科手术器械",
"bizScopeType": 1
}
],
"certVOList": [
{
"id": 1,
"billId": "",
"certKind": "YLQXJYXKZ",
"certKindName": "医疗器械经营许可证",
"certCode": "007",
"expdtBeginDate": "2023-04-01 16:03:04",
"expdtEndDate": "2044-05-03 16:03:06",
"isValidingCheck": false,
"isValiding": 0,
"companyRegistCertFile": [
{
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_36a6c16d51c34bd5a3c9d41f356bcfc3.jpg",
"fileOriginalName": "src=http___10wallpaper.com_wallpaper_2560x1600_1607_Mountains_macos_sierra_sky-Landscape_Theme_Wallpaper_2560x1600.jpg&refer=http___10wallpaper.jpg"
}
],
"printFile": "",
"certListCode": []
},
{
"id": 2,
"billId": "",
"certKind": "YYZZ",
"certKindName": "营业执照",
"certCode": "007",
"expdtBeginDate": "2023-04-01 16:03:04",
"expdtEndDate": "2055-06-01 16:03:06",
"isValidingCheck": false,
"isValiding": 0,
"companyRegistCertFile": [
{
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_798c90875cae4ca0aa60f2ad1c225583.jpg",
"fileOriginalName": "src=http___10wallpaper.com_wallpaper_2560x1600_1607_Mountains_macos_sierra_sky-Landscape_Theme_Wallpaper_2560x1600.jpg&refer=http___10wallpaper.jpg"
}
],
"printFile": "",
"certListCode": []
},
{
"id": 3,
"billId": "",
"certKind": "YLQXJYBAPZ",
"certKindName": "医疗器械经营备案凭证",
"certCode": "007",
"expdtBeginDate": "2023-04-01 16:03:04",
"expdtEndDate": "2055-07-06 16:03:06",
"isValidingCheck": false,
"isValiding": 0,
"companyRegistCertFile": [
{
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_f176acb649604765a720370b0dc9f4ea.jpg",
"fileOriginalName": "src=http___10wallpaper.com_wallpaper_2560x1600_1607_Mountains_macos_sierra_sky-Landscape_Theme_Wallpaper_2560x1600.jpg&refer=http___10wallpaper.jpg"
}
],
"printFile": "",
"certListCode": []
},
{
"id": 4,
"billId": "",
"certKind": "YLQXSCQYXKZ",
"certKindName": "医疗器械生产企业许可证",
"certCode": "007",
"expdtBeginDate": "2023-04-01 16:03:04",
"expdtEndDate": "2056-07-01 16:03:06",
"isValidingCheck": false,
"isValiding": 0,
"companyRegistCertFile": [
{
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_b729469d97d0465dbcab54dd33fcc457.jpg",
"fileOriginalName": "src=http___10wallpaper.com_wallpaper_2560x1600_1607_Mountains_macos_sierra_sky-Landscape_Theme_Wallpaper_2560x1600.jpg&refer=http___10wallpaper.jpg"
}
],
"printFile": "",
"certListCode": []
}
]
}
"payload3": {
"id": "%s",
"isLocked": 1
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
#器械注册人接口
"CompanyRegist_url": "/test2api/mdmService/companyRegistBill/insertCompanyRegist"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
"payload": {
"compFunction": "2",
"compFunctionArr": ["2"],
"cname": "%s",
"shortName": "",
"isAbroad": "1",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "002",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
"name1": "国药集团公司"
checkDict: {"code": 0,'msg': None,'data':1}
"payload4": {
"pageNum": 1,
"pageSize": 50,
"queryObject": {
"cname": "%s"
}
"payload": {
"compFunction": "2",
"compFunctionArr": ["2"],
"cname": "%s",
"shortName": "",
"isAbroad": "1",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "002",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
"payload5": {
"id": "%s"
#企业注册-器械注册人-有附件
"payload1": {
"compFunction": "2",
"compFunctionArr": [
"2"
],
"cname": "%s",
"shortName": "",
"isAbroad": "0",
"addrCodeList": [
"11",
"1101",
"110101"
],
"area": "北京市市辖区东城区",
"code": "110101",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": [
{
"id": 1,
"billId": "",
"certKind": "YYZZ",
"certKindName": "营业执照",
"certCode": "006",
"expdtBeginDate": "2023-04-01 16:05:08",
"expdtEndDate": "2044-04-01 16:05:08",
"isValidingCheck": true,
"isValiding": 1,
"companyRegistCertFile": [
{
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_f7d03d60d2fe42da8be7d65dfe1de601.jpg",
"fileOriginalName": "src=http___10wallpaper.com_wallpaper_2560x1600_1607_Mountains_macos_sierra_sky-Landscape_Theme_Wallpaper_2560x1600.jpg&refer=http___10wallpaper.jpg"
}
],
"printFile": "",
"certListCode": []
}
]
}
#企业注册接口-器械注册人-正常注册-所有输入项填写
"payload2": {
"payload": {
"compFunction": "2,3,4",
"compFunctionArr": [
......@@ -388,66 +175,12 @@ checkDict: {"code": 0,'msg': None,'data':1}
]
}
#器械注册人_企业注册提交_正常注册(境内)
"payload3": {
"compFunction": "2",
"compFunctionArr": [
"2"
],
"cname": "%s",
"shortName": "",
"isAbroad": "0",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "%s",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
#器械注册人_企业注册提交_正常注册
"payload4": {
"compFunction": "1",
"compFunctionArr": [
"2"
],
"cname": "%s",
"shortName": "",
"isAbroad": "1",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "%s",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
#器械注册人_企业注册提交_异常注册场景(注册企业名称已存在)
#预期结果
checkDict1: {'code': -1, 'msg': '该企业已经提交注册申请,正在审核中,请勿重复申请', 'data': None}
\ No newline at end of file
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
"name1": "国药集团公司"
checkDict: {"code": 0,'msg': None,'data':1}
checkDict1: {"code": 0,'msg': None,'data':'审核通过'}
"insertHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/insertHosRegistInfo"
\ No newline at end of file
......@@ -55,9 +55,9 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>0分0</td>
<td class="details-col-elapsed">0.0%</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分1</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -73,8 +73,8 @@
<tr width="600">
<td class="details-col-elapsed"><a href='../log/注册企业锁定认领审核流程/log.html' target='_blank'>注册企业锁定认领审核流程</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">0.384</td>
<td class="success">成功</td>
<td class="details-col-elapsed">1.519</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