diff --git "a/air_case/b5_spd3_core_business_flow/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.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.py" "b/air_case/b5_spd3_core_business_flow/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.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.py" index 8b91e3dbb14d95ee5c6362115a85ea834c2119bf..80bbdf45ddb5fd4d1389f7180a76cc5913838d54 100644 --- "a/air_case/b5_spd3_core_business_flow/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.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.py" +++ "b/air_case/b5_spd3_core_business_flow/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.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.py" @@ -870,4 +870,4 @@ def main(): print('==========================流程十一结束==============================') except: commonFuc().check_text_exist_result_text('error', '1') -main() \ No newline at end of file +# main() \ No newline at end of file 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 cbe75e153a87c7b631c796b2fe95419b20539702..e1f59ee707ef4db142dee5b3f9e5a629bbe4e59e 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" @@ -5,7 +5,8 @@ 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 get_create_time, check_mcms_dept_buy_car_sql +from common.db.sql.sql_tools import get_create_time, check_mcms_dept_buy_car_sql, get_dept_buy_id, \ + check_mcms_dept_buy_sql, get_mdm_goods_code, get_expdt_date, check_mcms_pur_plan_sql from common.fileUtls import FileUtils from common.run_cmd_script import execute_command @@ -36,7 +37,8 @@ def check_mcms_dept_buy_car(type=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)) + "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;;" % ( @@ -48,7 +50,7 @@ def check_mcms_dept_buy_car(type=1): print(actual_value1) deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] - areaCode = get_stockAreaId_new(deptid2, deptname2, 2) + areaCode = get_stockAreaId_new_fromDb(deptid2, deptname2, 2) areaName = '默认库区' # 读取文件中的信息 info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') @@ -100,6 +102,570 @@ def check_mcms_dept_buy_car(type=1): commonFuc().check_text_exist_result_text('error', 'succees') +def mcms_dept_buy_detail(type=16): + branch_id = get_branch_id() + # 获取主表主键 + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + id1 = process_tuple(get_dept_buy_id(sql)) + # 获取order_no + sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + order_no1 = get_dept_buy_id(sql1) + order_no1 = process_tuple(order_no1) + # 子表sql + sql1 = "select * from mcms_dept_buy_detail where pid='%s';" % id1 + # 从数据库中获取实际值 + actual = check_mcms_dept_buy_sql(sql1) + print('actual', actual) + 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"] + + # print(hos_goods_id,process_tuple(hos_goods_id)) + + # 获取子表id + detail_id = get_id("select id from mcms_dept_buy_detail where pid='%s';" % id1) + print('detail_id', detail_id) + info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') + list_a = info['list_a'] + mdm_goods_code = process_tuple( + get_mdm_goods_code("select mdm_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)) + goods_code = process_tuple( + get_mdm_goods_code("select hos_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)) + pkg_def_id = process_tuple( + get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + if pkg_def_id == 'None': + print(pkg_def_id) + pkg_def_id = pkg_def_id.replace("'", "") + print(pkg_def_id) + pkg_def_name = process_tuple( + get_id("select pkg_def_name from mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + create_user = get_login_user_uxid() + create_time = get_create_time("select create_time from mcms_dept_buy_detail where pid='%s';" % id1) + last_modified = create_time + last_modified_user = create_user + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail', detail_id, id1, order_no1, hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail1', detail_id, id1, order_no1, hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail2', detail_id, id1, order_no1, hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_dept_buy(type=16): + branch_id = get_branch_id() + sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1; + """ % (branch_id, type) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + # 获取主键id + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + id1 = get_dept_buy_id(sql) + # 获取order_no + sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + order_no1 = get_dept_buy_id(sql1) + print(process_tuple(id1), process_tuple(order_no1)) + id1 = process_tuple(id1) + order_no1 = process_tuple(order_no1) + deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_name = get_branch_name() + "中心库房" + # target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + + # area_code = get_stockAreaId_new(deptid2, deptname2, 2) + info = FileUtils().r_info8("b5_spd3_core_business_flow", "库区信息", 'message22') + list_a = info['list_a'] + area_code = commonFuc().analysis_json('shelfCode', list_a) + area_name = '默认库区' + # 读取文件中的信息 + info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') + list_a = info['list_a'] + target_dept_id = commonFuc().analysis_json('targetDeptId', list_a) + target_dept_name = commonFuc().analysis_json('targetDeptName', list_a) + pur_mode = commonFuc().analysis_json('purMode', list_a) + goodsCode = commonFuc().analysis_json('goodsCode', list_a) + pkgDefId = commonFuc().analysis_json('pkgDefId', list_a) + pkgDefName = commonFuc().analysis_json('pkgDefName', list_a) + + bill_expdt_date = get_expdt_date( + "select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + rec_user = get_login_user_uxid() + # rec_addr='二级检验科002' + create_user = rec_user + create_time = get_create_time( + "select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified = get_create_time( + "select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified_user = rec_user + last_auditor = rec_user + last_audit_time = get_create_time( + "select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + rec_addr = deptname2 + dept_id1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + stock_name = get_branch_name() + "中心库房" + target_stock_id = get_stockId_fromdb(stock_name, 1) + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_direct_sending', id1, order_no1, get_hosid(), branch_id, + deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, create_user, create_time, + last_modified, last_modified_user) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_direct_sending2', id1, order_no1, get_hosid(), + branch_id, deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, create_user, create_time, + last_modified, last_modified_user) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_direct_sending3', id1, order_no1, get_hosid(), + branch_id, deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, 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_dept_buy_approval_after(type=16): + branch_id = get_branch_id() + sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1; + """ % (branch_id, type) + actual = check_mcms_dept_buy_sql(sql) + print(actual) + # 获取主键id + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + id1 = get_dept_buy_id(sql) + # 获取order_no + sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + order_no1 = get_dept_buy_id(sql1) + print(process_tuple(id1), process_tuple(order_no1)) + id1 = process_tuple(id1) + order_no1 = process_tuple(order_no1) + deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + # target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + + # area_code = get_stockAreaId_new(deptid2, deptname2, 2) + info = FileUtils().r_info8("b5_spd3_core_business_flow", "库区信息", 'message22') + list_a = info['list_a'] + area_code = commonFuc().analysis_json('shelfCode', list_a) + area_name = '默认库区' + # 读取文件中的信息 + info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') + list_a = info['list_a'] + target_dept_id = commonFuc().analysis_json('targetDeptId', list_a) + target_dept_name = commonFuc().analysis_json('targetDeptName', list_a) + pur_mode = commonFuc().analysis_json('purMode', list_a) + goodsCode = commonFuc().analysis_json('goodsCode', list_a) + pkgDefId = commonFuc().analysis_json('pkgDefId', list_a) + pkgDefName = commonFuc().analysis_json('pkgDefName', list_a) + # # 获取边仓id + # target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id) + stock_name = get_branch_name() + "中心库房" + target_stock_id = get_stockId_fromdb(stock_name, 1) + bill_expdt_date = get_expdt_date( + "select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + rec_user = get_login_user_uxid() + # rec_addr='二级检验科002' + create_user = rec_user + create_time = get_create_time( + "select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified = get_create_time( + "select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + last_modified_user = rec_user + last_auditor = rec_user + last_audit_time = get_create_time( + "select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type)) + target_stock_name = get_branch_name() + "中心库房" + # import pdb + # pdb.set_trace() + rec_addr = deptname2 + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_approval_after4', id1, order_no1, get_hosid(), + branch_id, + deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, create_user, create_time, + last_modified, last_modified_user, last_auditor, last_audit_time) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_approval_after5', id1, order_no1, get_hosid(), + branch_id, deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, create_user, create_time, + last_modified, last_modified_user, last_auditor, last_audit_time) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_approval_after6', id1, order_no1, get_hosid(), + branch_id, deptid2, + deptname2, area_code, area_name, target_dept_id, target_dept_name, + target_stock_id, target_stock_name, bill_expdt_date, rec_user, + rec_addr, create_user, create_time, + last_modified, last_modified_user, last_auditor, last_audit_time) + + 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 mcms_dept_buy_detail_approval_after(type=16): + branch_id = get_branch_id() + # 获取主表主键 + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + id1 = process_tuple(get_dept_buy_id(sql)) + # 获取order_no + sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + order_no1 = get_dept_buy_id(sql1) + order_no1 = process_tuple(order_no1) + # 子表sql + sql1 = "select * from mcms_dept_buy_detail where pid='%s';" % id1 + # 从数据库中获取实际值 + actual = check_mcms_dept_buy_sql(sql1) + print('actual', actual) + 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"] + + # print(hos_goods_id,process_tuple(hos_goods_id)) + + # 获取子表id + detail_id = get_id("select id from mcms_dept_buy_detail where pid='%s';" % id1) + print('detail_id', detail_id) + info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') + list_a = info['list_a'] + mdm_goods_code = process_tuple( + get_mdm_goods_code("select mdm_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)) + goods_code = process_tuple( + get_mdm_goods_code("select hos_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)) + pkg_def_id = process_tuple( + get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + if pkg_def_id == 'None': + print(pkg_def_id) + pkg_def_id = pkg_def_id.replace("'", "") + print(pkg_def_id) + pkg_def_name = process_tuple( + get_id("select pkg_def_name from mcms_pkg where hos_goods_id='%s' LIMIT 1;" % hos_goods_id)) + create_user = get_login_user_uxid() + create_time = get_create_time("select create_time from mcms_dept_buy_detail where pid='%s';" % id1) + last_modified = get_create_time("select last_modified from mcms_dept_buy_detail where pid='%s';" % id1) + last_modified_user = create_user + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail_approval_after', detail_id, id1, order_no1, + hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail_approval_after1', detail_id, id1, order_no1, + hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + else: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_dept_buy_detail_approval_after2', detail_id, id1, order_no1, + hos_goods_id, + mdm_goods_code, goods_code, pkg_def_id, pkg_def_name, create_user, + create_time, last_modified, last_modified_user) + + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_mcms_pur_plan(type=16): + branch_id = get_branch_id() + # 获取请领单主键id + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + print(sql) + id1 = process_tuple(get_dept_buy_id(sql)) + sql = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + print(sql) + buyOrderNo1 = process_tuple(get_dept_buy_id(sql)) + # 根据请领单的id获取采购计划单主表主键 + sql = "select id from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + id2 = process_tuple(get_dept_buy_id(sql)) # 采购计划主表主键 + sql = "select order_no from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + PLAN_order_no = process_tuple(get_dept_buy_id(sql)) # 采购计划主表order_no + # 要验证的数据sql + sql1 = "select * from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql1) + print('actual', actual) + hos_id = get_hosid() + dept_id1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + dept_name1 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + dept_name2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + rec_org_id = process_tuple( + get_id("select id from sys_org where branch_id='%s' and ename='%s';" % (branch_id, dept_name2))) + rec_org_name = dept_name2 + info = FileUtils().r_info8("b5_spd3_core_business_flow", "库区信息", 'message22') + list_a = info['list_a'] + area_code = commonFuc().analysis_json('shelfCode', list_a) + area_name = '默认库区' + source_id = id1 + rec_user = get_login_user_uxid() + rec_addr = '自动化测试' + sql = "select bill_expdt_date from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + print(sql) + bill_expdt_date = get_expdt_date(sql) + buyBillId = id1 + planBillId = id2 + buyOrderNo = buyOrderNo1 + create_user = rec_user + create_time = get_create_time( + "select create_time from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1)) + last_modified = create_time + last_modified_user = create_user + planOrderNo=PLAN_order_no + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan', id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo,buyOrderNo, + create_user,create_time, last_modified, last_modified_user) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan2', id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, + create_user, create_time, last_modified, last_modified_user) + elif type == 66: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan3', id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo,buyOrderNo, + create_user,create_time, last_modified, last_modified_user) + else: + expected=None + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') + + +def check_mcms_mcms_pur_plan_detail(type=16): + branch_id = get_branch_id() + # 获取请领单主键id + sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + print(sql,'type',type) + id1 = process_tuple(get_dept_buy_id(sql)) + sql = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % ( + branch_id, type) + print(sql) + buyOrderNo1 = process_tuple(get_dept_buy_id(sql)) + # 根据请领单的id获取采购计划单主表主键 + sql = "select id from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + id2 = process_tuple(get_dept_buy_id(sql)) # 采购计划主表主键 + sql = "select order_no from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + PLAN_order_no = process_tuple(get_dept_buy_id(sql)) # 采购计划主表order_no + # 要验证的数据sql + sql1 = "select * from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + # 获取实际值 + actual = check_mcms_pur_plan_sql(sql1) + print('actual', actual) + hos_id = get_hosid() + dept_id1 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] + dept_name1 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1'] + dept_name2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + rec_org_id = process_tuple( + get_id("select id from sys_org where branch_id='%s' and ename='%s';" % (branch_id, dept_name2))) + rec_org_name = dept_name2 + info = FileUtils().r_info8("b5_spd3_core_business_flow", "库区信息", 'message22') + list_a = info['list_a'] + area_code = commonFuc().analysis_json('shelfCode', list_a) + area_name = '默认库区' + source_id = id1 + rec_user = get_login_user_uxid() + rec_addr = '自动化测试' + sql = "select bill_expdt_date from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1) + print(sql) + bill_expdt_date = get_expdt_date(sql) + buyBillId = id1 + planBillId = id2 + buyOrderNo = buyOrderNo1 + create_user = rec_user + create_time = get_create_time( + "select create_time from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, id1)) + last_modified = create_time + last_modified_user = create_user + planOrderNo=PLAN_order_no + if type == 16: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan', id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo,buyOrderNo, + create_user,create_time, last_modified, last_modified_user) + elif type == 20: + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan', id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, + create_user, create_time, last_modified, last_modified_user) + else: + import pdb + pdb.set_trace() + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'mcms_pur_plan',id2, PLAN_order_no, hos_id, + get_branch_id(), dept_id1, dept_name1, rec_org_id, rec_org_name, + area_code, area_name, source_id, rec_user, + rec_addr, bill_expdt_date, buyBillId, planBillId, planOrderNo, + buyOrderNo, + 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: # add_dept2() # 新增一个二级科室 # add_new_deptinfo() # 写入科室信息到文件中 @@ -114,38 +680,46 @@ try: sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air') using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air') - updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 - print('设置登录账号默认权限是二级库') + # updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 from a_b4流程十一请领业务流_二级库向直送 import goods_move2 - print('goods_move2') - goods_move2() # 设置产品出库渠道为直送 + from a_b4流程十一请领业务流_二级库向直送 import second_dept_Request from a_b4流程十一请领业务流_二级库向直送 import BuyCarSubmit from a_b4流程十一请领业务流_二级库向直送 import purchase_module_process from a_b4流程十一请领业务流_二级库向直送 import order_dp from a_b4流程十一请领业务流_二级库向直送 import check_accept_order - sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air') - using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air') - from a_b3流程十请领业务流_二级库向边仓_数据库验证 import check_mcms_dept_buy,mcms_dept_buy_detail for i in range(1): - # # 低值 - 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() # 请领车提交 + # 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)) + # 上面暂时注释========================================= + # 检查自动生成的采购计划数据 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() + check_mcms_mcms_pur_plan(int(i)) + # check_mcms_mcms_pur_plan_detail(int(i)) + # 采购模块处理 purchase_module_process() for i in range(3): # 三个单据共审批3次 @@ -160,5 +734,7 @@ try: second_dept_one_key_in() second_dept_one_key_in() commonFuc().check_text_exist_result_text('succees', 'succees') -except: - commonFuc().check_text_exist_result_text('error', '1') +except Exception as e: + # 打印错误信息 + print(f"发生错误: {e}") + commonFuc().check_text_exist_result_text('error', 'succees') diff --git a/air_case/public1/public1/public1.py b/air_case/public1/public1/public1.py index 59f2fc23e6b4ee906f4366c8a10b348260519780..3110958668690d89b1a8673c1164f3ad698c6cb0 100644 --- a/air_case/public1/public1/public1.py +++ b/air_case/public1/public1/public1.py @@ -342,6 +342,11 @@ def get_stockId(name, type=1): # 获取仓库id参数是库房名称 id3 = i['id'] print(id3) return id3 +def get_stockId_fromdb(name, type=1): # 获取仓库id参数是库房名称 + + stockId=process_tuple( + get_id("select id from mcms_stock_info where stock_name='%s'and branch_id='h0347-3754';" % name)) + return stockId def dept_query_all(): # 科室查询,将科室id写入文件中 @@ -1816,6 +1821,30 @@ def get_stockAreaId_new(dept_id, deptName, type=1): FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '库区信息', titlename, 'message22') return shelfCode +def get_stockAreaId_new_fromDb(dept_id, deptName, type=1): + module = "b2_herp3_bs" + stockId = 'stockId' + # 获取库房id========= 开始==== + if type == 1: + # 中心库房名称 + branch_name = FileUtils().r_info(module, '院区新增')["branch_name"] + stockId = get_stockId_fromdb(branch_name + '中心库房') + # 二级库房名称 + elif type == 2: + stockId = get_stockId_fromdb(deptName + '库房', 2) + print(stockId) + elif type == 3: + stockId = get_stockId_fromdb(deptName + '库房', 3) + print(stockId) + + # 获取库房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) + return shelfCode + def herpService_mcmsDeptGoodsInfo_getByProvIdPage(): # 高值跟台获取产品信息 module = "b5_spd3_core_business_flow" diff --git a/common/db/sql/sql_tools.py b/common/db/sql/sql_tools.py index 58c6e3203a15519bd9c59656f5805d438c5f6898..c4179d8723d832fa8f4c4532335fe5a4fda95059 100644 --- a/common/db/sql/sql_tools.py +++ b/common/db/sql/sql_tools.py @@ -116,6 +116,12 @@ def check_mcms_dept_buy_sql(sql): print('res_dict', res_dict) cursor.close() return res_dict +def check_mcms_pur_plan_sql(sql): + db, cursor = get_sql_conn() + res_dict = get_dict_data_sql(cursor, sql) + print('res_dict', res_dict) + cursor.close() + return res_dict def get_create_time(sql): db, cursor = get_sql_conn() cursor.execute(sql) diff --git a/data/b6_spd3_core_business_flow_database_check/data b/data/b6_spd3_core_business_flow_database_check/data index 3535f3a4618b5f55b5d94e98af8046ce38ce868f..fa84fa29290663641c359b22e1f931e6a63240b2 100644 --- a/data/b6_spd3_core_business_flow_database_check/data +++ b/data/b6_spd3_core_business_flow_database_check/data @@ -15,3 +15,17 @@ "mcms_dept_buy_detail_approval_after": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 10, "pkg_def_id": "%s", "pkg_def_name": "%s", "pkg_def_qty": Decimal("100.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("100.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 40, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "re_order_no": None, "coding_type": 0}' "mcms_dept_buy_detail_approval_after1": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 20, "pkg_def_id": %s, "pkg_def_name": %s, "pkg_def_qty": Decimal("1.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("1.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 40, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "re_order_no": None, "coding_type": 0}' "mcms_dept_buy_detail_approval_after2": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 60, "pkg_def_id": "%s", "pkg_def_name": "%s", "pkg_def_qty": Decimal("100.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("100.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 40, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "re_order_no": None, "coding_type": 0}' + +"mcms_dept_buy_direct_sending": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}' +"mcms_dept_buy_direct_sending2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}' +"mcms_dept_buy_direct_sending3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}' + + +"mcms_dept_buy_approval_after4": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}' +"mcms_dept_buy_approval_after5": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}' +"mcms_dept_buy_approval_after6": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}' + + +"mcms_pur_plan": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}' +"mcms_pur_plan2": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}' +"mcms_pur_plan3": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}' \ No newline at end of file diff --git a/report/summary.html b/report/summary.html index 1f5a0d58a08d3ab9e6f37a5dd8f94a7452ad0d6b..1c700015cbf14020bc0f8c3e8444c21af83a2869 100644 --- a/report/summary.html +++ b/report/summary.html @@ -76,9 +76,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间