Commit 55d61840 authored by 肖 和生's avatar 肖 和生
Browse files

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

parents d12f968f 4a9a5ea7
......@@ -4,6 +4,7 @@ import traceback
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from air_case.public1.public1.public1 import *
from common.db.sql.sql_tools import get_id, process_tuple
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -46,7 +47,9 @@ def second_dept_Request(hosGoodsId, type):
# 高值
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
# areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
areaCode =process_tuple(get_id("select shelf_code from mcms_stock_shelf where address='二级检验科002'and shelf_name='默认库区'order by create_time desc LIMIT 1;"))
request_body = commonFuc().get_business_data(module, "payload39", GoodsId, get_hosid(), deptid2, areaCode)
print('我要请领_手工请领_列表查询', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......@@ -72,6 +75,7 @@ def second_dept_Request(hosGoodsId, type):
goodsGeneralName = commonFuc().analysis_json('goodsGeneralName', data1)
provName = commonFuc().analysis_json('provName', data1)
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
pkgDefName= commonFuc().analysis_json('pkgDefName', data1)
# 信息写入文件
list_a = []
list_b = []
......@@ -88,27 +92,50 @@ def second_dept_Request(hosGoodsId, type):
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_buy_createBuyCar_url")
print('添加到请领车=================', url)
# if type == 1:
# request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec,
# mdmGoodsCode,
# goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
# deptId,
# areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
# targetStockName, purModeText, goodsGeneralName, provName)
# elif type == 2:
# request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec,
# mdmGoodsCode,
# goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId,
# areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
# targetStockName, purModeText, goodsGeneralName, provName)
# elif type == 3:
# request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec,
# mdmGoodsCode,
# goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
# deptId,
# areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
# targetStockName, purModeText, goodsGeneralName, provName)
#
# request_body = get_process_list(request_body)
if type == 1:
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 2:
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId,
goodsCode, unit, goodsMfrsName, unitName, price, deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 3:
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
request_body = get_process_list(request_body)
print('添加到请领车', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......
......@@ -5,6 +5,7 @@ import traceback
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from air_case.public1.public1.public1 import *
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import process_tuple, get_id
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -99,7 +100,9 @@ def second_dept_Request(hosGoodsId, type):
# 高值
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
# areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
areaCode =process_tuple(get_id("select shelf_code from mcms_stock_shelf where address='二级检验科002'and shelf_name='默认库区'order by create_time desc LIMIT 1;"))
request_body = commonFuc().get_business_data(module, "payload39", GoodsId, get_hosid(), deptid2, areaCode)
print('我要请领_手工请领_列表查询', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......@@ -125,6 +128,7 @@ def second_dept_Request(hosGoodsId, type):
goodsGeneralName = commonFuc().analysis_json('goodsGeneralName', data1)
provName = commonFuc().analysis_json('provName', data1)
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
pkgDefName= commonFuc().analysis_json('pkgDefName', data1)
# 信息写入文件
list_a = []
list_b = []
......@@ -142,22 +146,24 @@ def second_dept_Request(hosGoodsId, type):
"herpService_buy_createBuyCar_url")
print('添加到请领车=================', url)
if type == 1:
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 2:
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId,
goodsCode, unit, goodsMfrsName, unitName, price, deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 3:
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
......
......@@ -5,6 +5,7 @@ import traceback
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from air_case.public1.public1.public1 import *
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import process_tuple, get_id
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -100,7 +101,8 @@ def second_dept_Request(hosGoodsId, type):
# 高值
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
# areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
areaCode =process_tuple(get_id("select shelf_code from mcms_stock_shelf where address='二级检验科002'and shelf_name='默认库区'order by create_time desc LIMIT 1;"))
request_body = commonFuc().get_business_data(module, "payload39", GoodsId, get_hosid(), deptid2, areaCode)
print('我要请领_手工请领_列表查询', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......@@ -126,6 +128,7 @@ def second_dept_Request(hosGoodsId, type):
goodsGeneralName = commonFuc().analysis_json('goodsGeneralName', data1)
provName = commonFuc().analysis_json('provName', data1)
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
pkgDefName= commonFuc().analysis_json('pkgDefName', data1)
# 信息写入文件
list_a = []
list_b = []
......@@ -143,22 +146,24 @@ def second_dept_Request(hosGoodsId, type):
"herpService_buy_createBuyCar_url")
print('添加到请领车=================', url)
if type == 1:
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 2:
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId,
goodsCode, unit, goodsMfrsName, unitName, price, deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 3:
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
......@@ -835,7 +840,7 @@ def main():
# 从下面开始,上面的暂时注释
goods_move2() # 设置产品出库渠道为直送
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
for i in range(1):
for i in range(6):
# # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# # 高值
......
......@@ -139,19 +139,20 @@ def second_dept_Request(hosGoodsId, type):
print('添加到请领车', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('添加到请领车,result', result)
return token
# 添加到请领车=============================================
def BuyCarSubmit():
def BuyCarSubmit(token):
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等信息,使用创建的用户登录============结束
# # # 登录获取用户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,
......@@ -189,6 +190,17 @@ def BuyCarSubmit():
print('请领车提交,result', result)
# 请领车提交===============================================
# 创建领车交易=================================================
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "herpService_validBuyCarSubmit_url")
# print('创建领车交易=================', url)
#
# billExpdtDate = timeUtils().get_time_add(30, 2)
# request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0],
# list_id[1], list_id[2])
#
# print('创建领车交易', 'request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('validBuyCarSubmit', 'request_body', request_body)
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_buy_createBuyBill_url")
print('创建领车交易=================', url)
......@@ -433,8 +445,8 @@ def main():
# # # 高值
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)
BuyCarSubmit() # 请领车提交
token=second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
BuyCarSubmit(token) # 请领车提交
for i in range(6): # 三个单据共审批6次
approval_center()
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
......
......@@ -5,6 +5,7 @@ import traceback
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from air_case.public1.public1.public1 import *
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import get_id, process_tuple
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -70,7 +71,9 @@ def second_dept_Request(hosGoodsId, type):
# 高值
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
areaCode = get_stockAreaId_new(deptid3, deptname3, 3)
# areaCode = get_stockAreaId_new(deptid3, deptname3, 3)
areaCode =process_tuple(get_id("select shelf_code from mcms_stock_shelf where address='三级检测组003'and shelf_name='默认库区'order by create_time desc LIMIT 1;"))
request_body = commonFuc().get_business_data(module, "payload39", GoodsId, get_hosid(), deptid3, areaCode)
print('我要请领_手工请领_列表查询', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......@@ -96,6 +99,7 @@ def second_dept_Request(hosGoodsId, type):
goodsGeneralName = commonFuc().analysis_json('goodsGeneralName', data1)
provName = commonFuc().analysis_json('provName', data1)
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
pkgDefName= commonFuc().analysis_json('pkgDefName', data1)
# 信息写入文件
list_a = []
list_b = []
......@@ -113,22 +117,24 @@ def second_dept_Request(hosGoodsId, type):
"herpService_buy_createBuyCar_url")
print('添加到请领车=================', url)
if type == 1:
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 2:
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId,
goodsCode, unit, goodsMfrsName, unitName, price, deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
elif type == 3:
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec,
request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, purMode, goodsName, goodsSpec,
mdmGoodsCode,
goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price,
goodsCode, unit, goodsMfrsName, pkgDefName, pkgDefId, unitName,
price,
deptId,
areaCode, areaName, targetDeptId, targetDeptName, targetStockId,
targetStockName, purModeText, goodsGeneralName, provName)
......
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