Commit 2dc3ce71 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程七脚本编写

parent 1973b62c
...@@ -351,7 +351,7 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -351,7 +351,7 @@ def set_dept_user(dept_id, deptName, type=1):
# 二级库房名称 # 二级库房名称
elif type == 2: elif type == 2:
stockId = get_stockId(deptName + '库房', 2) stockId = get_stockId(deptName + '库房', 2)
print(stockId) print('stockId',stockId)
elif type == 3: elif type == 3:
stockId = get_stockId(deptName + '库房', 3) stockId = get_stockId(deptName + '库房', 3)
print(stockId) print(stockId)
...@@ -377,24 +377,27 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -377,24 +377,27 @@ def set_dept_user(dept_id, deptName, type=1):
# 获取token和projectCode # 获取token和projectCode
token1, projectCode1, uxid1, corpId1, info1 = login_system(username, password).get_token() token1, projectCode1, uxid1, corpId1, info1 = login_system(username, password).get_token()
# 登录获取用户id等信息,使用创建的用户登录============结束 # 登录获取用户id等信息,使用创建的用户登录============结束
# # 内网登录 # 内网登录
# username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
# ## print('医院名称',username) ## print('医院名称',username)
# password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
# # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# # 获取token和projectCode # 获取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) print( token,projectCode,uxid,corpId,info)
# 查询库区是否已经存在人员,不需要重复添加======== # 查询库区是否已经存在人员,不需要重复添加========
# 获取请求头信息 # 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token1, commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE")) commonFuc().get_business_data(module, "X-APP-CODE"))
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "basic_stockUser_page_url") url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "basic_stockUser_page_url")
request_body = commonFuc().get_business_data(module, "payload65_3", dept_id, stockId, get_hosid()) request_body = commonFuc().get_business_data(module, "payload65_3", dept_id, stockAreaId, get_hosid())
print('查询库区是否已经存在人员', request_body) print('查询库区是否已经存在人员', request_body)
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('查询库区是否已经存在人员',result)
userCode = commonFuc().analysis_json('userCode',commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) userCode = commonFuc().analysis_json('userCode',commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
print('userCode',userCode)
if userCode !=username1: if userCode !=username1:
# 查询库区是否已经存在人员,不需要重复添加=============== # 查询库区是否已经存在人员,不需要重复添加===============
...@@ -403,7 +406,7 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -403,7 +406,7 @@ def set_dept_user(dept_id, deptName, type=1):
print('url库房管理_库区设置_人员管理_添加人员', url) print('url库房管理_库区设置_人员管理_添加人员', url)
# 获取请求头信息 # 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token1, commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE")) commonFuc().get_business_data(module, "X-APP-CODE"))
# # 请求体 # # 请求体
......
...@@ -55,9 +55,9 @@ ...@@ -55,9 +55,9 @@
<tr width="600"> <tr width="600">
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分7</td> <td class='details-col-elapsed'>0分8</td>
<td class="details-col-elapsed">0.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a_b1流程八_高值跟台业务流程/log.html' target='_blank'>a_b1流程八_高值跟台业务流程</a></td> <td class="details-col-elapsed"><a href='../log/a_b1流程八_高值跟台业务流程/log.html' target='_blank'>a_b1流程八_高值跟台业务流程</a></td>
<td class="fail">失败</td> <td class="success">成功</td>
<td class="details-col-elapsed">7.269</td> <td class="details-col-elapsed">8.057</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