| | |
| | | string string1 = context.GetString("apID"); |
| | | string clientId = context.GetString("clientID"); |
| | | string string2 = context.GetString("spID"); |
| | | string string3 = context.GetString("opID"); |
| | | string opId = context.GetString("opID"); |
| | | int int1 = context.GetInt("routerType"); |
| | | string string4 = context.GetString("clientName"); |
| | | string company = context.GetString("company"); |
| | | int int2 = context.GetInt("chargeType"); |
| | | int recordCount = 0; |
| | | int int3 = context.GetInt("pageSize", 20); |
| | | int int4 = context.GetInt("pageIndex", 1); |
| | | int int5 = context.GetInt("resendStatus", 1); |
| | | string productId = context.GetString("productId")==null? "": context.GetString("productId"); |
| | | if (!string.IsNullOrEmpty(string3) && int1 <= 0) |
| | | throw new ArgumentException("请选择通道组路由模式"); |
| | | if (!string.IsNullOrEmpty(opId) && int1 <= 0) |
| | | { throw new ArgumentException("请选择通道组路由模式"); } |
| | | GwSpDao gwSpDao = new GwSpDao(); |
| | | string apId = "0"; |
| | | if (this.IsInt(string1)) |
| | |
| | | string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | //加载账号列表信息 |
| | | List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, string4, int1, string3, int2, int4, int3, int5.ToString(), productId, permissionsSQL, out recordCount); |
| | | List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, company, int1, opId, int2, int4, int3, int5.ToString(), productId, permissionsSQL, out recordCount); |
| | | string str1 = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | |
| | | o.CumulativeAuditTime = context.GetInt("CumulativeAuditTime"); |
| | | o.IsSyncChildSendAudit = context.GetInt("IsSyncChildSendAudit"); |
| | | |
| | | o.ProductId = context.GetString("ProductId",""); |
| | | o.ProductId = context.GetString("ProductId","");//产品ID |
| | | |
| | | if (context.GetInt("RouterType", 1) == 1) |
| | | { |
| | |
| | | o.CUGroupID = 0; |
| | | o.CTGroupID = 0; |
| | | } |
| | | o.BalanceThreshold = context.GetInt("BalanceThreshold"); |
| | | o.AlarmMobile = context.GetString("AlarmMobile"); |
| | | o.BalanceThreshold = context.GetInt("BalanceThreshold");//告警条数 |
| | | o.AlarmMobile = context.GetString("AlarmMobile");//告警号码 |
| | | o.ForceSignFlag = context.GetInt("ForceSignFlag"); |
| | | o.ForceSign = context.GetString("ForceSign"); |
| | | o.SignatureMode = context.GetInt("signatureMode"); |
| | |
| | | cTPattern.Enabled = context.GetInt("enabled"); |
| | | cTPattern.Pattern = context.GetString("patternContent"); |
| | | string pattern = @"^[A-Za-z0-9]+$"; //判断是字符或数字 |
| | | //if (!Regex.IsMatch(o.SpID, "^\\d{6}$")) |
| | | // throw new Exception("账号必须为6位数字!"); |
| | | //if (!Regex.IsMatch(o.SpID, "^\\d{6}$")) |
| | | // throw new Exception("账号必须为6位数字!"); |
| | | if (!Regex.IsMatch(o.SpID, "^[A-Za-z0-9]{6}$")) |
| | | throw new Exception("账号必须为6位字符或数字!"); |
| | | if (o.AccessCodeMode == 1) |
| | |
| | | throw new Exception("账号密码不能为空"); |
| | | this._Dao.Update(o); |
| | | this._Dao.UpdatePattern(cTPattern, context.OperatorID); //更新账号里面的报备内容 |
| | | |
| | | //同时修改客户-产品表记录,若存在,则更新,否则新建 |
| | | bool flag = GwClientProductDao.Instance.FindBySp(o.SpID); |
| | | GwClientProduct clientProduct = new GwClientProduct() |
| | | { |
| | | ClientId = o.ClientID, |
| | | ProductId = o.ProductId, |
| | | SpId = o.SpID, |
| | | ActivateStatus = 1, |
| | | Id=Guid.NewGuid().ToString() |
| | | }; |
| | | if (flag)//存在,更新 |
| | | { |
| | | GwClientProductDao.Instance.Update(clientProduct); |
| | | } |
| | | else |
| | | { |
| | | |
| | | GwClientProductDao.Instance.Add(clientProduct); |
| | | } |
| | | |
| | | return new JsonPageResult(true, (object)("账户" + o.SpID + "修改成功!")); |
| | | } |
| | | |
| | |
| | | throw new Exception("SPID已经存在,请重新填写!"); |
| | | this._Dao.Add(o); |
| | | this._Dao.UpdatePattern(string1, @int, string2, context.OperatorID);//添加账号的时候配置报备 |
| | | |
| | | |
| | | //如果选择了产品,表示创建的时候就激活。后台创建无赠送 |
| | | if (!string.IsNullOrEmpty(o.ProductId)) |
| | | { |
| | | //同时修改客户-产品表记录,若存在,则更新,否则新建 |
| | | bool flag = GwClientProductDao.Instance.FindBySp(o.SpID); |
| | | GwClientProduct clientProduct = new GwClientProduct() |
| | | { |
| | | ClientId = o.ClientID, |
| | | ProductId = o.ProductId, |
| | | SpId = o.SpID, |
| | | ActivateStatus = 1, |
| | | Id = Guid.NewGuid().ToString() |
| | | }; |
| | | if (flag)//存在,更新 |
| | | { |
| | | GwClientProductDao.Instance.Update(clientProduct); |
| | | } |
| | | else |
| | | { |
| | | |
| | | GwClientProductDao.Instance.Add(clientProduct); |
| | | } |
| | | } |
| | | |
| | | |
| | | return new JsonPageResult(true, (object)("账户" + o.SpID + "添加成功!")); |
| | | } |
| | | |