diff --git "a/air_case/b5_spd3_core_business_flow/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.air/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.py" "b/air_case/b5_spd3_core_business_flow/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.air/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.py" index 2ea91ee27615ff3b8e82cc781959e1b88bb54069..5e32e7954879a66304c5e8c4426182e01c2e3ea6 100644 --- "a/air_case/b5_spd3_core_business_flow/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.air/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.py" +++ "b/air_case/b5_spd3_core_business_flow/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.air/a_a7\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\2273_\345\206\205\347\275\221\351\252\214\346\224\266\345\205\245\345\272\223\347\273\223\347\256\227.py" @@ -11,7 +11,7 @@ __author__ = "xiaohesheng" """ case_tag:api,spd_core,a_a7流程五_中心库入库结算_正结算3_内网验收入库结算,id2302,id2302-7,sit,on 主数据平台:a_a7流程五_中心库入库结算_正结算3_内网验收入库结算 -python runner_test.py tag id2302-6 debug mdm3 +python runner_test.py tag id2302-7 debug mdm3 """ from common.common_func import commonFuc @@ -214,33 +214,46 @@ def putaway(): commonFuc().get_business_data(module, "json_contentType"), token, projectCode) url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_in_page_url") + print(url) branch_id = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_id"] hosId = branch_id[0:5] request_body = commonFuc().get_business_data(module, "payload6", branch_id, hosId) result = commonFuc().http_post(url, request_body, headers) print('result', result) - # 将上架入库列表数据写入文件 - data = commonFuc().analysis_json('data', result) - data1= commonFuc().analysis_json('data', data) - list_a = [] - list_b = [] - list_c = [] - list_a.append(data1) - list_b.append(data1) - list_c.append(data1) - # print('list_a', len(list_a), list_a) - info = (list_a, list_b, list_c) - titlename = ('list_a', 'list_b', 'list_c') - # 将验收单详细信息写入到文件中 - FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '上架入库列表数据', titlename, 'message16') + data=commonFuc().analysis_json('data', result) + total=commonFuc().analysis_json('total', data) + if total>=1: + # 将上架入库列表数据写入文件 + data = commonFuc().analysis_json('data', result) + data1= commonFuc().analysis_json('data', data) + list_a = [] + list_b = [] + list_c = [] + list_a.append(data1) + list_b.append(data1) + list_c.append(data1) + # print('list_a', len(list_a), list_a) + info = (list_a, list_b, list_c) + titlename = ('list_a', 'list_b', 'list_c') + # 将验收单详细信息写入到文件中 + FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '上架入库列表数据', titlename, 'message16') # =====================上架入库列表查询========================== # =============查看验收单详情======================== url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_detail_url") + print(url) deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] areaCode = FileUtils().r_info8('b2_herp3_bs', 'shelfinfo', 'message7')["shelfCode"] branch_id = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_id"] hosId = branch_id[0:5] - sourceId = FileUtils().r_info8('b5_spd3_core_business_flow', '验收单号', 'message15')["CHECK_NO1"] + # 从message16文件中获取信息 + info = FileUtils().r_info8('b5_spd3_core_business_flow', "上架入库列表数据", 'message16') + list_a = info['list_a'] + print('list_a', list_a) + sourceId='sourceId' + for i in list_a: + for j in i: + sourceId = j['sourceId'] + break # 从message13文件中获取信息 info = FileUtils().r_info8('b5_spd3_core_business_flow', "验收单信息", 'message13') # print('info', info) @@ -275,15 +288,16 @@ def putaway(): # ============= # =============查看验收单详情================================================ # ================================入库上架=================== url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_detail_submit_url") - viewId = 'h03470000306444442024-10-30100支/100' - shelfCode = 'areah03471250-2-01-01' - sourceId = 'CHECKh03472024042300019' + print(url) + viewId = 'viewId' + shelfCode = 'shelfCode' + sourceId = 'sourceId' sourceType = 'PSD' sourceVersion = '0' targetDeptId = deptid1 - targetDeptName = '设备科001' - targetAreaCode = areaCode - targetAreaName = '自动化测试' + targetDeptName = 'targetDeptName' + targetAreaCode = 'targetAreaCode' + targetAreaName = 'targetAreaName' # 从message17文件中获取信息 info = FileUtils().r_info8('b5_spd3_core_business_flow', "验收单库存详情信息", 'message17') # print('info', info) @@ -303,22 +317,27 @@ def putaway(): for i in list_a: for j in i: sourceId = j['sourceId'] + targetAreaName= j['areaName'] + targetAreaCode= j['areaCode'] break request_body = commonFuc().get_business_data(module, "payload5", viewId, shelfCode, sourceId, sourceType, sourceVersion, targetDeptId, targetDeptName, targetAreaCode, targetAreaName) print('request_body',request_body) + time.sleep(3) result = commonFuc().http_post(url, request_body, headers) print('result', result) - # ================================入库上架 + # ================================入库上架================================ try: - check_accept_order(1) - check_accept_order(2) - check_accept_order(3) + check_accept_order(1)#低值 + check_accept_order(2)#高值 + check_accept_order(3)#试剂 + putaway() + putaway() putaway() except Exception as e: - print('请检查脚本或者数据') + print('验收入库上架脚本出现异常,请检查脚本或者数据') print("发生异常:", str(e)) traceback.print_exc() else: diff --git a/data/a2_mdm3_ea/message b/data/a2_mdm3_ea/message index 8adc521d2cc92c247acd80762a596271a07a67e9..c82178404f79c7718a5685cad1073b93ab833577 100644 --- a/data/a2_mdm3_ea/message +++ b/data/a2_mdm3_ea/message @@ -1,3 +1,3 @@ 企业信息: - e_id: CR202404230258 - cname: 国药集团公司2pCeJ + e_id: CR202404240057 + cname: 国药集团公司BJong diff --git a/data/a3_mdm3_hs/message b/data/a3_mdm3_hs/message index d8143c947ab7db10b5e0aa07513ec7304e41a550..2895841fc49e2a2c0160cdddc986608daa899ce1 100644 --- a/data/a3_mdm3_hs/message +++ b/data/a3_mdm3_hs/message @@ -1,3 +1,3 @@ 医院信息: - h_id: 湖南省人民医院X@n8x - h_name: 湖南省人民医院X@n8x + h_id: 湖南省人民医院9n8tw + h_name: 湖南省人民医院9n8tw diff --git a/data/a5_mdm3_pdm/message2 b/data/a5_mdm3_pdm/message2 index 0f6581c13d91e47b3aee715330760654c6b9b1ef..9b8a168f33825cb0148e684b5dc6baa178423d5b 100644 --- a/data/a5_mdm3_pdm/message2 +++ b/data/a5_mdm3_pdm/message2 @@ -1,7 +1,7 @@ 产品审核信息: - MSPid: MSP2404230059_1 + MSPid: MSP2404240017_1 hosId: h0347 - hosGoodsId: h034700003066 - provGoodsid: provGood-99220175 - goodsAuditBillId: MSP2404230059 - targetId: MSP2404230059_1 + hosGoodsId: h034700003083 + provGoodsid: provGood-99220192 + goodsAuditBillId: MSP2404240017 + targetId: MSP2404240017_1 diff --git a/data/b2_herp3_bs/message b/data/b2_herp3_bs/message index aee483a08c21065ff3b31500cbd9f3f4b47c71cd..7bc4aa9ecef9a3f4181e422c0c4a34a76770db42 100644 --- a/data/b2_herp3_bs/message +++ b/data/b2_herp3_bs/message @@ -1,6 +1,6 @@ 院区新增: - branch_id: h0347-3514 - branch_name: 东土城路院区Ma7zU + branch_id: h0347-3516 + branch_name: 东土城路院区W%SH# 科室信息: - dept2_id: 9d4bd32c2cc449a4ac3dd0ab99a66b47 + dept2_id: 6060ec04938e4c7181bb51fb04a7f7da dept2_name: 二级检验科002 diff --git a/data/b5_spd3_core_business_flow/data b/data/b5_spd3_core_business_flow/data index 4618e0f2ad81d30ab76d32c0c16d031131f02651..3823ce1f57db67e37346e59363a2043154ffe4a5 100644 --- a/data/b5_spd3_core_business_flow/data +++ b/data/b5_spd3_core_business_flow/data @@ -25,4 +25,4 @@ json_headers2: { "payload3": {"billMode":"%s","branchId":"%s","checkAll":1,"deptId":"%s","deptName":"%s","hosId":"%s","provId":"%s","provName":"%s","recOrgId":"%s","recOrgName":"%s","resendStatus":null,"rejectReason":null,"sourceId":"%s","sourceVersion":"%s","sourceType":"%s","tbStatus":"%s","createUser":"%s","sourceNo":"%s","sterilizeList":[],"remark":"","rejectFlag":0,"detailList":[{"id":"%s","viewId":"%s","settlement":"%s","checkQty":100,"recTemperature":"%s","recHumidity":"%s"}]} "payload4": {"targetDeptId":"%s","targetAreaCode":"%s","hosId":"%s","sourceId":"%s","sourceType":"%s","pkgTaskId":null} "payload5": {"batchList":[{"viewId":"%s","shelfCode":"%s"}],"sourceId":"%s","sourceType":"%s","sourceVersion":"%s","targetDeptId":"%s","targetDeptName":"%s","targetAreaCode":"%s","targetAreaName":"%s","pkgTaskId":null} -"payload6": {"pageNum":1,"pageSize":50,"orderBy":"","queryObject":{"branchId":"%s","taskType":0,"stockKind":"","sourceOrgName":"","hosId":"%s"}} \ No newline at end of file +"payload6": {"pageNum":1,"pageSize":50,"orderBy":"","queryObject":{"branchId":"%s","taskType":0,"stockKind":"","sourceOrgName":"","hosId":"%s"}} diff --git a/report/summary.html b/report/summary.html index e987c421d18ed0225a21486b7e5b3fd8acc8a9e0..f31cc02bd4cc38bb34b6a944d6998b3eb75a2899 100644 --- a/report/summary.html +++ b/report/summary.html @@ -54,10 +54,10 @@