Commit c10cfc26 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化脚本

parent b79f1d55
......@@ -7,7 +7,7 @@ from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm_core,a_a1_流程一外网企业注册审批,2302,2302-1,sit,on
case_tag:api,mdm_core,a_a1_流程一外网企业注册审批,id2302,2302-1,sit,on
内网:a_a1_流程一外网企业注册审批
"""
......
......@@ -4,7 +4,7 @@ from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm_core,a_a2_流程二供货关系申请提交审批,2302,2302-2,sit,on
case_tag:api,mdm_core,a_a2_流程二供货关系申请提交审批,id2302,2302-2,sit,on
主数据平台:a_a2_流程二供货关系申请提交审批
"""
......
......@@ -4,7 +4,7 @@ from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-core,a_a3_流程三_产品导入和审批,2302,2302-3,sit,on
case_tag:api,mdm-core,a_a3_流程三_产品导入和审批,id2302,id2302-3,sit,on
主数据平台:a_a3_流程三_产品导入和审批
"""
......@@ -62,6 +62,7 @@ def e_login(type=1):
else:
return token, projectCode, uxid, corpId, username
# break
#高值
def add_goods():
token, projectCode, uxid, corpId, e_name = e_login(2)
......@@ -172,7 +173,38 @@ def select1():
FileUtils().w_info6(info, module, '产品审核信息', titlename,'message2')
else:
commonFuc().check_text_exist(0, result)
def add_goods1():#低值
token, projectCode, uxid, corpId, e_name = e_login(2)
# 获取医院corpId
h_token, h_projectCode, h_uxid, h_corpId, h_name = h_login()
module = "a5_mdm3_pdm"
module = "a5_mdm3_pdm"
# b18供货目录申请_客户类型_医院_提交供货申请单_添加产品
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "addGoodsHandleInfos_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
goodsname = commonFuc().randomString(5)
request_body = commonFuc().get_business_data(module, "payload", h_corpId, h_name, corpId, e_name, goodsname, e_name)
# request_body = commonFuc().get_business_data(module, "payload10_1")
# 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)
if code == 0:
commonFuc().check_text_exist(code, result)
else:
commonFuc().check_text_exist(-1, result)
add_goods()
select1()
apply()
\ No newline at end of file
apply()
# add_goods1()
# select1()
# apply()
\ No newline at end of file
......@@ -4,7 +4,7 @@ from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-core,a_a4_流程四_基础模块设置,2302,2302-4,sit,on
case_tag:api,mdm-core,a_a4_流程四_基础模块设置,id2302,2302-4,sit,on
主数据平台:a_a3_流程三_产品导入和审批
"""
......
......@@ -145,7 +145,7 @@ json_headers2: {
"ext2": "",
"cla": "",
"errorDesc": "",
"generalName": "一次性注射器",
"generalName": "牙钻机",
"hosGoodsErpCode": "",
"provName": "%s",
"provId": "p1df18",
......@@ -228,7 +228,7 @@ json_headers2: {
"ext2": "",
"cla": "",
"errorDesc": "",
"generalName": "一次性注射器",
"generalName": "检测试剂",
"hosGoodsErpCode": "",
"provName": "%s",
"provId": "p1df18",
......
产品审核信息:
MSPid: MSP2404120015_1
MSPid: MSP2404170015_1
hosId: h0347
hosGoodsId: h034700002858
provGoodsid: provGood-99219946
goodsAuditBillId: MSP2404120015
targetId: MSP2404120015_1
hosGoodsId: h034700002938
provGoodsid: provGood-99220043
goodsAuditBillId: MSP2404170015
targetId: MSP2404170015_1
......@@ -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分4</td>
<td class="details-col-elapsed">0.0%</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分8</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_b0_手工采购计划_低值产品_提交/log.html' target='_blank'>a_b0_手工采购计划_低值产品_提交</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">4.369</td>
<td class="details-col-elapsed"><a href='../log/a_a3_流程三_产品导入和审批/log.html' target='_blank'>a_a3_流程三_产品导入和审批</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">8.813</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