diff --git "a/air_case/b5_spd3_core_business_flow/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" "b/air_case/b5_spd3_core_business_flow/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" index b75628246112086c0b1f9036ce3680ae433df458..131900baa30d69d5cd3cb181733f190cfc3ea7dd 100644 --- "a/air_case/b5_spd3_core_business_flow/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" +++ "b/air_case/b5_spd3_core_business_flow/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" @@ -265,6 +265,7 @@ def edit_goods_target(currentDeptId, targetDeptId): print('编辑产品请领渠道result', result) + def pick_execute(): module = "b5_spd3_core_business_flow" # # 登录获取用户id等信息,使用创建的用户登录===========开始 @@ -283,7 +284,7 @@ def pick_execute(): "herpService_stock_out_buyPage_url") info= FileUtils().r_info8('b5_spd3_core_business_flow', "三级库向二级库请领单号", 'message27') - DRNo_list = [] + # DRNo_list = [] for i in range(1, 4): if i == 1: orderNo = info['buy_NO1'] @@ -333,7 +334,7 @@ def pick_execute(): print('udi_code', udi_code) if udi_code=='pkgCodeSee': print('没有获取到条码') - return + sys.exit(0) if billMode == '16': targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 1,token) # 低值 elif billMode == '20': @@ -349,20 +350,33 @@ def pick_execute(): print('提交拣货执行单=================', url) if billMode == '16': request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode, sourceId) + print('提交拣货执行单', 'request_body', request_body) + result = commonFuc().http_post(url, request_body, headers) + print('提交拣货执行单,result1', result) + DR_id = commonFuc().analysis_json('data', result) + # 将拣货单id写入文件 + info1 = (DR_id, DR_id) + titlename = ('DR_NO1低值', 'DR_NO1低值') + FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单低值id', titlename, 'message28') elif billMode == '20': request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode, sourceId) + print('提交拣货执行单', 'request_body', request_body) + result = commonFuc().http_post(url, request_body, headers) + print('提交拣货执行单,result1', result) + DR_id = commonFuc().analysis_json('data', result) + info1 = (DR_id, DR_id) + titlename = ('DR_NO1高值', 'DR_NO1高值') + FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单高值id', titlename, 'message28') elif billMode == '66': request_body = commonFuc().get_business_data(module, "payload51_1_3", targetAreaCode, sourceId) + print('提交拣货执行单', 'request_body', request_body) + result = commonFuc().http_post(url, request_body, headers) + print('提交拣货执行单,result1', result) + DR_id = commonFuc().analysis_json('data', result) + info1 = (DR_id, DR_id) + titlename = ('DR_NO1试剂', 'DR_NO1试剂') + FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单试剂id', titlename, 'message28') - print('提交拣货执行单', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('提交拣货执行单,result1', result) - DR_id = commonFuc().analysis_json('data', result) - DRNo_list.append(DR_id) - # 将拣货单id写入文件 - info = (DRNo_list[0], DRNo_list[1], DRNo_list[2]) - titlename = ('DR_NO1', 'DR_NO2', 'DR_NO3') - FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '拣货单id', titlename, 'message28') def main(): try: diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\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_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 8334f5088ddf57ccde62af0a110518fa181cd6f0..ac7d19616b97096b2c3a7c5914509759d60333ad 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\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_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b6\346\265\201\347\250\213\345\215\201\344\270\211\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -536,15 +536,18 @@ def check_mcms_psi_dept(type=16): branch_id, type) actual = check_mcms_dept_buy_sql(sql) print(actual) - info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28') + # info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28') # print(info) if type == 16: - DR_ID = info['DR_NO2'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单低值id", 'message28') + DR_ID = info['DR_NO1低值'] elif type == 20: - DR_ID = info['DR_NO3'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单高值id", 'message28') + DR_ID = info['DR_NO1高值'] else: - DR_ID = info['DR_NO1'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单试剂id", 'message28') + DR_ID = info['DR_NO1试剂'] DR_ID = ''.join(DR_ID) sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID order_no = get_id(sql) @@ -632,13 +635,16 @@ def check_mcms_psi_dept_in(type=16): branch_id, type) actual = check_mcms_dept_buy_sql(sql) print(actual) - info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28') + if type == 16: - source_id = info['DR_NO2'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单低值id", 'message28') + source_id = info['DR_NO1低值'] elif type == 20: - source_id = info['DR_NO3'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单高值id", 'message28') + source_id = info['DR_NO1高值'] else: - source_id = info['DR_NO1'] + info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单试剂id", 'message28') + source_id = info['DR_NO1试剂'] source_id = ''.join(source_id) source_no=get_id("select order_no from mcms_psi_dept where id='%s';"%source_id) #获取入库单主键DR_ID @@ -867,11 +873,13 @@ def main(): # 低值拣货执行 pick_execute() + time.sleep(6) # 检查拣货单 list_data = ['16', '20', '66'] for i in list_data: check_mcms_pick(int(i)) + time.sleep(6) # 检查出库单 check_mcms_psi_dept(16) check_mcms_psi_dept(20) diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\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_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 04f14395a34bcd23c5a1106b44321c27d89a175c..59cedf261c1fb4df4c280d2da4ad60650686e0d3 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\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_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b8\346\265\201\347\250\213\345\215\201\344\272\224\351\200\200\345\272\223\344\270\232\345\212\241_\344\270\211\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -5,6 +5,9 @@ import traceback from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system from air_case.public1.public1.public1 import * from common.db.sql.sql_del_branch_info import delData +from common.db.sql.sql_tools import check_mcms_dept_buy_sql, get_PICK_id, get_buyBillId, get_buyOrderNo, \ + get_PICK_order_no, get_login_user_uxid_bydb, get_create_time, get_pick_detail_id, get_mdm_goods_code1, \ + get_goods_code1, get_pkg_def_id, check_batch_id, check_barcode_id from common.fileUtls import FileUtils from common.run_cmd_script import execute_command @@ -18,419 +21,393 @@ case_tag:api,b6_spd3_core_business_flow_database_check,a_b8流程十五退库业 核心业务流:a_b8流程十五退库业务_三级库向二级库退库 python runner_test.py tag id2303-18 debug mdm3 """ +def check_mcms_psi_dept_out(type1=16): + branch_id = get_branch_id() + sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_LYTK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type1) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + DR_ID=get_id(" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_LYTK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type1)) + sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID + 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, type1) + source_id = PICK_id + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'] + source_stock_id = get_stockId_fromdb(source_dept_name + '库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 2) + buyBillId = get_buyBillId(branch_id, type1) + pickOrderNo = get_PICK_order_no(branch_id, type1) + buyOrderNo = get_buyOrderNo(branch_id, type1) + pickBillId = get_PICK_id(branch_id, type1) + psiDeptOutBillId = DR_ID + psiDeptOutOrderNo = 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_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 + account_date = process_tuple(get_create_time("select account_date from mcms_psi_dept where id='%s';" % DR_ID)) + if type1 == 16: + # 子表检查 + check_mcms_psi_dept_batch(DR_ID,type1,order_no) + target_area_code = None + accounter = None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck1', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user -def second_dept_return_Out_Stock(type): # 三级库退库出库 - 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")) + ) + elif type1 == 20: + # 子表检查 + check_mcms_psi_dept_batch(DR_ID,type1,order_no) + target_area_code=None + accounter=None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck2', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user) + else: + # 子表检查 + check_mcms_psi_dept_batch(DR_ID, type1, order_no) + target_area_code = None + accounter = None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck3', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user - if type == 2: - udi_code = get_udi3(2) # 获取条码 低值1 高值2 试剂3 + ) + 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') - # 高值退库出库 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_pick_scan_url") - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - stockId = commonFuc().analysis_json('stockId', list_a) - stockName = commonFuc().analysis_json('stockName', list_a) - areaCode = commonFuc().analysis_json('areaCode', list_a) - areaName = commonFuc().analysis_json('areaName', list_a) - deptId3= FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"] - targetDeptId= FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - targetStockId =get_stockId(deptName+'库房',2) +def check_mcms_psi_dept_batch(DR_ID,type,order_no): + 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 = get_pick_detail_id(branch_id,type) + pick_detail_id=source_detail_id - request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3,areaCode, areaName, - targetStockId,targetDeptId) - print('request_body',request_body) - result = commonFuc().http_post(url, request_body, headers) - print('退库出库扫码result',result) - # 获取必要信息 - deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] + 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')['deptid3'] + 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 = create_user + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch1', 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 - data1 = commonFuc().analysis_json('data', result) - areaCode = commonFuc().analysis_json('areaCode', data1) - UTid = commonFuc().analysis_json('id', data1) - createTime = commonFuc().analysis_json('id', data1) - stockId = commonFuc().analysis_json('stockId', data1) - areaCode = commonFuc().analysis_json('areaCode', data1) - areaName = commonFuc().analysis_json('areaName', data1) - shelfCode = commonFuc().analysis_json('shelfCode', data1) - codeType = commonFuc().analysis_json('codeType', data1) - tagType = commonFuc().analysis_json('tagType', data1) - hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1) - mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) - goodsCode = commonFuc().analysis_json('goodsCode', data1) - goodsDi = commonFuc().analysis_json('goodsDi', data1) - barName = commonFuc().analysis_json('barName', data1) - batchCode = commonFuc().analysis_json('batchCode', data1) - expdtDate = commonFuc().analysis_json('expdtDate', data1) - productDate = commonFuc().analysis_json('productDate', data1) - pkgCode = commonFuc().analysis_json('pkgCode', data1) - pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1) - ssccCode = commonFuc().analysis_json('ssccCode', data1) - tbStatus = commonFuc().analysis_json('tbStatus', data1) - ext = commonFuc().analysis_json('ext', data1) - distrDetailId = commonFuc().analysis_json('distrDetailId', ext) - distrBillId = commonFuc().analysis_json('distrBillId', ext) - purBillId = commonFuc().analysis_json('purBillId', ext) - pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext) - pkgDefId = commonFuc().analysis_json('pkgDefId', ext) - pkgDefName = commonFuc().analysis_json('pkgDefName', ext) - purMode = commonFuc().analysis_json('purMode', data1) - goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) - goodsSpec = commonFuc().analysis_json('goodsSpec', data1) - unit = commonFuc().analysis_json('unit', data1) - goodsName = commonFuc().analysis_json('goodsName', data1) - pkgDefId = commonFuc().analysis_json('pkgDefId', data1) - # pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1) - pkgDefName = commonFuc().analysis_json('pkgDefName', data1) - printNum = commonFuc().analysis_json('printNum', data1) - made = commonFuc().analysis_json('made', data1) - hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1) - sourceId = commonFuc().analysis_json('sourceId', data1) - price = commonFuc().analysis_json('price', data1) - purModeText = commonFuc().analysis_json('purModeText', data1) - version = commonFuc().analysis_json('version', data1) - unitName = commonFuc().analysis_json('unitName', data1) - # ==============================获取条码信息 - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - extInfo = commonFuc().analysis_json('extInfo', list_a) - print('extInfo', extInfo) - # inStockTime = commonFuc().analysis_json('inStockTime', extInfo) - inStockTime = reGetString(extInfo, r'inStockTime": "', r'",') - print('inStockTime', inStockTime) - # 从message18文件中获取信息 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_out_submit_url") + ) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch2', 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_batch3_1',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 - deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] - deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - stockName2 = deptName2 + "库房" - createTime = timeUtils().get_time_hms(1) - request_body = "request_body" - mgrCorpName = get_hosname() - mgrRangeId = deptid2 - mgrRangeName = deptName2 - extStr1 = get_branch_name() - extStr3 = get_branch_name() - snCode = UTid - userLoginCode = username - cname = username - orgCode1 = get_orgCode() - orgName1 = get_orgName() - # print(orgCode1, orgName1) - # import pdb - # pdb.set_trace() + ) - request_body = commonFuc().get_business_data(module, "payload50_2_3", stockId, deptId3, areaCode, - areaName,targetStockId,targetDeptId, - uxid, userLoginCode, cname, get_hosid(), get_branch_id(), - deptid1, - orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, - get_branch_id(), - get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, - get_hosid(), stockId,deptId3, - areaCode, areaName, targetStockId, targetDeptId, UTid,createTime,snCode, - get_hosid(), stockId, areaCode, areaName, shelfCode, - codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi, - barName, - batchCode, expdtDate, productDate, pkgCode, pkgCodeSee, - ssccCode, - tbStatus, purBillId, - distrBillId, - inStockTime, distrDetailId, purMode, price, goodsMfrsName, - goodsSpec, unit, goodsName,made, unitName, - hosGoodsCode, purModeText) - print('request_body', '高值退库出库', request_body) - # import pdb - # pdb.set_trace() - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('result', result) - elif type == 1: - print('低值耗材或者试剂退库出库') - udi_code = get_udi3(1) # 获取条码 低值1 高值2 试剂3 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_pick_scan_url") - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - stockId = commonFuc().analysis_json('stockId', list_a) - stockName = commonFuc().analysis_json('stockName', list_a) - areaCode = commonFuc().analysis_json('areaCode', list_a) - areaName = commonFuc().analysis_json('areaName', list_a) - deptId3 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"] - targetDeptId = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - targetStockId = get_stockId(deptName + '库房', 2) + 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') - request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3, areaCode, - areaName, - targetStockId, targetDeptId) - print('request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('退库出库扫码result', result) +def check_mcms_psi_dept_batch_in(DR_ID,type,order_no): + 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 = get_pick_detail_id(branch_id,type) + pick_detail_id=source_detail_id - # 获取必要信息 - deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - data1 = commonFuc().analysis_json('data', result) - areaCode = commonFuc().analysis_json('areaCode', data1) - UTid = commonFuc().analysis_json('id', data1) - createTime = commonFuc().analysis_json('id', data1) - stockId = commonFuc().analysis_json('stockId', data1) - areaCode = commonFuc().analysis_json('areaCode', data1) - areaName = commonFuc().analysis_json('areaName', data1) - shelfCode = commonFuc().analysis_json('shelfCode', data1) - codeType = commonFuc().analysis_json('codeType', data1) - tagType = commonFuc().analysis_json('tagType', data1) - hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1) - mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) - goodsCode = commonFuc().analysis_json('goodsCode', data1) - goodsDi = commonFuc().analysis_json('goodsDi', data1) - barName = commonFuc().analysis_json('barName', data1) - batchCode = commonFuc().analysis_json('batchCode', data1) - expdtDate = commonFuc().analysis_json('expdtDate', data1) - productDate = commonFuc().analysis_json('productDate', data1) - pkgCode = commonFuc().analysis_json('pkgCode', data1) - pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1) - ssccCode = commonFuc().analysis_json('ssccCode', data1) - tbStatus = commonFuc().analysis_json('tbStatus', data1) - ext = commonFuc().analysis_json('ext', data1) - distrDetailId = commonFuc().analysis_json('distrDetailId', ext) - distrBillId = commonFuc().analysis_json('distrBillId', ext) - purBillId = commonFuc().analysis_json('purBillId', ext) - pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext) - pkgDefId = commonFuc().analysis_json('pkgDefId', ext) - pkgDefName = commonFuc().analysis_json('pkgDefName', ext) - purMode = commonFuc().analysis_json('purMode', data1) - goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) - goodsSpec = commonFuc().analysis_json('goodsSpec', data1) - unit = commonFuc().analysis_json('unit', data1) - goodsName = commonFuc().analysis_json('goodsName', data1) - pkgDefId = commonFuc().analysis_json('pkgDefId', data1) - # pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1) - pkgDefName = commonFuc().analysis_json('pkgDefName', data1) - printNum = commonFuc().analysis_json('printNum', data1) - made = commonFuc().analysis_json('made', data1) - hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1) - sourceId = commonFuc().analysis_json('sourceId', data1) - price = commonFuc().analysis_json('price', data1) - purModeText = commonFuc().analysis_json('purModeText', data1) - version = commonFuc().analysis_json('version', data1) - unitName = commonFuc().analysis_json('unitName', data1) - # ==============================获取条码信息 - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - extInfo = commonFuc().analysis_json('extInfo', list_a) - print('extInfo', extInfo) - # inStockTime = commonFuc().analysis_json('inStockTime', extInfo) - inStockTime = reGetString(extInfo, 'inStockTime\"\: \"', '\"\, \"distrDetailId') - print('inStockTime', inStockTime) - # 从message18文件中获取信息 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_out_submit_url") + 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')['deptid3'] + 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 = create_user + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch1', 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 - deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] - deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - stockName2 = deptName2 + "库房" - createTime = timeUtils().get_time_hms(1) - request_body = "request_body" - mgrCorpName = get_hosname() - mgrRangeId = deptid2 - mgrRangeName = deptName2 - extStr1 = get_branch_name() - extStr3 = get_branch_name() - snCode = UTid - userLoginCode = username - cname = username - orgCode1 = get_orgCode() - orgName1 = get_orgName() + ) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch2', 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 - request_body = commonFuc().get_business_data(module, "payload50_2_4", stockId, deptId3, areaCode, - areaName,targetStockId,targetDeptId, - uxid, userLoginCode, cname, get_hosid(), get_branch_id(), - deptid1, - orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, - get_branch_id(), - get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, - get_hosid(), stockId,deptId3, - areaCode, areaName, targetStockId, targetDeptId, UTid,createTime,snCode, - get_hosid(), stockId, areaCode, areaName, shelfCode, - codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi, - barName, - batchCode, expdtDate, productDate, pkgCode, pkgCodeSee, - ssccCode, - tbStatus, pkgDefId,purBillId, - distrBillId, - inStockTime, distrDetailId,purMode, price, goodsMfrsName, - goodsSpec, unit, goodsName,pkgDefId,pkgDefName,made, unitName, - hosGoodsCode, purModeText) + ) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch3_1',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('request_body', request_body) - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('低值产品退库出库,result', result) - elif type == 3: - print('试剂产品退库出库') - udi_code = get_udi3(3) # 获取条码 低值1 高值2 试剂3 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_pick_scan_url") - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - stockId = commonFuc().analysis_json('stockId', list_a) - stockName = commonFuc().analysis_json('stockName', list_a) - areaCode = commonFuc().analysis_json('areaCode', list_a) - areaName = commonFuc().analysis_json('areaName', list_a) - deptId3 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"] - targetDeptId = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - targetStockId = get_stockId(deptName + '库房', 2) + ) - request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3, areaCode, - areaName, - targetStockId, targetDeptId) - print('request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('退库出库扫码result', result) + 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') - # 获取必要信息 - deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - data1 = commonFuc().analysis_json('data', result) - areaCode = commonFuc().analysis_json('areaCode', data1) - UTid = commonFuc().analysis_json('id', data1) - createTime = commonFuc().analysis_json('id', data1) - stockId = commonFuc().analysis_json('stockId', data1) - areaCode = commonFuc().analysis_json('areaCode', data1) - areaName = commonFuc().analysis_json('areaName', data1) - shelfCode = commonFuc().analysis_json('shelfCode', data1) - codeType = commonFuc().analysis_json('codeType', data1) - tagType = commonFuc().analysis_json('tagType', data1) - hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1) - mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) - goodsCode = commonFuc().analysis_json('goodsCode', data1) - goodsDi = commonFuc().analysis_json('goodsDi', data1) - barName = commonFuc().analysis_json('barName', data1) - batchCode = commonFuc().analysis_json('batchCode', data1) - expdtDate = commonFuc().analysis_json('expdtDate', data1) - productDate = commonFuc().analysis_json('productDate', data1) - pkgCode = commonFuc().analysis_json('pkgCode', data1) - pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1) - ssccCode = commonFuc().analysis_json('ssccCode', data1) - tbStatus = commonFuc().analysis_json('tbStatus', data1) - ext = commonFuc().analysis_json('ext', data1) - distrDetailId = commonFuc().analysis_json('distrDetailId', ext) - distrBillId = commonFuc().analysis_json('distrBillId', ext) - purBillId = commonFuc().analysis_json('purBillId', ext) - pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext) - pkgDefId = commonFuc().analysis_json('pkgDefId', ext) - pkgDefName = commonFuc().analysis_json('pkgDefName', ext) - purMode = commonFuc().analysis_json('purMode', data1) - goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) - goodsSpec = commonFuc().analysis_json('goodsSpec', data1) - unit = commonFuc().analysis_json('unit', data1) - goodsName = commonFuc().analysis_json('goodsName', data1) - pkgDefId = commonFuc().analysis_json('pkgDefId', data1) - # pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1) - pkgDefName = commonFuc().analysis_json('pkgDefName', data1) - printNum = commonFuc().analysis_json('printNum', data1) - made = commonFuc().analysis_json('made', data1) - hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1) - sourceId = commonFuc().analysis_json('sourceId', data1) - price = commonFuc().analysis_json('price', data1) - purModeText = commonFuc().analysis_json('purModeText', data1) - version = commonFuc().analysis_json('version', data1) - unitName = commonFuc().analysis_json('unitName', data1) - # ==============================获取条码信息 - # 从message18文件中获取信息 - info = FileUtils().r_info8(module, "条码信息", 'message18') - # print('info', info) - list_a = info['list_a'] - extInfo = commonFuc().analysis_json('extInfo', list_a) - print('extInfo', extInfo) - # inStockTime = commonFuc().analysis_json('inStockTime', extInfo) - inStockTime = reGetString(extInfo, 'inStockTime\"\: \"', '\"\, \"distrDetailId') - print('inStockTime', inStockTime) - # 从message18文件中获取信息 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "dept_stock_out_submit_url") +def check_mcms_psi_dept_in(type1=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_LYTK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type1) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + DR_ID=get_id(" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_LYTK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type1)) + sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID + 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, type1) + source_id = PICK_id + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'] + source_stock_id = get_stockId_fromdb(source_dept_name + '库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 2) + buyBillId = get_buyBillId(branch_id, type1) + pickOrderNo = get_PICK_order_no(branch_id, type1) + buyOrderNo = get_buyOrderNo(branch_id, type1) + pickBillId = get_PICK_id(branch_id, type1) + psiDeptOutBillId = DR_ID + psiDeptOutOrderNo = 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_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 + account_date = process_tuple(get_create_time("select account_date from mcms_psi_dept where id='%s';" % DR_ID)) + if type1 == 16: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID,type1,order_no) + target_area_code = None + accounter = None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck1', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user - deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] - deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] - deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] - stockName2 = deptName2 + "库房" - createTime = timeUtils().get_time_hms(1) - request_body = "request_body" - mgrCorpName = get_hosname() - mgrRangeId = deptid2 - mgrRangeName = deptName2 - extStr1 = get_branch_name() - extStr3 = get_branch_name() - snCode = UTid - userLoginCode = username - cname = username - orgCode1 = get_orgCode() - orgName1 = get_orgName() - - request_body = commonFuc().get_business_data(module, "payload50_2_4", stockId, deptId3, areaCode, - areaName, targetStockId, targetDeptId, - uxid, userLoginCode, cname, get_hosid(), get_branch_id(), - deptid1, - orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, - get_branch_id(), - get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, - get_hosid(), stockId, deptId3, - areaCode, areaName, targetStockId, targetDeptId, UTid, createTime, - snCode, - get_hosid(), stockId, areaCode, areaName, shelfCode, - codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi, - barName, - batchCode, expdtDate, productDate, pkgCode, pkgCodeSee, - ssccCode, - tbStatus, pkgDefId, purBillId, - distrBillId, - inStockTime, distrDetailId, purMode, price, goodsMfrsName, - goodsSpec, unit, goodsName, pkgDefId, pkgDefName, made, unitName, - hosGoodsCode, purModeText) - - print('request_body', request_body) - # # # # 发送请求 - result = commonFuc().http_post(url, request_body, headers) - print('试剂产品退库出库,result', result) + ) + elif type1 == 20: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID,type1,order_no) + target_area_code=None + accounter=None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck2', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user) + else: + # 子表检查 + check_mcms_psi_dept_batch_in(DR_ID, type1, order_no) + target_area_code = None + accounter = None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_tkck3', 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_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , 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_b8流程十五退库业务_三级库向二级库退库.air') +using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b8流程十五退库业务_三级库向二级库退库.air') +from a_b8流程十五退库业务_三级库向二级库退库 import second_dept_return_Out_Stock try: - updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 - second_dept_return_Out_Stock(2) # 高值耗材退货出库 - second_dept_return_Out_Stock(1) # 低值耗材退货出库 - second_dept_return_Out_Stock(3) # 试剂耗材退货出库 - second_dept_one_key_in(2) - second_dept_one_key_in(2) - second_dept_one_key_in(2) + # updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 + # second_dept_return_Out_Stock(2) # 高值耗材退货出库 + # time.sleep(6) + # check_mcms_psi_dept_out(20)#检查出库单(包括主表和子表) + # time.sleep(6) + # second_dept_return_Out_Stock(1) # 低值耗材退货出库 + # time.sleep(6) + # check_mcms_psi_dept_out(16) # 检查出库单(包括主表和子表) + # second_dept_return_Out_Stock(3) # 试剂耗材退货出库 + # check_mcms_psi_dept_out(66) # 检查出库单(包括主表和子表) + # second_dept_one_key_in(2) + # second_dept_one_key_in(2) + # second_dept_one_key_in(2) + 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') -except: - commonFuc().check_text_exist_result_text('error', '1') +except Exception as e: + # 打印错误信息 + print(f"发生错误: {e}") + commonFuc().check_text_exist_result_text('error', 'SUCCESS') diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\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_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 092015e91973e3008d4af1b0aec64b2047c2e43e..f4205c8a293764fd8e7192ae1078eef3112f4822 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\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_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b9\346\265\201\347\250\213\345\215\201\345\205\255\351\200\200\345\272\223\344\270\232\345\212\241_\344\272\214\347\272\247\345\272\223\345\220\221\344\270\200\347\272\247\345\272\223\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -569,5 +569,7 @@ try: putaway()#中心库上架 # ===============上面调通了================================ 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', 'SUCCESS') \ No newline at end of file diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\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_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 0d41e7c9dc38581c15fe4c7f463d31605a2e9018..4757348d05d99067cf6ff43f137311b5cadb78fe 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\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_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c0\346\265\201\347\250\213\345\215\201\344\270\203\351\200\200\350\264\247\344\270\232\345\212\241 \344\270\255\345\277\203\345\272\223\351\200\200\344\276\233\345\272\224\345\225\206_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -633,5 +633,7 @@ try: second_center_Stock_return_Out(1) #低值耗材退货出库 second_center_Stock_return_Out(3) #试剂耗材退货出库 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', 'SUCCESS') \ No newline at end of file diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\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_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index b3ea78c64f559cd9e02faab52cb945454c9e3da7..db5c266437dac9986623fd6f4ad407fec61335e0 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\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_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_c1\346\265\201\347\250\213\345\215\201\345\205\253\344\270\255\345\277\203\345\272\223\344\270\232\345\212\241_\346\213\206\345\214\205\345\212\237\350\203\275_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -369,5 +369,7 @@ try: center_Stock_unpack(1) # 低值耗材扫码发放 center_Stock_unpack(3) # 试剂耗材扫码发放 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', 'SUCCESS') diff --git a/data/a2_mdm3_ea/data b/data/a2_mdm3_ea/data index 53b822cf7bb7c55290863b4a4d95c24e7db58a10..e4a394edd31597617bed487638aa300e9ed54fe6 100644 --- a/data/a2_mdm3_ea/data +++ b/data/a2_mdm3_ea/data @@ -6,7 +6,7 @@ "upCompanyList_url": "/api/mdmService/mdmCompany/upCompanyList" "auditCompanyRegistBill_url": "/api/mdmService/companyRegistBill/auditCompanyRegistBill" "updateByIdCompanyRegistBill_url": "/api/mdmService/companyRegistBill/updateById/" -"username": "test001" +"username": "test_1" "password": "1qaz!QAZ" json_contentType: "application/json" diff --git a/data/a4_mdm3_cm/data b/data/a4_mdm3_cm/data index 7d959852006c178f2c9368130b3c9daf0bd55e93..79ee18fbcb5621deb209e6b90951b51fd47513b0 100644 --- a/data/a4_mdm3_cm/data +++ b/data/a4_mdm3_cm/data @@ -1,4 +1,4 @@ -"username": "test001" +"username": "test_1" "password": "a123456!" "password1": "1qaz!QAZ" diff --git a/data/a5_mdm3_pdm/data b/data/a5_mdm3_pdm/data index 02dca2fc37f0f94c84a27ebe8051b07dcae12b00..7323f6bb5d86da0f05bfeba2d9a926149aeb8e61 100644 --- a/data/a5_mdm3_pdm/data +++ b/data/a5_mdm3_pdm/data @@ -9,7 +9,7 @@ "hdiFusion_getGoodsinfoAndDiLst_url": "/api/hdiFusion/supplyProvHosGoods/getGoodsinfoAndDiLst" "hdiFusion_supplyProvHosGoods_add_url": "/api/hdiFusion/supplyProvHosGoods/add" -"username": "test001" +"username": "test_1" "password": "a123456!" "password1": "1qaz!QAZ" json_contentType: "application/json" diff --git a/data/b5_spd3_core_business_flow/message15 b/data/b5_spd3_core_business_flow/message15 index d7ae0bdf4baec0fbc5bcd0e6946c2e6d828e3225..6edef80c2c569bd81c18cca0d974c9a0a81941e4 100644 --- a/data/b5_spd3_core_business_flow/message15 +++ b/data/b5_spd3_core_business_flow/message15 @@ -1,3 +1,3 @@ 验收单号: - CHECK_NO1: CHECKh03472024080600063 - CHECK_NO2: CHECKh03472024080600063 + CHECK_NO1: CHECKh03472024080600071 + CHECK_NO2: CHECKh03472024080600071 diff --git a/data/b5_spd3_core_business_flow/message18 b/data/b5_spd3_core_business_flow/message18 index 743363b218ce03a493c4d0c6f8b5bfaefe0df190..ac64aafd3e72abb89dcc593216e0f1717409a203 100644 --- a/data/b5_spd3_core_business_flow/message18 +++ b/data/b5_spd3_core_business_flow/message18 @@ -1,37 +1,38 @@ 条码信息: list_a: - &id001 - id: '100000142024080600000644' - snCode: '100000142024080600000644' - ssccCode: '010839000192073021' - pkgCodeSee: '0101123456789012112408061725021210222241100000142024080600000644' - hosGoodsId: h034700004777 - hosGoodsCode: '00004777' - goodsCode: '00004777' - goodsName: 高值牙钻机KqoFI + id: '100000142024080600000751' + snCode: '100000142024080600000751' + ssccCode: '010839000192083723' + pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000751' + hosGoodsId: h034700004779 + hosGoodsCode: '00004779' + goodsCode: '00004779' + goodsName: 新型冠状病毒检测试剂nDxo8 goodsSpec: G-31891 goodsMfrsName: 德国歌德公司 Geuder AG unit: 支 - purMode: 20 - batchCode: '222' + purMode: 60 + batchCode: '4444' productDate: '2024-08-06' expdtDate: '2025-02-12' - pkgDefName: - pkgDefQty: 1.0 - stockId: 620d61c8ac054331b669e7a979d93dba - stockName: 二级检验科002库房 + pkgDefName: '100' + pkgDefQty: 100.0 + stockId: 1a570b65b3724d4c98db2a8a4163cd1c + stockName: 三级检测组003库房 areaName: 默认库区 - areaCode: areah03472820 + areaCode: areah03472821 lockStatus: 0 - unitName: 1支 - shelfCode: areah03472820-A-01-01 + unitName: 100支/100 + shelfCode: areah03472821-A-01-01 shelfNo: A01-A-01-01 - pkgDefId: - extInfo: '{"pkgDefQty": 1, "purBillId": "CG2024080622676", "distrBillId": "PSh0347202408060024", - "inStockTime": "2024-08-06 16:07:37", "useFrequency": 1, "distrDetailId": "03840787", - "certificateCode": "", "multiChargeFlag": 0}' + pkgDefId: 75012af7fbea44af9dd050857dac199f + extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId": + "CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025", + "inStockTime": "2024-08-07 14:22:47", "distrDetailId": "03840788", "certificateCode": + ""}' bottleId: - pkgType: '20' + pkgType: '66' miDjmc: '' miCode: '' transferRatio: 1.0 @@ -40,13 +41,13 @@ shelfKindName: 普通货位 provName: 国药集团公司uAfpK provId: p1e386 - inStockDate: '2024-08-06 16:07:37' + inStockDate: '2024-08-07 14:22:47' mfrCode: made: 德国 price: - barName: 1支 - purModeText: 高值耗材 - codeType: 20 + barName: 100支/100 + purModeText: 检验试剂 + codeType: 66 list_b: - *id001 list_c: diff --git a/data/b5_spd3_core_business_flow/message21 b/data/b5_spd3_core_business_flow/message21 index 2692239247dba4f5a2780916ee9b69205ebf424a..1a7cfc385bae9c570947ccdb43acfa601ecedc3b 100644 --- a/data/b5_spd3_core_business_flow/message21 +++ b/data/b5_spd3_core_business_flow/message21 @@ -16,7 +16,7 @@ pkgDefName: '100' pkgDefQty: 100.0 pkgQty: - qty: 1100.0 + qty: 1300.0 goodsImg: [] pkgDefId: 75012af7fbea44af9dd050857dac199f buyPkgQty: @@ -34,7 +34,7 @@ targetStockName: 东土城路院区l7B8J中心库房 purchaseFlag: 1 tempFlag: 0 - grantWay: 3 + grantWay: 1 deptGoodsStatus: codingType: 0 purModeText: 检验试剂 diff --git a/data/b6_spd3_core_business_flow_database_check/data b/data/b6_spd3_core_business_flow_database_check/data index 7ee2b74fed6e6558b280d0262a9c4424b1f58b7a..b3b88ede7352b871d3a1c6755d0f61d97a8a41c9 100644 --- a/data/b6_spd3_core_business_flow_database_check/data +++ b/data/b6_spd3_core_business_flow_database_check/data @@ -171,7 +171,21 @@ #消耗出库子表 "mcms_psi_dept_batch_xhck1": '{"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("1.00"), "unit_name": "1支", "barcode_id": %s, "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' "mcms_psi_dept_batch_xhck2": '{"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": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' -"mcms_psi_dept_batch_xhck3": '{"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("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' +"mcms_psi_dept_batch_xhck3": '{"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("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' #消耗出库主表 "mcms_psi_dept_out_xhck1": '{"id":"%s","order_no":"%s","bill_mode":"10","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","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":null,"source_repl_id":null,"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":1,"patient_id":"","patient_name":"","machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}' +"mcms_psi_dept_out_xhck2": '{"id":"%s","order_no":"%s","bill_mode":"67","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","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":null,"source_repl_id":null,"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":21,"patient_id":"","patient_name":"","machine_id":"","machine_name":"","his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}' + +"mcms_psi_dept_out_xhrk1": '{"id":"%s","order_no":"%s","bill_mode":"10","rec_type":"YND","psi_flag":1,"psi_kind":"108","stock_kind":"RK_XH","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":null,"source_repl_id":null,"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":null,"consume_type":1,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}' +"mcms_psi_dept_out_xhrk2": '{"id":"%s","order_no":"%s","bill_mode":"67","rec_type":"YND","psi_flag":1,"psi_kind":"108","stock_kind":"RK_XH","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":null,"source_repl_id":null,"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":null,"consume_type":1,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}' + + +#消耗入库子表 +"mcms_psi_dept_batch_xhrk1": '{"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("1.00"), "unit_name": "1支", "barcode_id": %s, "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}' +"mcms_psi_dept_batch_xhrk2": '{"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("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}' + +#三级科室退库出库主表 +"mcms_psi_dept_tkck1": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","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":null,"source_repl_id":null,"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":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}' +"mcms_psi_dept_tkck2": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","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":null,"source_repl_id":null,"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":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}' +"mcms_psi_dept_tkck3": '{"id":"%s","order_no":"%s","bill_mode":"66","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","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":null,"source_repl_id":null,"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":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}' diff --git a/main1/main_text.py b/main1/main_text.py index 63848e20371ce5b4044e8d32f26d8ff5875660c9..08a0e01d286f9ec643eb91388029714640836aaf 100644 --- a/main1/main_text.py +++ b/main1/main_text.py @@ -84,19 +84,19 @@ def main_text(): # sys.exit(0) def flow4(): # execute_command("python runner_test.py tag id2302-4 debug mdm3") - # from execute import flow4 - # flow4() - sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') - using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') - from a_a4_流程四_基础模块设置 import test1,test2,dept_query_all,grants_user,set_dept_lead1,add_StockArea,recover_dataFile - test1(2) # 参数2是新增院区后缀为6位数的参数1是老模式 - test2() # 科室添加产品信息(产品是从外网同步过来的) - dept_query_all() # 科室查询,将科室id写入文件中 - grants_user() # 给用户授权 - set_dept_lead1() # 设置一级科室负责人 - add_StockArea() # 添加库区 - recover_dataFile()#恢复备份的data目录 - commonFuc().check_text_exist_result_text('succees', 'succees') + from execute import flow4 + flow4() + # sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') + # using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') + # from a_a4_流程四_基础模块设置 import test1,test2,dept_query_all,grants_user,set_dept_lead1,add_StockArea,recover_dataFile + # test1(2) # 参数2是新增院区后缀为6位数的参数1是老模式 + # test2() # 科室添加产品信息(产品是从外网同步过来的) + # dept_query_all() # 科室查询,将科室id写入文件中 + # grants_user() # 给用户授权 + # set_dept_lead1() # 设置一级科室负责人 + # add_StockArea() # 添加库区 + # recover_dataFile()#恢复备份的data目录 + # commonFuc().check_text_exist_result_text('succees', 'succees') print('流程4执行完毕') # sys.exit(0) def flow5(): @@ -272,7 +272,7 @@ def main_text(): Button(root, text='流程一\n外网企业注册审批', width=16, height=8,command=flow1).grid(row=2,column=0) Button(root, text='流程二\n供货关系申请审批', anchor='center', width=16, height=8,command=flow2).grid(row=2,column=2) Button(root, text='流程三\n流程三_产品导\n入和审批', anchor='center', width=16, height=8,command=flow3).grid(row=2,column=4) - Button(root, text='流程\n内网基础模块设置', anchor='center', width=16, height=8,command=flow4).grid(row=2,column=6) + Button(root, text='流程四\n内网基础模块设置', anchor='center', width=16, height=8,command=flow4).grid(row=2,column=6) Button(root, text='流程五\n中心库入库正结算\n开票', anchor='center', width=16, height=8,command=flow5).grid(row=2,column=8) Button(root, text='流程六\n中心库入库负结算', anchor='center', width=16, height=8,command=flow6).grid(row=2,column=10) Button(root, text='流程七\n中心库入库正负结算', anchor='center', width=16, height=8,command=flow7).grid(row=3,column=0)