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 ae4eaa69fb994b6adfe96781e1510df6f4c0c389..40a3d7f2e2b3c7cb7bc6dc29e48caa3853a2066c 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)