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

新增采购计划模块脚本

parent 6c8a653f
......@@ -15,6 +15,8 @@ from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def add_center_dept():
"""
场景:c1_新增科室_科室已存在
......@@ -22,32 +24,38 @@ def add_center_dept():
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
# 内网登录
username = commonFuc().get_business_data(module, "username")
# print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
#c1_新增科室_科室已存在
# c1_新增科室_科室已存在
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "dept_insert_url")
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "dept_insert_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# #请求体
request_body=commonFuc().get_business_data(module, "payload14",branch_id)
request_body = commonFuc().get_business_data(module, "payload14", branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url,request_body,headers)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
# #断言
checkDict=commonFuc().get_business_data(module,'checkDict7')
commonFuc().check_result(checkDict,result)
add_center_dept()
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
if code == 1100000 and data == None:
# checkDict=commonFuc().get_business_data(module,'checkDict7')
# commonFuc().check_result(checkDict,result)
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
add_center_dept()
......@@ -46,7 +46,6 @@ def test1():
print('headers', headers)
# # 请求体
request_body = commonFuc().get_business_data(module, "payload11", pid)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
......
院区新增:
branch_id: h0347-3236
branch_name: 东土城路院区iHzX2
branch_id: h0347-3352
branch_name: 东土城路院区m*rFH
科室信息:
dept2_id: 4ec59eddc47443378f711a457161f258
dept2_id: 9eccca9b41c04fbeb682c6e43c688975
dept2_name: 二级科室002
单元包信息:
branchGoodsId: h0347-323600000010
branchGoodsId: h0347-335200000010
hosGoodsId: h034700000010
公告新增:
notices_id: N001121-h0347
notices_id: N001734-h0347
notices_name:
......@@ -56,7 +56,7 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1分14</td>
<td class='details-col-elapsed'>0分2</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/a1订单配送列表数据查询_待确认查询3医院/log.html' target='_blank'>a1订单配送列表数据查询_待确认查询3医院</a></td>
<td class="details-col-elapsed"><a href='../log/c1_新增科室_科室已存在/log.html' target='_blank'>c1_新增科室_科室已存在</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">74.843</td>
<td class="details-col-elapsed">1.905</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