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

脚本优化

parent bea1aa1e
...@@ -25,8 +25,11 @@ def test1(): ...@@ -25,8 +25,11 @@ def test1():
execute_command("python runner_test.py tag id2248 debug mdm3") execute_command("python runner_test.py tag id2248 debug mdm3")
#医院注册审核 #医院注册审核
execute_command("python runner_test.py tag id2249 debug mdm3") execute_command("python runner_test.py tag id2249 debug mdm3")
try: def main():
test1() try:
commonFuc().check_text_exist_result_text('succees','succees') test1()
except: commonFuc().check_text_exist_result_text('succees', 'succees')
commonFuc().check_text_exist_result_text('error','succees') except:
commonFuc().check_text_exist_result_text('error', 'succees')
# main()
\ No newline at end of file
...@@ -164,15 +164,18 @@ def supply_and_marketing_apply2(): ...@@ -164,15 +164,18 @@ def supply_and_marketing_apply2():
e_corpId=corpId e_corpId=corpId
e_username=username e_username=username
return e_corpId,h_corpId,e_username,h_name return e_corpId,h_corpId,e_username,h_name
try: def main():
h_login()#医院登录 try:
e_login(1)#企业登录 h_login()#医院登录
#供应关系申请-客户类型医院 e_login(1)#企业登录
FileUtils().w_info1(supply_and_marketing_apply(), module, '供货关系申请') #供应关系申请-客户类型医院
submitSupplyRelation_pass() FileUtils().w_info1(supply_and_marketing_apply(), module, '供货关系申请')
#供应关系申请-客户类型厂商 submitSupplyRelation_pass()
FileUtils().w_info1(supply_and_marketing_apply2(), module, '供货关系申请2') #供应关系申请-客户类型厂商
submitSupplyRelation_pass() FileUtils().w_info1(supply_and_marketing_apply2(), module, '供货关系申请2')
commonFuc().check_text_exist_result_text('succees','succees') submitSupplyRelation_pass()
except: commonFuc().check_text_exist_result_text('succees','succees')
print('a_a2_流程二供货关系申请提交审批,出现异常,请检查') print('流程二结束')
\ No newline at end of file except:
print('a_a2_流程二供货关系申请提交审批,出现异常,请检查')
# main()
\ No newline at end of file
...@@ -373,31 +373,34 @@ def supplyProvHosGoods_add_DI(): ...@@ -373,31 +373,34 @@ def supplyProvHosGoods_add_DI():
# print('产品数据删除出现异常') # print('产品数据删除出现异常')
# 删除上次新增的产品,避免产生过多的重复数据====这里不能每天删除,万一导入产品功能出现问题会影响后续脚本 # 删除上次新增的产品,避免产生过多的重复数据====这里不能每天删除,万一导入产品功能出现问题会影响后续脚本
# 每隔一段时间来删除重复的产品数据即可,内外网同步删除 # 每隔一段时间来删除重复的产品数据即可,内外网同步删除
try: def main():
# ==============分割线 暂时注释=============== try:
add_goods()#直销高值 # ==============分割线 暂时注释===============
select1('message1') add_goods()#直销高值
apply() select1('message1')
add_goods1()#直销低值 apply()
select1('message2') add_goods1()#直销低值
apply() select1('message2')
add_goods2()#直销试剂 apply()
select1('message3') add_goods2()#直销试剂
apply() select1('message3')
add_goods3()#集配 apply()
select1('message4') add_goods3()#集配
apply() select1('message4')
add_goods4()#定向 "isSubprov": "1" apply()
select1('message5') add_goods4()#定向 "isSubprov": "1"
apply() select1('message5')
#20240618外网在配送的时候增加了DI验证,加入维护di的脚本 apply()
supplyProvHosGoods_add_DI() #20240618外网在配送的时候增加了DI验证,加入维护di的脚本
# ==============分割线 暂时注释=============== supplyProvHosGoods_add_DI()
commonFuc().check_text_exist_result_text('succees', 'succees') # ==============分割线 暂时注释===============
except: commonFuc().check_text_exist_result_text('succees', 'succees')
print('新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题') except:
commonFuc().check_text_exist_result_text('产品新增失败', '产品新增成功') print('新增产品信息出现异常,后续的脚本必然无法走通,需要检查程序或者脚本或者环境是否出现问题')
else: commonFuc().check_text_exist_result_text('产品新增失败', '产品新增成功')
# 删除今天之前的产品信息(包含内外网) else:
delData().Del_goods_info_all() # 删除今天之前的产品信息(包含内外网)
commonFuc().check_text_exist_result_text('succees', 'succees') delData().Del_goods_info_all()
commonFuc().check_text_exist_result_text('succees', 'succees')
print('流程三结束')
# main()
\ No newline at end of file
...@@ -292,19 +292,20 @@ def add_StockArea():#添加货位 ...@@ -292,19 +292,20 @@ def add_StockArea():#添加货位
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 main():
try: try:
# ==============删除业务数据和报表数据 # ==============删除业务数据和报表数据
# delData().Delete_business_Data()#删除业务数据 # delData().Delete_business_Data()#删除业务数据
# delData().Del_reporter_data() # 删除报表数据 # delData().Del_reporter_data() # 删除报表数据
#==============删除业务数据和报表数据 #==============删除业务数据和报表数据
test1() test1()
test2()# 科室添加产品信息(产品是从外网同步过来的) test2()# 科室添加产品信息(产品是从外网同步过来的)
dept_query_all()# 科室查询,将科室id写入文件中 dept_query_all()# 科室查询,将科室id写入文件中
grants_user()#给用户授权 grants_user()#给用户授权
set_dept_lead1() #设置一级科室负责人 set_dept_lead1() #设置一级科室负责人
add_StockArea()#添加库区 add_StockArea()#添加库区
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except Exception as e: print('流程四结束')
commonFuc().check_text_exist_result_text('succees','error') except Exception as e:
print("发生异常:", str(e)) commonFuc().check_text_exist_result_text('succees','error')
\ No newline at end of file print("发生异常:", str(e))
\ No newline at end of file
...@@ -454,47 +454,45 @@ def reagent_purchase_plan(): ...@@ -454,47 +454,45 @@ def reagent_purchase_plan():
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 main(type=1): def main():
if type==1: try:
try: # 获取低值的hosGoodsId
# 获取低值的hosGoodsId hosGoodsId = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
hosGoodsId = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] get_GoodsPkgDef(hosGoodsId) # 获取单元包id
get_GoodsPkgDef(hosGoodsId) # 获取单元包id except:
except: print('流程五获取hosGoodsId出现错误,请检查脚本或者数据')
print('流程五获取hosGoodsId出现错误,请检查脚本或者数据') try:
try: low_vaule_purchase_plan()
low_vaule_purchase_plan() except Exception as e:
except Exception as e: print('低值采购计划提交出现错误,请检查脚本或者数据')
print('低值采购计划提交出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) traceback.print_exc()
traceback.print_exc() #审批
#审批 try:
try: approval_center()
approval_center() except Exception as e:
except Exception as e: print('审批采购计划出现错误,请检查脚本或者数据')
print('审批采购计划出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) try:
try: hight_vaule_purchase_plan()
hight_vaule_purchase_plan() except Exception as e:
except Exception as e: print('高值采购计划出现错误,请检查脚本或者数据')
print('高值采购计划出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) try:
try: approval_center()
approval_center() except Exception as e:
except Exception as e: print('审批采购计划出现错误,请检查脚本或者数据')
print('审批采购计划出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) try:
try: reagent_purchase_plan()
reagent_purchase_plan() except Exception as e:
except Exception as e: print('试剂采购计划出现错误,请检查脚本或者数据')
print('试剂采购计划出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) try:
try: approval_center()
approval_center() except Exception as e:
except Exception as e: print('审批采购计划出现错误,请检查脚本或者数据')
print('审批采购计划出现错误,请检查脚本或者数据') print("发生异常:", str(e))
print("发生异常:", str(e)) commonFuc().check_text_exist_result_text('succees','succees')
commonFuc().check_text_exist_result_text('succees','succees')
else: # main()
print('type=2时不执行任何内容') \ No newline at end of file
main()
\ No newline at end of file
...@@ -258,14 +258,14 @@ def order_dp(type=1): ...@@ -258,14 +258,14 @@ def order_dp(type=1):
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
# ==================订单配送===================================== # ==================订单配送=====================================
def main():
try: try:
order_dp(1)# 1低值 order_dp(1)# 1低值
order_dp(2)#2高值 order_dp(2)#2高值
order_dp(3)#3试剂 order_dp(3)#3试剂
except Exception as e: except Exception as e:
print('订单配送发生错误,请检查脚本或者数据') print('订单配送发生错误,请检查脚本或者数据')
print("发生异常:", str(e)) print("发生异常:", str(e))
traceback.print_exc() traceback.print_exc()
else: else:
commonFuc().check_text_exist_result_text('succees','succees') commonFuc().check_text_exist_result_text('succees','succees')
\ No newline at end of file \ No newline at end of file
...@@ -404,21 +404,22 @@ def putaway(): ...@@ -404,21 +404,22 @@ def putaway():
# # ================== 生成结算单============================== # # ================== 生成结算单==============================
try: def main():
# 验收 try:
check_accept_order(1) # 低值 # 验收
check_accept_order(2) # 高值 check_accept_order(1) # 低值
check_accept_order(3) # 试剂 check_accept_order(2) # 高值
# 入库上架 check_accept_order(3) # 试剂
putaway() # 入库上架
putaway() putaway()
putaway() putaway()
OBD_ID = settle()# 生成结算单 putaway()
# 调用审批结算单 OBD_ID = settle()# 生成结算单
approval_center(OBD_ID) # 调用审批结算单
except Exception as e: approval_center(OBD_ID)
print('脚本出现异常,请检查脚本或者数据') except Exception as e:
print("发生异常:", str(e)) print('脚本出现异常,请检查脚本或者数据')
traceback.print_exc() print("发生异常:", str(e))
else: traceback.print_exc()
commonFuc().check_text_exist_result_text('succees', 'succees') else:
commonFuc().check_text_exist_result_text('succees', 'succees')
...@@ -26,376 +26,375 @@ import time ...@@ -26,376 +26,375 @@ import time
module = "b5_spd3_core_business_flow" module = "b5_spd3_core_business_flow"
def invoice(): # def invoice():
# # 登录获取用户id等信息,使用创建的用户登录===========开始 # # # 登录获取用户id等信息,使用创建的用户登录===========开始
info = FileUtils().r_info8('b5_spd3_core_business_flow', "供货关系申请2", 'message') # info = FileUtils().r_info8('b5_spd3_core_business_flow', "供货关系申请2", 'message')
# print(info) # # print(info)
username = info['e_username'] # username = info['e_username']
password = commonFuc().get_business_data("b2_herp3_bs", "password1") # password = commonFuc().get_business_data("b2_herp3_bs", "password1")
token, projectCode, uxid, corpId, info = login(username, password) # token, projectCode, uxid, corpId, info = login(username, password)
# print(token, projectCode, uxid, corpId, info) # # print(token, projectCode, uxid, corpId, info)
# 登录获取用户id等信息,使用创建的用户登录============结束 # # 登录获取用户id等信息,使用创建的用户登录============结束
module = "a6_mdm3_si" # module = "a6_mdm3_si"
# 发票录入列表查询================================================= # # 发票录入列表查询=================================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listGoodsPage_url") # url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listGoodsPage_url")
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"), token, # commonFuc().get_business_data(module, "json_contentType"), token,
projectCode) # projectCode)
#
# request_body = commonFuc().get_business_data(module, "payload2_1_1", get_hosid(), get_branch_id())
#
# # print('request_body',request_body)
# # 发送请求
# i = 1
# while True:
# time.sleep(6)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', result)
# try:
# data = commonFuc().analysis_json('data', result)
# total = commonFuc().analysis_json('total', data)
# if total == 0:
# print('数据暂时未同步过来,或者内网没有生成结算单')
# i = i + 1
# if i >= 100:
# print('600秒过去了,数据还未查询出来,调用一下内网结算函数')
# settle()
# approval_center()
# continue
# else:
# break
# except:
# continue
#
# # 将发票信息写入文件
# data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# list_a = []
# list_b = []
# list_c = []
# list_a.append(data1[0])
# list_b.append(data1[0])
# list_c.append(data1[0])
# # print('list_a', len(list_a), list_a)
# info = (list_a, list_b, list_c)
# titlename = ('list_a', 'list_b', 'list_c')
# # 将发票信息写入文件
# FileUtils().w_info8(info, module, '结算开票信息', titlename, 'message')
# # 发票录入列表查询=================================================
# # ===========发票暂存=======================================
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "saveCacheBatch_url")
# print(url)
# # 从文件中获取必要信息
# info = FileUtils().r_info8(module, "结算开票信息", 'message')
# # print('info', info)
# list_a = info['list_a']
# print('list_a', list_a, type(list_a), len(list_a))
# pid = 'pid'
# settleMonth = "settleMonth"
# hosGoodsId = 'hosGoodsId'
# batchCode = 'batchCode'
# distrDetailId = 'distrDetailId'
# distrId = 'distrId'
# distrOrderNo = 'distrOrderNo'
# settlePrice = 'settlePrice'
# maxSettleQty = 'maxSettleQty'
# maxSettleAmount = 'maxSettleAmount'
# curSettleQty = 'curSettleQty'
# curSettleAmount = 'curSettleAmount'
# leftSettleQty = 'leftSettleQty'
# leftSettleAmount = 'leftSettleAmount'
# hosId = 'hosId'
# provId = 'provId'
# branchId = 'branchId'
# balanceDetId = 'balanceDetId'
# purMode = 'purMode'
# barCode = 'barCode'
# viewId = 'viewId'
# for i in list_a:
# pid = i['pid']
# settleMonth = i['settleMonth']
# hosGoodsId = i['hosGoodsId']
# detailList = i['detailList']
# for j in detailList:
# batchCode = j['batchCode']
# distrDetailId = j['distrDetailId']
# distrId = j['distrId']
# distrOrderNo = j['distrOrderNo']
# settlePrice = j['settlePrice']
# # maxSettleQty = j['leftSettleQty']
# # maxSettleAmount = j['leftSettleAmount']
# # curSettleQty = j['curSettleQty']
# # curSettleAmount = j['curSettleAmount']
# # leftSettleQty = j['leftSettleQty']
# leftSettleAmount = j['leftSettleAmount']
# hosId = j['hosId']
# provId = j['provId']
# branchId = j['branchId']
# balanceDetId = j['balanceDetId']
# purMode = j['purMode']
# barCode = j['barCode']
# viewId = j['viewId']
# break
# list2 = []
# detailList = None
# for i in list_a:
# detailList = i['detailList']
# list2 = detailList
# for k in list2:
# maxSettleQty = k['leftSettleQty']
# maxSettleAmount = k['settlePrice']
# curSettleQty = k['curSettleQty']
# curSettleAmount = k['curSettleAmount']
# leftSettleQty = k['leftSettleQty']
#
# request_body = commonFuc().get_business_data(module, "payload3_1_1_1", pid, settleMonth, hosGoodsId, batchCode,
# distrDetailId, distrId, distrOrderNo, settlePrice, maxSettleQty,
# maxSettleAmount, curSettleQty, curSettleAmount, leftSettleQty,
# leftSettleAmount, hosId,
# provId,
# branchId, balanceDetId, purMode, barCode, viewId)
# print('request_body', request_body)
#
# request_body_json = get_process_list(request_body)
# result = commonFuc().http_post(url, request_body_json, headers)
# print('发票暂存result', result)
# # ===========发票暂存===============================================
# # ==============发票缓存提交===========================================
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submitCache_url")
# hosVersion = 3
# hosName = commonFuc().get_business_data(module, 'hosName')
# invoiceQty = leftSettleQty
# invoiceAmount = leftSettleAmount
# invoiceDate = timeUtils().get_time_hms(5)
# request_body = commonFuc().get_business_data(module, "payload3_2_2_2_1", hosName, invoiceQty, invoiceAmount,
# invoiceDate, hosId, provId,hosVersion)
# print('发票缓存提交request_body', request_body)
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# print('发票缓存提交result', result)
# VI_id = commonFuc().analysis_json('billIds',
# commonFuc().analysis_json('data', result))
# VI_id= ' '.join(VI_id)
# print('VI_id',VI_id)
# # ==============发票缓存提交===========================================
# # ===============预开票列表查询====================================
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url1")
# request_body = commonFuc().get_business_data(module, "payload3_3_1")
# print('预开票列表查询request_body', request_body)
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# print('预开票列表查询', 'result', result)
#
# provName= commonFuc().analysis_json('provName',
# commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
# sumAmount= commonFuc().analysis_json('sumAmount',
# commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
#
# # ===============预开票列表查询====================================
# # ===============预开票提交====================================
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "mcmsOutBalance_submitInvoice_url")
# lastModified = timeUtils().get_time_hms(1)
# createTime = timeUtils().get_time_hms(1)
# invoiceTitle = hosName
# settleMonths=settleMonth
# request_body = commonFuc().get_business_data(module, "payload3_3_2", VI_id, lastModified, createTime, uxid,
# get_hosid(), provId, provName, invoiceAmount, invoiceDate,
# settleMonths, invoiceQty, hosName, invoiceTitle, sumAmount)
# print('预开票提交request_body', request_body)
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# print('预开票提交', 'result', result)
# # ===============预开票提交====================================
# # ===============发票确认列表查询
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url1")
#
# request_body = commonFuc().get_business_data(module, "payload3_3")
#
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# print('发票确认列表查询result', result)
# data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# id1 = commonFuc().analysis_json('id', data1[0])
# print(id1)
#
# # ===============发票确认列表查询
# # ===============发票确认
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "invoiceUpdateStatus_url")
#
# request_body = commonFuc().get_business_data(module, "payload3_4", id1)
#
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# print('发票确认result', result)
# # ===============发票确认
# # ==============内网发票核对============
# module = "b5_spd3_core_business_flow"
# # # 登录获取用户id等信息,使用创建的用户登录===========开始
# info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')
# username = info['username1']
# password = commonFuc().get_business_data("b2_herp3_bs", "password")
# print('username,password', username, password)
# # # 获取token和projectCode
# token, projectCode, uxid, corpId, info = login(username, password, 2)
# # 登录获取用户id等信息,使用创建的用户登录============结束
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "mcmsInvoice_listVoPage_url")
# print('url', url)
# # 获取请求头信息
# headers = commonFuc().get_business_data(module, "json_headers2",
# commonFuc().get_business_data(module, "json_contentType"), token,
# projectCode)
# request_body = commonFuc().get_business_data(module, "payload9", timeUtils().get_time_hms(5),
# timeUtils().get_time_hms(5), get_hosid(), get_hosid())
# print('request_body', request_body)
# # 发送请求
# i = 1
# while True:
# time.sleep(6)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', result)
# try:
# data = commonFuc().analysis_json('data', result)
# total = commonFuc().analysis_json('total', data)
# if total == 0:
# print('数据暂时未同步过来')
# i = i + 1
# if i >= 100:
# print('600秒过去了,数据还未查询出来,检查一下脚本或者被测软件')
# continue
# else:
# break
# except:
# continue
#
# print('result', '内网发票核对', result)
# data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
# VI_id = commonFuc().analysis_json('id', data1[0])
# print('VI_id', VI_id)
# # ==============发票列表查询
# # ==============发票核对提交
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_invoiceUpdateStatusList_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload10", VI_id, get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', result)
# # ==============发票核对提交
# # ==============内网发票核对============
# # ==============内网发票提交开始
# # 列表查询
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_listVoPage_url")
# print('内网发票提交url', url)
# request_body = commonFuc().get_business_data(module, "payload11", timeUtils().get_time_hms(5),
# timeUtils().get_time_hms(5), get_hosid(), get_hosid())
# print('内网发票提交request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', '内网发票提交列表查询结果', result)
# data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
# total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
# VI_id2='VI_id2'
# if total == 0:
# print('检查被测程序,发票提交列表查询数据是否正确')
# else:
# for i in range(total):
# VI_id2 = commonFuc().analysis_json('id', data1[i])
# if VI_id2 == VI_id:
# break
# print('VI_id2', VI_id2)
# # ==============发票提交,下一步归档
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_invoiceUpdateStatusList_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload12", VI_id, get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', '发票提交,下一步归档', result)
# # ==============发票提交,下一步归档
# # ==============发票归档列表查询
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_listVoPage_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload13", timeUtils().get_time_hms(5),
# timeUtils().get_time_hms(5), get_hosid(), get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', '发票归档列表查询', result)
# data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
# total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
# VI_id3='VI_id3'
# if total == 0:
# print('检查被测程序,发票归档列表查询查询数据是否正确')
# else:
# for i in range(total):
# VI_id3 = commonFuc().analysis_json('id', data1[i])
# if VI_id3 == VI_id2:
# break
# print('VI_id3', VI_id3)
# # ==============发票归档列表查询
# # ==================发票归档提交
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_invoiceUpdateStatusList_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload14", VI_id, get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', '发票归档提交,下一步付款', result)
# # ==================发票归档提交
# # ==================付款单列表查询
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_listVoPage_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload15", get_hosid(), get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', '付款单列表查询', result)
# data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
# total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
# VI_id4='VI_id4'
# if total == 0:
# print('检查被测程序,发票归档列表查询查询数据是否正确')
# else:
# for i in range(total):
# VI_id4 = commonFuc().analysis_json('id', data1[i])
# if VI_id4 == VI_id3:
# break
# print('VI_id4', VI_id4)
# # ==================付款单列表查询
# # ==================付款提交
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "mcmsInvoice_genPaymentBills_url")
# print('url', url)
# request_body = commonFuc().get_business_data(module, "payload16", VI_id, get_hosid())
# 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 and data == 1:
# commonFuc().check_text_exist(0, result)
# else:
# commonFuc().check_text_exist('error', result)
# # ==================付款提交
# # ==============内网发票提交
# # ================发票查询列表页面验证
#
# # ================发票查询列表页面验证
request_body = commonFuc().get_business_data(module, "payload2_1_1", get_hosid(), get_branch_id()) def main():
try:
# print('request_body',request_body) OBH_ID = settle()
# 发送请求 # 调用审批结算单
i = 1 approval_center(OBH_ID)
while True: invoice(2,OBH_ID)
time.sleep(6) except Exception as e:
result = commonFuc().http_post(url, request_body, headers) print('脚本出现异常,请检查脚本或者数据')
print('result', result) print("发生异常:", str(e))
try: traceback.print_exc()
data = commonFuc().analysis_json('data', result)
total = commonFuc().analysis_json('total', data)
if total == 0:
print('数据暂时未同步过来,或者内网没有生成结算单')
i = i + 1
if i >= 100:
print('600秒过去了,数据还未查询出来,调用一下内网结算函数')
settle()
approval_center()
continue
else:
break
except:
continue
# 将发票信息写入文件
data = commonFuc().analysis_json('data', result)
data1 = commonFuc().analysis_json('data', data)
list_a = []
list_b = []
list_c = []
list_a.append(data1[0])
list_b.append(data1[0])
list_c.append(data1[0])
# print('list_a', len(list_a), list_a)
info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c')
# 将发票信息写入文件
FileUtils().w_info8(info, module, '结算开票信息', titlename, 'message')
# 发票录入列表查询=================================================
# ===========发票暂存=======================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "saveCacheBatch_url")
print(url)
# 从文件中获取必要信息
info = FileUtils().r_info8(module, "结算开票信息", 'message')
# print('info', info)
list_a = info['list_a']
print('list_a', list_a, type(list_a), len(list_a))
pid = 'pid'
settleMonth = "settleMonth"
hosGoodsId = 'hosGoodsId'
batchCode = 'batchCode'
distrDetailId = 'distrDetailId'
distrId = 'distrId'
distrOrderNo = 'distrOrderNo'
settlePrice = 'settlePrice'
maxSettleQty = 'maxSettleQty'
maxSettleAmount = 'maxSettleAmount'
curSettleQty = 'curSettleQty'
curSettleAmount = 'curSettleAmount'
leftSettleQty = 'leftSettleQty'
leftSettleAmount = 'leftSettleAmount'
hosId = 'hosId'
provId = 'provId'
branchId = 'branchId'
balanceDetId = 'balanceDetId'
purMode = 'purMode'
barCode = 'barCode'
viewId = 'viewId'
for i in list_a:
pid = i['pid']
settleMonth = i['settleMonth']
hosGoodsId = i['hosGoodsId']
detailList = i['detailList']
for j in detailList:
batchCode = j['batchCode']
distrDetailId = j['distrDetailId']
distrId = j['distrId']
distrOrderNo = j['distrOrderNo']
settlePrice = j['settlePrice']
# maxSettleQty = j['leftSettleQty']
# maxSettleAmount = j['leftSettleAmount']
# curSettleQty = j['curSettleQty']
# curSettleAmount = j['curSettleAmount']
# leftSettleQty = j['leftSettleQty']
leftSettleAmount = j['leftSettleAmount']
hosId = j['hosId']
provId = j['provId']
branchId = j['branchId']
balanceDetId = j['balanceDetId']
purMode = j['purMode']
barCode = j['barCode']
viewId = j['viewId']
break
list2 = []
detailList = None
for i in list_a:
detailList = i['detailList']
list2 = detailList
for k in list2:
maxSettleQty = k['leftSettleQty']
maxSettleAmount = k['settlePrice']
curSettleQty = k['curSettleQty']
curSettleAmount = k['curSettleAmount']
leftSettleQty = k['leftSettleQty']
request_body = commonFuc().get_business_data(module, "payload3_1_1_1", pid, settleMonth, hosGoodsId, batchCode,
distrDetailId, distrId, distrOrderNo, settlePrice, maxSettleQty,
maxSettleAmount, curSettleQty, curSettleAmount, leftSettleQty,
leftSettleAmount, hosId,
provId,
branchId, balanceDetId, purMode, barCode, viewId)
print('request_body', request_body)
request_body_json = get_process_list(request_body)
result = commonFuc().http_post(url, request_body_json, headers)
print('发票暂存result', result)
# ===========发票暂存===============================================
# ==============发票缓存提交===========================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submitCache_url")
hosVersion = 3
hosName = commonFuc().get_business_data(module, 'hosName')
invoiceQty = leftSettleQty
invoiceAmount = leftSettleAmount
invoiceDate = timeUtils().get_time_hms(5)
request_body = commonFuc().get_business_data(module, "payload3_2_2_2_1", hosName, invoiceQty, invoiceAmount,
invoiceDate, hosId, provId,hosVersion)
print('发票缓存提交request_body', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('发票缓存提交result', result)
VI_id = commonFuc().analysis_json('billIds',
commonFuc().analysis_json('data', result))
VI_id= ' '.join(VI_id)
print('VI_id',VI_id)
# ==============发票缓存提交===========================================
# ===============预开票列表查询====================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url1")
request_body = commonFuc().get_business_data(module, "payload3_3_1")
print('预开票列表查询request_body', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('预开票列表查询', 'result', result)
provName= commonFuc().analysis_json('provName',
commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
sumAmount= commonFuc().analysis_json('sumAmount',
commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
# ===============预开票列表查询====================================
# ===============预开票提交====================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "mcmsOutBalance_submitInvoice_url")
lastModified = timeUtils().get_time_hms(1)
createTime = timeUtils().get_time_hms(1)
invoiceTitle = hosName
settleMonths=settleMonth
request_body = commonFuc().get_business_data(module, "payload3_3_2", VI_id, lastModified, createTime, uxid,
get_hosid(), provId, provName, invoiceAmount, invoiceDate,
settleMonths, invoiceQty, hosName, invoiceTitle, sumAmount)
print('预开票提交request_body', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('预开票提交', 'result', result)
# ===============预开票提交====================================
# ===============发票确认列表查询
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url1")
request_body = commonFuc().get_business_data(module, "payload3_3")
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('发票确认列表查询result', result)
data = commonFuc().analysis_json('data', result)
data1 = commonFuc().analysis_json('data', data)
id1 = commonFuc().analysis_json('id', data1[0])
print(id1)
# ===============发票确认列表查询
# ===============发票确认
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "invoiceUpdateStatus_url")
request_body = commonFuc().get_business_data(module, "payload3_4", id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('发票确认result', result)
# ===============发票确认
# ==============内网发票核对============
module = "b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')
username = info['username1']
password = commonFuc().get_business_data("b2_herp3_bs", "password")
print('username,password', username, password)
# # 获取token和projectCode
token, projectCode, uxid, corpId, info = login(username, password, 2)
# 登录获取用户id等信息,使用创建的用户登录============结束
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "mcmsInvoice_listVoPage_url")
print('url', url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload9", timeUtils().get_time_hms(5),
timeUtils().get_time_hms(5), get_hosid(), get_hosid())
print('request_body', request_body)
# 发送请求
i = 1
while True:
time.sleep(6)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
try:
data = commonFuc().analysis_json('data', result)
total = commonFuc().analysis_json('total', data)
if total == 0:
print('数据暂时未同步过来')
i = i + 1
if i >= 100:
print('600秒过去了,数据还未查询出来,检查一下脚本或者被测软件')
continue
else:
break
except:
continue
print('result', '内网发票核对', result)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
VI_id = commonFuc().analysis_json('id', data1[0])
print('VI_id', VI_id)
# ==============发票列表查询
# ==============发票核对提交
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_invoiceUpdateStatusList_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload10", VI_id, get_hosid())
print('request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
# ==============发票核对提交
# ==============内网发票核对============
# ==============内网发票提交开始
# 列表查询
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_listVoPage_url")
print('内网发票提交url', url)
request_body = commonFuc().get_business_data(module, "payload11", timeUtils().get_time_hms(5),
timeUtils().get_time_hms(5), get_hosid(), get_hosid())
print('内网发票提交request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', '内网发票提交列表查询结果', result)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
VI_id2='VI_id2'
if total == 0:
print('检查被测程序,发票提交列表查询数据是否正确')
else:
for i in range(total):
VI_id2 = commonFuc().analysis_json('id', data1[i])
if VI_id2 == VI_id:
break
print('VI_id2', VI_id2)
# ==============发票提交,下一步归档
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_invoiceUpdateStatusList_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload12", VI_id, get_hosid())
print('request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', '发票提交,下一步归档', result)
# ==============发票提交,下一步归档
# ==============发票归档列表查询
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_listVoPage_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload13", timeUtils().get_time_hms(5),
timeUtils().get_time_hms(5), get_hosid(), get_hosid())
print('request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', '发票归档列表查询', result)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
VI_id3='VI_id3'
if total == 0:
print('检查被测程序,发票归档列表查询查询数据是否正确')
else:
for i in range(total):
VI_id3 = commonFuc().analysis_json('id', data1[i])
if VI_id3 == VI_id2:
break
print('VI_id3', VI_id3)
# ==============发票归档列表查询
# ==================发票归档提交
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_invoiceUpdateStatusList_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload14", VI_id, get_hosid())
print('request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', '发票归档提交,下一步付款', result)
# ==================发票归档提交
# ==================付款单列表查询
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_listVoPage_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload15", get_hosid(), get_hosid())
print('request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', '付款单列表查询', result)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
VI_id4='VI_id4'
if total == 0:
print('检查被测程序,发票归档列表查询查询数据是否正确')
else: else:
for i in range(total): commonFuc().check_text_exist_result_text('succees', 'succees')
VI_id4 = commonFuc().analysis_json('id', data1[i])
if VI_id4 == VI_id3:
break
print('VI_id4', VI_id4)
# ==================付款单列表查询
# ==================付款提交
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"mcmsInvoice_genPaymentBills_url")
print('url', url)
request_body = commonFuc().get_business_data(module, "payload16", VI_id, get_hosid())
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 and data == 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
# ==================付款提交
# ==============内网发票提交
# ================发票查询列表页面验证
# ================发票查询列表页面验证
try:
OBH_ID = settle()
# 调用审批结算单
approval_center(OBH_ID)
from air_case.public1.public1.public1 import *
invoice(2,OBH_ID)
except Exception as e:
print('脚本出现异常,请检查脚本或者数据')
print("发生异常:", str(e))
traceback.print_exc()
else:
commonFuc().check_text_exist_result_text('succees', 'succees')
...@@ -218,23 +218,23 @@ def center_warehouse_return(): ...@@ -218,23 +218,23 @@ def center_warehouse_return():
print('herpService_stock_review_pass_submit_urlresult', result) print('herpService_stock_review_pass_submit_urlresult', result)
# ========出库复核提交 # ========出库复核提交
def main():
try: try:
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算 # test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# 先查询所有的部门信息写入文件 # 先查询所有的部门信息写入文件
dept_query_all() dept_query_all()
# 设置库房人员,根据传入的科室id和科室名称来设置库房 # 设置库房人员,根据传入的科室id和科室名称来设置库房
# 中心库type=1 二级type=2三级type=3 # 中心库type=1 二级type=2三级type=3
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'],2) set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'],2)
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3) set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3)
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库
center_warehouse_return()#中心库退货 center_warehouse_return()#中心库退货
# center_warehouse_return()#中心库退货 # center_warehouse_return()#中心库退货
OBh_ID=settle() # 生成结算单 OBh_ID=settle() # 生成结算单
# print(OBh_ID) # print(OBh_ID)
# 调用审批结算单 # 调用审批结算单
approval_center(OBh_ID) approval_center(OBh_ID)
invoice(2,OBh_ID)#type=2 传递结算单号,外网查询开票 invoice(2,OBh_ID)#type=2 传递结算单号,外网查询开票
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')
...@@ -218,21 +218,21 @@ def center_warehouse_return(): ...@@ -218,21 +218,21 @@ def center_warehouse_return():
print('herpService_stock_review_pass_submit_urlresult', result) print('herpService_stock_review_pass_submit_urlresult', result)
# ========出库复核提交 # ========出库复核提交
def main():
try: try:
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算 # test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# 先查询所有的部门信息写入文件 # 先查询所有的部门信息写入文件
dept_query_all() dept_query_all()
# 设置库房人员,根据传入的科室id和科室名称来设置库房 # 设置库房人员,根据传入的科室id和科室名称来设置库房
# 中心库type=1 二级type=2三级type=3 # 中心库type=1 二级type=2三级type=3
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'],2) set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'],2)
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3) set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3)
center_warehouse_return()#中心库退货 center_warehouse_return()#中心库退货
OBh_ID=settle() # 生成结算单 OBh_ID=settle() # 生成结算单
# print(OBh_ID) # print(OBh_ID)
# 调用审批结算单 # 调用审批结算单
approval_center(OBh_ID) approval_center(OBh_ID)
invoice(3,OBh_ID)#type=2 传递结算单号,外网查询开票 invoice(3,OBh_ID)#type=2 传递结算单号,外网查询开票
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', 'succees')
...@@ -322,25 +322,26 @@ def out_return_gt(): ...@@ -322,25 +322,26 @@ def out_return_gt():
# 跟台退货出库确认======================== # 跟台退货出库确认========================
try: def main():
set_dept_lead() # 设置二级科室负责人 try:
# # # # 设置默认科室,切换到二级科室,使用科室管理功能 set_dept_lead() # 设置二级科室负责人
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 # # # # 设置默认科室,切换到二级科室,使用科室管理功能
herpService_mcmsDeptGoodsInfo_getByProvIdPage() updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
operationApply() # 手术跟台申请单提交 herpService_mcmsDeptGoodsInfo_getByProvIdPage()
approval_center() # 审批手术跟台申请单 operationApply() # 手术跟台申请单提交
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 approval_center() # 审批手术跟台申请单
approval_center1() # 再次审批手术跟台申请单 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库
# # #内网查询手术通知单号 approval_center1() # 再次审批手术跟台申请单
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 # # #内网查询手术通知单号
orderno = Search_OrderNO() # 手术通知单接口查询单号 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库
print(orderno) orderno = Search_OrderNO() # 手术通知单接口查询单号
height_value_order_dp(orderno) # 高值跟台外网配送 print(orderno)
check_accept_order() # 内网验收 height_value_order_dp(orderno) # 高值跟台外网配送
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 check_accept_order() # 内网验收
second_dept_in_warehouse() # 二级科室入库 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 second_dept_in_warehouse() # 二级科室入库
out_return_gt() # 跟台退货出库_中心库处理 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库
commonFuc().check_text_exist_result_text('succees', 'succees') out_return_gt() # 跟台退货出库_中心库处理
except: commonFuc().check_text_exist_result_text('succees', 'succees')
commonFuc().check_text_exist_result_text('error', '1') except:
commonFuc().check_text_exist_result_text('error', '1')
...@@ -390,43 +390,44 @@ def pick_execute(GoodsId,type=1): ...@@ -390,43 +390,44 @@ def pick_execute(GoodsId,type=1):
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('herpService_stock_review_pass_submit_urlresult', result) print('herpService_stock_review_pass_submit_urlresult', result)
#复核=================================== #复核===================================
try: def main():
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 try:
# 二级库区信息写入文件 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], # 二级库区信息写入文件
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],
# get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3) FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2)
# 设置库区联系人 # get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3)
set_stockShelf_Linkman() # 设置库区联系人
# 低值 set_stockShelf_Linkman()
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) # 低值
# 高值 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) # 高值
# 试剂 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) # 试剂
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
for i in range(6): # 三个单据共审批6次 for i in range(6): # 三个单据共审批6次
approval_center() approval_center()
updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库
#获取拣货单列表个数 #获取拣货单列表个数
for i in range(get_centeStock_pick_list_counts()): for i in range(get_centeStock_pick_list_counts()):
centeStock_pick()#中心库拣货 centeStock_pick()#中心库拣货
#低值拣货执行 #低值拣货执行
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'] hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '') GoodsId = hosGoodsId.replace(get_hosid(), '')
pick_execute(GoodsId,1) pick_execute(GoodsId,1)
# 高值拣货执行 # 高值拣货执行
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'] hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '') GoodsId = hosGoodsId.replace(get_hosid(), '')
pick_execute(GoodsId,2) pick_execute(GoodsId,2)
# 试剂拣货执行 # 试剂拣货执行
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'] hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '') GoodsId = hosGoodsId.replace(get_hosid(), '')
pick_execute(GoodsId, 3) pick_execute(GoodsId, 3)
second_dept_one_key_in() second_dept_one_key_in()
second_dept_one_key_in() second_dept_one_key_in()
second_dept_one_key_in() second_dept_one_key_in()
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')
...@@ -308,31 +308,29 @@ def check_buyWayText(): ...@@ -308,31 +308,29 @@ def check_buyWayText():
def main1(type=1): def main():
try: try:
if type==1:
set_dept_lead() # 设置二级科室负责人 set_dept_lead() # 设置二级科室负责人
# 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0" # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
add_logic_stock() add_logic_stock()
# 设置产品出库渠道为边仓 # 设置产品出库渠道为边仓
goods_move() goods_move()
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
# # # 低值 # # # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# # 高值 # # 高值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
# # 试剂 # # 试剂
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
for i in range(6): # 三个单据共审批6次 for i in range(6): # 三个单据共审批6次
approval_center() approval_center()
check_buyWayText()#验证出库渠道是否为边仓 check_buyWayText()#验证出库渠道是否为边仓
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('aa')
except: except:
commonFuc().check_text_exist_result_text('error', 'succees') commonFuc().check_text_exist_result_text('error', 'succees')
main1()
\ No newline at end of file
...@@ -807,41 +807,41 @@ def check_accept_order(type=1): ...@@ -807,41 +807,41 @@ def check_accept_order(type=1):
titlename = ('CHECK_NO1', 'CHECK_NO2') titlename = ('CHECK_NO1', 'CHECK_NO2')
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '验收单号', titlename, 'message15') FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '验收单号', titlename, 'message15')
def main():
try: try:
# add_dept2() # 新增一个二级科室 # add_dept2() # 新增一个二级科室
# add_new_deptinfo() # 写入科室信息到文件中 # add_new_deptinfo() # 写入科室信息到文件中
# grants_user_new() #新增授权 # grants_user_new() #新增授权
# 设置部门用户 # 设置部门用户
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'],2) # set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'],2)
# 设置部门负责人 # 设置部门负责人
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人 # set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
# 从下面开始,上面的暂时注释 # 从下面开始,上面的暂时注释
goods_move2() # 设置产品出库渠道为直送 goods_move2() # 设置产品出库渠道为直送
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
for i in range(6): for i in range(6):
# # 低值 # # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# # 高值 # # 高值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
# # 试剂 # # 试剂
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
for i in range(6): # 三个单据共审批6次 for i in range(6): # 三个单据共审批6次
approval_center() approval_center()
# 采购模块处理 # 采购模块处理
purchase_module_process() purchase_module_process()
for i in range(3): # 三个单据共审批3次 for i in range(3): # 三个单据共审批3次
approval_center() approval_center()
order_dp(1) # 1低值 order_dp(1) # 1低值
order_dp(2) # 2高值 order_dp(2) # 2高值
order_dp(3) # 3试剂 order_dp(3) # 3试剂
check_accept_order(1) # 低值 check_accept_order(1) # 低值
check_accept_order(2) # 高值 check_accept_order(2) # 高值
check_accept_order(3) # 试剂 check_accept_order(3) # 试剂
second_dept_one_key_in() second_dept_one_key_in()
second_dept_one_key_in() second_dept_one_key_in()
second_dept_one_key_in() second_dept_one_key_in()
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')
...@@ -402,45 +402,45 @@ def pick_execute(): ...@@ -402,45 +402,45 @@ def pick_execute():
# 复核=================================== # 复核===================================
def main():
try: try:
add_dept2() # 新增一个二级科室 add_dept2() # 新增一个二级科室
add_new_deptinfo() # 写入科室信息到文件中 add_new_deptinfo() # 写入科室信息到文件中
grants_user_new() # 新增授权 grants_user_new() # 新增授权
# 同步库房信息 # 同步库房信息
execute_command("python runner_test.py tag id2263-221 debug sit") execute_command("python runner_test.py tag id2263-221 debug sit")
# 设置部门用户 # 设置部门用户
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'], set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2) FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
# 设置部门负责人 # 设置部门负责人
set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人 set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'], get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2) FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
set_stockShelf_Linkman()#设置库区联系人 set_stockShelf_Linkman()#设置库区联系人
#新建科室产品分配 #新建科室产品分配
dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5']) dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'])
#编辑产品请领目标为二级检验科002 #编辑产品请领目标为二级检验科002
currentDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'] currentDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5']
targetDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] targetDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
edit_goods_target(currentDeptId, targetDeptId) edit_goods_target(currentDeptId, targetDeptId)
updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库
# # # 低值 # # # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# # # 高值 # # # 高值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
# # # 试剂 # # # 试剂
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
for i in range(6): # 三个单据共审批6次 for i in range(6): # 三个单据共审批6次
approval_center() approval_center()
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
# 二级科室领用出库 # 二级科室领用出库
# 低值拣货执行 # 低值拣货执行
pick_execute() pick_execute()
second_dept_one_key_in(5) second_dept_one_key_in(5)
second_dept_one_key_in(5) second_dept_one_key_in(5)
second_dept_one_key_in(5) second_dept_one_key_in(5)
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')
...@@ -326,37 +326,37 @@ def pick_execute(): ...@@ -326,37 +326,37 @@ def pick_execute():
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('提交拣货执行单,result1', result) print('提交拣货执行单,result1', result)
def main():
try:
# 设置部门用户
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3)
# 设置部门负责人
set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"]) # 设置二级科室负责人
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3)
set_stockShelf_Linkman() # 设置库区联系人
#三级科室产品分配
dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'])
try: updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库
# 设置部门用户 # # # 低值
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'], second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3) # # # 高值
# 设置部门负责人 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"]) # 设置二级科室负责人 # # # 试剂
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'], second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3) BuyCarSubmit() # 请领车提交
set_stockShelf_Linkman() # 设置库区联系人 for i in range(6): # 三个单据共审批6次
#三级科室产品分配 approval_center()
dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3']) updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) #设置登录账号默认权限是二级库
#二级科室领用出库
updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 # 低值拣货执行
# # # 低值 pick_execute()
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) #设置登录账号默认权限是三级库
# # # 高值 second_dept_one_key_in(3)
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) second_dept_one_key_in(3)
# # # 试剂 second_dept_one_key_in(3)
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) commonFuc().check_text_exist_result_text('succees', 'succees')
BuyCarSubmit() # 请领车提交 except:
for i in range(6): # 三个单据共审批6次 commonFuc().check_text_exist_result_text('error ', '1')
approval_center()
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) #设置登录账号默认权限是二级库
#二级科室领用出库
# 低值拣货执行
pick_execute()
updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) #设置登录账号默认权限是三级库
second_dept_one_key_in(3)
second_dept_one_key_in(3)
second_dept_one_key_in(3)
commonFuc().check_text_exist_result_text('succees', 'succees')
except:
commonFuc().check_text_exist_result_text('error ', '1')
...@@ -576,17 +576,17 @@ def second_dept_consume_in_Stock(type=1): ...@@ -576,17 +576,17 @@ def second_dept_consume_in_Stock(type=1):
else: else:
commonFuc().check_text_exist_result_text('error', 'succees') commonFuc().check_text_exist_result_text('error', 'succees')
def main():
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
sCan_grant(1) # 低值扫码发放 sCan_grant(1) # 低值扫码发放
sCan_grant(3) # 试剂扫码发放 sCan_grant(3) # 试剂扫码发放
second_dept_consume_Out_Stock(2) # 高值消耗出库 second_dept_consume_Out_Stock(2) # 高值消耗出库
second_dept_consume_in_Stock(2) # 高值消耗退货入库 second_dept_consume_in_Stock(2) # 高值消耗退货入库
second_dept_consume_Out_Stock(1) # 低值消耗出库 second_dept_consume_Out_Stock(1) # 低值消耗出库
second_dept_consume_in_Stock(1) # 低值消耗退回入库 second_dept_consume_in_Stock(1) # 低值消耗退回入库
second_dept_consume_Out_Stock(3) # 试剂消耗出库 second_dept_consume_Out_Stock(3) # 试剂消耗出库
second_dept_consume_in_Stock(3) # 试剂消耗退回入库 second_dept_consume_in_Stock(3) # 试剂消耗退回入库
commonFuc().check_text_exist_result_text('SUCCESS', 'SUCCESS') commonFuc().check_text_exist_result_text('SUCCESS', 'SUCCESS')
except: except:
commonFuc().check_text_exist_result_text('error', 'SUCCESS') commonFuc().check_text_exist_result_text('error', 'SUCCESS')
...@@ -422,15 +422,15 @@ def second_dept_return_Out_Stock(type): # 三级库退库出库 ...@@ -422,15 +422,15 @@ def second_dept_return_Out_Stock(type): # 三级库退库出库
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('试剂产品退库出库,result', result) print('试剂产品退库出库,result', result)
def main():
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库
second_dept_return_Out_Stock(2) # 高值耗材退货出库 second_dept_return_Out_Stock(2) # 高值耗材退货出库
second_dept_return_Out_Stock(1) # 低值耗材退货出库 second_dept_return_Out_Stock(1) # 低值耗材退货出库
second_dept_return_Out_Stock(3) # 试剂耗材退货出库 second_dept_return_Out_Stock(3) # 试剂耗材退货出库
second_dept_one_key_in(2) second_dept_one_key_in(2)
second_dept_one_key_in(2) second_dept_one_key_in(2)
second_dept_one_key_in(2) second_dept_one_key_in(2)
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')
...@@ -553,21 +553,21 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库 ...@@ -553,21 +553,21 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('试剂产品退库出库,result', result) print('试剂产品退库出库,result', result)
def main():
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
second_dept_return_Out_Stock(2)#高值耗材退货出库 second_dept_return_Out_Stock(2)#高值耗材退货出库
approval_center()#审批 approval_center()#审批
putaway()#中心库上架 putaway()#中心库上架
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
second_dept_return_Out_Stock(1)#低值耗材退货出库 second_dept_return_Out_Stock(1)#低值耗材退货出库
approval_center() # 审批 approval_center() # 审批
putaway() # 中心库上架 putaway() # 中心库上架
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
second_dept_return_Out_Stock(3)#试剂耗材退货出库 second_dept_return_Out_Stock(3)#试剂耗材退货出库
approval_center()#审批 approval_center()#审批
putaway()#中心库上架 putaway()#中心库上架
# ===============上面调通了================================ # ===============上面调通了================================
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')
...@@ -626,12 +626,12 @@ def second_center_Stock_return_Out(type): # 中心库退供应商 ...@@ -626,12 +626,12 @@ def second_center_Stock_return_Out(type): # 中心库退供应商
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('herpService_stock_review_pass_submit_urlresult', result) print('herpService_stock_review_pass_submit_urlresult', result)
# ========出库复核提交 # ========出库复核提交
def main():
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(1)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage1(1)) # 设置登录账号默认权限是二级库
second_center_Stock_return_Out(2) #高值耗材退货出库 second_center_Stock_return_Out(2) #高值耗材退货出库
second_center_Stock_return_Out(1) #低值耗材退货出库 second_center_Stock_return_Out(1) #低值耗材退货出库
second_center_Stock_return_Out(3) #试剂耗材退货出库 second_center_Stock_return_Out(3) #试剂耗材退货出库
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')
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