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 89a9da924c0f87ed4bd23a42f00f3850675bae40..d53bdae704ad00a92ff9015d65ea98ba51c4f42a 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" @@ -11,7 +11,8 @@ from common.db.sql.sql_tools import get_create_time, check_mcms_dept_buy_car_sql get_goods_mfrs_id, get_supply_id, check_mcms_pur_sql, check_source_id, get_pkg_def_id, get_buyBillId, \ get_planBillId, get_planOrderNo, get_buyOrderNo, get_purOrderNo, get_purBillId, get_distrBillId, \ get_distrOrderNo, get_distr_detail_id, get_ext_info, get_login_user_uxid_bydb, get_purBillDate, get_purBillDate2, \ - get_mcms_chek_purBillDate + get_mcms_chek_purBillDate, get_PICK_id, get_PICK_order_no, get_account_date, get_checkBillId, get_checkOrderNo, \ + get_psiInBillId, get_psiInOrderNo, check_batch_id, check_barcode_id from common.db.sql.sql_tools_out import check_out_check_mcms_purchase from common.fileUtls import FileUtils @@ -1549,7 +1550,7 @@ def check_mcms_check_batch(type, check_no, order_no, hos_goods_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) + 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) @@ -1662,6 +1663,8 @@ def check_mcms_psi(type=1): 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_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi1', id, order_no, target_corp_id, target_branch_id, target_dept_id, target_dept_name, target_stock_id @@ -1673,7 +1676,7 @@ def check_mcms_psi(type=1): psiInBillId, psiInOrderNo, create_user , create_time, last_modified, last_modified_user) elif type == 2: - + check_mcms_psi_batch_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi2', id, order_no, target_corp_id, target_branch_id, target_dept_id, target_dept_name, target_stock_id @@ -1685,7 +1688,7 @@ def check_mcms_psi(type=1): psiInBillId, psiInOrderNo, create_user , create_time, last_modified, last_modified_user) else: - + check_mcms_psi_batch_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi3', id, order_no, target_corp_id, target_branch_id, target_dept_id, target_dept_name, target_stock_id @@ -1738,8 +1741,8 @@ def check_mcms_psi(type=1): source_repl_id = source_no source_corp_id = get_hosid() 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_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + source_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') accounter = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) account_date = get_create_time("select account_date from mcms_psi where id='%s';" % id_out) @@ -1771,8 +1774,9 @@ def check_mcms_psi(type=1): last_modified = get_create_time("select last_modified from mcms_psi where id='%s';" % id_out) last_modified_user = create_user source_branch_id = get_branch_id() - source_area_code=get_stockAreaId_new_fromDb(source_dept_name) + source_area_code = get_stockAreaId_new_fromDb(source_dept_name) 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_out1', id_out, order_no_out, target_corp_id, target_branch_id, target_dept_id, @@ -1785,8 +1789,9 @@ def check_mcms_psi(type=1): psiInBillId, psiInOrderNo, psiOutBillId, psiOutOrderNo, create_user , create_time, last_modified, last_modified_user) elif type == 2: - - expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi_out2', id_out, + 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_out2', + id_out, order_no_out, target_corp_id, target_branch_id, target_dept_id, target_dept_name, target_stock_id , target_area_code, source_id_out, source_no_out, source_repl_id, @@ -1797,8 +1802,9 @@ def check_mcms_psi(type=1): psiInBillId, psiInOrderNo, psiOutBillId, psiOutOrderNo, create_user , create_time, last_modified, last_modified_user) else: - - expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_psi_out3',id_out, + 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_out3', + id_out, order_no_out, target_corp_id, target_branch_id, target_dept_id, target_dept_name, target_stock_id , target_area_code, source_id_out, source_no_out, source_repl_id, @@ -1826,90 +1832,311 @@ def check_mcms_psi(type=1): else: print('error') commonFuc().check_text_exist_result_text('error', 'succees') -def check_mcms_psi_dept_in(bill_mode=16): + + +def check_mcms_psi_dept_in(type=16): + bill_mode = type 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, bill_mode) + branch_id, bill_mode) actual = check_mcms_dept_buy_sql(sql) print(actual) - #获取主键 - id=get_id(" 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, bill_mode)) - #获取source_id + # 获取主键 + id = get_id( + " 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, bill_mode)) + # 获取source_id sql = "select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;" % ( branch_id, bill_mode) source_id = get_id(sql) - source_no=get_id("select order_no from mcms_psi where id='%s';"%source_id) - #获取order_no - sql = " select order_no from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_SL' order by CREATE_TIME desc LIMIT 1;" % ( - branch_id, type) + source_no = get_id("select order_no from mcms_psi where id='%s';" % source_id) + # 获取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, 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')['deptid5'] - target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'] + 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) + PICK_id = get_PICK_id(branch_id, bill_mode) source_corp_id = get_hosid() source_branch_id = get_branch_id() - source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] - source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] - 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, type) - pickOrderNo = get_PICK_order_no(branch_id, type) - buyOrderNo = get_buyOrderNo(branch_id, type) - pickBillId = get_PICK_id(branch_id, type) + 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, bill_mode) + pickOrderNo = get_PICK_order_no(branch_id, bill_mode) + buyOrderNo = get_buyOrderNo(branch_id, bill_mode) + pickBillId = get_PICK_id(branch_id, bill_mode) psiDeptOutBillId = source_id psiDeptOutOrderNo = source_no + 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"] + elif type == 66: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + else: + hos_goods_id = None + planBillId = get_planBillId(hos_goods_id) + purOrderNo = get_purOrderNo(branch_id, bill_mode) + purBillId = get_purBillId(branch_id, bill_mode) 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) + create_time = get_create_time("select create_time from mcms_psi_dept where id='%s';" % id) + last_modified = get_create_time("select last_modified from mcms_psi_dept where id='%s';" % 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 + accounter = create_user + sql = "select account_date from mcms_psi_dept where id='%s';" % id + account_date = get_account_date(sql) + psiDeptInBillId = id + psiDeptInOrderNo = order_no + source_repl_id = get_distrBillId(branch_id, bill_mode) + bill_relation_json = get_id( + "select bill_relation_json from mcms_psi_dept a where id = '%s';" % ( + id)) + print(bill_relation_json) + purBillDate = reGetString(bill_relation_json, r'purBillDate":"', r'""distrBillId') + distrBillId = get_distrBillId(branch_id, bill_mode) + distrOrderNo = get_distrOrderNo(branch_id, bill_mode) + checkBillId = get_checkBillId(branch_id, bill_mode) + checkOrderNo = get_checkOrderNo(branch_id, bill_mode) + psiInBillId = get_psiInBillId(branch_id, bill_mode) + psiInOrderNo = get_psiInOrderNo(branch_id, bill_mode) + planOrderNo = get_planOrderNo(hos_goods_id) if type == 16: # 子表检查 - check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id) + check_mcms_psi_dept_batch_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', - 'mcms_psi_dept_in_1', DR_ID, order_no, target_corp_id, target_branch_id, + 'mcms_psi_dept_in_4', 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, + , 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, psiDeptOutBillId, - psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo - , create_user, create_time, last_modified, last_modified_user + accounter, account_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, purOrderNo, purBillId, purBillDate, distrBillId, + distrOrderNo, checkBillId, checkOrderNo, psiInBillId, psiInOrderNo, + 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) + check_mcms_psi_dept_batch_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', - 'mcms_psi_dept_in_2', DR_ID, order_no, target_corp_id, target_branch_id, + 'mcms_psi_dept_in_5', 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, + , 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, psiDeptOutBillId, - psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo - , create_user, create_time, last_modified, last_modified_user + accounter, account_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, purOrderNo, purBillId, purBillDate, distrBillId, + distrOrderNo, checkBillId, checkOrderNo, psiInBillId, psiInOrderNo, + 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) + check_mcms_psi_dept_batch_in(id, type, order_no, source_id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', - 'mcms_psi_dept_in_3', DR_ID, order_no, target_corp_id, target_branch_id, + 'mcms_psi_dept_in_6', 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, + , 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, psiDeptOutBillId, - psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo - , create_user, create_time, last_modified, last_modified_user + accounter, account_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, purOrderNo, purBillId, purBillDate, distrBillId, + distrOrderNo, checkBillId, checkOrderNo, psiInBillId, psiInOrderNo, + 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 = create_user + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in4', 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 + + ) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in5', 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 + + ) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_in6', 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 + + ) + + 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_batch_in(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 = source_id1 + '0001' + pick_detail_id = None + 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 = get_id( + "select id from mcms_hos_batch where hos_goods_id='%s' order by create_time desc LIMIT 1;" % hos_goods_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_in1', batch_main_key, pid, order_no, source_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_in2', batch_main_key, pid, order_no, source_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_in3', batch_main_key, pid, order_no, source_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 ) @@ -1932,6 +2159,221 @@ def check_mcms_psi_dept_in(bill_mode=16): 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 = source_id1 + '0001' + pick_detail_id = None + 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 = get_id( + "select id from mcms_hos_batch where hos_goods_id='%s' order by create_time desc LIMIT 1;" % hos_goods_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_in1', batch_main_key, pid, order_no, source_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_in2', batch_main_key, pid, order_no, source_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_in3', batch_main_key, pid, order_no, source_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_hos_batch(type=1): # 检查批次表信息 + print('中心库入库后检查批次表信息') + if type == 1: + bill_mode = 16 + pur_mode = 10 + elif type == 2: + bill_mode = 20 + pur_mode = 20 + else: + pur_mode = 60 + bill_mode = 66 + branch_id = get_branch_id() + sql = "select * from mcms_hos_batch where branch_id='%s' and pur_mode='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, pur_mode) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql) + print('actual', actual) + sql = "select id from mcms_hos_batch where branch_id='%s' and pur_mode='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, pur_mode) + id = get_id(sql) + hos_id = get_hosid() + branch_id = get_branch_id() + + stock_name = get_branch_name() + "中心库房" + stock_id = get_stockId_fromdb(stock_name) + src_batch_id = get_id("select src_batch_id from mcms_hos_batch where id='%s';" % id) + src_batch_id = 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"] + elif type == 3: + 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) + 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) + + + 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 + + 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_hos_batch where id='%s';" % id) + last_modified = get_create_time("select last_modified from mcms_hos_batch where id='%s';" % id) + last_modified_user = create_user + supply_id = get_supply_id(hos_goods_id) + 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"] + sub_prov_id = prov_id + sub_prov_name = prov_name + expdt_date = get_create_time("select expdt_date from mcms_hos_batch where id='%s';" % id) + product_date = get_create_time("select product_date from mcms_hos_batch where id='%s';" % id) + distr_id = get_distrBillId(branch_id, bill_mode) + distr_detail_id = get_distr_detail_id(branch_id, bill_mode) + in_time = get_create_time("select in_time from mcms_hos_batch where id='%s';" % id) + goodsGg = goods_gg + goodsCode = goods_code + goodsName = goods_name + erpCode = mdm_goods_code + if type == 1: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_hos_batch1', + id, + hos_id, branch_id, stock_id, src_batch_id, hos_goods_id, + mdm_goods_code, goods_code, goods_name, goods_gg + , mfrs_id, supply_id, prov_id, prov_name, sub_prov_id, + sub_prov_name, expdt_date, product_date + , distr_id, distr_detail_id, purBillId, in_time, goodsGg, goodsCode, + goodsName, erpCode, create_user, create_time + , last_modified, last_modified_user + ) + elif type == 2: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_hos_batch2', + id, + hos_id, branch_id, stock_id, src_batch_id, hos_goods_id, + mdm_goods_code, goods_code, goods_name, goods_gg + , mfrs_id, supply_id, prov_id, prov_name, sub_prov_id, + sub_prov_name, expdt_date, product_date + , distr_id, distr_detail_id, purBillId, in_time, goodsGg, goodsCode, + goodsName, erpCode, create_user, create_time + , last_modified, last_modified_user) + else: + fcatId=get_id("select id from mcms_goods_kind where kind_name='财务试剂';") + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', 'check_mcms_hos_batch3', + id, + hos_id, branch_id, stock_id, src_batch_id, hos_goods_id, + mdm_goods_code, goods_code, goods_name, goods_gg + , mfrs_id, supply_id, prov_id, prov_name, sub_prov_id, + sub_prov_name, expdt_date, product_date + , distr_id, distr_detail_id, purBillId, in_time, goodsGg, goodsCode, + goodsName, erpCode, fcatId,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') + + try: pro_path = commonFuc().get_pro_path2() print('pro_path', pro_path) @@ -1947,84 +2389,90 @@ try: from a_b4流程十一请领业务流_二级库向直送 import check_accept_order for i in range(1): - # 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) - # # # 高值 - # 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() # 请领车提交 - # - # 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() - # 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)) - # - # time.sleep(20) - # # 检查自动生成的采购计划数据 - # list_data = ['16', '20', '66'] - # for i in list_data: - # check_mcms_mcms_pur_plan(int(i)) - # # 采购模块处理 - # purchase_module_process() - # - # # 三个单据共审批三次 - # approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号试剂', 'message12')) - # approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号', 'message7')) - # approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号高值', 'message11')) - # time.sleep(20) - # list_data = ['16', '20', '66'] - # for i in list_data: - # check_mcms_purchase(int(i)) - # - # # 检查同步到外网的采购订单数据跟内网的是否一致 - # check_mcms_purchase_out_and_in(1) - # print('检查同步到外网的采购订单数据跟内网的是否一致') - # check_mcms_purchase_out_and_in(2) - # order_dp(1) # 1低值 - # time.sleep(6) - # order_dp(2) # 2高值 - # time.sleep(6) - # 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)) - # - # time.sleep(20) + 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) + # # 高值 + 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() # 请领车提交 + + 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() + 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)) + + time.sleep(20) + # 检查自动生成的采购计划数据 + list_data = ['16', '20', '66'] + for i in list_data: + check_mcms_mcms_pur_plan(int(i)) + # 采购模块处理 + purchase_module_process() + + # 三个单据共审批三次 + approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号试剂', 'message12')) + approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号', 'message7')) + approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号高值', 'message11')) + time.sleep(20) + list_data = ['16', '20', '66'] + for i in list_data: + check_mcms_purchase(int(i)) + + # 检查同步到外网的采购订单数据跟内网的是否一致 + check_mcms_purchase_out_and_in(1) + print('检查同步到外网的采购订单数据跟内网的是否一致') + check_mcms_purchase_out_and_in(2) + order_dp(1) # 1低值 + time.sleep(6) + order_dp(2) # 2高值 + time.sleep(6) + 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)) + + time.sleep(20) #到这里就是验收和中心库自动入库以及中心库出库 - # check_accept_order(1) # 低值 验收和自动入库和出库 - # time.sleep(6) - # check_mcms_check(1) # 调用函数检查验收单数据库写值 - # check_mcms_psi(1) # 调用函数检查中心库入库单和出库单数据库写值 - # check_accept_order(2) # 高值 验收和自动入库和出库 - # time.sleep(6) - # # 这里验收后会自动生成出入库单,批次信息,需要同步验证入库单和批次信息 - # check_mcms_check(2) # 调用函数检查验收单数据库写值 - # check_mcms_psi(2) # 调用函数检查中心库入库单数据库写值 - # check_accept_order(3) # 试剂 验收和自动入库和出库 - # time.sleep(6) - # check_mcms_check(3) # 调用函数检查验收单数据库写值 - # check_mcms_psi(3) # 调用函数检查中心库入库单数据库写值 - # time.sleep(6) + check_accept_order(1) # 低值 验收和自动入库和出库 + time.sleep(6) + check_mcms_check(1) # 调用函数检查验收单数据库写值 + check_mcms_psi(1) # 调用函数检查中心库入库单和出库单数据库写值 + check_accept_order(2) # 高值 验收和自动入库和出库 + time.sleep(6) + + # #这里验收后会自动生成出入库单,批次信息,需要同步验证入库单和批次信息 + check_mcms_check(2) # 调用函数检查验收单数据库写值 + check_mcms_psi(2) # 调用函数检查中心库入库单数据库写值 + check_accept_order(3) # 试剂 验收和自动入库和出库 + time.sleep(6) + check_mcms_check(3) # 调用函数检查验收单数据库写值 + check_mcms_psi(3) # 调用函数检查中心库入库单数据库写值 + time.sleep(6) # # 上面暂时注释======================================== - # second_dept_one_key_in() - # second_dept_one_key_in() - # second_dept_one_key_in() + # 检查批次信息 + check_mcms_hos_batch(1) + check_mcms_hos_batch(2) + check_mcms_hos_batch(3) + second_dept_one_key_in() + second_dept_one_key_in() + second_dept_one_key_in() + # 检查二级库入库单 check_mcms_psi_dept_in(16) check_mcms_psi_dept_in(20) 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 f0c17090a418973c98cc32a9400c231c2f7eac90..3382d9735034138f3a977634246478749646de29 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" @@ -5,7 +5,7 @@ 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 * from common.fileUtls import FileUtils from common.run_cmd_script import execute_command from common.timeUtils import timeUtils @@ -20,314 +20,101 @@ python runner_test.py tag id2303-16 debug mdm3 """ -def SERACH_goods_id(GoodsId): - # 在请领出库渠道边仓中搜索产品 - module = 'b5_spd3_core_business_flow' - # # 登录获取用户id等信息,使用创建的用户登录===========开始 - info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') - username = info['username1'] - password = commonFuc().get_business_data("b2_herp3_bs", "password") - print('username,password', username, password) - # # 获取token和projectCode - token, projectCode, uxid, corpId, info = login(username, password, 2) - # 登录获取用户id等信息,使用创建的用户登录============结束\ - # 获取请求头信息 - headers = commonFuc().get_business_data(module, "json_headers2", - commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_mcmsBranchGoodsInfo_page_url") - dept1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] - # hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'] - # GoodsId = hosGoodsId.replace(get_hosid(), '') - request_body = commonFuc().get_business_data(module, "payload53_2", GoodsId, get_hosid(), get_branch_id(), dept1) - result = commonFuc().http_post(url, request_body, headers) - branchGoodsId = commonFuc().analysis_json('id', commonFuc().analysis_json('data', commonFuc().analysis_json('data', - result))) - return branchGoodsId - - -def second_dept_Request(hosGoodsId, 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")) - - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_buy_queryGoodsInfoPage_url") - print('我要请领_手工请领_列表查询=================', url) - deptid3 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'] - deptname3 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'] - # 高值 - # hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'] - GoodsId = hosGoodsId.replace(get_hosid(), '') - areaCode = get_stockAreaId_new(deptid3, deptname3, 3) - request_body = commonFuc().get_business_data(module, "payload39", GoodsId, get_hosid(), deptid3, areaCode) - 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)) - goodsName = commonFuc().analysis_json('goodsName', data1) - goodsSpec = commonFuc().analysis_json('goodsSpec', data1) - mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) - goodsCode = commonFuc().analysis_json('goodsCode', data1) - unit = commonFuc().analysis_json('unit', data1) - purMode = commonFuc().analysis_json('purMode', data1) - goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) - unitName = commonFuc().analysis_json('unitName', data1) - price = commonFuc().analysis_json('price', data1) - deptId = commonFuc().analysis_json('deptId', data1) - # areaCode=commonFuc().analysis_json('areaCode',data1) - areaName = '默认库区' - targetDeptId = commonFuc().analysis_json('targetDeptId', data1) - targetDeptName = commonFuc().analysis_json('targetDeptName', data1) - targetStockId = commonFuc().analysis_json('targetStockId', data1) - targetStockName = commonFuc().analysis_json('targetStockName', data1) - purModeText = commonFuc().analysis_json('purModeText', data1) - goodsGeneralName = commonFuc().analysis_json('goodsGeneralName', data1) - provName = commonFuc().analysis_json('provName', data1) - pkgDefId = commonFuc().analysis_json('pkgDefId', data1) - # 信息写入文件 - 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, 'message24') - # 我要请领_手工请领_列表查询=========================== - # 添加到请领车============================================= - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_buy_createBuyCar_url") - print('添加到请领车=================', url) +def check_mcms_dept_buy_car(type=1): + hos_goods_id = 'hos_goods_id' if type == 1: - request_body = commonFuc().get_business_data(module, "payload40", hosGoodsId, goodsName, goodsSpec, - mdmGoodsCode, - goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price, - deptId, - areaCode, areaName, targetDeptId, targetDeptName, targetStockId, - targetStockName, purModeText, goodsGeneralName, provName) + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] elif type == 2: - request_body = commonFuc().get_business_data(module, "payload41", hosGoodsId, goodsName, goodsSpec, - mdmGoodsCode, - goodsCode, unit, purMode, goodsMfrsName, unitName, price, deptId, - areaCode, areaName, targetDeptId, targetDeptName, targetStockId, - targetStockName, purModeText, goodsGeneralName, provName) + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] elif type == 3: - request_body = commonFuc().get_business_data(module, "payload42", hosGoodsId, goodsName, goodsSpec, - mdmGoodsCode, - goodsCode, unit, purMode, goodsMfrsName, pkgDefId, unitName, price, - deptId, - areaCode, areaName, targetDeptId, targetDeptName, targetStockId, - targetStockName, purModeText, goodsGeneralName, provName) - request_body = get_process_list(request_body) - print('添加到请领车', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('添加到请领车,result', result) - # 添加到请领车============================================= - - -def BuyCarSubmit(): - 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_buy_queryBuyCarPage_url") - print('请领车查询=================', url) - deptid3 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'] - deptname3 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'] - areaCode = get_stockAreaId_new(deptid3, deptname3, 3) - request_body = commonFuc().get_business_data(module, "payload43", areaCode, get_hosid(), deptid3) - - print('请领车查询', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('请领车查询,result', result) - data = commonFuc().analysis_json('data', result) - list_id = [] - for i in data: - id = commonFuc().analysis_json('id', i) - list_id.append(id) - # 请领车查询=============================================== - # 请领车提交=============================================== - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_buy_validBuyCarSubmit_url") - print('请领车提交=================', url) - - billExpdtDate = timeUtils().get_time_add(30, 2) - print('billExpdtDate', billExpdtDate) - request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0], - list_id[1], list_id[2]) - - 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, - "herpService_buy_createBuyBill_url") - print('创建领车交易=================', url) - - billExpdtDate = timeUtils().get_time_add(30, 2) - request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0], - list_id[1], list_id[2]) - - print('创建领车交易', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('创建领车交易,result', result) - currentTaskList = commonFuc().analysis_json('currentTaskList', commonFuc().analysis_json('data', result)) - - -def edit_goods_target(currentDeptId, targetDeptId): - module = "b2_herp3_bs" - # # 登录获取用户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, "basic_mcmsDeptGoodsInfo_page_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, "payload58_13_1", currentDeptId, get_hosid()) - result = commonFuc().http_post(url, request_body, headers) - print('科室产品列表查询', result) - data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)) - for i in data1: - shelfCode = commonFuc().analysis_json('shelfCode', i) - id1 = commonFuc().analysis_json('id', i) - pkgDefId = commonFuc().analysis_json('pkgDefId', i) - purMode = commonFuc().analysis_json('purMode', i) - tbStatus = commonFuc().analysis_json('tbStatus', i) - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_basic_mcmsDeptGoodsInfo_url") - url = url + id1 - result = commonFuc().http_get(url, headers) - print('获取产品详情信息', result) - data2 = commonFuc().analysis_json('data', result) - packetQty = commonFuc().analysis_json('packetQty', data2) - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "basic_mcmsDeptGoodsInfo_updateById") - if purMode == 60 or purMode == 10: # 低值和试剂 - request_body = commonFuc().get_business_data(module, "payload58_10_1", id1, pkgDefId, targetDeptId, - shelfCode, packetQty, - tbStatus) - elif purMode == 20: # 高值 - request_body = commonFuc().get_business_data(module, "payload58_10_2", id1, targetDeptId, - shelfCode, tbStatus) - print('编辑产品请领渠道request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('编辑产品请领渠道result', result) - - -def pick_execute(): - 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")) - url1 = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_out_buyPage_url") - print('请领出库列表页面=================', url1) - request_body1 = commonFuc().get_business_data(module, "payload46_1", get_branch_id()) - - print('请领出库列表页面', 'request_body', request_body1) - result1 = commonFuc().http_post(url1, request_body1, headers) - print('请领出库列表页面,result1', result1) - data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result1)) - for i in data1: - # 获取id - BH_ID = commonFuc().analysis_json('id', i) - version = commonFuc().analysis_json('version', i) - deptBuyDetailVOList = commonFuc().analysis_json('deptBuyDetailVOList', i) - purMode = commonFuc().analysis_json('purMode', deptBuyDetailVOList) - # 生成拣货单列表查询=============================================== - # 生成拣货单列表锁定=============================================== - - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_out_use_updateLock_url") - print('请领出库列表列表页面锁定=================', url) - # version=int(version)+1 - request_body = commonFuc().get_business_data(module, "payload49_1", BH_ID, version) + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] + branch_id = get_branch_id() + # 获取create_time的值 + create_time = get_create_time( + "select create_time from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s'order by create_time desc LIMIT 1;" % ( + branch_id, hos_goods_id)) + print('create_time', create_time) + id = get_id( + "select id from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, hos_goods_id)) + print('id', id) + create_user = get_id( + "select create_user from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s' order by create_time desc LIMIT 1;;" % ( + branch_id, hos_goods_id)) + print('create_time', create_time, 'id', id) + sql = """select * from mcms_dept_buy_car where branch_id='%s' and hos_goods_id='%s' order by create_time desc LIMIT 1; + """ % (branch_id, hos_goods_id) + # 要验证的sql,取自数据库的表中 + actual_value1 = check_mcms_dept_buy_car_sql(sql) + print(actual_value1) + deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'] + deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'] + areaCode = get_stockAreaId_new_fromDb(deptname2, 2) + areaName = '默认库区' - print('请领出库列表列表页面锁定', 'request_body', request_body) - result = commonFuc().http_post(url, request_body, headers) - print('请领出库列表列表页面锁定,result1', result) - # 生成拣货单列表锁定=============================================== + mdm_goods_code = get_mdm_goods_code1(hos_goods_id) + goodsCode = get_goods_code1(hos_goods_id) + pkgDefId = get_pkg_def_id(hos_goods_id) + pkgDefName = get_pkg_def_Name(hos_goods_id) + last_modified_user = create_user + last_modified = create_time + # print('actual_value1',actual_value1) + actual_value2 = get_process_list2(actual_value1) + # print('actual_value2') + # print( actual_value2) + # prov_hos_goods_id = '8d6273b7bca84dd8aace12b9422d7fd6' + expected_value2 = 'expected_value2' + if type == 1: + expected_value2 = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_dept_buy_car', id, get_hosid(), branch_id, + deptid2, + deptname2, areaCode, areaName, hos_goods_id, mdm_goods_code, + goodsCode, pkgDefId, pkgDefName + , create_user, create_time, last_modified, last_modified_user) + elif type == 2: + expected_value2 = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_dept_buy_car2', id, get_hosid(), + branch_id, + deptid2, + deptname2, areaCode, areaName, hos_goods_id, mdm_goods_code, + goodsCode, + create_user, create_time, last_modified, last_modified_user) + else: + expected_value2 = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'check_mcms_dept_buy_car3', id, get_hosid(), branch_id, + deptid2, + deptname2, areaCode, areaName, hos_goods_id, mdm_goods_code, + goodsCode, pkgDefId, pkgDefName + , create_user, create_time, last_modified, last_modified_user) + # print('expected_value2', expected_value2) + # expected_value2=get_process_list2(expected_value2) + actual_value2 = actual_value2.replace(" ", "") + expected_value2 = expected_value2.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') - # 拣货============================== - if purMode == 10: - udi_code = get_udi2(1) # 获取条码 低值1 高值2 试剂3 - elif purMode == 20: - udi_code = get_udi2(2) # 获取条码 低值1 高值2 试剂3 - elif purMode == 60: - udi_code = get_udi2(3) # 获取条码 低值1 高值2 试剂3 - else: - udi_code = 'udi_code' - print('udi_code', udi_code) - if purMode == 10: - targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 1) # 低值 - elif purMode == 20: - targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 2) # 高值 - elif purMode == 60: - targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 3) # 试剂 - else: - targetAreaCode = 'targetAreaCode' - sourceId = 'sourceId' - # 提交领用出库单 - url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, - "herpService_stock_out_use_submit_url") - print('提交拣货执行单=================', url) - if purMode == 10: - request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode, sourceId) - elif purMode == 20: - request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode, sourceId) - elif purMode == 60: - 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) +try: + 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_b6流程十三请领业务流_三级库向二级库.air') + using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air') + from a_b6流程十三请领业务流_三级库向二级库 import add_dept2 -try: + from a_b6流程十三请领业务流_三级库向二级库 import add_new_deptinfo, edit_goods_target, second_dept_Request + from a_b6流程十三请领业务流_三级库向二级库 import BuyCarSubmit, pick_execute # 设置部门用户 set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'], FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3) @@ -345,10 +132,13 @@ try: updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 # # # 低值 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() # 请领车提交 for i in range(6): # 三个单据共审批6次 approval_center() diff --git a/air_case/public1/public1/public1.py b/air_case/public1/public1/public1.py index 8b6599b52803dda6a8e382e0226faa84783b5387..24a80846d55d0ba4652bdc55721b669b9db749d6 100644 --- a/air_case/public1/public1/public1.py +++ b/air_case/public1/public1/public1.py @@ -1890,6 +1890,7 @@ def get_stockAreaId_new_fromDb(deptName, type=1): # 中心库房名称 branch_name = FileUtils().r_info(module, '院区新增')["branch_name"] stockId = get_stockId_fromdb(branch_name + '中心库房') + deptName = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] # 二级库房名称 elif type == 2: stockId = get_stockId_fromdb(deptName + '库房') @@ -1901,6 +1902,7 @@ def get_stockAreaId_new_fromDb(deptName, type=1): # 获取库房id==========结束============ # ====获取库区id===== 开始========== + sql="select shelf_code from mcms_stock_shelf where stock_Id='%s'and address='%s';"%(stockId,deptName) print(sql) shelfCode=get_id(sql) diff --git a/common/db/sql/sql_tools.py b/common/db/sql/sql_tools.py index 70b7637d656ab6b55e676011c9d35a8ed7557dc1..59f4a4be6e7e8419818412fd12db509171402c3b 100644 --- a/common/db/sql/sql_tools.py +++ b/common/db/sql/sql_tools.py @@ -411,6 +411,26 @@ def get_distrOrderNo(branch_id,bill_mode): "select order_no from hdi_distr a where id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( get_distrBillId(branch_id,bill_mode), bill_mode)) return distr_order_no +def get_checkBillId(branch_id,bill_mode): + checkBillId=get_id( + "select id from mcms_check where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id,bill_mode)) + return checkBillId +def get_checkOrderNo(branch_id,bill_mode): + checkOrderNo=get_id( + "select order_no from mcms_check a where id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + get_checkBillId(branch_id,bill_mode), bill_mode)) + return checkOrderNo +def get_psiInBillId(branch_id,bill_mode): + psiInBillId=get_id( + "select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_YS' order by create_time desc LIMIT 1;" % ( + branch_id,bill_mode)) + return psiInBillId +def get_psiInOrderNo(branch_id,bill_mode): + psiInOrderNo=get_id( + "select order_no from mcms_psi a where id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + get_psiInBillId(branch_id,bill_mode), bill_mode)) + return psiInOrderNo def check_in_check_mcms_purchase(sql): db, cursor = get_sql_conn() cursor.execute(sql) diff --git a/data/b5_spd3_core_business_flow/message15 b/data/b5_spd3_core_business_flow/message15 index eb6244511b4a7c6238eb55c5d54d32d6d9cc83ce..a66644296ab4378f994e633d84bfee1c611826c2 100644 --- a/data/b5_spd3_core_business_flow/message15 +++ b/data/b5_spd3_core_business_flow/message15 @@ -1,3 +1,3 @@ 验收单号: - CHECK_NO1: CHECKh03472024072600068 - CHECK_NO2: CHECKh03472024072600068 + CHECK_NO1: CHECKh03472024072900002 + CHECK_NO2: CHECKh03472024072900002 diff --git a/data/b6_spd3_core_business_flow_database_check/data b/data/b6_spd3_core_business_flow_database_check/data index f2fda81ce834677d7ea06fa0caf011c578deb5db..2e5ae84ac2dd4e1711366614a404d9a358fe70cb 100644 --- a/data/b6_spd3_core_business_flow_database_check/data +++ b/data/b6_spd3_core_business_flow_database_check/data @@ -104,7 +104,7 @@ "mcms_psi_dept_in_2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "107", "stock_kind": "RK_SL", "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","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%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": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "107", "stock_kind": "RK_SL", "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","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%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_in1": '{"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": '{"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": '{"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}' @@ -114,6 +114,12 @@ "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}' + +#中心库入库单子表 +"mcms_psi_batch_in1": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"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-A-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}' +"mcms_psi_batch_in2": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"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-A-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}' +"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-A-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}' @@ -122,4 +128,14 @@ #直送二级库入库单 "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}' \ No newline at end of file +"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_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}' +"mcms_psi_dept_batch_in5": '{"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": null, "version": 0}' +"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":"%s","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}' \ No newline at end of file