# -*- encoding=utf8 -*-
from common.fileUtls import FileUtils

__author__ = "xiaohesheng"

"""
case_tag:api,mdm-web,a10供货关系审核_驳回_客户类型_医院_医院账号登录,id2255,id2255-10,sit,on
主数据平台:a10供货关系审核_驳回_客户类型_医院_医院账号登录 
"""

from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "a4_mdm3_cm"
def h_login():
    module = "a4_mdm3_cm"
    info = FileUtils().r_info("a4_mdm3_cm", "供货关系申请")
    print(info)
    e_corpId = info['e_corpId']
    h_corpId = info['h_corpId']
    e_username = info['e_username']
    h_name = info['h_name']
    """
     场景:a10供货关系审核_驳回_客户类型_医院_医院账号登录
     用例名称：a10供货关系审核_驳回_客户类型_医院_医院账号登录
     输入：用户名，密码
     输出："rtn_msg": token
    """
    # module = "mdm3_cm"
    #a10供货关系审核_驳回_客户类型_医院_医院账号登录
    username = h_name
    # print('医院名称',username)
    password = commonFuc().get_business_data(module, "password")
    # print(username, password)
    # 获取token和projectCode
    token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
    return token,projectCode,uxid,corpId,h_name
h_login()

