private string GetOrginComputerNo(int?stockA, string companyCode) { if (!stockA.HasValue) { return(string.Empty); } string result = string.Empty; string whcomfig = ExternalDomainBroker.GetSystemConfigurationValue("GrouldSettingValue", companyCode); if (string.IsNullOrEmpty(whcomfig)) { BizExceptionHelper.Throw("Res_SO_SysConfigurationError"); } Dictionary <string, string> dic_whs = new Dictionary <string, string>(); string[] strs = whcomfig.Split(new char[] { ',' }); foreach (string str in strs) { string[] srs = str.Split(new char[] { ':' }); dic_whs.Add(srs[0], srs[1]); } foreach (var wh in dic_whs) { if (wh.Key == stockA.ToString()) { result = wh.Value; } } if (result == string.Empty) { BizExceptionHelper.Throw("Res_SO_NotExistsKeyStock", stockA.Value.ToString()); } return(result); }
public void InsertKnownFraudCustomer(KnownFraudCustomer entity) { if (m_da.GetKFCByCustomerSysNo(entity.CustomerSysNo.Value) != null) { return; } int maxBlockMark = 0; if (!int.TryParse(ExternalDomainBroker.GetSystemConfigurationValue("GRADENUM", entity.CompanyCode), out maxBlockMark)) { maxBlockMark = 5; } List <KnownFraudCustomer> list = m_da.GetKFCByIPAndTel(entity.IPAddress, entity.MobilePhone, entity.Telephone, entity.CompanyCode); //存在同一个IP地址且同一个手机号码相同记录重复5条 //则其相关的客户信息升级到Block if (list != null && list.Count + 1 >= maxBlockMark) { list.ForEach(item => { item.KFCType = KFCType.QiZha; item.LastEditDate = item.CreateDate; item.LastEditUserName = item.CreateUserName; m_da.UpdateKnowFrandCustomerStatus(item); }); entity.KFCType = KFCType.QiZha; m_da.InsertKnowFrandCustomer(entity); } else { m_da.InsertKnowFrandCustomer(entity); } }