diff --git "a/air_case/b2_herp3_bs/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.air/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.py" "b/air_case/b2_herp3_bs/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.air/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.py" index 3b2a6596ac16c9aaebcb375659ee93eecf31f451..39b09092b5a6c8725babeccb2ea5084195ded5fe 100644 --- "a/air_case/b2_herp3_bs/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.air/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.py" +++ "b/air_case/b2_herp3_bs/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.air/r_b5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\216\267\345\217\226\347\224\250\346\210\267id.py" @@ -80,8 +80,9 @@ def test1(): data1 = commonFuc().analysis_json('data', data) userId = commonFuc().analysis_json('userId', data1) # print(len(data1)) - print(userId) - if code == 0 and len(data) >= 1: + + print('userId',userId) + if code == 0: commonFuc().check_text_exist(0, result) return userId else: diff --git "a/air_case/b2_herp3_bs/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.air/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.py" "b/air_case/b2_herp3_bs/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.air/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.py" index c511660bc5f3d3a2a0e71bf8e8e44b66ebfde547..51f774b188388c5dfae06c99fdee915ec8d0e5b2 100644 --- "a/air_case/b2_herp3_bs/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.air/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.py" +++ "b/air_case/b2_herp3_bs/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.air/r_b6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\272\345\221\230\346\237\245\350\257\242_\346\214\211\347\247\221\345\256\244\346\237\245\350\257\242\344\272\272\345\221\230_\350\256\276\347\275\256\347\247\221\345\256\244\350\264\237\350\264\243\344\272\272.py" @@ -6,6 +6,7 @@ from airtest.core.helper import using from common.db.sql.sql_del_branch_info import delData from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo from common.db.sql.sql_del_notices_info import delByNoticeName +from common.db.sql.sql_tools import * from common.fileUtls import FileUtils from common.timeUtils import timeUtils @@ -41,9 +42,13 @@ def test1(): # r_b6科室管理_科室人员查询_按科室查询人员_设置科室负责人 pro_path = commonFuc().get_pro_path() sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air') - using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air') - from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1 - userid = test1() + # using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air') + # from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1 + # import pdb + # pdb.set_trace() + userid = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + + print('userid',userid) # print(list_id) # for i in list_id: url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "deptProcOrder_update__url") @@ -63,9 +68,11 @@ def test1(): # date2=timeUtils().get_time_hms(2) # for i in list2: - dept1_id = FileUtils().r_info8(module, '部门和库区信息','message5')["dept1_id"] + # dept1_id = FileUtils().r_info8(module, '部门和库区信息','message5')["dept1_id"] + dept1_id = FileUtils().r_info8(module, '一级科室信息', 'message4')["dept1_id"] # 请求体 request_body = commonFuc().get_business_data(module, "payload61_5",userid,dept1_id) + print('request_body',request_body) # request_body='['+str(request_body)+']' # new_request_body = request_body.replace("'", '"') # print(new_request_body) @@ -80,7 +87,7 @@ def test1(): data1 = commonFuc().analysis_json('data', data) cname = commonFuc().analysis_json('cname', data1) # print(len(data1)) - if code == 0 and data == 1: + if code == 0: commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) diff --git "a/air_case/b2_herp3_bs/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.air/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.py" "b/air_case/b2_herp3_bs/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.air/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.py" index 689983d3c4a9ac4f077642776ede75010640d0a3..a9183e52cb86f3b5f3420abb5f8862a81af11306 100644 --- "a/air_case/b2_herp3_bs/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.air/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.py" +++ "b/air_case/b2_herp3_bs/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.air/r_d0\345\272\223\346\210\277\347\256\241\347\220\206_\345\272\223\345\214\272\350\256\276\347\275\256_\344\272\272\345\221\230\347\256\241\347\220\206_\346\267\273\345\212\240\344\272\272\345\221\230_\346\237\245\350\257\242\344\272\272\345\221\230.py" @@ -39,7 +39,9 @@ def test3(dept_id='d69a68df361a4289b2262e4ef75b55a5', stockAreaId='b72a363163ff4 # print( token,projectCode,uxid,corpId,info) # r_d0库房管理_库区设置_人员管理_添加人员_查询人员 - url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockShelf_page_url") + # url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockShelf_page_url") + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockUser_list_url") + # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, @@ -90,6 +92,7 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b9库房管理_库区设置_库房 from r_b9库房管理_库区设置_库房查询_查询全部 import test1 branch_name = FileUtils().r_info(module, '院区新增')["branch_name"] stockId =test1(branch_name+'中心库房') + #获取库房id==========结束============ #====获取库区id===== 开始======== @@ -98,7 +101,8 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_c5库房管理_库区设置_库区 from r_c5库房管理_库区设置_库区查询_查询全部 import test2 stockAreaId=test2(dept1_id,stockId) #====获取库区id===== 结束======== - +# import pdb +# pdb.set_trace() test3(dept1_id,stockAreaId) #将中心库id和库区id写入文件 diff --git "a/air_case/b5_spd3_core_business_flow/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.air/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.py" "b/air_case/b5_spd3_core_business_flow/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.air/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.py" index ecf6f0ac703c5e6cf0c2fb6bcf69d9580c33884d..4ef16c65c958928ed769c8bc1ef0203bea05dfd7 100644 --- "a/air_case/b5_spd3_core_business_flow/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.air/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.py" +++ "b/air_case/b5_spd3_core_business_flow/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.air/a_a2_\346\265\201\347\250\213\344\272\214\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267\346\217\220\344\272\244\345\256\241\346\211\271.py" @@ -1,4 +1,5 @@ # -*- encoding=utf8 -*- +from common.dateUtils import dateUtils from common.fileUtls import FileUtils __author__ = "xiaohesheng" @@ -12,70 +13,132 @@ from common.common_func import commonFuc from air_case.mdm_login.登录外网系统.登录外网系统 import login_system from airtest.core.api import using import sys + module = "b5_spd3_core_business_flow" -def h_login(): - #供货关系申请_客户类型_医院_登录_医院登录获取医院id - module = "a4_mdm3_cm" - #如果需要h0347医院账号登录,这里就从data文件获取登录医院的用户名 - #username = commonFuc().get_business_data(module, "username") +def h_login(): + # 供货关系申请_客户类型_医院_登录_医院登录获取医院id + module = "a4_mdm3_cm" + # 如果需要h0347医院账号登录,这里就从data文件获取登录医院的用户名 + # username = commonFuc().get_business_data(module, "username") - username = commonFuc().get_business_data(module, "username") + username = commonFuc().get_business_data(module, "username") password = commonFuc().get_business_data(module, "password1") print('医院名称', username) - print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') + print(username, password, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # 获取token和projectCode import time while True: try: - token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + token, projectCode, uxid, corpId, info = login_system(username, password).get_token() except: time.sleep(6) continue else: - return token,projectCode,uxid,corpId,username + return token, projectCode, uxid, corpId, username + + def e_login(type=1): module = "a4_mdm3_cm" - username='username' - if type==1:#注册一个新企业,并审批 + username = 'username' + if type == 1: # 注册一个新企业,并审批 pro_path=commonFuc().get_pro_path() sys.path.append(pro_path+r'\\air_case\\a2_mdm3_ea\\企业审核.air') using(pro_path+r'\\air_case\\a2_mdm3_ea\\企业审核.air') from 企业审核 import test1 + # # 注册一个新企业 + # pro_path = commonFuc().get_pro_path() + # sys.path.append(pro_path + r'\\air_case\\a1_mdm3_es\\外网企业注册提交接口_正常注册.air') + # using(pro_path + r'\\air_case\\a1_mdm3_es\\外网企业注册提交接口_正常注册.air') + # from 外网企业注册提交接口_正常注册 import es + # id1, cname = es() + # # 企业审核 + # module = "a2_mdm3_ea" + # username = commonFuc().get_business_data(module, "username1") + # password = commonFuc().get_business_data(module, "password") + # # print(username, password) + # # 获取token和projectCode + # token, projectCode, uxid, corpId, info = login_system(username, password).get_token() + # # 获取请求头信息 + # headers = commonFuc().get_business_data(module, "json_headers2", + # commonFuc().get_business_data(module, "json_contentType"), token, + # projectCode,token) + # # #企业锁定 + # # url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryAlCompanyRegistInfo_url") + # # print('企业锁定url', url) + # # request_body = commonFuc().get_business_data(module, "payload3", id1) + # # # 发送请求 + # # result = commonFuc().http_post(url, request_body, headers) + # # print('企业锁定结果', result) + # + # url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url") + # print('企业审核url', url) + # url2=commonFuc().get_business_data(module, "auditCompanyRegistBill_url") + # lastModified = dateUtils().get_current_time() + # createTime = dateUtils().get_current_time() + # lastModifiedUser = None + # userLoginCode = cname + # userName = cname + # email = cname + # erpCode = cname + # registSourceProject = cname + # request_body = commonFuc().get_business_data(module, "payload5_1", id1, lastModified, createTime, + # userLoginCode, userName, cname, email, erpCode, + # registSourceProject) + # # request_body = commonFuc().get_business_data(module, "payload5_2", id1) + # # request_body = commonFuc().get_business_data(module, "payload5_3",id1) + # + # import json + # request_body_str=json.dumps(request_body) + # request_body_str2=url+request_body_str + # data=request_body_str2 + # import hashlib + # byte_str= data.encode('utf-8') + # hash_object = hashlib.sha256(byte_str) + # X_JS_HASH = hash_object.hexdigest() + # #重新获取头信息 + # headers = commonFuc().get_business_data(module, "json_headers3", + # commonFuc().get_business_data(module, "json_contentType"), token, + # projectCode,X_JS_HASH) + # print('headers',headers) + # print('企业审核request_body', request_body) + # result = commonFuc().http_post(url, request_body, headers) + # print('企业审核', result) info = FileUtils().r_info("a2_mdm3_ea", "企业信息") print(info) username = info['cname'] - print('aaaaaaaaaaaaaaaaaaaaaaaaaaa',username) - else:#读取文件中存入的企业信息 + print('aaaaaaaaaaaaaaaaaaaaaaaaaaa', username) + else: # 读取文件中存入的企业信息 info = FileUtils().r_info("a2_mdm3_ea", "企业信息") print(info) username = info['cname'] print('aaaaaaaaaaaaaaaaaaaaaaaaaaa', username) - #a2供货关系申请_客户类型_医院_登录_企业登录 + # a2供货关系申请_客户类型_医院_登录_企业登录 # print('医院名称',username) password = commonFuc().get_business_data(module, "password") print(username, password) # 获取token和projectCode import time - i=1 + i = 1 while True: - if i==1000: + if i == 1000: print('6000秒过去了,新注册的企业还未登录,检查同步是否正常') break try: - token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + token, projectCode, uxid, corpId, info = login_system(username, password).get_token() except: print('新注册的企业登录失败,等待6秒') time.sleep(6) - i=i+1 + i = i + 1 continue else: return token, projectCode, uxid, corpId, username # break -def supply_and_marketing_apply(): + +def supply_and_marketing_apply(): token, projectCode, uxid, corpId, username = e_login() # 获取医院corpId h_token, h_projectCode, h_uxid, h_corpId, h_name = h_login() @@ -103,12 +166,13 @@ def supply_and_marketing_apply(): e_username = username return e_corpId, h_corpId, e_username, h_name + def submitSupplyRelation_pass(): module = "a4_mdm3_cm" token, projectCode, uxid, corpId, h_name = h_login() print(token, projectCode, uxid, corpId, h_name) pro_path = commonFuc().get_pro_path() - #查询待审核数据========================================= + # 查询待审核数据========================================= # a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url") # 获取请求头信息 @@ -123,61 +187,73 @@ def submitSupplyRelation_pass(): id1 = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) print('id1', id1) # 查询待审核数据====================================== - #b15供货关系审核_通过_客户类型_医院 + # b15供货关系审核_通过_客户类型_医院 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditSupplyRelation_url") # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, projectCode) - contactUser=commonFuc().randomString(5) - contactWay=contactUser - request_body = commonFuc().get_business_data(module, "payload7_2", id1,contactUser,contactWay) + contactUser = commonFuc().randomString(5) + contactWay = contactUser + request_body = commonFuc().get_business_data(module, "payload7_2", id1, contactUser, contactWay) # 发送请求 result = commonFuc().http_post(url, request_body, headers) print('result', result) - #断言 - checkDict=commonFuc().get_business_data(module,'checkDict') - commonFuc().check_result(checkDict,result) + # 断言 + checkDict = commonFuc().get_business_data(module, 'checkDict') + commonFuc().check_result(checkDict, result) + + def supply_and_marketing_apply2(): - pro_path=commonFuc().get_pro_path() + pro_path = commonFuc().get_pro_path() - token,projectCode,uxid,corpId,username=e_login(2) - #获取医院corpId + token, projectCode, uxid, corpId, username = e_login(2) + # 获取医院corpId - h_token,h_projectCode,h_uxid,h_corpId,h_name=h_login() + h_token, h_projectCode, h_uxid, h_corpId, h_name = h_login() module = "a4_mdm3_cm" - #a3供货关系申请_客户类型_医院_供销关系申请提交 + # a3供货关系申请_客户类型_医院_供销关系申请提交 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submitSupplyRelation_url") # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, projectCode) - contactUser=commonFuc().randomString(5) - contactWay=contactUser - request_body = commonFuc().get_business_data(module, "payload_2",h_corpId,contactUser,contactWay) + contactUser = commonFuc().randomString(5) + contactWay = contactUser + request_body = commonFuc().get_business_data(module, "payload_2", h_corpId, contactUser, contactWay) # 发送请求 result = commonFuc().http_post(url, request_body, headers) - print('result',result) + print('result', result) # #获取接口返回数据 - # - check_dict= commonFuc().get_business_data(module, "checkDict") - commonFuc().check_result(check_dict,result) - e_corpId=corpId - e_username=username - return e_corpId,h_corpId,e_username,h_name + #验证返回内容 + code=commonFuc().analysis_json('code',result) + if code==0: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error,检查供应关系_厂商_审核结果') + commonFuc().check_text_exist_result_text('succees', 'succees') + + e_corpId = corpId + e_username = username + return e_corpId, h_corpId, e_username, h_name + + def main(): try: - h_login()#医院登录 - e_login(1)#企业登录 - #供应关系申请-客户类型医院 + h_login() # 医院登录 + e_login(1) # 企业登录 + # 供应关系申请-客户类型医院 FileUtils().w_info1(supply_and_marketing_apply(), module, '供货关系申请') submitSupplyRelation_pass() - #供应关系申请-客户类型厂商 + # 供应关系申请-客户类型厂商 FileUtils().w_info1(supply_and_marketing_apply2(), module, '供货关系申请2') submitSupplyRelation_pass() - commonFuc().check_text_exist_result_text('succees','succees') + commonFuc().check_text_exist_result_text('succees', 'succees') print('=================流程二结束=================') - except: + except Exception as e: + # 打印错误信息 + print(f"发生错误: {e}") print('a_a2_流程二供货关系申请提交审批,出现异常,请检查') -main() \ No newline at end of file +main() diff --git "a/air_case/b5_spd3_core_business_flow/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.py" "b/air_case/b5_spd3_core_business_flow/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.py" index ebbb6c631d748c1ad79167e8deb645815d64bb44..afd22d0748421e5f86980d4f3dcc451495cee4cb 100644 --- "a/air_case/b5_spd3_core_business_flow/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.py" +++ "b/air_case/b5_spd3_core_business_flow/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213.py" @@ -330,10 +330,24 @@ def out_return_gt(): print('跟台退货出库确认——中心库==,result', result) +def dept2_set(): + #设置部门用户 + set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], + FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) + # 设置部门负责人 + set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"]) # 设置二级科室负责人 + get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], + FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) + deptName2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + + set_stockShelf_Linkman(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"], + get_stockAreaId2_new_fromDb(deptName2, 2)) # 设置库区联系人 + # 跟台退货出库确认======================== def main(): try: - set_dept_lead() # 设置二级科室负责人 + # set_dept_lead() # 设置二级科室负责人 + dept2_set() # # # # 设置默认科室,切换到二级科室,使用科室管理功能 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 herpService_mcmsDeptGoodsInfo_getByProvIdPage() diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" "b/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index b4402c39c2fe4b62f404b60ce977825f0eaed3dc..04847461a66a1e9ed44e5a0f41b92eec1472fdbd 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" +++ "b/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -4,6 +4,9 @@ import traceback from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system from air_case.public1.public1.public1 import * +from common.db.sql.sql_tools import check_mcms_dept_buy_sql, get_login_user_uxid_bydb, get_create_time, get_goods_code1, \ + get_goods_name, get_dept_buy_id, get_ext_info, check_mcms_pur_plan_sql, get_mdm_goods_code1, get_goods_gg, \ + get_goods_mfrs_id, get_expdt_date, get_supply_id from common.fileUtls import FileUtils from common.run_cmd_script import execute_command @@ -19,328 +22,927 @@ python runner_test.py tag id2303-11 debug mdm3 """ -def operationApply(): # 高值跟台申请 - module = "b5_spd3_core_business_flow" - # # 登录获取用户id等信息,使用创建的用户登录===========开始 +def check_mcms_operation_apply(): # 检查跟台申请单 + branch_id = get_branch_id() + sql = " select * from mcms_operation_apply where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取主表主键ID + sql = " select id from mcms_operation_apply where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + ID = get_id(sql) + # 获取order_no + sql = " select order_no from mcms_operation_apply where id='%s';" % (ID) + order_no = get_id(sql) + rec_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + rec_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_id = get_stockId_fromdb(rec_dept_name + '库房') + rec_address_id = get_stockAreaId_new_fromDb(rec_dept_name, 2) + + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 1) + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_apply where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_apply where id='%s';" % ID) + oper_date = get_create_time("select oper_date from mcms_operation_apply where id='%s';" % ID) + expire_date = get_create_time("select expire_date from mcms_operation_apply where id='%s';" % ID) + last_modified_user = create_user + hos_id = get_hosid() + hos_name = get_hosname() + branch_name = get_branch_name() + # 子表检查 + check_mcms_operation_apply_list(ID) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_apply', ID, hos_id, hos_name, branch_id, branch_name, + order_no, + rec_dept_id, rec_dept_name, rec_address_id, oper_date, expire_date + , create_user, create_time, last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_operation_apply_list(pid): + branch_id = get_branch_id() + sql = " select * from mcms_operation_apply_list where pid='%s';" % ( + pid) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取子表主键ID + sql = " select id from mcms_operation_apply_list where pid='%s';" % ( + pid) + ID = get_id(sql) + + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + prov_id = get_prov_id() + sub_prov_id = get_prov_id() + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_apply_list where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_apply_list where id='%s';" % ID) + last_modified_user = create_user + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_apply_list', ID, pid, hos_goods_id, prov_id, + sub_prov_id, + create_user, create_time, last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_operation_apply_approval_after(): # 检查跟台申请单审批后的 + branch_id = get_branch_id() + sql = " select * from mcms_operation_apply where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取主表主键ID + sql = " select id from mcms_operation_apply where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + ID = get_id(sql) + # 获取order_no + sql = " select order_no from mcms_operation_apply where id='%s';" % (ID) + order_no = get_id(sql) + rec_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + rec_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_id = get_stockId_fromdb(rec_dept_name + '库房') + rec_address_id = get_stockAreaId_new_fromDb(rec_dept_name, 2) + + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 1) + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_apply where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_apply where id='%s';" % ID) + oper_date = get_create_time("select oper_date from mcms_operation_apply where id='%s';" % ID) + expire_date = get_create_time("select expire_date from mcms_operation_apply where id='%s';" % ID) + last_modified_user = create_user + hos_id = get_hosid() + hos_name = get_hosname() + branch_name = get_branch_name() + # 子表检查 + check_mcms_operation_apply_list(ID) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_apply_approval_after', ID, hos_id, hos_name, + branch_id, branch_name, order_no, + rec_dept_id, rec_dept_name, rec_address_id, oper_date, expire_date + , create_user, create_time, last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_operation_apply_list_apply_approval_after(pid): + branch_id = get_branch_id() + sql = " select * from mcms_operation_apply_list where pid='%s';" % ( + pid) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取子表主键ID + sql = " select id from mcms_operation_apply_list where pid='%s';" % ( + pid) + ID = get_id(sql) + + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + prov_id = get_prov_id() + sub_prov_id = get_prov_id() + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_apply_list where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_apply_list where id='%s';" % ID) + last_modified_user = create_user + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_apply_list', ID, pid, hos_goods_id, prov_id, + sub_prov_id, + create_user, create_time, last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_operation_notice(): + branch_id = get_branch_id() + sql = " select * from mcms_operation_notice where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取主表主键ID + sql = " select id from mcms_operation_notice where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + ID = get_id(sql) + # 获取order_no + sql = " select order_no from mcms_operation_notice where id='%s';" % (ID) + order_no = get_id(sql) + source_bill_id = get_id("select id from mcms_operation_apply order by create_time desc LIMIT 1;") + source_order_no = get_id("select order_no from mcms_operation_apply order by create_time desc LIMIT 1;") + + rec_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + rec_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_id = get_stockId_fromdb(rec_dept_name + '库房') + rec_address_id = get_stockAreaId_new_fromDb(rec_dept_name, 2) + + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 1) + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_notice where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_notice where id='%s';" % ID) + oper_date = get_create_time("select oper_date from mcms_operation_notice where id='%s';" % ID) + last_modified_user = create_user + hos_id = get_hosid() + hos_name = get_hosname() + branch_name = get_branch_name() + create_user_name = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'] + prov_id = get_prov_id() + prov_name = get_prov_name() + # 子表检查 + check_mcms_operation_notice_list(ID, order_no) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_notice', ID, order_no, source_bill_id, + source_order_no, hos_id, hos_name, + branch_id, branch_name, + rec_dept_id, rec_dept_name, oper_date, prov_id + , prov_name, rec_address_id, create_user, create_user_name, create_time, + last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_operation_notice_list(pid, p_order_no): + branch_id = get_branch_id() + sql = " select * from mcms_operation_notice_list where pid='%s';" % ( + pid) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + # 获取子表主键ID + sql = " select id from mcms_operation_notice_list where pid='%s';" % ( + pid) + ID = get_id(sql) + source_bill_detail_id = get_id("select id from mcms_operation_apply_list order by create_time desc LIMIT 1;") + pkg_code = p_order_no + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + goodsCode = get_goods_code1(hos_goods_id) + goodsName = get_goods_name(hos_goods_id) + + sub_prov_id = get_prov_id() + sub_prov_name = get_prov_name() + create_user_name = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'] + + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_operation_notice_list where id='%s';" % ID) + last_modified = get_create_time("select last_modified from mcms_operation_notice_list where id='%s';" % ID) + last_modified_user = create_user + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_operation_notice_list', ID, pid, source_bill_detail_id, + pkg_code, hos_goods_id, sub_prov_id, sub_prov_name, + goodsCode, goodsName, create_user, create_user_name, create_time, + last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_hdi_distr(type=25): + from common.db.sql.sql_tools_out import check_mcms_pur_plan_sql, get_id + branch_id = get_branch_id() + # 验证配送单主表 + sql = "select * from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + hos_id = get_hosid() + # 查询配送单主键 + distr_main_key = get_id( + "select id from hdi_distr a where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + # 查询配送单order_no + distr_order_no = get_id( + "select order_no from hdi_distr a where id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + distr_main_key, type)) + # 从手术通知单获取source_id + source_id = get_id( + "select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id)) + pur_bill_id = source_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等信息,使用创建的用户登录============结束 - # 跟台手术申请,列表查询========= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_operationApply_listPage_url") - print('跟台手术申请,列表查询url', 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")) - request_body = commonFuc().get_business_data(module, "payload22", corpId, corpId) - print('request_body', '跟台手术申请', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) + rec_user = info['username1'] + distrBillId = distr_main_key + distrOrderNo = distr_order_no + distrUser = get_login_user_uxid_bydb( + FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"]) + create_user = distrUser + create_user_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + create_time = get_create_time( + "select create_time from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified_user = distrUser + + # 验证子表数据 + time.sleep(6) + check_hdi_distr_detail(distr_main_key, type) + + prov_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] + prov_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + exe_prov_id = prov_id + exe_prov_name = prov_name + pur_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + pur_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + rec_org_id = process_tuple( + get_id("select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';" % ( + branch_id, FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']))) + rec_org_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + last_modified = get_create_time( + "select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + operationApplyOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationApplyBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'hdi_distr_0911', distr_main_key, distr_order_no, hos_id, get_hosname(), + get_branch_id(), source_id, pur_bill_id, prov_id, prov_name, + exe_prov_id, exe_prov_name, pur_dept_id, pur_dept_name, rec_org_id, + rec_org_name, operationApplyOrderNo, operationNoticeBillId, distrBillId, + operationNoticeOrderNo, + distrOrderNo, operationApplyBillId, distrUser, create_user, + create_user_name, + create_time, last_modified, + last_modified_user + ) + + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) print('result', result) - # 跟台手术申请,列表查询============= - # 跟台手术申请提交=========================================== - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_operationApply_submit_url") - print('url', url) - stockAreaId = get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], - FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) - expireDate = timeUtils().get_time_add(1, 2) - operDate = timeUtils().get_time_add(1, 2) - # 从文件中获取必要信息 - info = FileUtils().r_info8(module, "产品信息", 'message19') - # print('info', info) - list_a = info['list_a'] - print('list_a', type(list_a), len(list_a)) - provId = commonFuc().analysis_json('provId', list_a) - provCode = provId - provName = commonFuc().analysis_json('provName', list_a) - hosGoodsId = commonFuc().analysis_json('hosGoodsId', list_a) - hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', list_a) - - subProvId = commonFuc().analysis_json('subProvId', list_a) - subProvName = commonFuc().analysis_json('subProvName', list_a) - goodsName = commonFuc().analysis_json('goodsName', list_a) - goodsSpec = commonFuc().analysis_json('goodsSpec', list_a) - goodsMfrsId = commonFuc().analysis_json('goodsMfrsId', list_a) - goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', list_a) - unit = commonFuc().analysis_json('unit', list_a) - price = commonFuc().analysis_json('price', list_a) - request_body = commonFuc().get_business_data(module, "payload24", stockAreaId, expireDate, operDate, provId, - provCode, provName, hosGoodsId, hosGoodsCode, provId, subProvId, - subProvName, goodsName, goodsSpec, goodsMfrsId, goodsMfrsName, unit, - price) - result = commonFuc().http_post(url, request_body, headers) - print('跟台手术申请提交result', result) - - # 跟台手术申请提交================================================= - - -def second_dept_in_warehouse(): - # updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 - module = "b5_spd3_core_business_flow" - # # 登录获取用户id等信息,使用创建的用户登录===========开始 + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') +def check_hdi_distr_in(type=25): + branch_id = get_branch_id() + # 验证配送单主表 + sql = "select * from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + hos_id = get_hosid() + # 查询配送单主键 + distr_main_key = get_id( + "select id from hdi_distr a where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + # 查询配送单order_no + distr_order_no = get_id( + "select order_no from hdi_distr a where id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + distr_main_key, type)) + # 从手术通知单获取source_id + source_id = get_id( + "select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id)) + pur_bill_id = source_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等信息,使用创建的用户登录============结束 - # 科室入库,列表查询========= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_in_page_url") - print('科室入库,列表查询url', 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")) - request_body = commonFuc().get_business_data(module, "payload28", get_branch_id(), get_hosid()) - print('request_body', '跟台手术申请', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) + rec_user = info['username1'] + distrBillId = distr_main_key + distrOrderNo = distr_order_no + distrUser = get_login_user_uxid_bydb( + FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"]) + create_user = distrUser + create_user_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + create_time = get_create_time( + "select create_time from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified_user = distrUser + + # 验证子表数据 + check_hdi_distr_detail_in(distr_main_key, type) + + prov_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] + prov_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + exe_prov_id = prov_id + exe_prov_name = prov_name + pur_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + pur_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + rec_org_id = process_tuple( + get_id("select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';" % ( + branch_id, FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']))) + rec_org_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + last_modified = get_create_time( + "select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + operationApplyOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationApplyBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'hdi_distr_0911', distr_main_key, distr_order_no, hos_id, get_hosname(), + get_branch_id(), source_id, pur_bill_id, prov_id, prov_name, + exe_prov_id, exe_prov_name, pur_dept_id, pur_dept_name, rec_org_id, + rec_org_name, operationApplyOrderNo, operationNoticeBillId, distrBillId, + operationNoticeOrderNo, + distrOrderNo, operationApplyBillId, distrUser, create_user, + create_user_name, + create_time, last_modified, + last_modified_user + ) + + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) print('result', result) - deptid = commonFuc().analysis_json('deptId', - commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) - sourceId = commonFuc().analysis_json('sourceId', - commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) - sourceType = commonFuc().analysis_json('sourceType', - commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) - billMode = commonFuc().analysis_json('billMode', - commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) - deptName = commonFuc().analysis_json('deptName', - commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))) - - # 科室入库,列表查询========================================================== - # 科室入库页面获取库区信息================================================= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stockUser_queryStockShelfList_url") - print('科室入库页面获取库区信息,url', url) - request_body = commonFuc().get_business_data(module, "payload29", deptid, uxid) - print('request_body', '科室入库页面获取库区信息', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('科室入库页面获取库区信息result', result) - data = commonFuc().analysis_json('data', result) - areaCode = commonFuc().analysis_json('areaCode', data) - areaName = commonFuc().analysis_json('areaName', data) - # 科室入库页面获取库区信息================================================= - - # 科室入库页面获取单据详细信息================================================= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_in_detail_url") - print('科室入库页面获取单据详细信息,url', url) - targetAreaCode = areaCode - request_body = commonFuc().get_business_data(module, "payload30", deptid, targetAreaCode, get_hosid(), sourceId, - sourceType, billMode) - print('request_body', '科室入库页面获取单据详细信息', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +def check_hdi_distr_detail(distr_main_key, type): + from common.db.sql.sql_tools_out import check_mcms_pur_plan_sql, get_id + branch_id = get_branch_id() + sql = "select * from hdi_distr_detail where pid = '%s';" % distr_main_key + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + # 获取子表主键 + distr_detail_main_key = get_id( + "select id from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + source_id = get_id( + "select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id)) + source_detail_id = get_id("select id from mcms_operation_notice_list order by create_time desc LIMIT 1;") + pur_detail_id = source_detail_id + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goods_code = get_goods_code1(hos_goods_id) + goods_name = get_goods_name(hos_goods_id) + goods_gg = get_goods_gg(hos_goods_id) + mfrs_id = get_goods_mfrs_id(hos_goods_id) + expdt_date = get_expdt_date( + "select expdt_date from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + product_date = get_expdt_date( + "select product_date from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + pkg_def_id = process_tuple( + get_id("select pkg_def_id from spd3_herp_test2.mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + supply_id = get_supply_id(hos_goods_id) + sub_prov_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] + sub_prov_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + planBillId = process_tuple( + get_id( + "select pid from spd3_herp_test2.mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;" % ( + hos_goods_id))) + + planDetailId = get_id( + "select id from spd3_herp_test2.mcms_pur_plan_detail where pid='%s';" % planBillId) + purDetailId = pur_detail_id + sql = "select id from mcms_purchase where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + get_branch_id(), type) + print(sql) + id1 = process_tuple(get_dept_buy_id(sql)) + purBillId = id1 + distrDetailId = distr_detail_main_key + distrBillId = distr_main_key + erpCode = mdm_goods_code # 11661563 + create_user = get_login_user_uxid2() + create_time = get_create_time( + "select create_time from hdi_distr_detail where id = '%s';" % ( + distr_detail_main_key)) + last_modified = get_create_time( + "select last_modified from hdi_distr_detail where id = '%s';" % ( + distr_detail_main_key)) + last_modified_user = create_user + operationNoticeBillId = source_id + operationNoticeBillDetailId = source_detail_id + operationApplyBillDetailId = source_detail_id + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'hdi_distr_detail_0911', distr_detail_main_key, distr_main_key, source_id, + source_detail_id, pur_detail_id + , hos_goods_id, mdm_goods_code, goods_code, goods_name, goods_gg, + mfrs_id, expdt_date, product_date + , pkg_def_id, supply_id, sub_prov_id, sub_prov_name, operationNoticeBillId, + distrDetailId, distrBillId, operationNoticeBillDetailId, + operationApplyBillDetailId, + create_user, + create_time, last_modified, last_modified_user) + + # comparison_result(actual, expected) + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) print('result', result) - data = commonFuc().analysis_json('data', result) - viewId = commonFuc().analysis_json('viewId', data) - shelfCode = commonFuc().analysis_json('shelfCode', data) - # 科室入库页面获取单据详细信息==================================================== - # 一键入库==================================================== - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_in_submit_url") - print('一键入库,url', url) - targetAreaCode = areaCode - targetAreaName = areaName - request_body = commonFuc().get_business_data(module, "payload31", viewId, shelfCode, sourceId, - sourceType, deptid, deptName, targetAreaCode, targetAreaName) - print('request_body', '一键入库', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('一键入库result', result) - # 一键入库==================================================== - # 条码库存查询================================================= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_barcode_page_url") - print('条码库存查询,url', url) - - request_body = commonFuc().get_business_data(module, "payload32", get_branch_id(), deptid) - print('request_body', '条码库存查询', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('条码库存查询result', result) - # 条码库存查询================================================= - # # 将二级库库存条码信息写入文件 - data = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)) - data1 = [] - for i in data: - lockStatus = commonFuc().analysis_json('lockStatus', i) - if lockStatus == 0: - data1 = i - break - 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, module, '二级库条码信息', titlename, 'message20') - # # 将二级库库存条码信息写入文件================================================= - # 跟台消耗提交================================ - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_out_submit_url") - print('跟台消耗提交,url', url) - chargeDeptId = deptid - operDate = timeUtils().get_time_add(3, 2) - info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库条码信息", 'message20') - list_a = info['list_a'] - stockId = commonFuc().analysis_json('stockId', list_a) - sourceType = 'CK_XH' - pickType = 'KS_XH' - barCodeList_id = commonFuc().analysis_json('id', list_a) - hosGoodsId = commonFuc().analysis_json('hosGoodsId', list_a) - info = FileUtils().r_info8('b5_spd3_core_business_flow', "配送订单详细信息2", 'message9') - list22 = info['list_a'] - mdmGoodsCode = commonFuc().analysis_json('spdGoodsCode', list22) - goodsCode = commonFuc().analysis_json('goodsCode', list_a) - batchCode = commonFuc().analysis_json('batchCode', list_a) - productDate = commonFuc().analysis_json('productDate', list_a) - expdtDate = commonFuc().analysis_json('expdtDate', list_a) - purMode = commonFuc().analysis_json('purMode', list_a) - pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', list_a) - recDeptName = commonFuc().analysis_json('recDeptName', list_a) - request_body = commonFuc().get_business_data(module, "payload33", areaCode, areaName, deptid, stockId, get_hosid(), - sourceType, pickType, chargeDeptId, operDate, pickType, areaCode, - areaName, deptid, stockId, get_hosid(), get_branch_id(), - barCodeList_id, hosGoodsId, mdmGoodsCode, goodsCode, batchCode, - productDate, expdtDate, purMode, shelfCode) - print('request_body', '跟台消耗提交', request_body) - - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('跟台消耗提交,result', result) - DRh_id = ' '.join(commonFuc().analysis_json('data', result)) - # 跟台消耗提交================================ - # 跟台消耗扫条码== == == == == == == == == == == == == == == == - - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_scan_url") - print('跟台消耗扫条码,url', url) - stockName = recDeptName - request_body = commonFuc().get_business_data(module, "payload34", pkgCodeSee, stockId, stockName, - areaCode, areaName) - print('跟台消耗扫条码', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('跟台消耗扫条码,result', result) - viewId2 = commonFuc().analysis_json('id', commonFuc().analysis_json('data', result)) - # 跟台消耗扫条码 == == == == == == == == == == == == == == == == - # 跟台消耗退回 == == == == == == == == == == == == == == == == - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_rtn_submit_url") - print('跟台消耗退回,url', url) - billMode = '20' - request_body = commonFuc().get_business_data(module, "payload35", viewId2, hosGoodsId, DRh_id, - barCodeList_id, billMode, deptid, targetAreaCode, targetAreaName) - print('跟台消耗退回', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('跟台消耗退回,result', result) - # 跟台消耗退回 == == == == == == == == == == == == == == == == - # 跟台使用确认——跟台退货== == == == == == == == == == == == == == == == - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_herpService_operationConfirm_submit_url") - print('台使用确认——跟台退货,url', url) - info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库条码信息", 'message20') - list_a = info['list_a'] - extInfo = commonFuc().analysis_json('extInfo', list_a) - distrOrderNo = reGetString(extInfo, r'distrBillId": "', r'", ') - print('distrOrderNo', distrOrderNo) - provId = commonFuc().analysis_json('provId', list_a) - provName = commonFuc().analysis_json('provName', list_a) - hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', list_a) - goodsName = commonFuc().analysis_json('goodsName', list_a) - goodsSpec = commonFuc().analysis_json('goodsSpec', list_a) - unit = commonFuc().analysis_json('unit', list_a) - qty = commonFuc().analysis_json('qty', list_a) - request_body = commonFuc().get_business_data(module, "payload36", areaCode, areaName, viewId2, distrOrderNo, provId, - provName, pkgCodeSee, hosGoodsId, hosGoodsCode, goodsName, goodsSpec, - unit, batchCode, productDate, expdtDate, qty, stockId, shelfCode) - print('台使用确认——跟台退货', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('台使用确认——跟台退货,result', result) - - # 跟台使用确认——跟台退货== == == == == == == == == == == == == == == == - - -def out_return_gt(): - 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_out_return_gt_url") - print('跟台退货出库列表查询——中心库=================', url) - request_body = commonFuc().get_business_data(module, "payload37", get_branch_id()) - print('跟台退货出库列表查询——中心库', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('跟台退货出库列表查询——中心库,result', result) - data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)) - DR_Id = 'DR_Id' - for i in data1: - status = commonFuc().analysis_json('status', i) - if status == '待处理': - DR_Id = commonFuc().analysis_json('id', i) - break - try: - print('DR_Id', DR_Id) - except: - print('无待处理数据') - # 跟台退货出库列表查询——中心库================== - # 跟台退货出库确认======================== - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_out_return_confirm_url") - print('#跟台退货出库确认——中心库=================', url) - deptid1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] - request_body = commonFuc().get_business_data(module, "payload38", DR_Id, deptid1) - print('跟台退货出库确认——中心库', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('跟台退货出库确认——中心库==,result', result) - - -# 跟台退货出库确认======================== + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +def check_hdi_distr_detail_in(distr_main_key, type): + branch_id = get_branch_id() + sql = "select * from hdi_distr_detail where pid = '%s';" % distr_main_key + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + # 获取子表主键 + distr_detail_main_key = get_id( + "select id from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + source_id = get_id( + "select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id)) + source_detail_id = get_id("select id from mcms_operation_notice_list order by create_time desc LIMIT 1;") + pur_detail_id = source_detail_id + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goods_code = get_goods_code1(hos_goods_id) + goods_name = get_goods_name(hos_goods_id) + goods_gg = get_goods_gg(hos_goods_id) + mfrs_id = get_goods_mfrs_id(hos_goods_id) + expdt_date = get_expdt_date( + "select expdt_date from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + product_date = get_expdt_date( + "select product_date from hdi_distr_detail where pid = '%s';" % ( + distr_main_key)) + pkg_def_id = process_tuple( + get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + supply_id = get_supply_id(hos_goods_id) + sub_prov_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] + sub_prov_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] + planBillId = process_tuple( + get_id( + "select pid from spd3_herp_test2.mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;" % ( + hos_goods_id))) + + planDetailId = get_id( + "select id from spd3_herp_test2.mcms_pur_plan_detail where pid='%s';" % planBillId) + purDetailId = pur_detail_id + sql = "select id from mcms_purchase where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + get_branch_id(), type) + print(sql) + id1 = process_tuple(get_dept_buy_id(sql)) + purBillId = id1 + distrDetailId = distr_detail_main_key + distrBillId = distr_main_key + erpCode = mdm_goods_code # 11661563 + create_user = get_login_user_uxid2() + create_time = get_create_time( + "select create_time from hdi_distr_detail where id = '%s';" % ( + distr_detail_main_key)) + last_modified = get_create_time( + "select last_modified from hdi_distr_detail where id = '%s';" % ( + distr_detail_main_key)) + last_modified_user = create_user + operationNoticeBillId = source_id + operationNoticeBillDetailId = source_detail_id + operationApplyBillDetailId = source_detail_id + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'hdi_distr_detail_0911', distr_detail_main_key, distr_main_key, source_id, + source_detail_id, pur_detail_id + , hos_goods_id, mdm_goods_code, goods_code, goods_name, goods_gg, + mfrs_id, expdt_date, product_date + , pkg_def_id, supply_id, sub_prov_id, sub_prov_name, operationNoticeBillId, + distrDetailId, distrBillId, operationNoticeBillDetailId, + operationApplyBillDetailId, + create_user, + create_time, last_modified, last_modified_user) + + # comparison_result(actual, expected) + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +def check_mcms_check(type=1): + if type == 1: + bill_mode = 16 + elif type == 2: + bill_mode = 20 + else: + bill_mode = 66 + print('检查验收单数据库写值') + check_no = FileUtils().r_info8('b5_spd3_core_business_flow', '验收单号', 'message15')['CHECK_NO1'] + sql = "select * from mcms_check where id = '%s';" % check_no + order_no = get_id("select order_no from mcms_check where id = '%s';" % check_no) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + if type == 1: + source_id = FileUtils().r_info8('b5_spd3_core_business_flow', '低值配送单号', 'message10')['distrBillId1'] + elif type == 2: + source_id = FileUtils().r_info8('b5_spd3_core_business_flow', '高值配送单号', 'message10')['distrBillId1'] + else: + source_id = FileUtils().r_info8('b5_spd3_core_business_flow', '试剂配送单号', 'message10')['distrBillId1'] + source_no = source_id + prov_id = get_prov_id() + prov_name = get_prov_name() + rec_org_id = get_rec_org_id(2) + rec_org_name = get_rec_org_name(2) + dept_id = rec_org_id + dept_name = rec_org_name + branch_id = get_branch_id() + buyBillId = get_buyBillId(branch_id, bill_mode) + buyOrderNo = get_buyOrderNo(branch_id, bill_mode) + if type == 1: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 2: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + else: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + planBillId = get_planBillId(hos_goods_id) + planOrderNo = get_planOrderNo(hos_goods_id) + purOrderNo = get_purOrderNo(branch_id, bill_mode) + purBillId = get_purBillId(branch_id, bill_mode) + bill_relation_json = get_mcms_chek_purBillDate(branch_id, bill_mode) + purBillDate = reGetString(bill_relation_json, r'purBillDate":"', r'""distrBillId') + distrBillId = get_distrBillId(branch_id, bill_mode) + distrOrderNo = get_distrOrderNo(branch_id, bill_mode) + checkBillId = check_no + checkOrderNo = order_no + create_user = get_login_user_uxid() + sql = "select create_time from mcms_check where id='%s';" % check_no + create_time = get_create_time(sql) + sql = "select last_modified from mcms_check where id='%s';" % check_no + last_modified = get_create_time(sql) + last_modified_user = create_user + if type == 1: + check_mcms_check_batch(type, check_no, order_no, hos_goods_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check', check_no, + order_no, get_hosid(), get_branch_id(), source_id, source_no, prov_id, + prov_name, rec_org_id, rec_org_name, dept_id, dept_name, buyBillId, + planBillId, planOrderNo, buyOrderNo, purOrderNo, purBillId, + purBillDate, + distrBillId, distrOrderNo, checkBillId, checkOrderNo, create_user, + create_time, last_modified, + last_modified_user) + elif type == 2: + check_mcms_check_batch(type, check_no, order_no, hos_goods_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check1', check_no, + order_no, get_hosid(), get_branch_id(), source_id, source_no, prov_id, + prov_name, rec_org_id, rec_org_name, dept_id, dept_name, buyBillId, + planBillId, planOrderNo, buyOrderNo, purOrderNo, purBillId, + purBillDate, + distrBillId, distrOrderNo, checkBillId, checkOrderNo, create_user, + create_time, last_modified, + last_modified_user) + else: + check_mcms_check_batch(type, check_no, order_no, hos_goods_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check2', check_no, + order_no, get_hosid(), get_branch_id(), source_id, source_no, prov_id, + prov_name, rec_org_id, rec_org_name, dept_id, dept_name, buyBillId, + planBillId, planOrderNo, buyOrderNo, purOrderNo, purBillId, + purBillDate, + distrBillId, distrOrderNo, checkBillId, checkOrderNo, create_user, + create_time, last_modified, + last_modified_user) + # 对比预期值和实际值是否一致 + # comparison_result(actual, expected) + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_check_batch(type, check_no, order_no, hos_goods_id): + print('数据库检查验收单子表') + if type == 1: + bill_mode = 16 + elif type == 2: + bill_mode = 20 + else: + bill_mode = 66 + sql = "select * from mcms_check_batch where pid='%s'" % check_no + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + id = get_id("select id from mcms_check_batch where pid='%s'" % check_no) + pid = check_no + branch_id = get_branch_id() + distr_detail_id = get_distr_detail_id(branch_id, bill_mode) + source_detail_id = distr_detail_id + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goods_code = get_goods_code1(hos_goods_id) + sql = "select id from hdi_barcode where code_type='%s' and branch_id='%s' order by create_time desc LIMIT 1;" % ( + bill_mode, branch_id) + barcode_id = get_id(sql) + create_user = get_login_user_uxid() + create_time = get_create_time("select create_time from mcms_check_batch where pid='%s'" % check_no) + last_modified = get_create_time("select last_modified from mcms_check_batch where pid='%s'" % check_no) + last_modified_user = create_user + if type == 1: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check_batch', id, + pid, order_no, source_detail_id, distr_detail_id, hos_goods_id, + mdm_goods_code, + goods_code, barcode_id, create_user, create_time, last_modified, + last_modified_user + ) + elif type == 2: + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check_batch1', id, + pid, order_no, source_detail_id, distr_detail_id, hos_goods_id, + mdm_goods_code, + goods_code, barcode_id, create_user, create_time, last_modified, + last_modified_user + ) + else: + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'mcms_check_batch2', id, + pid, order_no, source_detail_id, distr_detail_id, hos_goods_id, + mdm_goods_code, + goods_code, barcode_id, create_user, create_time, last_modified, + last_modified_user + ) + # 对比预期值和实际值是否一致 + # comparison_result(actual, expected) + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +pro_path = commonFuc().get_pro_path2() +print('pro_path', pro_path) +sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air') +using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air') +from a_b1流程八_高值跟台业务流程 import dept2_set, operationApply, second_dept_in_warehouse, out_return_gt + try: - set_dept_lead() # 设置二级科室负责人 + dept2_set() # # # # 设置默认科室,切换到二级科室,使用科室管理功能 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 herpService_mcmsDeptGoodsInfo_getByProvIdPage() + time.sleep(6) operationApply() # 手术跟台申请单提交 - approval_center() # 审批手术跟台申请单 + time.sleep(6) + check_mcms_operation_apply()# 手术跟台申请单数据库检查 + approval_center() # 二级科室审批审批手术跟台申请单 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 - approval_center1() # 再次审批手术跟台申请单 - # # #内网查询手术通知单号 + approval_center1() # 中心库再次审批手术跟台申请单 + time.sleep(6) + check_mcms_operation_apply_approval_after() # 手术跟台申请单审批后的数据库检查 + # #内网查询手术通知单号 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 + time.sleep(6) + check_mcms_operation_notice()# 手术通知单数据库检查 + time.sleep(6) orderno = Search_OrderNO() # 手术通知单接口查询单号 - print(orderno) height_value_order_dp(orderno) # 高值跟台外网配送 + time.sleep(6) + check_hdi_distr() # 外网配送单数据库检查 + time.sleep(6) check_accept_order() # 内网验收 + time.sleep(6) + check_mcms_check(3)#高值跟台验收检查验收表数据 updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 second_dept_in_warehouse() # 二级科室入库 updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 out_return_gt() # 跟台退货出库_中心库处理 commonFuc().check_text_exist_result_text('succees', 'succees') -except: - commonFuc().check_text_exist_result_text('error', '1') +except Exception as e: + # 打印错误信息 + print(f"发生错误: {e}") + commonFuc().check_text_exist_result_text('error', 'succees') diff --git "a/air_case/b6_spd3_core_business_flow_database_check/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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" "b/air_case/b6_spd3_core_business_flow_database_check/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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 18ec557d7c58c0b7d11151e2f524e59a1cc3fbfb..7cdb0a99089146c524fd10dd257cdf693553094b 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" +++ "b/air_case/b6_spd3_core_business_flow_database_check/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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.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_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -6,7 +6,9 @@ from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_ from air_case.public1.public1.public1 import * from common.db.sql.sql_tools import get_create_time, check_mcms_dept_buy_car_sql, get_mdm_goods_code1, get_dept_buy_id, \ check_mcms_dept_buy_sql, get_mdm_goods_code, get_expdt_date, get_buyBillId, get_goods_code1, get_pkg_def_id, \ - get_login_user_uxid_bydb, get_buyOrderNo + get_login_user_uxid_bydb, get_buyOrderNo, check_mcms_pur_plan_sql, get_PICK_id, get_PICK_order_no, get_planBillId, \ + get_purOrderNo, get_purBillId, get_purBillDate2, get_distrBillId, get_distrOrderNo, get_pick_detail_id, \ + check_batch_id, check_barcode_id, get_account_date from common.fileUtls import FileUtils from common.run_cmd_script import execute_command @@ -448,6 +450,418 @@ def check_mcms_pick(type=16): print('error') commonFuc().check_text_exist_result_text('error', 'succees') +def check_mcms_psi_out(type=1): + print('检查中心库出库单') + if type == 1: + bill_mode = 16 + elif type == 2: + bill_mode = 20 + else: + bill_mode = 66 + branch_id = get_branch_id() + sql = "select * from mcms_psi where source_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + sql = "select id from mcms_psi where source_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode) + id = get_id(sql) + sql = "select order_no from mcms_psi where source_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode) + order_no = get_id(sql) + target_corp_id = get_hosid() + target_branch_id =get_branch_id() + target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + stock_name = get_branch_name() + "中心库房" + target_stock_id =get_stockId_fromdb(target_dept_name+'库房') + target_area_code =get_stockAreaId_new_fromDb(target_dept_name, 2) + source_id = get_PICK_id(branch_id, bill_mode) + source_no = None + source_repl_id = None + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name()+'中心库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 1) + accounter = None + account_date = None + buyBillId = get_buyBillId(branch_id, bill_mode) + if type == 1: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 2: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + else: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + pickOrderNo = get_PICK_order_no(branch_id, bill_mode) + pickBillId = get_PICK_id(branch_id, bill_mode) + planBillId = get_planBillId(hos_goods_id) + psiOutBillId = id + psiOutOrderNo =order_no + + buyOrderNo = get_buyOrderNo(branch_id, bill_mode) + purOrderNo = get_purOrderNo(branch_id, bill_mode) + purBillId = get_purBillId(branch_id, bill_mode) + bill_relation_json = get_purBillDate2(branch_id, bill_mode) + purBillDate = reGetString(bill_relation_json, r'purBillDate":"', r'""distrBillId') + distrBillId = get_distrBillId(branch_id, bill_mode) + distrOrderNo = get_distrOrderNo(branch_id, bill_mode) + checkBillId = source_id + sql = "select order_no from mcms_check where id='%s';" % checkBillId + checkOrderNo = get_id(sql) + psiInBillId = id + psiInOrderNo = order_no + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_psi where id='%s';" % id) + last_modified = get_create_time("select last_modified from mcms_psi where id='%s';" % id) + last_modified_user = create_user + if type == 1: + # 检查子表 + check_mcms_psi_batch_out(id, type, order_no, source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi_out_1_1_0905', id, + order_no, target_corp_id, target_branch_id, target_dept_id, + target_dept_name, target_stock_id + , target_area_code, source_id, source_no, source_repl_id, + source_corp_id, source_branch_id, source_dept_id, source_dept_name + , source_stock_id, source_area_code, accounter, account_date, + buyBillId,pickOrderNo, buyOrderNo,pickBillId, + psiOutBillId, psiOutOrderNo, + create_user + , create_time, last_modified, last_modified_user) + elif type == 2: + check_mcms_psi_batch_out(id, type, order_no, source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi_out_1_2_0905', id, + order_no, target_corp_id, target_branch_id, target_dept_id, + target_dept_name, target_stock_id + , target_area_code, source_id, source_no, source_repl_id, + source_corp_id, source_branch_id, source_dept_id, source_dept_name + , source_stock_id, source_area_code, accounter, account_date, + buyBillId,pickOrderNo, buyOrderNo,pickBillId, + psiOutBillId, psiOutOrderNo, + create_user + , create_time, last_modified, last_modified_user) + else: + check_mcms_psi_batch_out(id, type, order_no, source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi_out_1_3_0905',id, + order_no, target_corp_id, target_branch_id, target_dept_id, + target_dept_name, target_stock_id + , target_area_code, source_id, source_no, source_repl_id, + source_corp_id, source_branch_id, source_dept_id, source_dept_name + , source_stock_id, source_area_code, accounter, account_date, + buyBillId,pickOrderNo, buyOrderNo,pickBillId, + psiOutBillId, psiOutOrderNo, + create_user + , create_time, last_modified, last_modified_user) + # 对比预期值和实际值是否一致 + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_psi_batch_out(DR_ID, type, order_no, source_id1): + if type == 1: + bill_mode = 16 + elif type == 2: + bill_mode = 20 + else: + bill_mode = 66 + branch_id = get_branch_id() + sql = " select * from mcms_psi_batch where pid='%s';" % ( + DR_ID) + actual = check_mcms_dept_buy_sql(sql) + print('actual', actual) + batch_main_key = get_id("select id from mcms_psi_batch where pid='%s';" % DR_ID) + pid = DR_ID + # order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID) + source_detail_id = get_pick_detail_id(branch_id,bill_mode) + pick_detail_id = source_detail_id + if type == 1: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 2: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + else: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goods_code = get_goods_code1(hos_goods_id) + pkg_def_id = get_pkg_def_id(hos_goods_id) + picker_name = FileUtils().r_info8("b2_herp3_bs", "用户名信息", 'message3')['username1'] + picker = get_login_user_uxid_bydb(picker_name) + source_batch_id = get_id("select source_batch_id from mcms_psi_batch where pid='%s';" % DR_ID) + distrBillId = get_distrBillId(branch_id, bill_mode) + target_batch_id = source_batch_id + if check_batch_id(source_batch_id) == True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + barcode_id = get_id("select barcode_id from mcms_psi_batch where pid='%s';" % DR_ID) + if check_barcode_id(barcode_id) == True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + shelf_code = get_stockAreaId_new_fromDb(get_branch_name(), 1) + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_psi_batch where pid='%s';" % DR_ID) + last_modified = get_create_time("select last_modified from mcms_psi_batch where pid='%s';" % DR_ID) + last_modified_user = create_user + if type == 1: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_batch_out1_0905', batch_main_key, pid, order_no, source_detail_id + , pick_detail_id,hos_goods_id, mdm_goods_code, goods_code, source_batch_id, + target_batch_id, barcode_id, shelf_code, create_user, create_time, + last_modified, last_modified_user + + ) + elif type == 2: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_batch_out2_0905', batch_main_key, pid, order_no, source_detail_id + , pick_detail_id,hos_goods_id, mdm_goods_code, goods_code, source_batch_id, + target_batch_id, barcode_id, shelf_code, create_user, create_time, + last_modified, last_modified_user + + ) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_batch_out3_0905', batch_main_key, pid, order_no, source_detail_id + , pick_detail_id,hos_goods_id, mdm_goods_code, goods_code, source_batch_id, + target_batch_id, barcode_id, shelf_code, create_user, create_time, + last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +def check_mcms_psi_dept_in(type=16): + branch_id = get_branch_id() + sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + if type == 16: + source_id = process_tuple(get_id("select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"%(branch_id,type))) + elif type == 20: + source_id = process_tuple(get_id("select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"%(branch_id,type))) + else: + source_id = process_tuple(get_id("select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"%(branch_id,type))) + + # source_id = ''.join(source_id) + source_no=get_id("select order_no from mcms_psi where id='%s';"%source_id) + #获取入库单主键DR_ID + sql = " select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type) + DR_ID = get_id(sql) + #获取order_no + sql = " select order_no from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_QL' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type) + order_no = get_id(sql) + target_corp_id = get_hosid() + target_branch_id = get_branch_id() + target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_id = get_stockId_fromdb(target_dept_name + '库房') + target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 2) + PICK_id = get_PICK_id(branch_id, type) + + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 1) + buyBillId = get_buyBillId(branch_id, type) + pickOrderNo = get_PICK_order_no(branch_id, type) + buyOrderNo = get_buyOrderNo(branch_id, type) + pickBillId = get_PICK_id(branch_id, type) + psiDeptOutBillId = source_id + psiDeptOutOrderNo = source_no + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_psi_dept where id='%s';" % DR_ID) + last_modified = get_create_time("select last_modified from mcms_psi_dept where id='%s';" % DR_ID) + last_modified_user = create_user + accounter=create_user + sql="select account_date from mcms_psi_dept where id='%s';"%DR_ID + account_date=get_account_date(sql) + psiDeptInBillId=DR_ID + psiDeptInOrderNo=order_no + if type == 16: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_in_1_0905', DR_ID, order_no, target_corp_id, target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id,source_no, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + accounter,account_date,buyBillId, pickOrderNo, buyOrderNo, pickBillId, psiDeptOutBillId, + psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo + , create_user, create_time, last_modified, last_modified_user + + ) + elif type == 20: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID, type, order_no,source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_in_2_0905', DR_ID, order_no, target_corp_id, target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id,source_no, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + accounter,account_date,buyBillId, pickOrderNo, buyOrderNo, pickBillId, psiDeptOutBillId, + psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo + , create_user, create_time, last_modified, last_modified_user + + ) + else: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID, type, order_no,source_id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_in_3_0905', DR_ID, order_no, target_corp_id, target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id,source_no, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + accounter,account_date,buyBillId, pickOrderNo, buyOrderNo, pickBillId, psiDeptOutBillId, + psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo + , create_user, create_time, last_modified, last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') +def check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id1): + branch_id = get_branch_id() + sql = " select * from mcms_psi_dept_batch where pid='%s';" % ( + DR_ID) + actual = check_mcms_dept_buy_sql(sql) + print('actual', actual) + batch_main_key = get_id("select id from mcms_psi_dept_batch where pid='%s';" % DR_ID) + pid = DR_ID + # order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID) + source_detail_id = source_id1+'0001' + pick_detail_id=None + if type == 16: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 20: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] + else: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goods_code = get_goods_code1(hos_goods_id) + pkg_def_id = get_pkg_def_id(hos_goods_id) + picker_name = FileUtils().r_info8("b2_herp3_bs", "用户名信息", 'message3')['username1'] + picker = get_login_user_uxid_bydb(picker_name) + source_batch_id=get_id("select source_batch_id from mcms_psi_dept_batch where pid='%s';" % DR_ID) + target_batch_id=source_batch_id + if check_batch_id(source_batch_id)==True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + barcode_id=get_id("select barcode_id from mcms_psi_dept_batch where pid='%s';" % DR_ID) + if check_barcode_id(barcode_id)==True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + dept_name=FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + shelf_code= get_stockAreaId_new_fromDb(dept_name, 2) + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_psi_dept_batch where pid='%s';" % DR_ID) + last_modified = get_create_time("select last_modified from mcms_psi_dept_batch where pid='%s';" % DR_ID) + last_modified_user = None + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in1_0905', batch_main_key, pid, order_no,source_detail_id + ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + last_modified_user + + ) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in2_0905', batch_main_key, pid, order_no,source_detail_id + ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + last_modified_user + + ) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in3_0905',batch_main_key, pid, order_no,source_detail_id + ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + last_modified_user + + ) + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + pro_path = commonFuc().get_pro_path2() print('pro_path', pro_path) sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b2流程九请领业务流_二级库向中心库.air') @@ -456,40 +870,40 @@ from a_b2流程九请领业务流_二级库向中心库 import goods_move3, seco centeStock_pick,pick_execute try: - # updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 - # goods_move3() - # # 二级库区信息写入文件 - # get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], - # FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) - # deptName2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] - # # 设置库区联系人 - # set_stockShelf_Linkman(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"], - # get_stockAreaId2_new_fromDb(deptName2, 2)) - # # 低值 - # second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) - # check_mcms_dept_buy_car(1) - # # 高值 - # second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) - # check_mcms_dept_buy_car(2) - # # 试剂 - # second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) - # check_mcms_dept_buy_car(3) - # BuyCarSubmit() # 请领车提交 - # - # time.sleep(6) - # list_data = ['16', '20', '66'] - # for i in list_data: - # check_mcms_dept_buy(int(i)) - # mcms_dept_buy_detail(int(i)) - # """ - # 这里的审批跟审批流的设置有关 - # """ - # for i in range(6): # 三个单据共审批6次 - # approval_center() - # updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 - # # 获取拣货单列表个数 - # for i in range(get_centeStock_pick_list_counts()): - # centeStock_pick() # 中心库拣货 + updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 + goods_move3() + # 二级库区信息写入文件 + get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'], + FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2) + deptName2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + # 设置库区联系人 + set_stockShelf_Linkman(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"], + get_stockAreaId2_new_fromDb(deptName2, 2)) + # 低值 + second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) + check_mcms_dept_buy_car(1) + # 高值 + second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) + check_mcms_dept_buy_car(2) + # 试剂 + second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) + check_mcms_dept_buy_car(3) + BuyCarSubmit() # 请领车提交 + + time.sleep(6) + list_data = ['16', '20', '66'] + for i in list_data: + check_mcms_dept_buy(int(i)) + mcms_dept_buy_detail(int(i)) + """ + 这里的审批跟审批流的设置有关 + """ + for i in range(6): # 三个单据共审批6次 + approval_center() + updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 + # 获取拣货单列表个数 + for i in range(get_centeStock_pick_list_counts()): + centeStock_pick() # 中心库拣货 # 检查拣货单表数据 list_data = ['16', '20', '66'] for i in list_data: @@ -498,17 +912,33 @@ try: hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'] GoodsId = hosGoodsId.replace(get_hosid(), '') pick_execute(hosGoodsId, GoodsId, 1) + # 检查中心库出库单低值 + time.sleep(6) + check_mcms_psi_out(1) + # 高值拣货执行 hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'] GoodsId = hosGoodsId.replace(get_hosid(), '') pick_execute(hosGoodsId, GoodsId, 2) + # 检查中心库出库单高值 + time.sleep(6) + check_mcms_psi_out(2) # 试剂拣货执行 hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'] GoodsId = hosGoodsId.replace(get_hosid(), '') pick_execute(hosGoodsId, GoodsId, 3) + # 检查中心库出库单试剂 + time.sleep(6) + check_mcms_psi_out(3) + time.sleep(6) second_dept_one_key_in() second_dept_one_key_in() second_dept_one_key_in() + time.sleep(6) + # 检查入库单 + check_mcms_psi_dept_in(16) + check_mcms_psi_dept_in(20) + check_mcms_psi_dept_in(66) commonFuc().check_text_exist_result_text('succees', 'succees') print('==========================流程九结束==============================') except Exception as e: diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" "b/air_case/b6_spd3_core_business_flow_database_check/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index f55da9b423d90b0e0f642ca4c452647adf3a90f4..df04e15cf6d51aa74037b51a923b40d80356bd86 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" +++ "b/air_case/b6_spd3_core_business_flow_database_check/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\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\347\233\264\351\200\201_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -1077,11 +1077,11 @@ def check_mcms_purchase_out_and_in(type=1): continue -def check_hdi_distr(type=16): +def check_hdi_distr(type=16): from common.db.sql.sql_tools_out import check_mcms_pur_plan_sql, get_id branch_id = get_branch_id() # 验证配送单主表 - sql = "select * from hdi_distr where branch_id = '%s' and bill_mode='%s'order by create_time desc LIMIT 1;" % ( + sql = "select * from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( branch_id, type) # 获取实际值 actual = check_mcms_pur_plan_sql(sql) @@ -1115,11 +1115,6 @@ def check_hdi_distr(type=16): distr_main_key, type)) print(bill_relation_json) purBillDate = reGetString(bill_relation_json, r'purBillDate":"', r'""distrBillId') - # purBillDate = get_expdt_date( - # "select create_time from mcms_purchase where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( - # branch_id, type)) - # process_date(purBillDate) - distrBillId = distr_main_key distrOrderNo = distr_order_no distrUser = get_login_user_uxid2() @@ -2387,45 +2382,40 @@ def main(): sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air') using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air') - from a_b4流程十一请领业务流_二级库向直送 import goods_move2 + from a_b4流程十一请领业务流_二级库向直送 import goods_move2,second_dept_Request,BuyCarSubmit,purchase_module_process,order_dp,check_accept_order - from a_b4流程十一请领业务流_二级库向直送 import second_dept_Request - from a_b4流程十一请领业务流_二级库向直送 import BuyCarSubmit - from a_b4流程十一请领业务流_二级库向直送 import purchase_module_process - from a_b4流程十一请领业务流_二级库向直送 import order_dp - from a_b4流程十一请领业务流_二级库向直送 import check_accept_order for i in range(1): - updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 + updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) #设置登录账号默认权限是二级库 goods_move2() # 设置产品出库渠道为直送 # # 低值 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) - check_mcms_dept_buy_car(1) + check_mcms_dept_buy_car(1)#检查请领车数据库表数据 (低值) # # 高值 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) - check_mcms_dept_buy_car(2) + check_mcms_dept_buy_car(2)#检查请领车数据库表数据(高值) # # 试剂 second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) - check_mcms_dept_buy_car(3) + check_mcms_dept_buy_car(3)#检查请领车数据库表数据(试剂) BuyCarSubmit() # 请领车提交 list_data = ['16', '20', '66'] for i in list_data: - check_mcms_dept_buy(int(i)) - mcms_dept_buy_detail(int(i)) + check_mcms_dept_buy(int(i))#检查请领单主表 + mcms_dept_buy_detail(int(i))#检查请领单子表 for i in range(6): # 三个单据共审批6次 approval_center() list_data = ['16', '20', '66'] for i in list_data: - check_mcms_dept_buy_approval_after(int(i)) - mcms_dept_buy_detail_approval_after(int(i)) + check_mcms_dept_buy_approval_after(int(i))#检查审批后的请领单 + mcms_dept_buy_detail_approval_after(int(i))#检查审批后的请领单子表 time.sleep(20) # 检查自动生成的采购计划数据 list_data = ['16', '20', '66'] for i in list_data: - check_mcms_mcms_pur_plan(int(i)) - # 采购模块处理 + check_mcms_mcms_pur_plan(int(i))#检查采购计划数据(包括主表和子表) + # # 采购模块处理 purchase_module_process() # 三个单据共审批三次 @@ -2435,24 +2425,24 @@ def main(): time.sleep(20) list_data = ['16', '20', '66'] for i in list_data: - check_mcms_purchase(int(i)) + check_mcms_purchase(int(i))#检查采购订单数据(包括主表和子表) # 检查同步到外网的采购订单数据跟内网的是否一致 - check_mcms_purchase_out_and_in(1) + check_mcms_purchase_out_and_in(1) #1主表 print('检查同步到外网的采购订单数据跟内网的是否一致') - check_mcms_purchase_out_and_in(2) - order_dp(1) # 1低值 + check_mcms_purchase_out_and_in(2) #2子表 + order_dp(1) # 1低值 配送单发货 time.sleep(6) - order_dp(2) # 2高值 + order_dp(2) # 2高值 配送单发货 time.sleep(6) - order_dp(3) # 3试剂 + order_dp(3) # 3试剂 配送单发货 time.sleep(6) time.sleep(20) list_data = ['16', '20', '66'] for i in list_data: time.sleep(6) - check_hdi_distr(int(i)) + check_hdi_distr(int(i))#检查配送单(外网) time.sleep(20) # 到这里就是验收和中心库自动入库以及中心库出库 diff --git a/air_case/public1/public1/public1.py b/air_case/public1/public1/public1.py index 33371d6496b4ac30ee65208b5180c72012797a23..dab41d048e420d19f80acbf0df72c24f1263288b 100644 --- a/air_case/public1/public1/public1.py +++ b/air_case/public1/public1/public1.py @@ -5,7 +5,7 @@ from airtest.core.helper import using from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system from common.common_func import commonFuc from common.db.sql.sql_del_branch_info import delData -from common.db.sql.sql_tools import get_id, process_tuple, set_goods_coding_type +from common.db.sql.sql_tools import * from common.fileUtls import FileUtils import json import time diff --git a/data/b5_spd3_core_business_flow/message b/data/b5_spd3_core_business_flow/message index cc62e1968234c39646512ce9a55c2bb427a292e8..141b927336c6ce5621e138f4c63144abf0a4b41d 100644 --- a/data/b5_spd3_core_business_flow/message +++ b/data/b5_spd3_core_business_flow/message @@ -1,5 +1,5 @@ 供货关系申请2: - e_corpId: p1e386 + e_corpId: p1e3ae h_corpId: h0347 - e_username: 国药集团公司uAfpK - h_name: test001 + e_username: 国药集团公司lSTdZ + h_name: test_1 diff --git a/data/b5_spd3_core_business_flow/message1 b/data/b5_spd3_core_business_flow/message1 index fe137590c8c8fd74c48b7cdc85d68120777f7c40..9350425f575b2dfa94cfd585e986f63e1e070a6b 100644 --- a/data/b5_spd3_core_business_flow/message1 +++ b/data/b5_spd3_core_business_flow/message1 @@ -1,7 +1,7 @@ 产品审核信息: - MSPid: MSP2408060012_1 + MSPid: MSP2408220013_1 hosId: h0347 - hosGoodsId: h034700004777 - provGoodsid: provGood-99222014 - goodsAuditBillId: MSP2408060012 - targetId: MSP2408060012_1 + hosGoodsId: h034700004905 + provGoodsid: provGood-99222157 + goodsAuditBillId: MSP2408220013 + targetId: MSP2408220013_1 diff --git a/data/b5_spd3_core_business_flow/message13 b/data/b5_spd3_core_business_flow/message13 index 3b67aff70aa60034ead8feaa173d26fb34c45819..6b4344b2871d4776e2e4427a3fd6f80a2d413292 100644 --- a/data/b5_spd3_core_business_flow/message13 +++ b/data/b5_spd3_core_business_flow/message13 @@ -3,27 +3,26 @@ - &id001 - id: hosId: h0347 - branchId: h0347-3759 + branchId: h0347-3764 deptId: taskType: 1 - sourceOrgId: p1e37e - sourceOrgName: 国药集团公司sya!$ - sourceOrderNo: PSh0347202408060022 - billMode: '66' + sourceOrgId: p1e3ae + sourceOrgName: 国药集团公司lSTdZ + sourceOrderNo: PSh0347202408280004 + billMode: '25' stockKind: purMode: - sourceId: PSh0347202408060022 + sourceId: PSh0347202408280004 sourceDetailId: sourceType: PSD sourceTypeName: 配送单 sourceVersion: 1 - planOrderNo: PLAN2024080634538 - purOrderNo: CG2024080622673 - recOrgId: c30ca7fe7c0f4ba8b6398caeb387bd3b - recOrgName: 设备科001 - billRelationJson: '{"planBillId":"Ph034720240806031183","planOrderNo":"PLAN2024080634538","purOrderNo":"CG2024080622673","purBillId":"Ch034720240806000045","purBillDate":"2024-08-06 - 13:27:19","distrBillId":"PSh0347202408060022","distrOrderNo":"PSh0347202408060022"}' - taskDate: '2024-08-06 13:30:29' + planOrderNo: SSSQ202408280385 + purOrderNo: SSTZ202408280363 + recOrgId: 9e693185220a45c5a9fb8328f4d45b5d + recOrgName: 二级检验科002 + billRelationJson: '{"operationApplyOrderNo":"SSSQ202408280385","operationNoticeBillId":"Nh034720240828000001","distrBillId":"PSh0347202408280004","operationNoticeOrderNo":"SSTZ202408280363","distrOrderNo":"PSh0347202408280004","operationApplyBillId":"Oh034720240828000001"}' + taskDate: '2024-08-28 16:05:13' taskDateStart: taskDateEnd: billModeList: @@ -32,6 +31,7 @@ tbStatus: 20 remark: pdaFlag: + areaCode: list_b: - *id001 list_c: diff --git a/data/b5_spd3_core_business_flow/message15 b/data/b5_spd3_core_business_flow/message15 index 6edef80c2c569bd81c18cca0d974c9a0a81941e4..858ccacd816650634876b86d374577ed74f909ec 100644 --- a/data/b5_spd3_core_business_flow/message15 +++ b/data/b5_spd3_core_business_flow/message15 @@ -1,3 +1,3 @@ 验收单号: - CHECK_NO1: CHECKh03472024080600071 - CHECK_NO2: CHECKh03472024080600071 + CHECK_NO1: CHECKh03472024082800004 + CHECK_NO2: CHECKh03472024082800004 diff --git a/data/b5_spd3_core_business_flow/message18 b/data/b5_spd3_core_business_flow/message18 index ac936d555035d291dba20f4bd55e95d4e2ad42fd..fcfa57fc4266edae57ed2db9f68d0d3461fe314b 100644 --- a/data/b5_spd3_core_business_flow/message18 +++ b/data/b5_spd3_core_business_flow/message18 @@ -1,35 +1,36 @@ 条码信息: list_a: - &id001 - id: '100000142024080600000776' - snCode: '100000142024080600000776' - ssccCode: '010839000192086229' - pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000776' - hosGoodsId: h034700004779 - hosGoodsCode: '00004779' - goodsCode: '00004779' - goodsName: 新型冠状病毒检测试剂nDxo8 + id: '100000142024082200000877' + snCode: '100000142024082200000877' + ssccCode: '010839000192616327' + pkgCodeSee: '01376400000490701124082217250228104444241100000142024082200000877' + hosGoodsId: h034700004907 + hosGoodsCode: '00004907' + goodsCode: '00004907' + goodsName: 新型冠状病毒检测试剂C7HGi goodsSpec: G-31891 goodsMfrsName: 德国歌德公司 Geuder AG unit: 支 purMode: 60 batchCode: '4444' - productDate: '2024-08-06' - expdtDate: '2025-02-12' + productDate: '2024-08-22' + expdtDate: '2025-02-28' pkgDefName: '100' pkgDefQty: 100.0 - stockId: 42c24f7facba4231aeda83b1348d6d1a - stockName: 东土城路院区l7B8J中心库房 + stockId: 4188c1ded3aa4c838904ee1cc6013645 + stockName: 东土城路院区Hyl74中心库房 areaName: 自动化测试 - areaCode: areah03472822 + areaCode: areah03472838 lockStatus: 0 unitName: 100支/100 - shelfCode: areah03472822-2-01-01 + shelfCode: areah03472838-2-01-01 + shelfName: shelfNo: 自动化测试-2-01-01 - pkgDefId: 75012af7fbea44af9dd050857dac199f - extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId": - "CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025", - "inStockTime": "2024-08-06 14:17:06", "distrDetailId": "03840788", "certificateCode": + pkgDefId: 7b0c0e35ef8943abbc87ebd8540e3150 + extInfo: '{"pkgDefId": "7b0c0e35ef8943abbc87ebd8540e3150", "pkgDefQty": 100, "purBillId": + "CG2024082223071", "pkgDefName": "100", "distrBillId": "PSh0347202408220016", + "inStockTime": "2024-08-22 14:23:42", "distrDetailId": "03841116", "certificateCode": ""}' bottleId: pkgType: '66' @@ -39,8 +40,8 @@ qty: 1 shelfKind: 0 shelfKindName: 普通货位 - provName: 国药集团公司uAfpK - provId: p1e386 + provName: 国药集团公司lSTdZ + provId: p1e3ae inStockDate: mfrCode: made: 德国 diff --git a/data/b5_spd3_core_business_flow/message2 b/data/b5_spd3_core_business_flow/message2 index 06278c0b6ef6eb950862838b7e67cd3d8fe88cac..eba0b926534536bb0b0e79c4cdb9477b1054dbcb 100644 --- a/data/b5_spd3_core_business_flow/message2 +++ b/data/b5_spd3_core_business_flow/message2 @@ -1,7 +1,7 @@ 产品审核信息: - MSPid: MSP2408060013_1 + MSPid: MSP2408220014_1 hosId: h0347 - hosGoodsId: h034700004778 - provGoodsid: provGood-99222015 - goodsAuditBillId: MSP2408060013 - targetId: MSP2408060013_1 + hosGoodsId: h034700004906 + provGoodsid: provGood-99222158 + goodsAuditBillId: MSP2408220014 + targetId: MSP2408220014_1 diff --git a/data/b5_spd3_core_business_flow/message21 b/data/b5_spd3_core_business_flow/message21 index 1a7cfc385bae9c570947ccdb43acfa601ecedc3b..c1cc1ad48a2ca7b4e92901b923d9f124b017646c 100644 --- a/data/b5_spd3_core_business_flow/message21 +++ b/data/b5_spd3_core_business_flow/message21 @@ -1,16 +1,16 @@ -二级库请领产品信息: +ƷϢ: list_a: - &id001 - hosGoodsId: h034700004779 purMode: 60 grantRule: id: - goodsName: 新型冠状病毒检测试剂nDxo8 + goodsName: ͹״ԼnDxo8 goodsSpec: G-31891 mdmGoodsCode: '11661765' goodsCode: '00004779' - unit: 支 - goodsMfrsName: 德国歌德公司 Geuder AG + unit: ֧ + goodsMfrsName: ¹¹˾ Geuder AG miDjmc: '' miCode: '' pkgDefName: '100' @@ -20,7 +20,7 @@ goodsImg: [] pkgDefId: 75012af7fbea44af9dd050857dac199f buyPkgQty: - unitName: 100支/100 + unitName: 100֧/100 price: 99.9999 hosId: branchId: @@ -29,19 +29,19 @@ areaCode: areaName: targetDeptId: 73235696798d429393a91a28b9467b19 - targetDeptName: 设备科001 + targetDeptName: 豸001 targetStockId: 42c24f7facba4231aeda83b1348d6d1a - targetStockName: 东土城路院区l7B8J中心库房 + targetStockName: ·Ժl7B8JĿⷿ purchaseFlag: 1 tempFlag: 0 grantWay: 1 deptGoodsStatus: codingType: 0 - purModeText: 检验试剂 - goodsGeneralName: 检测试剂 + purModeText: Լ + goodsGeneralName: Լ goodsRegCert: '' applicationScope: - provName: 国药集团公司uAfpK + provName: ҩŹ˾uAfpK noRecPkgQty: 2.0 noRecQty: 200.0 autoUnpack: 0 diff --git a/data/b6_spd3_core_business_flow_database_check/data b/data/b6_spd3_core_business_flow_database_check/data index d14143574bd1336c38ae86b1a2dca4a08838c310..2a3fa336f81f342dc8ded267dae1708b0de71511 100644 --- a/data/b6_spd3_core_business_flow_database_check/data +++ b/data/b6_spd3_core_business_flow_database_check/data @@ -36,9 +36,9 @@ "mcms_pur_plan3": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}' #采购计划子表 -"mcms_pur_plan_detail": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 10, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("100.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' -"mcms_pur_plan_detail2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 20, "pkg_def_id": None, "pkg_def_name": None, "pkg_def_qty": Decimal("1.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("1.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("1.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' -"mcms_pur_plan_detail3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 60, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("100.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' +"mcms_pur_plan_detail": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 10, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("0.00"), "price": Decimal("99.999900"), "qty": Decimal("0.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' +"mcms_pur_plan_detail2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 20, "pkg_def_id": None, "pkg_def_name": None, "pkg_def_qty": Decimal("1.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("1.00"), "pkg_qty": Decimal("0.00"), "price": Decimal("99.999900"), "qty": Decimal("0.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' +"mcms_pur_plan_detail3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 60, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("0.00"), "price": Decimal("99.999900"), "qty": Decimal("0.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}' #采购订单主表 "mcms_purchase": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "HDI", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "bill_expdt_date": %s, "source_id": "%s", "source_type": "CGJH", "in_settlement": None, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "exe_prov_id": "%s", "exe_prov_name": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s"}", "ext_info": "{"epidemicFlag":0,"purMode":10}", "barcode_flag": 1, "pkg_flag": 1, "remark": "", "priority": 0, "close_status": 0, "close_date": %s, "up_status": 0, "tb_status": 30, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": None, "version": 0, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s}' @@ -110,9 +110,9 @@ "mcms_psi_dept_batch_in3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' #中心库入库单 -"check_mcms_psi1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' -"check_mcms_psi2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' -"check_mcms_psi3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' #中心库入库单子表 @@ -121,14 +121,14 @@ "mcms_psi_batch_in3": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"pur_mode":60,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1}' #中心库出库单 -"check_mcms_psi_out1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' -"check_mcms_psi_out2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' -"check_mcms_psi_out3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi_out1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "HDI", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi_out2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "HDI", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi_out3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "HDI", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' #直送二级库入库单 -"mcms_psi_dept_in_4": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' -"mcms_psi_dept_in_5": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' -"mcms_psi_dept_in_6": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' +"mcms_psi_dept_in_4": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' +"mcms_psi_dept_in_5": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' +"mcms_psi_dept_in_6": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' #科室入库单子表 "mcms_psi_dept_batch_in4": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": null, "version": 0}' @@ -136,9 +136,9 @@ "mcms_psi_dept_batch_in6": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": null, "version": 0}' #批次信息 -"check_mcms_hos_batch1": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "10", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "333", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":10,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' -"check_mcms_hos_batch2": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "222", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":20,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' -"check_mcms_hos_batch3": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "60", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "4444", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":60,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' +"check_mcms_hos_batch1": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "10", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "333", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":10,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1,"focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' +"check_mcms_hos_batch2": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "222", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":20,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1,"focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' +"check_mcms_hos_batch3": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 40, "batch_price": Decimal("99.999900"), "src_batch_id": "%s", "src_batch_price": Decimal("99.999900"), "settlement": 1, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "60", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "4444", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": "", "in_time": %s, "ext_info": "{"goodsGg":"%s","goodsCode":"%s","purMode":60,"goodsName":"%s","ygptCode":"","transCond":"","storageCond":"","erpCode":"%s","ybDefId":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1,"focus_control":"0","focus_control_type":null}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' #三级科室请领单 @@ -220,6 +220,8 @@ "mcms_psi_batch_out1_1": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":10,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' "mcms_psi_batch_out1_2": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":20,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' "mcms_psi_batch_out1_3": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":60,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' + + #中心库退供应商主表 "check_mcms_psi_out_1_1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": -1, "psi_kind": "299", "stock_kind": "CK_TH", "target_corp_id": "%s", "target_branch_id": %s, "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": %s, "target_area_name":null , "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": "", "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}' "check_mcms_psi_out_1_2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": -1, "psi_kind": "299", "stock_kind": "CK_TH", "target_corp_id": "%s", "target_branch_id": %s, "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": %s, "target_area_name":null, "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": "", "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}' @@ -268,3 +270,47 @@ "mcms_pick_center_detail4": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s0001", "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pkg_def_type": None, "pkg_base_mirror": None, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "apply_qty": Decimal("1.00"), "qty": Decimal("1.00"), "picked_qty": Decimal("1.00"), "picker": "%s", "picker_name": "%s", "tb_status": 20, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 2, "plan_flag": None}' "mcms_pick_center_detail5": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s0001", "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pkg_def_type": None, "pkg_base_mirror": None, "pkg_def_id": %s, "pkg_def_name": None, "pkg_def_qty": Decimal("1.00"), "apply_qty": Decimal("1.00"), "qty": Decimal("1.00"), "picked_qty": Decimal("1.00"), "picker": "%s", "picker_name": "%s", "tb_status": 20, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 2, "plan_flag": None}' "mcms_pick_center_detail6": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s0001", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pkg_def_type": None, "pkg_base_mirror": None, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "apply_qty": Decimal("1.00"), "qty": Decimal("1.00"), "picked_qty": Decimal("1.00"), "picker": "%s", "picker_name": "%s", "tb_status": 20, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 2, "plan_flag": None}' + +#中心库出库到二级库子表 +"mcms_psi_batch_out1_0905": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":10,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' +"mcms_psi_batch_out2_0905": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":20,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' +"mcms_psi_batch_out3_0905": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":60,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}' + + +#中心库出库到二级库子表主表 +"check_mcms_psi_out_1_1_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name":"默认库区" , "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": "", "tb_status": 20, "accounter": %s, "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi_out_1_2_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name":"默认库区", "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": "", "tb_status": 20, "accounter": %s, "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}' +"check_mcms_psi_out_1_3_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name":"默认库区", "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": "", "tb_status": 20, "accounter": %s, "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}' + + +#二级库向中心库请领,二级科室入库单子表 +"mcms_psi_dept_batch_in1_0905": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}' +"mcms_psi_dept_batch_in2_0905": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}' +"mcms_psi_dept_batch_in3_0905": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}' + +#二级库向中心库请领,二级科室入库单主表 +"mcms_psi_dept_in_1_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": None, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' +"mcms_psi_dept_in_2_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": None, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' +"mcms_psi_dept_in_3_0905": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": None, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}' + + +#跟台手术申请单主表 +"check_mcms_operation_apply": '{"id": "%s", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "branch_name": "%s", "order_no": "%s", "rec_dept_id": "%s", "rec_dept_name": "%s", "rec_address_id": "%s", "rec_address": "默认库区", "remark": "自动化测试", "patient_in_hos_id": "123456", "patient_id": None, "patient_name": "张三", "sex": 1, "age": 44, "oper_name": "血管扩张术", "oper_doctor": "李四", "oper_date": %s, "bed_num": "2", "opration_house": "设备科一手术间", "sur_dept_id": None, "sur_dept_name": "", "tb_status": 10, "is_operation_pkg": 0, "operation_apply_mode": 0, "expire_date": %s, "source_type": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}' + +#跟台手术申请单子表 +"check_mcms_operation_apply_list": '{"id": "%s", "pid": "%s", "hos_goods_id": "%s", "goods_num": 1, "prov_id": "%s", "sub_prov_id": "%s", "operation_pkg_id": None, "operation_pkg_code": None, "price": Decimal("99.999900"), "in_settlement": 3, "tb_status": 10, "version": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}' + +#审批后的跟台手术申请单主表(审批后的子表无变化) +"check_mcms_operation_apply_approval_after": '{"id": "%s", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "branch_name": "%s", "order_no": "%s", "rec_dept_id": "%s", "rec_dept_name": "%s", "rec_address_id": "%s", "rec_address": "默认库区", "remark": "自动化测试", "patient_in_hos_id": "123456", "patient_id": None, "patient_name": "张三", "sex": 1, "age": 44, "oper_name": "血管扩张术", "oper_doctor": "李四", "oper_date": %s, "bed_num": "2", "opration_house": "设备科一手术间", "sur_dept_id": None, "sur_dept_name": "", "tb_status": 20, "is_operation_pkg": 0, "operation_apply_mode": 0, "expire_date": %s, "source_type": 1, "version": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}' + +#手术通知单主表主表 +"check_mcms_operation_notice": '{"id": "%s", "order_no": "%s", "source_bill_id": "%s", "source_order_no": "%s", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "branch_name": "%s", "is_operation_pkg": 0, "operation_apply_mode": 0, "rec_dept_id": "%s", "rec_dept_name": "%s", "oper_name": "血管扩张术", "oper_date": %s, "oper_doctor": "李四", "prov_id": "%s", "prov_name": "%s", "rec_address_id": "%s", "rec_address": "默认库区", "stock_address": None, "patient_in_hos_id": "123456", "patient_id": None, "patient_name": "张三", "sex": 1, "age": 44, "bed_num": "2", "opration_house": "设备科一手术间", "sur_dept_name": "", "sur_dept_id": None, "status": 10, "up_status": 0, "remark": "自动化测试", "version": 0, "bill_mode": "25", "delivery_type": 1, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}' + +#手术通知单主表子表 +"check_mcms_operation_notice_list": '{"id": "%s", "pid": "%s", "source_bill_detail_id": "%s", "pkg_code": "%s", "operation_pkg_code": None, "operation_pkg_id": None, "hos_goods_id": "%s", "goods_num": 1, "distr_qty": Decimal("0.00"), "check_qty": Decimal("0.00"), "not_send_qty": Decimal("0.00"), "up_qty": Decimal("0.00"), "price": Decimal("99.999900"), "in_settlement": 3, "sub_prov_id": "%s", "sub_prov_name": "%s", "ext_info": "{"goodsCode":"%s","goodsName":"%s","goodsSpec":"G-31891","goodsMfrsName":"德国歌德公司 Geuder AG","unit":"支"}", "status": 10, "version": 0, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}' + +#高值跟台配送单子表 +"hdi_distr_detail_0911": '{"id": "%s", "pid": "%s", "source_id": "%s", "source_detail_id": "%s", "pur_detail_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "pur_price": Decimal("99.999900"), "batch_code": "2222", "expdt_date": %s, "product_date": %s, "pkg_def_id": %s, "pkg_def_name": null, "pkg_def_qty": Decimal("1.00"), "supply_id": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "sub_price": Decimal("99.9999"), "distr_price": Decimal("99.9999"), "distr_pkg_qty": Decimal("1.00"), "distr_qty": Decimal("1.00"), "settlement": 3, "certificate_code": null, "product_cert_code": None, "detail_relation_json": "{"operationNoticeBillId":"%s","distrDetailId":"%s","distrBillId":"%s","transCond":"","erpCode":"","storageCond":"","operationNoticeBillDetailId":"%s","operationApplyBillDetailId":"%s","ygptCode":""}","ext_info": "{"ygptCode":"","transCond":"","storageCond":"","erpCode":""}", "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0}' + +#高值跟台配送单主表 +"hdi_distr_0911": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": "HDI", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "source_id": "%s", "source_type": "SUR", "pur_bill_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 30, "exe_prov_id": "%s", "exe_prov_name": "%s", "settlement": 3, "pur_dept_id": "%s", "pur_dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "rec_user": null, "rec_phone": None, "rec_addr": null, "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s"}", "ext_info": "{"distrUser":"%s","operUserPhone":"ttt","operUserName":"ttt","operationPriority":0,"operationPkg":0}", "barcode_flag": 1, "pkg_flag": 0, "remark": "自动化测试", "task_id": None, "convert_flag": 1, "convert_time": None, "convert_user_name": None, "reject_status": 0, "tb_status": 20, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "initial_order": None}'