Commit 91b626bb authored by xiao-hesheng's avatar xiao-hesheng
Browse files

修改脚本适合融合环境

parent a50fa8e5
...@@ -14,7 +14,7 @@ from airtest.core.api import using ...@@ -14,7 +14,7 @@ from airtest.core.api import using
import sys import sys
module = "a4_mdm3_cm" module = "a4_mdm3_cm"
def submitSupplyRelation_pass(): def submitSupplyRelation_pass():
module = "mdm3_cm" module = "a4_mdm3_cm"
pro_path = commonFuc().get_pro_path() pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air') sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air')
using(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air') using(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air')
......
...@@ -14,7 +14,7 @@ from airtest.core.api import using ...@@ -14,7 +14,7 @@ from airtest.core.api import using
import sys import sys
module = "a4_mdm3_cm" module = "a4_mdm3_cm"
def submitSupplyRelation_reject(): def submitSupplyRelation_reject():
module = "mdm3_cm" module = "a4_mdm3_cm"
pro_path = commonFuc().get_pro_path() pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air') sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air')
using(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air') using(pro_path + r'\\air_case\\a4_mdm3_cm\\b10供货关系审核_驳回_客户类型_医院_医院账号登录.air')
......
...@@ -13,7 +13,7 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste ...@@ -13,7 +13,7 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
from airtest.core.api import using from airtest.core.api import using
import sys import sys
module = "a4_mdm3_cm" module = "a4_mdm3_cm"
def submitSupplyRelation_reject(): def add_goods():
module = "a4_mdm3_cm" module = "a4_mdm3_cm"
pro_path = commonFuc().get_pro_path() pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b17供货目录申请_客户类型_医院_企业账号登录.air') sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\b17供货目录申请_客户类型_医院_企业账号登录.air')
...@@ -32,16 +32,18 @@ def submitSupplyRelation_reject(): ...@@ -32,16 +32,18 @@ def submitSupplyRelation_reject():
输入:医院id 输入:医院id
输出:"rtn_msg": 0 输出:"rtn_msg": 0
""" """
module = "mdm3_cm" module = "a4_mdm3_cm"
#b18供货目录申请_客户类型_医院_提交供货申请单_添加产品 #b18供货目录申请_客户类型_医院_提交供货申请单_添加产品
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listProvInfoBySubProv_url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "addGoodsHandleInfos_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)
contactUser=commonFuc().randomString(5) goodsname = commonFuc().randomString(5)
contactWay=contactUser request_body = commonFuc().get_business_data(module, "payload10", h_corpId,h_name,corpId,e_name,goodsname,e_name)
request_body = commonFuc().get_business_data(module, "payload8", corpId,h_corpId) # request_body = commonFuc().get_business_data(module, "payload10_1")
# print('request_body',request_body)
# 发送请求 # 发送请求
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('result', result) print('result', result)
...@@ -51,5 +53,5 @@ def submitSupplyRelation_reject(): ...@@ -51,5 +53,5 @@ def submitSupplyRelation_reject():
if code==0: if code==0:
commonFuc().check_text_exist(corpId,result) commonFuc().check_text_exist(corpId,result)
submitSupplyRelation_reject() add_goods()
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
"submitSupplyRelation_url": "/test2api/hdiFusion/supplyRelation/submitSupplyRelation" "submitSupplyRelation_url": "/test2api/hdiFusion/supplyRelation/submitSupplyRelation"
"listVoPage_url": "/test2api/hdiFusion/supplyRelation/listVoPage/" "listVoPage_url": "/test2api/hdiFusion/supplyRelation/listVoPage/"
"editSupplyRelation_url": "/test2api/mdmService/supplyRelation/editSupplyRelation/" "editSupplyRelation_url": "/test2api/mdmService/supplyRelation/editSupplyRelation/"
"auditSupplyRelation_url": "/test2api/mdmService/supplyRelation/auditSupplyRelation/" "auditSupplyRelation_url": "/test2api/hdiFusion/supplyRelation/auditSupplyRelation/"
"listProvInfoBySubProv_url": "/test2api/mdmService/supplyRelation/listProvInfoBySubProv/" "listProvInfoBySubProv_url": "/test2api/mdmService/supplyRelation/listProvInfoBySubProv/"
"listVo_url": "/test2api/mdmService/provGoodsInfo/listVo/" "listVo_url": "/test2api/mdmService/provGoodsInfo/listVo/"
"addGoodsHandleInfos_url": "/test2api/hdiFusion/import/goods/addGoodsHandleInfos?flag=true"
json_contentType: "application/json" json_contentType: "application/json"
json_headers: { json_headers: {
"Content-Type": "%s" "Content-Type": "%s"
...@@ -127,8 +128,93 @@ json_headers2: { ...@@ -127,8 +128,93 @@ json_headers2: {
"hosId": "%s", "hosId": "%s",
"provId": "%s" "provId": "%s"
} }
"payload10_1": {"hosId":"h277b","hosName":"湖南省人民医院6)sJI","hosVersion":3,"collectorId":"p1df18","collectorName":"国药集团公司*&Xer","goodsName":"一次性注射器1206","goodsGg":"G-31891","made":"德国","unit":"套","mfrsName":"德国歌德公司 Geuder AG","mfrsId":"mfrs-11229","purMode":"10","provGoodsJDECode":"","salePrice":99.9999,"purPrice":99.9999,"taxRate":0.13,"unitRate":1,"miCode":"","hisPrice":"0","sendPackage":100,"hitCode":"12","hitPrice":99.9999,"hosGoodsCode":"","xvmecCode":"123456789","xvmecPrice":99.9999,"hitId":"123456789","ygptPrimaryCode":"123456789","isDistrRel":"0","isOnline":"0","onlineKind":"dictOnlineKind:1","hosFactId":"","hosFcatKind":0,"remark":"无 ","storageConditions":"","hrpInfo":{"store":"","trans":"","cla":""},"ext1":"","ext2":"","cla":"","errorDesc":"","generalName":"一次性注射器","hosGoodsErpCode":"","provName":"国药集团公司*&Xer","provId":"p1df18","subProvErpCode":"","hosLbsx":"","hosKindLevelCode":"","certificateCode":"","brand":"","hosUnit":"支","mfrsCode":"","masterCode":"","goodsDesc":"","hwDesc":"1","packeage":"1","icdCode":"","icd20Code":"","icdName":"","ext3":"{\"store\":\"\",\"trans\":\"\",\"cla\":\"\"}","ext4":"","ext5":"","ext6":"","tempPurchase":"0","charging":"1","isMetering":"1","isSubprov":"0","midPackageUnit":"","useUnit":"","useUnitCount":"1","hosUnitCount":"1","provUnitCount":"1","functional":"","material":"","keySupervision":"0","handleStatus":"0","dataSource":"2","errorFlag":"","userId":""}
"payload10": {
"hosId": "%s",
"hosName": "%s",
"hosVersion": 3,
"collectorId": "%s",
"collectorName": "%s",
"goodsName": "一次性注射器%s",
"goodsGg": "G-31891",
"made": "德国",
"unit": "套",
"mfrsName": "德国歌德公司 Geuder AG",
"mfrsId": "mfrs-11229",
"purMode": "10",
"provGoodsJDECode": "",
"salePrice": 99.9999,
"purPrice": 99.9999,
"taxRate": 0.13,
"unitRate": 1,
"miCode": "",
"hisPrice": "0",
"sendPackage": 100,
"hitCode": "12",
"hitPrice": 99.9999,
"hosGoodsCode": "",
"xvmecCode": "123456789",
"xvmecPrice": 99.9999,
"hitId": "123456789",
"ygptPrimaryCode": "123456789",
"isDistrRel": "0",
"isOnline": "0",
"onlineKind": "dictOnlineKind:1",
"hosFactId": "",
"hosFcatKind": 0,
"remark": "无 ",
"storageConditions": "",
"hrpInfo": {
"store": "",
"trans": "",
"cla": ""
},
"ext1": "",
"ext2": "",
"cla": "",
"errorDesc": "",
"generalName": "一次性注射器",
"hosGoodsErpCode": "",
"provName": "%s",
"provId": "p1df18",
"subProvErpCode": "",
"hosLbsx": "",
"hosKindLevelCode": "",
"certificateCode": "",
"brand": "",
"hosUnit": "支",
"mfrsCode": "",
"masterCode": "",
"goodsDesc": "",
"hwDesc": "1",
"packeage": "1",
"icdCode": "",
"icd20Code": "",
"icdName": "",
"ext3": "{\"store\":\"\",\"trans\":\"\",\"cla\":\"\"}",
"ext4": "",
"ext5": "",
"ext6": "",
"tempPurchase": "0",
"charging": "1",
"isMetering": "1",
"isSubprov": "0",
"midPackageUnit": "",
"useUnit": "",
"useUnitCount": "1",
"hosUnitCount": "1",
"provUnitCount": "1",
"functional": "",
"material": "",
"keySupervision": "0",
"handleStatus": "0",
"dataSource": "2",
"errorFlag": "",
"userId": ""
}
checkDict: {"code": 0,'msg': None,'data':1} checkDict: {"code": 0,'msg': None,'data':1}
checkDict1: {"code": 400,'msg': '供销关系已存在!请勿重复添加','data':None} checkDict1: {"code": 400,'msg': '供销关系已存在!请勿重复添加','data':None}
checkDict2: {"code": 400,'msg': None,'data':None} checkDict2: {"code": 400,'msg': None,'data':None}
checkDict3: {'code': 400, 'msg': '数据更新不成功,可能数据的版本不一致!请刷新页面重试', 'data': None} checkDict3: {'code': 400, 'msg': '数据更新不成功,可能数据的版本不一致!请刷新页面重试', 'data': None}
checkDict4: {'code': 0, 'msg': None, 'data': []} checkDict4: {'code': 0, 'msg': None, 'data': []}
\ No newline at end of file checkDict5: {'code': 0, 'msg': None, 'tag': None, 'data': 1}
\ No newline at end of file
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a7供货关系申请_客户类型_医院_分页查询分页查询供货申请单4/log.html' target='_blank'>a7供货关系申请_客户类型_医院_分页查询分页查询供货申请单4</a></td> <td class="details-col-elapsed"><a href='../log/a2器械注册人申报/log.html' target='_blank'>a2器械注册人申报</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">2.725</td> <td class="details-col-elapsed">2.13</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </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