Commit 785d8f8c authored by 肖 和生's avatar 肖 和生
Browse files

Merge remote-tracking branch 'remotes/origin/master' into core_flow

parents 9e10584f 7ad46483
...@@ -455,59 +455,7 @@ def reagent_purchase_plan(): ...@@ -455,59 +455,7 @@ 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 goods_move3(): # 设置请领出库渠道为中心库
# # 登录获取用户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等信息,使用创建的用户登录============结束
module = "b2_herp3_bs"
# 设置请领出库渠道为中心库
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "updateSettleType_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
for i in range(1, 4):
info = FileUtils().r_info8('b5_spd3_core_business_flow', "产品审核信息", 'message%s' % i)
hosGoodsId = info['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
branchGoodsId = SERACH_goods_id(GoodsId)
# #请求体
request_body = commonFuc().get_business_data(module, "payload47_3", branchGoodsId, hosGoodsId, get_branch_id())
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('goods_move,result', result)
def SERACH_goods_id(GoodsId):
# 在请领出库渠道边仓中搜索产品
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等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_mcmsBranchGoodsInfo_page_url")
dept1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
# GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload53_2", GoodsId, get_hosid(), get_branch_id(), dept1)
result = commonFuc().http_post(url, request_body, headers)
branchGoodsId = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data',
result)))
return branchGoodsId
def main(): def main():
try: try:
# 获取低值的hosGoodsId # 获取低值的hosGoodsId
......
...@@ -390,6 +390,61 @@ def pick_execute(hosGoodsId,GoodsId,type=1): ...@@ -390,6 +390,61 @@ def pick_execute(hosGoodsId,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)
#复核=================================== #复核===================================
def goods_move3(): # 设置请领出库渠道为中心库
# # 登录获取用户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等信息,使用创建的用户登录============结束
module = "b2_herp3_bs"
# 设置请领出库渠道为中心库
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "updateSettleType_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
for i in range(1, 4):
info = FileUtils().r_info8('b5_spd3_core_business_flow', "产品审核信息", 'message%s' % i)
hosGoodsId = info['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
branchGoodsId = SERACH_goods_id(GoodsId)
# #请求体
request_body = commonFuc().get_business_data(module, "payload47_3", branchGoodsId, hosGoodsId, get_branch_id())
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('goods_move,result', result)
def SERACH_goods_id(GoodsId):
# 在请领出库渠道边仓中搜索产品
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等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_mcmsBranchGoodsInfo_page_url")
dept1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
# GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload53_2", GoodsId, get_hosid(), get_branch_id(), dept1)
result = commonFuc().http_post(url, request_body, headers)
branchGoodsId = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data',
result)))
return branchGoodsId
def main(): def main():
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
......
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