From 47a97abcdc8b2302a16e74521c167960c5313b74 Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Fri, 13 Sep 2024 14:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=85=AB=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...56\345\272\223\351\252\214\350\257\201.py" | 533 +++++++++++++++++- common/db/sql/sql_tools.py | 32 ++ data/b5_spd3_core_business_flow/message21 | 27 +- .../data | 12 + 4 files changed, 575 insertions(+), 29 deletions(-) diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" "b/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 034b81c9..a6f84c75 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" +++ "b/air_case/b6_spd3_core_business_flow_database_check/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b1\346\265\201\347\250\213\345\205\253_\351\253\230\345\200\274\350\267\237\345\217\260\344\270\232\345\212\241\346\265\201\347\250\213_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -406,8 +406,8 @@ def check_hdi_distr(type=25): create_user = distrUser create_user_name = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"] create_time = get_create_time( - "select create_time from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( - branch_id, type)) + "select create_time from spd_hdiorder_test2.hdi_distr where id = '%s' " % ( + distr_main_key)) last_modified_user = distrUser # 验证子表数据 @@ -425,7 +425,7 @@ def check_hdi_distr(type=25): branch_id, FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']))) rec_org_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] last_modified = get_create_time( - "select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + "select last_modified from spd_hdiorder_test2.hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( branch_id, type)) operationApplyOrderNo = get_id( "select order_no from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) @@ -559,18 +559,18 @@ def check_hdi_distr_in(type=25): def check_hdi_distr_detail(distr_main_key, type): from common.db.sql.sql_tools_out import check_mcms_pur_plan_sql, get_id branch_id = get_branch_id() - sql = "select * from hdi_distr_detail where pid = '%s';" % distr_main_key + sql = "select * from spd_hdiorder_test2.hdi_distr_detail where pid = '%s';" % distr_main_key # 获取实际值 actual = check_mcms_pur_plan_sql(sql) print('actual', actual) # 获取子表主键 distr_detail_main_key = get_id( - "select id from hdi_distr_detail where pid = '%s';" % ( + "select id from spd_hdiorder_test2.hdi_distr_detail where pid = '%s';" % ( distr_main_key)) source_id = get_id( - "select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( + "select id from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % ( branch_id)) - source_detail_id = get_id("select id from mcms_operation_notice_list order by create_time desc LIMIT 1;") + source_detail_id = get_id("select id from spd3_herp_test2.mcms_operation_notice_list order by create_time desc LIMIT 1;") pur_detail_id = source_detail_id hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] mdm_goods_code = get_mdm_goods_code1(hos_goods_id) @@ -579,10 +579,10 @@ def check_hdi_distr_detail(distr_main_key, type): goods_gg = get_goods_gg(hos_goods_id) mfrs_id = get_goods_mfrs_id(hos_goods_id) expdt_date = get_expdt_date( - "select expdt_date from hdi_distr_detail where pid = '%s';" % ( + "select expdt_date from spd_hdiorder_test2.hdi_distr_detail where pid = '%s';" % ( distr_main_key)) product_date = get_expdt_date( - "select product_date from hdi_distr_detail where pid = '%s';" % ( + "select product_date from spd_hdiorder_test2.hdi_distr_detail where pid = '%s';" % ( distr_main_key)) pkg_def_id = process_tuple( get_id("select pkg_def_id from spd3_herp_test2.mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) @@ -607,10 +607,10 @@ def check_hdi_distr_detail(distr_main_key, type): erpCode = mdm_goods_code # 11661563 create_user = get_login_user_uxid2() create_time = get_create_time( - "select create_time from hdi_distr_detail where id = '%s';" % ( + "select create_time from spd_hdiorder_test2.hdi_distr_detail where id = '%s';" % ( distr_detail_main_key)) last_modified = get_create_time( - "select last_modified from hdi_distr_detail where id = '%s';" % ( + "select last_modified from spd_hdiorder_test2.hdi_distr_detail where id = '%s';" % ( distr_detail_main_key)) last_modified_user = create_user operationNoticeBillId = source_id @@ -1566,6 +1566,504 @@ def check_mcms_psi_dept_batch_in(DR_ID, type, order_no, source_id1): print('error') commonFuc().check_text_exist_result_text('error', 'succees') +def check_mcms_psi_dept_out(type=25): + 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='CK_TK' order by CREATE_TIME desc LIMIT 1;" % ( + 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='CK_TK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode)) + # 获取source_id + # sql = "select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_XH' order by CREATE_TIME desc LIMIT 1;" % ( + # branch_id, bill_mode) + source_id = get_PICK_id_KS_TK(branch_id,bill_mode) + source_no = get_id("select order_no from mcms_psi_dept 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='CK_TK' order by CREATE_TIME desc LIMIT 1;" % ( + # branch_id, bill_mode) + order_no = None + target_corp_id = get_hosid() + target_branch_id = get_branch_id() + target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + target_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房') + target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 1) + 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, 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 == 25: + 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';" % 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';" % 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) + + + # 子表检查 + check_mcms_psi_dept_batch_out(id, type, hos_goods_id) + operationApplyOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationNoticeOrderNo = get_id( + "select order_no from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + operationApplyBillId = get_id( + "select id from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;" % branch_id) + psiOutBillId=get_id("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)) + psiOutOrderNo=get_id("select order_no 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)) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_out_0913', id, order_no, target_corp_id, target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id, source_no, source_repl_id, + source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + accounter, account_date, operationApplyOrderNo, operationNoticeBillId, distrBillId, + operationNoticeOrderNo, distrOrderNo, operationApplyBillId, checkBillId, checkOrderNo, + psiInBillId, psiInOrderNo, psiOutBillId, psiOutOrderNo, 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_out(DR_ID, type, hos_goods_id): + 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_KS_TK(branch_id,type) + pick_detail_id = source_detail_id + # if type == 16: + # hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + # elif type == 25: + # 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 + + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_0913', batch_main_key, pid, order_no, + source_detail_id + , pick_detail_id, hos_goods_id, mdm_goods_code, goods_code, + source_batch_id, + target_batch_id, barcode_id, shelf_code, create_user, create_time, + last_modified,last_modified_user + + ) + + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + +def check_mcms_psi_dept_XH_CK(type1=25,type2=25): + branch_id = get_branch_id() + sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_XH' 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_XH' 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_KS_XH(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')['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, type1) + pickOrderNo = get_PICK_order_no_KS_XH(branch_id, type1) + buyOrderNo = get_buyOrderNo(branch_id, type1) + pickBillId = get_PICK_id_KS_XH(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)) + + # 子表检查 + check_mcms_psi_dept_batch_xhck(DR_ID,type1,order_no) + his_charge_no=get_id(" select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;"%(branch_id,DR_ID)) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_out_xhck_0913', 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,his_charge_no,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') + #消耗反入库============================================================ + + branch_id = get_branch_id() + + sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_XH' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type2) + + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + DR_ID1 = get_id( + " select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_XH' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, type2)) + + sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID1 + order_no1 = 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 = "-" + 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, 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 + psiDeptInBillId=DR_ID1 + psiDeptInOrderNo=order_no1 + 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_ID1) + last_modified = get_create_time("select last_modified from mcms_psi_dept where id='%s';" % DR_ID1) + last_modified_user = create_user + accounter = create_user + source_no=None + last_auditor=create_user + last_audit_time= get_create_time("select last_audit_time from mcms_psi_dept where id='%s';" % DR_ID1) + account_date = process_tuple(get_create_time("select account_date from mcms_psi_dept where id='%s';" % DR_ID1)) + #子表检查 + check_mcms_psi_dept_batch_xhrk(DR_ID1, source_id, type2, order_no1) + source_id = "-" + source_area_code = None + his_charge_no = get_id( + "select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, DR_ID1)) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_out_xhrk_0913', DR_ID1, order_no1, 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, + his_charge_no, accounter, account_date, + create_user, create_time, last_modified, last_modified_user + + ) + + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') +def check_mcms_psi_dept_batch_xhck(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_KS_XH(branch_id,type) + pick_detail_id=source_detail_id + + if type == 16 or type==10: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 25: + 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=get_id("select target_batch_id from mcms_psi_dept_batch where pid='%s';" % DR_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 + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_xhck_0913', batch_main_key, pid, order_no,source_detail_id + ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + last_modified_user + + ) + + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') +def check_mcms_psi_dept_batch_xhrk(DR_ID,source_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_id("select id from mcms_psi_dept where stock_kind='CK_XH' and target_branch_id='%s' order by CREATE_TIME desc LIMIT 1;"%(branch_id)) + source_detail_id=source_detail_id+"0001" + pick_detail_id=None + + if type==10: + hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] + elif type == 25: + 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=get_id("select target_batch_id from mcms_psi_dept_batch where pid='%s';" % DR_ID) + if check_batch_id(source_batch_id)==True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + barcode_id=get_id("select barcode_id from mcms_psi_dept_batch where pid='%s';" % DR_ID) + if check_barcode_id(barcode_id)==True: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + commonFuc().check_text_exist_result_text('error', 'succees') + dept_name=FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + shelf_code= get_stockAreaId_new_fromDb(dept_name, 2) + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from mcms_psi_dept_batch where pid='%s';" % DR_ID) + last_modified = get_create_time("select last_modified from mcms_psi_dept_batch where pid='%s';" % DR_ID) + last_modified_user = None + mdm_goods_code=get_mdm_goods_code1(hos_goods_id) + # if type == 16 or type==10: + # expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + # 'mcms_psi_dept_batch_xhrk1', batch_main_key, pid, order_no,source_detail_id + # ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + # target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + # last_modified_user + # + # ) + # elif type == 67: + # mdm_goods_code=None + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_psi_dept_batch_xhrk_0913', batch_main_key, pid, order_no,source_detail_id + ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id, + target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified, + last_modified_user + + ) + + + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + print(compare_text_index(actual_value2, expected_value2)) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') pro_path = commonFuc().get_pro_path2() print('pro_path', pro_path) sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air') @@ -1601,15 +2099,18 @@ try: # check_mcms_check(2)#高值跟台验收检查验收表数据 # #这里验收后会自动生成出入库单,批次信息,需要同步验证入库单和批次信息 # check_mcms_psi(2) # 调用函数检查中心库入库单和出库单数据库写值 - #检查批次信息 + # # 检查批次信息 # check_mcms_hos_batch(2) # updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 # second_dept_in_warehouse() # 二级科室入库 # time.sleep(6) - # 检查二级库入库单 - check_mcms_psi_dept_in() - updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 - out_return_gt() # 跟台退货出库_中心库处理 + # check_mcms_psi_dept_in() # 检查二级库入库单数据库表数据 + # updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库 + # out_return_gt() # 跟台退货出库_中心库处理 + # time.sleep(6) + # #这里的业务会产生二级库消耗出库和消耗退货入库单据,和二级库出库数据 + # check_mcms_psi_dept_XH_CK() + check_mcms_psi_dept_out()# 检查二级库退库出库单数据库表数据 commonFuc().check_text_exist_result_text('succees', 'succees') except Exception as e: # 打印错误信息 diff --git a/common/db/sql/sql_tools.py b/common/db/sql/sql_tools.py index 762210a6..0e1433d3 100644 --- a/common/db/sql/sql_tools.py +++ b/common/db/sql/sql_tools.py @@ -438,6 +438,31 @@ def get_PICK_id(branch_id, bill_mode): print(sql) return process_tuple(get_dept_buy_id(sql)) +def get_PICK_id_KS_XH(branch_id, bill_mode): + sql = "select id from mcms_pick where branch_id='%s' and bill_mode='%s' and pick_type='KS_XH' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode) + print(sql) + return process_tuple(get_dept_buy_id(sql)) + +def get_pick_detail_id_KS_XH(branch_id, bill_mode): + main_id = get_PICK_id_KS_XH(branch_id, bill_mode) + sql = "select id from mcms_pick_detail where pid='%s';" % ( + main_id) + print(sql) + return process_tuple(get_dept_buy_id(sql)) + +def get_PICK_id_KS_TK(branch_id, bill_mode): + sql = "select id from mcms_pick where branch_id='%s' and bill_mode='%s' and pick_type='KS_TK' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id, bill_mode) + print(sql) + return process_tuple(get_dept_buy_id(sql)) + +def get_pick_detail_id_KS_TK(branch_id, bill_mode): + main_id = get_PICK_id_KS_TK(branch_id, bill_mode) + sql = "select id from mcms_pick_detail where pid='%s';" % ( + main_id) + print(sql) + return process_tuple(get_dept_buy_id(sql)) def get_pick_detail_id(branch_id, bill_mode): main_id = get_PICK_id(branch_id, bill_mode) @@ -455,6 +480,13 @@ def get_PICK_order_no(branch_id, bill_mode): return process_tuple(get_dept_buy_id(sql)) +def get_PICK_order_no_KS_XH(branch_id, bill_mode): + PICK_id = get_PICK_id_KS_XH(branch_id, bill_mode) + sql = "select order_no from mcms_pick where id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + PICK_id) + print(sql) + return process_tuple(get_dept_buy_id(sql)) + def get_buyBillId(branch_id, bill_mode): sql = "select id from spd3_herp_test2.mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( branch_id, bill_mode) diff --git a/data/b5_spd3_core_business_flow/message21 b/data/b5_spd3_core_business_flow/message21 index d11dc81b..fe5f54a3 100644 --- a/data/b5_spd3_core_business_flow/message21 +++ b/data/b5_spd3_core_business_flow/message21 @@ -1,14 +1,14 @@ 二级库请领产品信息: list_a: - &id001 - - hosGoodsId: h034700004907 + - hosGoodsId: h034700005070 purMode: 60 grantRule: id: - goodsName: 新型冠状病毒检测试剂C7HGi + goodsName: 新型冠状病毒检测试剂jGRMV goodsSpec: G-31891 - mdmGoodsCode: '11661921' - goodsCode: '00004907' + mdmGoodsCode: '11662098' + goodsCode: '00005070' unit: 支 goodsMfrsName: 德国歌德公司 Geuder AG miDjmc: '' @@ -16,34 +16,35 @@ pkgDefName: '100' pkgDefQty: 100.0 pkgQty: - qty: 1400.0 + qty: 1000.0 goodsImg: [] - pkgDefId: 7b0c0e35ef8943abbc87ebd8540e3150 + pkgDefId: ae9b52ae8e5b4f5aa501f8ea717180bb buyPkgQty: unitName: 100支/100 price: 99.9999 hosId: branchId: - deptId: 9e693185220a45c5a9fb8328f4d45b5d + deptId: 327ed981d695457880bc5622fa90d641 deptName: areaCode: areaName: - targetDeptId: 0a49aab6160b4c8d98db8773eb69de05 + targetDeptId: 2c2069ed30084987b25592be25b1c1fa targetDeptName: 设备科001 - targetStockId: 4188c1ded3aa4c838904ee1cc6013645 - targetStockName: 东土城路院区Hyl74中心库房 + targetStockId: 24d5ec62951d4fe7a18bcf3c05c4af93 + targetStockName: 东土城路院区E3YVe中心库房 purchaseFlag: 1 tempFlag: 0 grantWay: 1 deptGoodsStatus: codingType: 0 + chargeFlag: 1 purModeText: 检验试剂 goodsGeneralName: 检测试剂 goodsRegCert: '' applicationScope: - provName: 国药集团公司lSTdZ - noRecPkgQty: 9.0 - noRecQty: 900.0 + provName: 国药集团公司Dk&FX + noRecPkgQty: 2.0 + noRecQty: 200.0 autoUnpack: 0 consumeQty: consumePkgQty: diff --git a/data/b6_spd3_core_business_flow_database_check/data b/data/b6_spd3_core_business_flow_database_check/data index 2a5497a4..b9195d73 100644 --- a/data/b6_spd3_core_business_flow_database_check/data +++ b/data/b6_spd3_core_business_flow_database_check/data @@ -332,3 +332,15 @@ "check_mcms_hos_batch_0912": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 20, "batch_price": Decimal("99.999900"), "src_batch_id": %s, "src_batch_price": Decimal("99.999900"), "settlement": 3, "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": 30, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "2222", "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": null, "in_time": %s, "ext_info": "{"ygptCode":"","transCond":"","storageCond":"","erpCode":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}' #高值跟台二级库入库单主表 "mcms_psi_dept_in_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": null, "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": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%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_xhck_0913": '{"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": 1, "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": 1}' +#跟台消耗出库主表 +"mcms_psi_dept_out_xhck_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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":"无","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_batch_xhrk_0913": '{"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": 1, "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_xhrk_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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_0913": '{"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_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","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":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"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":2,"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}' -- GitLab