Commit 779736f8 authored by liguangyu06's avatar liguangyu06
Browse files

新增期初导入脚本

No related merge requests found
Showing with 55 additions and 33 deletions
+55 -33
......@@ -39,43 +39,43 @@ def l_gen1():
# print( token,projectCode,uxid,corpId,info)
headers = commonFuc().get_business_data(module, "json_headers_pur", token)
# 生成期初任务
url = "http://spdtest.cmic.com.cn:8080/api/herpService/mcmsInitStock/insertInitStock"
# print(url)
request_body = {
"stockId": "1d7a43f605574af3bc69c6a24250718e",
"areaCode": "area0389",
"purMode": "60",
"hosId": "h0347",
"branchId": "h0347-2013"
}
"""
场景: 期初导入
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
result = json.loads(result.content)
# 获取期初任务id
qc_id = result["data"]
orderNo = qc_id.replace("h0347", "")
# # 生成期初任务
# url = "http://spdtest.cmic.com.cn:8080/api/herpService/mcmsInitStock/insertInitStock"
# # print(url)
# request_body = {
# "stockId": "1d7a43f605574af3bc69c6a24250718e",
# "areaCode": "area0389",
# "purMode": "60",
# "hosId": "h0347",
# "branchId": "h0347-2013"
# }
# """
# 场景: 期初导入
# """
#
# # 发送请求
# result = requests.post(url, json=request_body, headers=headers)
# # 获取接口响应时间
# result = json.loads(result.content)
# # 获取期初任务id
# qc_id = result["data"]
# orderNo = qc_id.replace("h0347", "")
# 获取产品信息
url = "http://spdtest.cmic.com.cn:8080/api/herpService/mcmsInitStock/getMcmsGoodsInfoVOS"
# print(url)
request_body = {
"queryObject": {
"id": qc_id ,
"hosId": "h0347",
"deptId": "177b66929d40480d910ed7a3177dbd6f",
"stockId": "1d7a43f605574af3bc69c6a24250718e",
"orderNo": orderNo,
"purMode": 60,
"goodsSpec": "Test-001"
},
"pageNum": 1,
"pageSize": 1200
}
"queryObject": {
"id": "QCh034720250511001976",
"hosId": "h0347",
"deptId": "177b66929d40480d910ed7a3177dbd6f",
"stockId": "1d7a43f605574af3bc69c6a24250718e",
"orderNo": "QC202505111978",
"purMode": 60,
"goodsSpec": "Test-001"
},
"pageNum": 1,
"pageSize": 1500
}
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
......@@ -90,6 +90,28 @@ def l_gen1():
hosGoodsCode = i["hosGoodsCode"]
pkgDefId = i["pkgDefId"]
# 生成期初任务
url = "http://spdtest.cmic.com.cn:8080/api/herpService/mcmsInitStock/insertInitStock"
# print(url)
request_body = {
"stockId": "1d7a43f605574af3bc69c6a24250718e",
"areaCode": "area0389",
"purMode": "60",
"hosId": "h0347",
"branchId": "h0347-2013"
}
"""
场景: 期初导入
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
result = json.loads(result.content)
# 获取期初任务id
qc_id = result["data"]
orderNo = qc_id.replace("h0347", "")
# 期初导入
url = "http://spdtest.cmic.com.cn:8080/api/herpService/mcmsInitStock/generate"
# print(url)
......
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