| | |
| | | private List<GwDiverter> _DiverterList; |
| | | private List<GwAp> _APList; |
| | | private List<GwStrategy> _StrategyList; |
| | | private List<GwProduct> _ProductList; |
| | | |
| | | private List<GwOp> OpList |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private List<GwProduct> ProductList |
| | | { |
| | | get |
| | | { |
| | | if (this._ProductList == null) |
| | | { |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | { |
| | | GwProduct gwProduct = new GwProduct(); |
| | | gwProduct.Classes = -1; |
| | | gwProduct.IsDefault = -1; |
| | | gwProduct.IsEnable = -1; |
| | | this._ProductList = gwProductDao.getAllList(gwProduct); |
| | | } |
| | | } |
| | | return this._ProductList; |
| | | } |
| | | } |
| | | |
| | | private List<GwStrategy> StrategyList |
| | | { |
| | | get |
| | |
| | | return this.Add(context); |
| | | case "loadGwSpPageList": |
| | | return this.LoadGwSpPageList(context); |
| | | case "loadGwSpAccountPageList": |
| | | case "loadGwSpAccountPageList"://加载账号列表 |
| | | return this.LoadGwSpAccountPageList(context); |
| | | case "update": |
| | | return this.Update(context); |
| | |
| | | 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("请选择通道组路由模式"); |
| | | GwSpDao gwSpDao = new GwSpDao(); |
| | |
| | | if (string.IsNullOrEmpty(clientId) && !string.IsNullOrEmpty(string4)) |
| | | clientId = new GwClientDao().GetClientName(string4).ClientID; |
| | | //加载账号列表信息 |
| | | List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, int1, string3, int2, int4, int3, out recordCount); |
| | | List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, int1, string3, int2, int4, int3, int5.ToString(),out recordCount, productId); |
| | | string str1 = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | |
| | | { |
| | | str1 = str1 + "<tr><td rowspan=\"1\" ><input type=\"checkbox\"name=\"checkbox\" value=\"" + gwSp.SpID + "\"/></td><td rowspan=\"1\">" + gwSp.SpID + "<div class=\"text-muted\">" + this.GetAPName(gwSp.ApID) + "</div><div class=\"text-muted\">" + this.GetClientName(gwSp.ClientID) + "</div>"; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + (object)this.GetProductToName(gwSp.ProductId) + "</td>"; |
| | | if (gwSp.RouterType == 1) |
| | | { |
| | | str1 += "<td rowspan=\"1\"><div class=\"btn btn-primary btn-xs\">点路由</div>"; |
| | |
| | | string str2 = "<div class=\"text-muted\">" + gwSp.ChargerTypeText + "</div>"; |
| | | if (gwSp.ChargerTypeText == "后付费") |
| | | str2 = "<div style=\"color:red\">" + gwSp.ChargerTypeText + "</div>"; |
| | | str1 = str1 + (object)"<td><div class=\"text-muted\">" + (object)(gwSp.Balance / (long)gwSp.Price) + "条/" + (object)((double)gwSp.Balance / 1000.0) + "元</div>"; |
| | | //add: yangzh by 2022-03-14 start |
| | | //str1 = str1 + (object)"<td><div class=\"text-muted\">" + (object)(gwSp.Balance / (long)gwSp.Price) + "条/" + (object)((double)gwSp.Balance / 1000.0) + "元</div>"; |
| | | str1 = str1 + (object)"<td><div class=\"text-muted\">" + (object)(gwSp.BasicNum + (long)gwSp.GivingNum) + "条 / " + (object)(gwSp.BasicNum) + "条 / " + (object)(gwSp.GivingNum) + "条</div>"; |
| | | //add: yangzh by 2022-03-14 end |
| | | str1 = str1 + (object)str2 + "<div class=\"text-muted\">" + (object)((double)gwSp.Price / 1000.0) + "元/条</div>"; |
| | | if (context.HasRight("3021")) |
| | | str1 += string.Format(" <a class=\"btn btn-xs btn-success action-modal-charge\" data-id=\"{0}\"><i class=\"fa fa-cny\"></i> 充值</a>", (object)gwSp.SpID); |
| | |
| | | if (context.HasRight("3023")) |
| | | str1 += string.Format(" <a class=\"btn-block btn btn-primary btn-xs action-modal-edit\" data-id=\"{0}\"><i class=\"fa fa-edit\"></i> 编辑</a>", (object)gwSp.SpID); |
| | | str1 += string.Format(" <a class=\"btn-block btn btn-success btn-xs action-create-summary\" data-id=\"{0}\">账号摘要</a>", (object)gwSp.SpID); |
| | | if (context.HasRight("3024")) |
| | | str1 += string.Format(" <a class=\"btn-block btn btn-xs btn-default action-delete\" data-id=\"{0}\"><i class=\"fa fa-trash\"></i> 删除</a>", (object)gwSp.SpID); |
| | | |
| | | //if (context.HasRight("3024")) |
| | | // str1 += string.Format(" <a class=\"btn-block btn btn-xs btn-default action-delete\" data-id=\"{0}\"><i class=\"fa fa-trash\"></i> 删除</a>", (object)gwSp.SpID); |
| | | str1 += "</td>"; |
| | | str1 += "</tr>"; |
| | | } |
| | |
| | | return "【" + gwDiverter.DiverterName + "】导流策略"; |
| | | } |
| | | |
| | | //产品转名称 |
| | | private string GetProductToName(string productId) |
| | | { |
| | | GwProduct gwProduct = this.ProductList.Find((Predicate<GwProduct>)(bean => productId.Equals(bean.Id) )); |
| | | if (gwProduct != null) |
| | | { |
| | | //return string.Format("{0}-{1}", (object)gwAp.ApID, (object)gwAp.ApName);//2021.2.24.wzp变更,后续可以删除 |
| | | return string.Format("{0}", (object)gwProduct.Name); |
| | | } |
| | | return string.Empty; |
| | | } |
| | | |
| | | private JsonPageResult LoadGwSpPageList(PageContext<SysUser> context) |
| | | { |
| | | string string1 = context.GetString("SelectedSpID"); |