From 779736f88f2e29e6c262603aa9b99e815c759bdb Mon Sep 17 00:00:00 2001 From: liguangyu06 <1666071293@qq.com> Date: Sun, 11 May 2025 17:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=9F=E5=88=9D=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...37\345\210\235\345\257\274\345\205\245.py" | 88 ++++++++++++------- 1 file changed, 55 insertions(+), 33 deletions(-) diff --git "a/air_case/b2_herp3_bs/\346\234\237\345\210\235\345\257\274\345\205\245.air/\346\234\237\345\210\235\345\257\274\345\205\245.py" "b/air_case/b2_herp3_bs/\346\234\237\345\210\235\345\257\274\345\205\245.air/\346\234\237\345\210\235\345\257\274\345\205\245.py" index ae4eaa69..40a3d7f2 100644 --- "a/air_case/b2_herp3_bs/\346\234\237\345\210\235\345\257\274\345\205\245.air/\346\234\237\345\210\235\345\257\274\345\205\245.py" +++ "b/air_case/b2_herp3_bs/\346\234\237\345\210\235\345\257\274\345\205\245.air/\346\234\237\345\210\235\345\257\274\345\205\245.py" @@ -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) -- GitLab