Commit 6f15e5d7 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程七脚本编写

parent 02f5a67a
...@@ -85,9 +85,18 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的) ...@@ -85,9 +85,18 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的)
break break
dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
j=1
for i in list2: for i in list2:
# 请求体 # 请求体
request_body = commonFuc().get_business_data(module, "payload58_6", dept2_id, i) if j==1:
request_body = commonFuc().get_business_data(module, "payload58_6_3", dept2_id, i,20)
elif j==2:
request_body = commonFuc().get_business_data(module, "payload58_6_3", dept2_id, i, 10)
elif j==3:
request_body = commonFuc().get_business_data(module, "payload58_6_3", dept2_id, i, 60)
else:
request_body = commonFuc().get_business_data(module, "payload58_6_3", dept2_id, i,20)
j=j+1
request_body = '[' + str(request_body) + ']' request_body = '[' + str(request_body) + ']'
new_request_body = request_body.replace("'", '"') new_request_body = request_body.replace("'", '"')
print(new_request_body) print(new_request_body)
...@@ -105,6 +114,7 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的) ...@@ -105,6 +114,7 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的)
commonFuc().check_text_exist(0, result) commonFuc().check_text_exist(0, result)
else: else:
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
#高值产品必须设置为赋码管理
def dept_query_all(): # 科室查询,将科室id写入文件中 def dept_query_all(): # 科室查询,将科室id写入文件中
......
...@@ -80,19 +80,19 @@ def operationApply(): # 高值跟台申请 ...@@ -80,19 +80,19 @@ def operationApply(): # 高值跟台申请
try: try:
# set_dept_lead()#设置科室负责人 set_dept_lead()#设置科室负责人
# # 设置默认科室,切换到二级科室,使用科室管理功能 # # # # 设置默认科室,切换到二级科室,使用科室管理功能
# updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) updateUserLoginDefaultRange(get_listUserMgrRangePage(2))
# herpService_mcmsDeptGoodsInfo_getByProvIdPage() herpService_mcmsDeptGoodsInfo_getByProvIdPage()
# operationApply() operationApply()
# approval_center() approval_center()
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) updateUserLoginDefaultRange(get_listUserMgrRangePage(1))
# approval_center1() approval_center1()
# #内网查询手术通知单号 # # #内网查询手术通知单号
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) updateUserLoginDefaultRange(get_listUserMgrRangePage(1))
orderno=Search_OrderNO() orderno=Search_OrderNO()
print(orderno) print(orderno)
# height_value_order_dp(orderno) height_value_order_dp(orderno)
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except: except:
commonFuc().check_text_exist_result_text('error', '1') commonFuc().check_text_exist_result_text('error', '1')
...@@ -60,7 +60,6 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'): ...@@ -60,7 +60,6 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
print(request_body) print(request_body)
# # # 发送请求 # # # 发送请求
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
...@@ -100,6 +99,7 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'): ...@@ -100,6 +99,7 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
else: else:
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
def approval_center1(): def approval_center1():
module = "b2_herp3_bs" module = "b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始 # 登录获取用户id等信息,使用创建的用户登录===========开始
...@@ -126,7 +126,6 @@ def approval_center1(): ...@@ -126,7 +126,6 @@ def approval_center1():
print(request_body) print(request_body)
# # # 发送请求 # # # 发送请求
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
...@@ -158,6 +157,7 @@ def approval_center1(): ...@@ -158,6 +157,7 @@ def approval_center1():
else: else:
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
def login(username, password, type=1): def login(username, password, type=1):
print('username,password', username, password) print('username,password', username, password)
# 外网登录 # 外网登录
...@@ -366,7 +366,6 @@ def get_stockAreaId(dept_id, stockId): # 获取库区id,参数是部门id和仓 ...@@ -366,7 +366,6 @@ def get_stockAreaId(dept_id, stockId): # 获取库区id,参数是部门id和仓
# url=url+userid # url=url+userid
print(url) print(url)
# 请求体 # 请求体
request_body = commonFuc().get_business_data(module, "payload62_4", dept_id, stockId) request_body = commonFuc().get_business_data(module, "payload62_4", dept_id, stockId)
print('request_body查询库区id', request_body) print('request_body查询库区id', request_body)
...@@ -410,7 +409,7 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -410,7 +409,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',stockId) print('stockId', stockId)
elif type == 3: elif type == 3:
stockId = get_stockId(deptName + '库房', 3) stockId = get_stockId(deptName + '库房', 3)
print(stockId) print(stockId)
...@@ -443,7 +442,7 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -443,7 +442,7 @@ def set_dept_user(dept_id, deptName, type=1):
# 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",
...@@ -453,10 +452,11 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -453,10 +452,11 @@ def set_dept_user(dept_id, deptName, type=1):
request_body = commonFuc().get_business_data(module, "payload65_3", dept_id, stockAreaId, 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) 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) # print('userCode',userCode)
if userCode !=username1: if userCode != username1:
# 查询库区是否已经存在人员,不需要重复添加=============== # 查询库区是否已经存在人员,不需要重复添加===============
# r_d2库房管理_库区设置_人员管理_添加人员 # r_d2库房管理_库区设置_人员管理_添加人员
...@@ -468,7 +468,8 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -468,7 +468,8 @@ def set_dept_user(dept_id, deptName, type=1):
commonFuc().get_business_data(module, "X-APP-CODE")) commonFuc().get_business_data(module, "X-APP-CODE"))
# # 请求体 # # 请求体
request_body = commonFuc().get_business_data(module, "payload62_9_1_1", dept_id, deptName, get_hosid(), stockAreaId, request_body = commonFuc().get_business_data(module, "payload62_9_1_1", dept_id, deptName, get_hosid(),
stockAreaId,
username1, uxid1, username1) username1, uxid1, username1)
print('url库房管理_库区设置_人员管理_添加人员request_body', request_body) print('url库房管理_库区设置_人员管理_添加人员request_body', request_body)
...@@ -490,6 +491,7 @@ def set_dept_user(dept_id, deptName, type=1): ...@@ -490,6 +491,7 @@ def set_dept_user(dept_id, deptName, type=1):
else: else:
print('库区已经存在人员,无需重复添加') print('库区已经存在人员,无需重复添加')
def call_login(type=1): # type=1外网登录 2内网登录 def call_login(type=1): # type=1外网登录 2内网登录
module = "b2_herp3_bs" module = "b2_herp3_bs"
info = FileUtils().r_info8(module, "用户名信息", 'message3') info = FileUtils().r_info8(module, "用户名信息", 'message3')
...@@ -1222,16 +1224,16 @@ def get_listUserMgrRangePage(type=1): # 查询权限id ...@@ -1222,16 +1224,16 @@ def get_listUserMgrRangePage(type=1): # 查询权限id
request_body = commonFuc().get_business_data('b5_spd3_core_business_flow', "payload23", uxid) request_body = commonFuc().get_business_data('b5_spd3_core_business_flow', "payload23", uxid)
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)) data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
print('data1',data1) print('data1', data1)
list2=[] list2 = []
mgrRangeName_list=[] mgrRangeName_list = []
for i in data1: for i in data1:
mgrRangeName=i['mgrRangeName'] mgrRangeName = i['mgrRangeName']
mgrRangeName_list.append(mgrRangeName) mgrRangeName_list.append(mgrRangeName)
print('mgrRangeName_list',mgrRangeName_list) print('mgrRangeName_list', mgrRangeName_list)
for i in mgrRangeName_list: for i in mgrRangeName_list:
print(i) print(i)
if i=='设备科001': if i == '设备科001':
list2.append(i) list2.append(i)
for i in mgrRangeName_list: for i in mgrRangeName_list:
...@@ -1250,24 +1252,24 @@ def get_listUserMgrRangePage(type=1): # 查询权限id ...@@ -1250,24 +1252,24 @@ def get_listUserMgrRangePage(type=1): # 查询权限id
else: else:
continue continue
print('list2',list2) print('list2', list2)
if type == 1: if type == 1:
for i in data1: for i in data1:
if i['mgrRangeName']==list2[0]: if i['mgrRangeName'] == list2[0]:
return commonFuc().analysis_json('id', i) return commonFuc().analysis_json('id', i)
elif type==2: elif type == 2:
for i in data1: for i in data1:
if i['mgrRangeName']==list2[1]: if i['mgrRangeName'] == list2[1]:
return commonFuc().analysis_json('id', i) return commonFuc().analysis_json('id', i)
elif type == 3: elif type == 3:
for i in data1: for i in data1:
if i['mgrRangeName']==list2[2]: if i['mgrRangeName'] == list2[2]:
return commonFuc().analysis_json('id', i) return commonFuc().analysis_json('id', i)
elif type == 4: elif type == 4:
for i in data1: for i in data1:
if i['mgrRangeName']==list2[3]: if i['mgrRangeName'] == list2[3]:
return commonFuc().analysis_json('id', i) return commonFuc().analysis_json('id', i)
def get_stockAreaId_new(dept_id, deptName, type=1): def get_stockAreaId_new(dept_id, deptName, type=1):
...@@ -1382,7 +1384,7 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1382,7 +1384,7 @@ def height_value_order_dp(orderno): # 高值跟台配送
print('username,password', username, password) print('username,password', username, password)
# # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# # 获取token和projectCode # # 获取token和projectCode
token, projectCode, uxid, corpId, info = login(username, password,1) token, projectCode, uxid, corpId, info = login(username, password, 1)
# 登录获取用户id等信息,使用创建的用户登录============结束 # 登录获取用户id等信息,使用创建的用户登录============结束
# =========================查询待确认订单====================== # =========================查询待确认订单======================
...@@ -1392,11 +1394,10 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1392,11 +1394,10 @@ def height_value_order_dp(orderno): # 高值跟台配送
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)
branch_id = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_id"] branch_id = get_branch_id()
hos_id = branch_id[0:5] hos_id = branch_id[0:5]
exeProvId = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] exeProvId = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"]
orderNo1 = orderno orderNo1 = orderno
dateValue1 = timeUtils().get_time_add(-30, 2) dateValue1 = timeUtils().get_time_add(-30, 2)
...@@ -1404,8 +1405,7 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1404,8 +1405,7 @@ def height_value_order_dp(orderno): # 高值跟台配送
request_body = commonFuc().get_business_data(module, "payload1_1_1", dateValue1, dateValue2, orderNo1, exeProvId, request_body = commonFuc().get_business_data(module, "payload1_1_1", dateValue1, dateValue2, orderNo1, exeProvId,
hos_id, dateValue1, dateValue2) hos_id, dateValue1, dateValue2)
print('request_body',request_body) print('查询待确认订单request_body', request_body)
# 发送请求 # 发送请求
while True: while True:
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
...@@ -1447,15 +1447,44 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1447,15 +1447,44 @@ def height_value_order_dp(orderno): # 高值跟台配送
print(new_request_body1) print(new_request_body1)
list_a2 = json.loads(new_request_body1) list_a2 = json.loads(new_request_body1)
# print('list_a', list_a) # print('list_a', list_a)
billMode = "billMode" id1 = "billMode"
createUser = 'createUser' createUserName = 'createUserName'
hosId = 'hosId' hosId = 'hosId'
provId = 'provId' provId = 'provId'
sourceOrderNo = 'sourceOrderNo';
hosName = 'hosName';
branchName = 'branchName';
recDeptName = 'recDeptName';
operName = 'operName';
operDate = 'operDate';
operDoctor = 'operDoctor';
patientName = 'patientName';
status = 'status';
patientInHosId = 'patientInHosId';
remark = 'remark';
distPriority = 'distPriority';
hosVersion = 'hosVersion'
createTime = 'createTime';
recDeptId = 'recDeptId'
for i in list_a2: for i in list_a2:
billMode = i["billMode"] id1 = i["id"]
createUser = i["createUser"] createUserName = i["createUserName"]
hosId = i['hosId'] hosId = i['hosId']
provId = i['provId'] provId = i['provId']
sourceOrderNo = i['sourceOrderNo']
hosName = i['hosName']
branchName = i['branchName']
recDeptName = i['recDeptName']
operName = i['operName']
operDate = i['operDate']
operDoctor = i['operDoctor']
patientName = i['patientName']
patientInHosId = i['patientInHosId']
remark = i['remark']
distPriority = i['distPriority']
hosVersion = i['hosVersion']
createTime = i['createTime']
recDeptId = i['recDeptId']
break break
# =========================查询待确认订单====================== # =========================查询待确认订单======================
...@@ -1477,26 +1506,23 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1477,26 +1506,23 @@ def height_value_order_dp(orderno): # 高值跟台配送
else: else:
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
# ==============================确认订单================== # ==============================确认订单==================
# ==================a3获取订单详细信息中的子表id_3_0医院 # ==================a3获取订单详细信息
# a1订单配送列表数据查询_全部 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "operation_one_url")
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "detail_id_url") url = url + id1
url=url+id1+"/3" print('a3获取订单详细信息', url)
# request_body = commonFuc().get_business_data(module, "payload4", id1) # request_body = commonFuc().get_business_data(module, "payload4", id1)
# print('request_body',request_body) # print('request_body',request_body)
# 发送请求 # 发送请求
result = commonFuc().http_get(url,headers) result = commonFuc().http_get(url, headers)
print('resulta3获取订单详细信息中的子表id_3_0医院', result) print('a3获取订单详细信息', result)
# 断言 # 断言
code = commonFuc().analysis_json('code', result) code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result) data = commonFuc().analysis_json('data', result)
total = commonFuc().analysis_json('total', data)
commonFuc().check_text_exist(code, result) id2 = commonFuc().analysis_json('id', data)
data1 = commonFuc().analysis_json('data', data)
id2 = commonFuc().analysis_json('id', data1[0])
print(id1, id2) print(id1, id2)
data1 = commonFuc().analysis_json('data', data) data1 = commonFuc().analysis_json('data', result)
list_a = [] list_a = []
list_b = [] list_b = []
list_c = [] list_c = []
...@@ -1506,64 +1532,105 @@ def height_value_order_dp(orderno): # 高值跟台配送 ...@@ -1506,64 +1532,105 @@ def height_value_order_dp(orderno): # 高值跟台配送
# print('list_a', len(list_a), list_a) # print('list_a', len(list_a), list_a)
info = (list_a, list_b, list_c) info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c') titlename = ('list_a', 'list_b', 'list_c')
# 将配送订单信息息写入到文件中 # 将配送订单信息息写入到文件中1
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '配送订单详细信息', titlename, 'message9') FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '配送订单详细信息', titlename, 'message9')
# 将配送订单信息息写入到文件中2===================================
# ==================a3获取订单详细信息中的子表id_3_0医院 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "operation_detail_url")
# ==================订单配送======================== url = url + id1 + '/3'
# a1订单配送列表数据查询_全部 result = commonFuc().http_get(url, headers)
data1 = commonFuc().analysis_json('data', result)
list_a = []
list_b = []
list_c = []
list_a.append(data1)
list_b.append(data1)
list_c.append(data1)
info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c')
# 将配送订单信息息写入到文件中2
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '配送订单详细信息2', titlename, 'message9')
# 将配送订单信息息写入到文件中2===============================
# ==================a3获取订单详细信息中的子表
# ==================高值跟台订单配送========================
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submit_url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submit_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)
# 从message9文件中获取信息 # 从message9文件中获取信息1
info = FileUtils().r_info8('b5_spd3_core_business_flow', "配送订单详细信息", 'message9') info = FileUtils().r_info8('b5_spd3_core_business_flow', "配送订单详细信息", 'message9')
list_a = info['list_a']
sumAmount = commonFuc().analysis_json('sumAmount',list_a)
statusText = commonFuc().analysis_json('statusText',list_a)
sumQty = str(commonFuc().analysis_json('sumQty',list_a))
operationPkg=commonFuc().analysis_json('operationPkg',list_a)
provName=commonFuc().analysis_json('provName',list_a)
status = str(commonFuc().analysis_json('status',list_a))
version= str(commonFuc().analysis_json('version',list_a))
# 从message9文件中获取信息1==============
# 从message9文件中获取信息2============
info = FileUtils().r_info8('b5_spd3_core_business_flow', "配送订单详细信息2", 'message9')
print('info从message9文件中获取信息', info) print('info从message9文件中获取信息', info)
# print('info', info) # print('info', info)
list_a = info['list_a'] list_a = info['list_a']
id3 = 'id3'
hosGoodsId = 'hosGoodsId' hosGoodsId = 'hosGoodsId'
mdmGoodsCode = 'mdmGoodsCode'
goodsCode = 'goodsCode' goodsCode = 'goodsCode'
pkgDefId = 'pkgDefId'
erpCode = 'erpCode'
for i in list_a: for i in list_a:
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', i) print('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', i)
for j in i: for j in i:
print('bbbbbbbbbbbbbbbbbbb', j) print('bbbbbbbbbbbbbbbbbbb', j)
hosGoodsId = j['hosGoodsId'] hosGoodsId = j['hosGoodsId']
mdmGoodsCode = j['mdmGoodsCode'] id3 = j['id']
goodsCode = j['goodsCode'] goodsNum=j['goodsNum']
pkgDefId = j['pkgDefId'] price=j['price']
erpCode = j['erpCode'] inSettlement=j['inSettlement']
inSettlementText=j['inSettlementText']
goodsName=j['goodsName']
goodsSpec=j['goodsSpec']
goodsMfrsId=j['goodsMfrsId']
goodsMfrsName=j['goodsMfrsName']
unit=j['unit']
subProvId=j['subProvId']
subProvName=j['subProvName']
totalAmount=j['totalAmount']
spdGoodsCode=j['spdGoodsCode']
barCodeMng=j['barCodeMng']
settlement=j['inSettlement']
goodsCode=j['goodsCode']
break break
# # #获取日期 # # #获取日期
productDate = timeUtils().get_time_hms(5) productDate = timeUtils().get_time_hms(5)
expdtDate = timeUtils().get_time_add(190, 2) expdtDate = timeUtils().get_time_add(190, 2)
createUser = uxid
lastModifiedUser = uxid
request_body = commonFuc().get_business_data(module, "payload9_2_1_2", id1, id1, hosId, provId, billMode, viewId = id3
createUser, username, createUser, id2, hosGoodsId, mdmGoodsCode, createUserName=provName
goodsCode, productDate, expdtDate, erpCode, id2) priceTotal=price
request_body = commonFuc().get_business_data(module, "payload27", id1, orderno, sourceOrderNo, hosId, hosName,
print('request_body', request_body) branchName, recDeptName,operName, operDate, operDoctor, patientName,
status, statusText, version,patientInHosId, remark, createUserName,
distPriority, hosVersion, createTime, sumQty, sumAmount, operationPkg,
provId, provName, recDeptId, createUser, lastModifiedUser,
id3, hosGoodsId, goodsNum, price, inSettlement, inSettlementText,
goodsName, goodsSpec, goodsCode, goodsMfrsId, goodsMfrsName, unit,
subProvId, subProvName, totalAmount, spdGoodsCode, barCodeMng,
sumAmount, id3, hosGoodsId, goodsCode, settlement, productDate,expdtDate, viewId)
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)
# 断言 # 断言
code = commonFuc().analysis_json('code', result) code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result) data = commonFuc().analysis_json('data', result)
id1 = commonFuc().analysis_json('id', data) id1 = commonFuc().analysis_json('distrId', data)
info = (id1, id1) info = (id1, id1)
titlename = ('distrBillId1', 'distrBillId2') titlename = ('distrBillId1', 'distrBillId2')
# 将配送订单信息息写入到文件中 # 将配送订单信息息写入到文件中
if type == 1: FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '高值跟台配送单号', titlename, 'message10')
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '低值配送单号', titlename, 'message10')
elif type == 2:
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '高值配送单号', titlename, 'message10')
elif type == 3:
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '试剂配送单号', titlename, 'message10')
if code == 0: if code == 0:
commonFuc().check_text_exist(code, result) commonFuc().check_text_exist(code, result)
else: else:
...@@ -1594,7 +1661,8 @@ def Search_OrderNO(): ...@@ -1594,7 +1661,8 @@ def Search_OrderNO():
commonFuc().get_business_data(module, "X-APP-CODE")) commonFuc().get_business_data(module, "X-APP-CODE"))
print('headers', headers) print('headers', headers)
# 从文件中获取院区id # 从文件中获取院区id
branchId = FileUtils().r_info8('b2_herp3_bs', "院区新增", 'message') branchId = get_branch_id()
# # #获取日期 # # #获取日期
date1 = timeUtils().get_time_hms(5) date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_hms(5) date2 = timeUtils().get_time_hms(5)
......
企业信息: 企业信息:
e_id: CR202404300166 e_id: CR202405070038
cname: 国药集团公司&7H!M cname: 国药集团公司1Q&h$
医院信息: 医院信息:
h_id: 湖南省人民医院h0dXo h_id: 湖南省人民医院iNByZ
h_name: 湖南省人民医院h0dXo h_name: 湖南省人民医院iNByZ
产品审核信息: 产品审核信息:
MSPid: MSP2404300041_1 MSPid: MSP2405070011_1
hosId: h0347 hosId: h0347
hosGoodsId: h034700003295 hosGoodsId: h034700003432
provGoodsid: provGood-99220404 provGoodsid: provGood-99220541
goodsAuditBillId: MSP2404300041 goodsAuditBillId: MSP2405070011
targetId: MSP2404300041_1 targetId: MSP2405070011_1
...@@ -382,6 +382,9 @@ json_headers2: { ...@@ -382,6 +382,9 @@ json_headers2: {
"payload58_5": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"荧光试纸-试剂","goodsSpec":"","purModes":["60"]},"pageNum":1,"pageSize":200} "payload58_5": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"荧光试纸-试剂","goodsSpec":"","purModes":["60"]},"pageNum":1,"pageSize":200}
"payload58_6": {"deptId":"%s","hosGoodsId":"%s","grantRule":1,"purMode":10} "payload58_6": {"deptId":"%s","hosGoodsId":"%s","grantRule":1,"purMode":10}
"payload58_6_2": {"deptId":"%s","hosGoodsId":"h034700001743","grantRule":1,"purMode":10} "payload58_6_2": {"deptId":"%s","hosGoodsId":"h034700001743","grantRule":1,"purMode":10}
"payload58_6_3": {"deptId":"%s","hosGoodsId":"%s","grantRule":1,"purMode":"%s"}
"payload58_7": {"deptId":"%s","hosGoodsId":"h034700001743222","grantRule":1,"purMode":10} "payload58_7": {"deptId":"%s","hosGoodsId":"h034700001743222","grantRule":1,"purMode":10}
"payload58_8": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":0} "payload58_8": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":0}
"payload58_9": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":1} "payload58_9": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":1}
......
院区新增: 院区新增:
branch_id: h0347-3554 branch_id: h0347-3572
branch_name: 东土城路院区szT8i branch_name: 东土城路院区q8fpn
科室信息: 科室信息:
dept2_id: 220fcaa711924c4da079b76cb9b74e17 dept2_id: 16d7c9d6925a4dacbceafa9746f58144
dept2_name: 二级检验科002 dept2_name: 二级检验科002
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
"herpService_operationApply_submit_url": "/api/herpService/operationApply/submit" "herpService_operationApply_submit_url": "/api/herpService/operationApply/submit"
"hdiFusion_operation_page_url": "/api/hdiFusion/bill/operation/page" "hdiFusion_operation_page_url": "/api/hdiFusion/bill/operation/page"
"ensure_url": "/api/hdiFusion/bill/operation/ensure" "ensure_url": "/api/hdiFusion/bill/operation/ensure"
"detail_id_url": "/api/hdiFusion/bill/operation/detail/" "operation_one_url": "/api/hdiFusion/bill/operation/one/"
"submit_url": "/api/hdiFusion/bill/distr/operation/submit" "submit_url": "/api/hdiFusion/bill/distr/operation/submit"
"operation_detail_url": "/api/hdiFusion/bill/operation/detail/"
"username": "xhs1009" "username": "xhs1009"
"password": "1qaz!QAZ" "password": "1qaz!QAZ"
...@@ -70,3 +70,4 @@ json_headers2: { ...@@ -70,3 +70,4 @@ json_headers2: {
"payload24": {"recAddressId":"%s","expireDate":"%s 14:03:47","remark":"自动化测试","patientInHosId":"123456","patientName":"张三","sex":1,"age":44,"operName":"血管扩张术","operDoctor":"李四","operDate":"%s 14:04:13","bedNum":"2","oprationHouse":"设备科一手术间","surDeptName":"","recAddress":"默认库区","provGoodsVOList":[{"id":null,"lastModified":null,"version":null,"createTime":null,"createUser":null,"lastModifiedUser":null,"hosId":null,"provId":"%s","subProvId":null,"clientType":null,"invitationCode":null,"contactWay":null,"contactUser":null,"tbStatus":null,"activeFlag":null,"auditor":null,"auditTime":null,"auditComment":null,"provCode":"%s","provName":"%s","subProvName":null,"goodsVOList":[{"hosGoodsId":"%s","hosGoodsCode":"%s","provId":"%s","subProvId":"%s","subProvName":"%s","goodsName":"%s","goodsSpec":"%s","goodsGeneralName":null,"goodsMfrsId":"%s","goodsMfrsName":"%s","unit":"%s","price":"%s","miCode":"","miDjmc":"","goodsNum":1}]}]} "payload24": {"recAddressId":"%s","expireDate":"%s 14:03:47","remark":"自动化测试","patientInHosId":"123456","patientName":"张三","sex":1,"age":44,"operName":"血管扩张术","operDoctor":"李四","operDate":"%s 14:04:13","bedNum":"2","oprationHouse":"设备科一手术间","surDeptName":"","recAddress":"默认库区","provGoodsVOList":[{"id":null,"lastModified":null,"version":null,"createTime":null,"createUser":null,"lastModifiedUser":null,"hosId":null,"provId":"%s","subProvId":null,"clientType":null,"invitationCode":null,"contactWay":null,"contactUser":null,"tbStatus":null,"activeFlag":null,"auditor":null,"auditTime":null,"auditComment":null,"provCode":"%s","provName":"%s","subProvName":null,"goodsVOList":[{"hosGoodsId":"%s","hosGoodsCode":"%s","provId":"%s","subProvId":"%s","subProvName":"%s","goodsName":"%s","goodsSpec":"%s","goodsGeneralName":null,"goodsMfrsId":"%s","goodsMfrsName":"%s","unit":"%s","price":"%s","miCode":"","miDjmc":"","goodsNum":1}]}]}
"payload1_1_1": {"pageNum":1,"pageSize":50,"queryObject":{"dateValue":["%s 14:20:37","%s 14:20:37"],"orderNo":"%s","provId":"%s","pageType":2,"hosIdList":["%s"],"status":"10","startDate":"%s 00:00:00","endDate":"%s 23:59:59"}} "payload1_1_1": {"pageNum":1,"pageSize":50,"queryObject":{"dateValue":["%s 14:20:37","%s 14:20:37"],"orderNo":"%s","provId":"%s","pageType":2,"hosIdList":["%s"],"status":"10","startDate":"%s 00:00:00","endDate":"%s 23:59:59"}}
"payload26": {"id":"%s","version":0,"hosVersion":3,"userId":"%s"} "payload26": {"id":"%s","version":0,"hosVersion":3,"userId":"%s"}
"payload27": {"id":"%s","orderNo":"%s","sourceOrderNo":"%s","hosId":"%s","hosName":"%s","branchName":"%s","recDeptName":"%s","operName":"%s","operDate":"%s","operDoctor":"%s","patientName":"%s","status":"%s","statusText":"%s","version":"%s","patientInHosId":"%s","surDeptName":"","remark":"%s","createUserName":"%s","distPriority":"%s","distPriorityText":"否","distId":null,"distNo":null,"hosVersion":"%s","createTime":"%s","sumQty":"%s","sumAmount":"%s","operationPkg":"%s","provId":"%s","provName":"%s","subProvId":"","subProvName":"","recDeptId":"%s","createUser":"%s","lastModifiedUser":"%s","detailList":[{"id":"%s","hosGoodsId":"%s","goodsNum":"%s","price":"%s","inSettlement":"%s","inSettlementText":"%s","goodsName":"%s","goodsSpec":"%s","goodsCode":"%s","goodsMfrsId":"%s","goodsMfrsName":"%s","unit":"%s","subProvId":"%s","subProvName":"%s","totalAmount":"%s","spdGoodsCode":"%s","barCodeMng":"%s","erpCode":null,"quantityQty":0,"numTotal":"1","priceTotal":"%s","statusSpanType":"orange","statusSpanText":"配送情况:1/1","rightTableList":null,"batchList":[{"sourceDetailId":"%s","hosGoodsId":"%s","goodsCode":"%s","settlement":"%s","batchCode":"2222","productDate":"%s","expdtDate":"%s","distrPkgQty":"1","disabledFlag":0,"distrQty":0,"ext":{"ygptCode":"","transCond":"","storageCond":"","erpCode":""},"edit":true,"barcodeList":[],"viewId":"%sROW0"}]}],"operUserName":"ttt","operUserPhone":"ttt"}
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<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'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分3秒</td> <td class='details-col-elapsed'>0分37</td>
<td class="details-col-elapsed">100.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a_a2_手工采购计划_添加产品页面_列表查询_条件查询_精确查询/log.html' target='_blank'>a_a2_手工采购计划_添加产品页面_列表查询_条件查询_精确查询</a></td> <td class="details-col-elapsed"><a href='../log/a_b1流程八_高值跟台业务流程/log.html' target='_blank'>a_b1流程八_高值跟台业务流程</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">3.848</td> <td class="details-col-elapsed">37.082</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