using Library; using MySystem.Service.Main2; using System.Collections.Generic; using MySystem.Service.KxsMain; namespace MySystem.Service.Main2 { /// /// 银联商户表工具类 /// public class MerchantInfoUtil { #region 通过创客编号查询商户Id /// /// 通过创客编号查询商户Id /// /// 创客编号 /// public static string QueryMerchantIdByMakerCode(string MakerCode) { var info = ""; var userInfo = UsersService.QueryByMakerCode(MakerCode); if (userInfo.Id > 0) { List relationData = new List(); var merInfo = MerchantInfoService.List(relationData, " and UserId=" + userInfo.Id + "", 1, 9999); var merIds = ""; foreach (Dictionary dic in merInfo) { var MerchantId = int.Parse(dic["Id"].ToString()); merIds += MerchantId + ","; } info = merIds.TrimEnd(','); } else { return "创客编号" + MakerCode + "不存在"; } return info; } #endregion #region 主体类型 /// /// 主体类型 /// /// public static Dictionary GetSubjects() { Dictionary dic = new Dictionary(); dic.Add("SUBJECT_TYPE_INDIVIDUAL", "个体工商户"); dic.Add("SUBJECT_TYPE_ENTERPRISE", "企业公司"); dic.Add("SUBJECT_TYPE_SMALL", "小微商户"); // dic.Add("SUBJECT_TYPE_INSTITUTIONS", "党政、机关及事业单位"); // dic.Add("SUBJECT_TYPE_OTHERS", "其他组织"); return dic; } #endregion #region 账户类型 /// /// 账户类型 /// /// public static Dictionary GetAccountTypes() { Dictionary dic = new Dictionary(); dic.Add("BANK_ACCOUNT_TYPE_CORPORATE", "企业对公银行账号"); dic.Add("BANK_ACCOUNT_TYPE_PERSONAL", "法人个人银行卡"); return dic; } #endregion #region 获取字典参数 /// /// 获取字典参数 /// /// /// /// public static string GetDicValue(Dictionary dic, string key) { key = function.CheckNull(key); if (dic.ContainsKey(key)) { return dic[key]; } return ""; } #endregion } }