Commit 0923a292 authored by liguangyu06's avatar liguangyu06
Browse files

生成结算数据

parent 36a52ed2
......@@ -25,7 +25,6 @@ import json
module = "b2_herp3_bs"
u_id = str(uuid.uuid4())
u_random = random.randint(1000, 100000000000000)
......@@ -42,61 +41,67 @@ headers = commonFuc().get_business_data(module, "json_headers_pur", token)
print(headers)
n = 0
if n < 2:
# 第二步发起站点资料变更
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "pur_get_goods_url")
print(url)
request_body = commonFuc().get_business_data(module, "payload_pur")
"""
# 第二步发起站点资料变更
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "pur_get_goods_url")
print(url)
request_body = commonFuc().get_business_data(module, "payload_pur")
"""
场景: 站点资料申请变更功能验证
用例名称:站点资料申请变更功能验证
输出:{"success":true,"code":"200","message":"OK","data":"success"}
"""
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
result = json.loads(result.content)
print(len(result["data"]["data"]))
len = random.randint(0, len(result["data"]["data"]) - 1)
# 获取产品信息
detail_list = result["data"]["data"][len]
print(detail_list["hosGoodsCode"])
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
result = json.loads(result.content)
print(len(result["data"]["data"]))
# len = random.randint(0, len(result["data"]["data"]) - 1)
# # 获取产品信息
# detail_list = result["data"]["data"][len]
# print(detail_list["hosGoodsCode"])
pkg_def_id = result["data"]["data"][0]["pkgDefVOList"][0]["pkgDefId"]
detail_list["inSettlement"] = 1
for i in result["data"]["data"]:
pkg_def_id = i["pkgDefVOList"][0]["pkgDefId"]
print(i["hosGoodsCode"])
i["inSettlement"] = 1
# pkg_def_id = result["data"]["data"][0]["pkgDefVOList"][0]["pkgDefId"]
# detail_list["inSettlement"] = 1
initStockBatchVOS = [
{
"batchCode": u_random,
"productDate": "2025-04-01",
"expdtDate": "2029-04-30",
"stockQty": 1,
"viewId": u_id,
"pkgDefId": pkg_def_id,
"pkgDefName": "大包",
"pkgDefQty": 20
}
]
{
"batchCode": u_random,
"productDate": "2025-04-01",
"expdtDate": "2029-04-30",
"stockQty": 1,
"viewId": u_id,
"pkgDefId": pkg_def_id,
"pkgDefName": "大包",
"pkgDefQty": 20
}
]
batchVOS = [
{
"batchCode": u_random,
"productDate": "2025-04-01",
"expdtDate": "2029-04-30",
"stockQty": 1,
"viewId": u_id,
"pkgDefId": pkg_def_id,
"pkgDefName": "大包",
"pkgDefQty": 20
}
]
detail_list["initStockBatchVOS"] = initStockBatchVOS
detail_list["batchVOS"] = batchVOS
detail_list["stockQty"] = 1
{
"batchCode": u_random,
"productDate": "2025-04-01",
"expdtDate": "2029-04-30",
"stockQty": 1,
"viewId": u_id,
"pkgDefId": pkg_def_id,
"pkgDefName": "大包",
"pkgDefQty": 20
}
]
i["initStockBatchVOS"] = initStockBatchVOS
i["batchVOS"] = batchVOS
i["stockQty"] = 1
json1 = {
"areaCode": "area0379",
......@@ -110,7 +115,7 @@ if n < 2:
"attachmentList": []
}
json1["detailVOS"] = [detail_list]
json1["detailVOS"] = [i]
payload_pur = json1
# 手工入库
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "pur_submit_url")
......@@ -122,9 +127,4 @@ if n < 2:
print(result)
n = n + 1
......@@ -208,7 +208,7 @@ json_headers_pur: {
"queryObject": {
"branchId": "h0347-2013",
"deptId": "391d5e06d0ba4cb39a3a7ee2e7934ae7",
"stockId": "b278f988a25c4678a1448fb08c3b4a41",
"goodsName": "性能测试",
"provId": "p00002a0c",
"subProvId": "p00002a0c",
"purMode": "60",
......@@ -216,7 +216,10 @@ json_headers_pur: {
"stockLevel": ""
},
"pageNum": 1,
"pageSize": 500000
"pageSize": 1500
}
......
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