# -*- encoding=utf8 -*-
import json
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.fileUtls import FileUtils
from common.run_cmd_script import execute_command
from common.timeUtils import timeUtils
from airtest.core.api import using

__author__ = "xiaohesheng"

"""
case_tag:api,id2303-22,sit,on
python runner_test.py tag id2303-22 debug mdm3
"""
pro_path = commonFuc().get_pro_path2()


# print('pro_path', pro_path)
def flow1():
    # ==================调用流程一开始
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a1_流程一外网企业注册审批_数据库验证.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a1_流程一外网企业注册审批_数据库验证.air')
    from a_a1_流程一外网企业注册审批_数据库验证 import main
    main()
# ==================调用流程一结束
def flow2():
    # ==================调用流程二开始
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a2_流程二供货关系申请提交审批.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a2_流程二供货关系申请提交审批.air')
    from a_a2_流程二供货关系申请提交审批 import main
    main()
# ==================调用流程二结束
def flow3():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a3_流程三_产品导入和审批.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a3_流程三_产品导入和审批.air')
    from a_a3_流程三_产品导入和审批 import main
    main()
def flow4():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a4_流程四_基础模块设置.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a4_流程四_基础模块设置.air')
    from a_a4_流程四_基础模块设置 import main
    main()


def flow5():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a5流程五_中心库入库结算_正结算1_提交采购计划.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a5流程五_中心库入库结算_正结算1_提交采购计划.air')
    from a_a5流程五_中心库入库结算_正结算1_提交采购计划 import main
    main()
def flow6():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a6流程五_中心库入库结算_正结算2_外网配送.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a6流程五_中心库入库结算_正结算2_外网配送.air')
    from a_a6流程五_中心库入库结算_正结算2_外网配送 import main
    main()

def flow7():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算.air')
    from a_a7流程五_中心库入库结算_正结算3_内网验收入库结算 import main
    main()

def flow8():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a8流程五_中心库入库结算_正结算3_外网开票.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a8流程五_中心库入库结算_正结算3_外网开票.air')
    from a_a8流程五_中心库入库结算_正结算3_外网开票 import main
    main()
def flow9():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_a9流程六_中心库入库结算_负结算.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_a9流程六_中心库入库结算_负结算.air')
    from a_a9流程六_中心库入库结算_负结算 import main
    main()
def flow10():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b0流程七_中心库入库结算_正负结算.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b0流程七_中心库入库结算_正负结算.air')
    from a_b0流程七_中心库入库结算_正负结算 import main
    main()
def flow11():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程.air')
    from a_b1流程八_高值跟台业务流程 import main
    main()
def flow12():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b2流程九请领业务流_二级库向中心库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b2流程九请领业务流_二级库向中心库.air')
    from a_b2流程九请领业务流_二级库向中心库 import main
    main()
def flow13():
    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 main
    main()


def flow14():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送.air')
    from a_b4流程十一请领业务流_二级库向直送 import main
    main()


def flow15():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库.air')
    from a_b5流程十二请领业务流_二级库向二级库 import main
    main()


def flow16():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库.air')
    from a_b6流程十三请领业务流_三级库向二级库 import main
    main()


def flow17():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b7流程十四退库业务_消耗退库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b7流程十四退库业务_消耗退库.air')
    from a_b7流程十四退库业务_消耗退库 import main
    main()


def flow18():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b8流程十五退库业务_三级库向二级库退库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b8流程十五退库业务_三级库向二级库退库.air')
    from a_b8流程十五退库业务_三级库向二级库退库 import main
    main()


def flow19():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_b9流程十六退库业务_二级库向一级库退库.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_b9流程十六退库业务_二级库向一级库退库.air')
    from a_b9流程十六退库业务_二级库向一级库退库 import main
    main()


def flow20():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_c0流程十七退货业务_中心库退供应商.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_c0流程十七退货业务_中心库退供应商.air')
    from a_c0流程十七退货业务_中心库退供应商 import main
    main()


def flow21():
    sys.path.append(pro_path + r'/air_case/b6_spd3_core_business_flow_database_check/a_c1流程十八中心库业务_拆包功能.air')
    using(pro_path + r'//air_case/b6_spd3_core_business_flow_database_check/a_c1流程十八中心库业务_拆包功能.air')
    from a_c1流程十八中心库业务_拆包功能 import main
    main()


# try:
#     flow1()
#     flow2()
#     flow3()
#     flow4()
#     flow5()
#     flow6()
#     flow7()
#     flow8()
#     flow9()
#     flow10()
#     flow11()
#     flow12()
#     flow13()
#     flow14()
#     flow15()
#     flow16()
#     flow17()
#     flow18()
#     flow19()
#     flow20()
#     flow21()
#
#     commonFuc().check_text_exist_result_text('succees', 'succees')
# except:
#     commonFuc().check_text_exist_result_text('error', 'succees')
