Commit d12f968f authored by 肖 和生's avatar 肖 和生
Browse files

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

parents eeb95ef5 900e3a85
......@@ -218,15 +218,15 @@ def BuyCarSubmit():
# 创建领车交易=================================================
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_buy_createBuyBill_url")
print('创建领车交易=================', 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)
print('创建领车交易', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('创建领车交易,result', result)
print('创建领车交易,result', result)
currentTaskList = commonFuc().analysis_json('currentTaskList', commonFuc().analysis_json('data', result))
......@@ -440,7 +440,7 @@ def order_dp(type=1):
# 发送请求
while True:
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
print('待确认列表查询result', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
......@@ -588,7 +588,7 @@ def order_dp(type=1):
print('request_body', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
print('配送提交result', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
......@@ -835,7 +835,7 @@ def main():
# 从下面开始,上面的暂时注释
goods_move2() # 设置产品出库渠道为直送
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
for i in range(6):
for i in range(1):
# # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# # 高值
......@@ -847,8 +847,11 @@ def main():
approval_center()
# 采购模块处理
purchase_module_process()
for i in range(3): # 三个单据共审批3次
approval_center()
# 三个单据共审批3次
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号试剂', 'message12'))
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号', 'message7'))
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号高值', 'message11'))
order_dp(1) # 1低值
order_dp(2) # 2高值
order_dp(3) # 3试剂
......
......@@ -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,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='二级科室005'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)
......@@ -96,6 +98,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 +116,22 @@ 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)
......
......@@ -138,11 +138,15 @@ json_headers2: {
"payload37": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":null,"outStockNo":"","status":null,"branchId":"%s"}}
"payload38": {"billId":"%s","remark":null,"targetDeptId":"%s","version":0}
"payload39": {"pageNum":1,"pageSize":50,"queryObject":{"goodsName":"%s","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s","areaCode":"%s","provName":""}}
"payload40": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"100","pkgDefQty":100,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":null,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":100}
"payload41": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":null,"pkgDefQty":1,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":null,"buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":1}
"payload42": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"100","pkgDefQty":100,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":null,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":100}
"payload40": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"%s","pkgDefQty":100,"pkgQty":null,"qty":100,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":1,"noRecQty":100,"autoUnpack":0,"consumeQty":null,"consumePkgQty":null,"buyQty":100}
"payload41": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":null,"pkgDefQty":1,"pkgQty":null,"qty":1,"goodsImg":[],"pkgDefId":null,"buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"autoUnpack":null,"consumeQty":null,"consumePkgQty":null,"buyQty":1}
"payload42": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"%s","pkgDefQty":100,"pkgQty":null,"qty":100,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"autoUnpack":0,"consumeQty":null,"consumePkgQty":null,"buyQty":100}
"payload43": {"areaCode":"%s","goodsName":"","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s"}
"payload44": {"billExpdtDate":"%s","billExpectDate":"","priority":"0","remark":"","branchId":"%s","buyCarIds":["%s","%s","%s"]}
"payload45": {"dtos":"%s","opinion":1}
"payload46": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":"","auditStartTime":null,"auditEndTime":null,"startBillExpectDate":null,"endBillExpectDate":null,"priorityList":[],"orderNo":"","keyword":"","goodsSpec":"","shelfName":"","address":""}}
"payload46_1": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","priorityList":[],"branchId":"%s"}}
......
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