From 7ad46483d963b00d7ef2489e3ae5a6e99447d29b Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Fri, 12 Jul 2024 14:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=8D=81=E8=84=9A=E6=9C=AC=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...07\350\264\255\350\256\241\345\210\222.py" | 52 ------------------ ...21\344\270\255\345\277\203\345\272\223.py" | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 52 deletions(-) diff --git "a/air_case/b5_spd3_core_business_flow/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.air/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.py" "b/air_case/b5_spd3_core_business_flow/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.air/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.py" index 691d3165..38e55755 100644 --- "a/air_case/b5_spd3_core_business_flow/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.air/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.py" +++ "b/air_case/b5_spd3_core_business_flow/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.air/a_a5\346\265\201\347\250\213\344\272\224_\344\270\255\345\277\203\345\272\223\345\205\245\345\272\223\347\273\223\347\256\227_\346\255\243\347\273\223\347\256\2271_\346\217\220\344\272\244\351\207\207\350\264\255\350\256\241\345\210\222.py" @@ -455,59 +455,7 @@ def reagent_purchase_plan(): commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) -def goods_move3(): # 设置请领出库渠道为中心库 - # # 登录获取用户id等信息,使用创建的用户登录===========开始 - info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') - username = info['username1'] - password = commonFuc().get_business_data("b2_herp3_bs", "password") - print('username,password', username, password) - # # 获取token和projectCode - token, projectCode, uxid, corpId, info = login(username, password, 2) - # 登录获取用户id等信息,使用创建的用户登录============结束 - module = "b2_herp3_bs" - # 设置请领出库渠道为中心库 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "updateSettleType_url") - # 获取请求头信息 - headers = commonFuc().get_business_data(module, "json_headers2", - commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) - for i in range(1, 4): - info = FileUtils().r_info8('b5_spd3_core_business_flow', "产品审核信息", 'message%s' % i) - hosGoodsId = info['hosGoodsId'] - GoodsId = hosGoodsId.replace(get_hosid(), '') - branchGoodsId = SERACH_goods_id(GoodsId) - # #请求体 - request_body = commonFuc().get_business_data(module, "payload47_3", branchGoodsId, hosGoodsId, get_branch_id()) - print(request_body) - # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('goods_move,result', result) -def SERACH_goods_id(GoodsId): - # 在请领出库渠道边仓中搜索产品 - module = 'b5_spd3_core_business_flow' - # # 登录获取用户id等信息,使用创建的用户登录===========开始 - info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') - username = info['username1'] - password = commonFuc().get_business_data("b2_herp3_bs", "password") - print('username,password', username, password) - # # 获取token和projectCode - token, projectCode, uxid, corpId, info = login(username, password, 2) - # 登录获取用户id等信息,使用创建的用户登录============结束\ - # 获取请求头信息 - headers = commonFuc().get_business_data(module, "json_headers2", - commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_mcmsBranchGoodsInfo_page_url") - dept1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] - # hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'] - # GoodsId = hosGoodsId.replace(get_hosid(), '') - request_body = commonFuc().get_business_data(module, "payload53_2", GoodsId, get_hosid(), get_branch_id(), dept1) - result = commonFuc().http_post(url, request_body, headers) - branchGoodsId = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data', - result))) - return branchGoodsId def main(): try: # 获取低值的hosGoodsId diff --git "a/air_case/b5_spd3_core_business_flow/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.air/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.py" "b/air_case/b5_spd3_core_business_flow/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.air/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.py" index 32f54cec..cf454907 100644 --- "a/air_case/b5_spd3_core_business_flow/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.air/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.py" +++ "b/air_case/b5_spd3_core_business_flow/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.air/a_b2\346\265\201\347\250\213\344\271\235\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\255\345\277\203\345\272\223.py" @@ -390,6 +390,61 @@ def pick_execute(hosGoodsId,GoodsId,type=1): result = commonFuc().http_post(url, request_body, headers) print('herpService_stock_review_pass_submit_urlresult', result) #复核=================================== +def goods_move3(): # 设置请领出库渠道为中心库 + # # 登录获取用户id等信息,使用创建的用户登录===========开始 + info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') + username = info['username1'] + password = commonFuc().get_business_data("b2_herp3_bs", "password") + print('username,password', username, password) + # # 获取token和projectCode + token, projectCode, uxid, corpId, info = login(username, password, 2) + # 登录获取用户id等信息,使用创建的用户登录============结束 + module = "b2_herp3_bs" + # 设置请领出库渠道为中心库 + url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "updateSettleType_url") + + # 获取请求头信息 + headers = commonFuc().get_business_data(module, "json_headers2", + commonFuc().get_business_data(module, "json_contentType"), token, + commonFuc().get_business_data(module, "X-APP-CODE")) + for i in range(1, 4): + info = FileUtils().r_info8('b5_spd3_core_business_flow', "产品审核信息", 'message%s' % i) + hosGoodsId = info['hosGoodsId'] + GoodsId = hosGoodsId.replace(get_hosid(), '') + branchGoodsId = SERACH_goods_id(GoodsId) + # #请求体 + request_body = commonFuc().get_business_data(module, "payload47_3", branchGoodsId, hosGoodsId, get_branch_id()) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url, request_body, headers) + print('goods_move,result', result) + + +def SERACH_goods_id(GoodsId): + # 在请领出库渠道边仓中搜索产品 + module = 'b5_spd3_core_business_flow' + # # 登录获取用户id等信息,使用创建的用户登录===========开始 + info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') + username = info['username1'] + password = commonFuc().get_business_data("b2_herp3_bs", "password") + print('username,password', username, password) + # # 获取token和projectCode + token, projectCode, uxid, corpId, info = login(username, password, 2) + # 登录获取用户id等信息,使用创建的用户登录============结束\ + # 获取请求头信息 + headers = commonFuc().get_business_data(module, "json_headers2", + commonFuc().get_business_data(module, "json_contentType"), token, + commonFuc().get_business_data(module, "X-APP-CODE")) + url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, + "herpService_mcmsBranchGoodsInfo_page_url") + dept1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + # hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'] + # GoodsId = hosGoodsId.replace(get_hosid(), '') + request_body = commonFuc().get_business_data(module, "payload53_2", GoodsId, get_hosid(), get_branch_id(), dept1) + result = commonFuc().http_post(url, request_body, headers) + branchGoodsId = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data', + result))) + return branchGoodsId def main(): try: updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 -- GitLab