yzh
2022-05-26 3b18a48485f7207438d9d0eb3038d979e069431d
优化产品及产品分类,订单,对称加密,IP转地区名称
36个文件已修改
506 ■■■■ 已修改文件
web/Common/Common.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/DESEncrypt.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/Utils.cs 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/GwClientDao.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/GwOrderDao.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/SysFlowNodeDao.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Common.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Common.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/Model/GwOrder.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Common.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Common.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwClient.ashx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwClient.aspx 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwClient.aspx.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwOrder.ashx 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwOrderAudit.aspx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwOrderComplete.aspx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwProduct.ashx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwProduct.aspx 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwProduct.aspx.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwSpPrePattern.aspx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwStatisProfit.aspx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/web.config 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/Common.csproj
@@ -35,6 +35,10 @@
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\web\Bin\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>lib\Oracle.DataAccess.dll</HintPath>
web/Common/DESEncrypt.cs
@@ -6,17 +6,23 @@
namespace Common
{
  public class DESEncrypt
  {
        //加密串
        //public static string encryptStr = "litianping";
        public static string encryptStr = "abcDEF123@$@";
    public static string Encrypt(string Text)
    {
      return DESEncrypt.Encrypt(Text, "litianping");
      return DESEncrypt.Encrypt(Text, encryptStr );
    }
    public static string Encrypt(string Text, string sKey)
    {
      DESCryptoServiceProvider cryptoServiceProvider = new DESCryptoServiceProvider();
      byte[] bytes = Encoding.Default.GetBytes(Text);
            //c#的DES加密是key为8位
      cryptoServiceProvider.Key = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
      cryptoServiceProvider.IV = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
      MemoryStream memoryStream = new MemoryStream();
@@ -31,7 +37,7 @@
    public static string Decrypt(string Text)
    {
      return DESEncrypt.Decrypt(Text, "litianping");
      return DESEncrypt.Decrypt(Text, encryptStr);
    }
    public static string Decrypt(string Text, string sKey)
@@ -44,6 +50,7 @@
        int num = Convert.ToInt32(Text.Substring(index * 2, 2), 16);
        buffer[index] = (byte) num;
      }
            //c#的DES加密是key为8位
      cryptoServiceProvider.Key = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
      cryptoServiceProvider.IV = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
      MemoryStream memoryStream = new MemoryStream();
web/Common/Utils.cs
@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json.Linq;
using System;
using System.IO;
using System.Net;
using System.Net.Mail;
@@ -7,6 +8,7 @@
using System.Text.RegularExpressions;
using System.Threading;
using System.Web;
using System.Xml;
namespace Common
{
@@ -816,6 +818,127 @@
      string str = string.Empty;
      return HttpContext.Current.Request.ServerVariables["HTTP_VIA"] == null ? (HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] == null ? "0.0.0.0" : HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString()) : (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null ? HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString() : (HttpContext.Current.Request.ServerVariables["HTTP_CLIENT_IP"] == null ? (HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] == null ? "0.0.0.0" : HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString()) : HttpContext.Current.Request.ServerVariables["HTTP_CLIENT_IP"].ToString()));
    }
        /// <summary>
        /// 获取客户端IP地址
        /// </summary>
        /// <returns>若失败则返回回送地址</returns>
        public static string GetCurrentUserIp()
        {
            //如果客户端使用了代理服务器,则利用HTTP_X_FORWARDED_FOR找到客户端IP地址
            string userHostAddress = string.IsNullOrEmpty(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]) ? null : HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Split(',')[0].Trim();
            //否则直接读取REMOTE_ADDR获取客户端IP地址
            if (string.IsNullOrEmpty(userHostAddress))
            {
                userHostAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
            }
            //前两者均失败,则利用Request.UserHostAddress属性获取IP地址,但此时无法确定该IP是客户端IP还是代理IP
            if (string.IsNullOrEmpty(userHostAddress))
            {
                userHostAddress = HttpContext.Current.Request.UserHostAddress;
            }
            //最后判断获取是否成功,并检查IP地址的格式(检查其格式非常重要)
            if (!string.IsNullOrEmpty(userHostAddress) && IsIP(userHostAddress))
            {
                return userHostAddress;
            }
            return "127.0.0.1";
        }
        //获取本地IP地址,如:192.168.1.102
        public static string GetLocalIPAddress()
        {
            var host = Dns.GetHostEntry(Dns.GetHostName());
            foreach (var ip in host.AddressList)
            {
                if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                {
                    return ip.ToString();
                }
            }
            throw new Exception("No network adapters with an IPv4 address in the system!");
        }
        /// <summary>
        /// 根据IP 获取物理地址
        /// </summary>
        /// <param name="ip">Ip地址</param>
        /// <param name="AddressClasses">返回地址类别:0-全地址,1-国家编码, 2-国家,3-地区编码,4-地区名称,5-城市名称</param>
        /// <returns></returns>
        public static string GetIpAddress(string ip, string addressClasses)
        {
            string url = "http://ip-api.com/json/" + ip + "?lang=zh-CN";
            string result = "";
            WebRequest wrt = null;
            WebResponse wrp = null;
            try
            {
                wrt = WebRequest.Create(url);
                wrt.Credentials = CredentialCache.DefaultCredentials;
                wrp = wrt.GetResponse();
                StreamReader sr = new StreamReader(wrp.GetResponseStream(), Encoding.UTF8);
                //获取到的是Json数据
                string html = sr.ReadToEnd();
                if (string.IsNullOrEmpty(html))
                    return null;
                //Newtonsoft.Json读取数据
                JObject obj = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(html);
                string countryCode = obj["countryCode"] == null ? "" : obj["countryCode"].ToString();   //国家编码
                string country = obj["country"] == null ? "" : obj["country"].ToString();   //国家
                string region = obj["region"] == null ? "" : obj["region"].ToString();   //地区编码
                string regionName = obj["regionName"] == null ? "" : obj["regionName"].ToString();   //地区名称
                string city = obj["city"] == null ? "" : obj["city"].ToString();    //城市名称
                                                                                    //string province = obj["regionName"].ToString();
                //地址全称
                if (addressClasses.Equals("0"))
                    return country + (city.Equals(regionName) ? city : (regionName + city));
                //国家编码
                if (addressClasses.Equals("1"))
                    return countryCode;
                //国家名称
                if (addressClasses.Equals("2"))
                    return country;
                //地区编码
                if (addressClasses.Equals("3"))
                    return region;
                //地区名称
                if (addressClasses.Equals("4"))
                    return regionName;
                //城市名称
                if (addressClasses.Equals("5"))
                    //return city.Equals(regionName) ? city : (regionName + city);
                    return city;
                else
                    return country + (city.Equals(regionName) ? city : (regionName + city));
            }
            catch (Exception)
            {
            }
            finally
            {
                if (wrp != null)
                    wrp.Close();
                if (wrt != null)
                    wrt.Abort();
            }
            return result;
        }
        /// <summary>
        /// 检查IP地址格式
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        public static bool IsIP(string ip)
        {
            return System.Text.RegularExpressions.Regex.IsMatch(ip, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
        }
    public static string GetTrueWebSitePath()
    {
web/Dao/GwClientDao.cs
@@ -23,9 +23,13 @@
        /// <param name="clientName">联系人</param>
        /// <param name="telphone">联系电话</param>
        /// <param name="agent">业务员</param>
        /// <param name="company">公司名称</param>
        /// <param name="salesman">归属业务员</param>
        /// <param name="supportStaff">归属客服人员</param>
        /// <param name="productId">产品ID</param>
        /// <returns></returns>
        //public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telphone, string agent)
        public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telphone, string agent, string company, string salesman, string productId, string permissionsSQL )
        public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telphone, string agent, string company, string salesman, string supportStaff, string productId, string permissionsSQL )
        {
            List<GwClient> list = new List<GwClient>();
@@ -34,7 +38,7 @@
            {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append("from GW_CLIENT where 1=1");
                OracleParameter[] oracleParameterArray = new OracleParameter[6];
                OracleParameter[] oracleParameterArray = new OracleParameter[7];
                if (clientID != null && clientID != "")
                {
                    oracleParameterArray[0] = new OracleParameter(":ClientID", (OracleDbType)126);
@@ -71,6 +75,12 @@
                    ((DbParameter)oracleParameterArray[5]).Value = (object)("%" + agent + "%");
                    stringBuilder.Append(" and Agent like :Agent");
                }
                if (supportStaff != null && supportStaff != "")
                {
                    oracleParameterArray[6] = new OracleParameter(":SupportStaff", (OracleDbType)126);
                    ((DbParameter)oracleParameterArray[6]).Value = (object)(supportStaff);
                    stringBuilder.Append(" and SUPPORT_STAFF = :SupportStaff");
                }
                if (productId != null && productId != "")
                {
web/Dao/GwOrderDao.cs
@@ -32,7 +32,7 @@
        //flag: 0-待审核订单(已提交、审核中);1-已完成订单(审核通过、审核不通过、取消)
        public List<GwOrder> LoadInfoList(string spId, string clientId, string clientName, int flag, DateTime startDate, DateTime endDate, int pageSize, int PageIndex, string permissionsSQL, out int recordcount)
        public List<GwOrder> LoadInfoList(string spId, string clientId, string compay, int flag, DateTime startDate, DateTime endDate, int pageSize, int PageIndex, string permissionsSQL, out int recordcount)
        {
            
            List<GwOrder> list = new List<GwOrder>();
@@ -41,7 +41,7 @@
            {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append(" FROM ( ");
                stringBuilder.Append("SELECT GWO.*, GWC.CLIENT_NAME  ");
                stringBuilder.Append("SELECT GWO.*, GWC.CLIENT_NAME, GWC.COMPANY  ");
                stringBuilder.Append(" FROM GW_ORDER GWO ");
                stringBuilder.Append(" LEFT JOIN GW_SP GWS ON GWS.SP_ID = GWO.SP_ID ");
                stringBuilder.Append(" LEFT JOIN GW_CLIENT GWC ON GWC.CLIENT_ID = GWO.CLIENT_ID ");
@@ -81,9 +81,9 @@
                {
                    stringBuilder.Append(" and GWO.CLIENT_ID like '%" + clientId + "%'");
                }
                if ((clientName != null) && (clientName != ""))
                if ((compay != null) && (compay != ""))
                {
                    stringBuilder.Append(" and GWC.CLIENT_NAME like '%" + clientName + "%'");
                    stringBuilder.Append(" and GWC.COMPANY like '%" + compay + "%'");
                }
                //客户权限SQL脚本
                stringBuilder.Append(permissionsSQL);
@@ -309,6 +309,7 @@
            o.OrderId = oracleReaderWrapper.GetString("ORDER_ID", "");
            o.SpId = oracleReaderWrapper.GetString("SP_ID", "");
            o.ClientId = oracleReaderWrapper.GetString("CLIENT_ID", "");
            o.Company = oracleReaderWrapper.GetString("COMPANY", "");
            o.ClientName = oracleReaderWrapper.GetString("CLIENT_NAME", "");
            o.ProductId = oracleReaderWrapper.GetString("PRODUCT_ID", "");
            o.ComboId = oracleReaderWrapper.GetString("COMBO_ID", "");
web/Dao/SysFlowNodeDao.cs
@@ -172,7 +172,7 @@
                }
                if (sysFlowNode.UserId != null && sysFlowNode.UserId != "")
                {
                    stringBuilder.Append(" AND INSTR(','||USER_ID||',','" + sysFlowNode.UserId + "') > 0");
                    stringBuilder.Append(" AND INSTR(','||USER_ID||',', '" + sysFlowNode.UserId + "') > 0"); //对应MySql的FIND_IN_SET语法。
                }
                stringBuilder.Append(" ORDER BY BUSINESS_TYPE ");
web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
Binary files differ
web/Dao/obj/Debug/Dao.dll
Binary files differ
web/Dao/obj/Debug/Dao.pdb
Binary files differ
web/Lib/Common.dll
Binary files differ
web/Lib/Common.pdb
Binary files differ
web/Lib/Dao.dll
Binary files differ
web/Lib/Dao.pdb
Binary files differ
web/Lib/Model.dll
Binary files differ
web/Lib/Model.pdb
Binary files differ
web/Model/Model/GwOrder.cs
@@ -13,6 +13,8 @@
        public string ClientId { get; set; }
        public string Company { get; set; }
        public string ClientName { get; set; }
        public string ProductId { get; set; }
web/Model/obj/Debug/Model.dll
Binary files differ
web/Model/obj/Debug/Model.pdb
Binary files differ
web/web/Bin/Common.dll
Binary files differ
web/web/Bin/Common.pdb
Binary files differ
web/web/Bin/Dao.dll
Binary files differ
web/web/Bin/Dao.pdb
Binary files differ
web/web/Bin/Model.dll
Binary files differ
web/web/Bin/Model.pdb
Binary files differ
web/web/GwClient.ashx
@@ -24,6 +24,7 @@
    private int _userId = -1;
    private int _userType = -1;
    private string _account = "";
    private string initPwd = ConfigurationManager.AppSettings["initPwd"];
    public override JsonPageResult ProcessRequestInternal(PageContext<Model.SysUser> context)
    {
@@ -66,6 +67,9 @@
            //批量分配客户的个性产品
            case "batchUpdateClientProduct":
                return BatchUpdateClientProduct(context);
            //重置密码
            case "resetPwd":
                return ResetPwd(context);
            default:
                throw new Exception("Invalid Action=" + action);
@@ -87,6 +91,7 @@
        string ClientName = context.GetString("ClientName");
        string Telephone = context.GetString("Telephone");
        string Salesman = context.GetString("Salesman");
        string SupportStaff = context.GetString("SupportStaff");
        string ProductId = context.GetString("ProductId");
        int pageIndex = context.GetInt("pageIndex", 1);
@@ -100,7 +105,7 @@
        using (GwClientDao dao = new GwClientDao())
        {
            string permissionsSQL = dao.GetClientPermissions(_userId, _userType, null);
            var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, ProductId, permissionsSQL);
            var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, permissionsSQL);
            if (list != null && list.Count > 0)
            {
@@ -114,8 +119,8 @@
                    //edit:yangzh by 20220511
                    //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Top_up_Amount_Total + "元</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>";
                    //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>";
                    str += @"<tr ><td  rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>";
                    //str += @"<tr ><td  rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>";
                    str += @"<tr ><td  rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "</td><td>" + item.Top_up_Amount_Total/1000 + "</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td></td>";
                    str += @"<td>";
                    string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account + "&password=" + item.Password;
@@ -134,6 +139,10 @@
                    str += @"黑名单";
                    str += @"</a>&nbsp;";
                    str += string.Format(@"<a class=""action-modal-resetPwd btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID);
                    str += @"重置密码";
                    str += @"</a>&nbsp;";
                    str += string.Format(@"<a class=""action-delete btn btn-xs btn-default"" href=""javascript:;"" data-id=""{0}"">", item.ClientID);
                    str += @"删除";
                    str += @"</a>";
@@ -143,7 +152,7 @@
            }
            else
            {
                str += @"<tr><td colspan=""10"">暂无信息</td></tr>";
                str += @"<tr><td colspan=""9"">暂无信息</td></tr>";
            }
        }
@@ -216,6 +225,20 @@
        string clientID = context.GetString("clientID");
        return new JsonPageResult(true, _Dao.GetBlackList(clientID));
    }
        //重置密码
    private JsonPageResult ResetPwd(PageContext<Model.SysUser> context)
    {
        string clientID = context.GetString("clientID");
        string password = string.IsNullOrEmpty(initPwd ) ? "123456" : initPwd;
        //密码MD5加密,
        password = DataHelper.MD5Hex(password);
        _Dao.UpdatePassword(clientID, password);
        return new JsonPageResult(true, "重置密码成功!");
    }
    /// <summary>
@@ -620,14 +643,14 @@
        }
    }
    //管理端账户名称
    //管理端用户ID转名称
    private string SysUserName(int userId)
    {
        if (this.SysUserList == null)
            return string.Empty;
        SysUser sysUser = this._SysUserList.Find((Predicate<SysUser>)(bean => bean.UserID == userId));
        if (sysUser != null)
            return string.Format("{0}-{1}", (object)sysUser.UserID, (object)sysUser.UserName);
            return string.Format("{0}", (object)sysUser.UserName);
        return string.Empty;
    }
}
web/web/GwClient.aspx
@@ -20,11 +20,12 @@
                var Telephone = $("#Telephone").val();
                var Agent = $("#Agent").val();
                var Salesman = $("#Salesman").val();
                var SupportStaff = $("#SupportStaff").val();
                var ProductId = $("#ProductId").val();
                $.ajax({
                    url: "GwClient.ashx",
                    type: "POST",
                    data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, ProductId: ProductId , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") },
                    data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, SupportStaff: SupportStaff, ProductId: ProductId , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") },
                    success: function (result) {
                        if (result.OK) {
                            $("#gwclientTable tbody").html(result.Message.Table);
@@ -161,6 +162,20 @@
                    mytek.confirm("是否需要删除该客户?", "客户删除后将无法恢复,请谨慎操作!", function (b) {
                        if (b) {
                            $.post("gwclient.ashx", { action: "delete", clientID: id }, function (r) {
                                mytek.alert(r.Message, r.OK, function () {
                                    window.location.reload();
                                });
                            });
                        }
                    });
                });
                //重置密码
                $(document).on("click", ".action-modal-resetPwd", function () {
                    var id = $(this).data("id");
                    mytek.confirm("重置密码?", "是否重置密码?请谨慎操作!", function (b) {
                        if (b) {
                            $.post("gwclient.ashx", { action: "resetPwd", clientID: id }, function (r) {
                                mytek.alert(r.Message, r.OK, function () {
                                    window.location.reload();
                                });
@@ -316,7 +331,7 @@
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">创建/修改客户
                        <h4 class="modal-title">创建/修改客户信息
                        </h4>
                        <input name="action" value="add" type="hidden" />
                        <input name="id" id="id" type="hidden" value="" />
@@ -334,7 +349,7 @@
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
                                客户名称 <span style="color:red">*</span>
                                公司名称(全称) <span style="color:red">*</span>
                            </label>
                            <div class="col-sm-4">
                                <input type="text" name="company" id="company" value="" class="form-control" />
@@ -352,7 +367,7 @@
                            </div>
                            <div class="col-sm-6">
                                <a class="btn btn-xs btn-primary action-generate-password ">生成密码</a>
                                <a class="btn btn-xs btn-success action-generate-password ">复制密码</a>
                                <a class="btn btn-xs btn-success action-copyPwd ">复制密码</a>
                            </div>
                        </div>
                        <div class="form-group">
@@ -403,6 +418,7 @@
                                    </select>
                            </div>
                        </div>
                        <!--
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
                                彩信是否支持显示状态报告 <span style="color:red">*</span>
@@ -415,6 +431,7 @@
                                    </select>
                            </div>
                        </div>
                        -->
                        <!--
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
@@ -447,7 +464,7 @@
                        </div>
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
                                归属客户人员 <span style="color:red">*</span>
                                归属客服人员 <span style="color:red">*</span>
                            </label>
                            <div class="col-sm-4">
                                    <select name="supportStaff" id="supportStaff" class="form-control">
@@ -465,27 +482,27 @@
                                    </select>
                            </div>
                        </div>
                        <!--
                        <div class="form-group">
                            <label class="control-label col-sm-2">营业执照</label>
                            <div class="col-sm-4">
                                <input type="file" name="txt_file" id="txt_file" class="file-loading" />
                            </div>
                        </div>
                        -->
                        <!--
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
                                权限管理
                            </label>
                            <div class="col-sm-10">
                             <input type="checkbox" class="icheck-me" value="GwClientList.aspx" name="permissionData" />代理商管理(*是否支持创建下级代理)
                                <!--
                                <!//--
                             <input type="checkbox" class="icheck-me" value="LgSmsDetailReport.aspx" name="permissionData" />查看状态报告
                             <input type="checkbox" class="icheck-me" value="1" name="permissionData" />发送权限
                             <input type="checkbox" class="icheck-me" value="2" name="permissionData" />查看数据权限
                                --//>
                            </div>
                        </div>
                                -->
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label  col-sm-2">
                                备注
@@ -521,7 +538,7 @@
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">客户名称</span>
                <span class="input-group-addon">联系人</span>
                <input type="text" name="ClientName" id="ClientName" class="form-control" />
            </div>
        </div>
@@ -536,6 +553,14 @@
                <span class="input-group-addon">归属业务员</span>
                    <select name="Salesman" id="Salesman" class="form-control">
                        <%=salesmanOptions(-1)%>
                    </select>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">归属客服人员</span>
                    <select name="SupportStaff" id="SupportStaff" class="form-control">
                        <%=supportStaffOptions(-1)%>
                    </select>
            </div>
        </div>
@@ -567,19 +592,21 @@
                    <th>客户账号
                    </th>
                    <th>公司名称</th>
                    <th>客户名称
                    <th>联系人
                    </th>
                    <th>联系电话
                    </th>
                    <th>账户余额
                    <th>账户余额(元)
                    </th>
                    <th>累计充值
                    <th>累计充值(元)
                    </th>
                    <th>业务员
                    </th>
                    <!--
                    <th>认证状态
                    </th>
                    -->
                    <th>操作
                    </th>
                </tr>
web/web/GwClient.aspx.cs
@@ -8,12 +8,15 @@
using Dao;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
public partial class _GwClient : PageBase<SysUser>, IRequiresSessionState
{
    protected List<SysUser> SysUserList;
    protected List<GwProduct> GwProductList;
    string addressClasses = ConfigurationManager.AppSettings["addressClasses"];
    protected void Page_Load(object sender, EventArgs e)
    {
@@ -64,9 +67,9 @@
            }
            if (userId == bean.UserID)
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
        }
        return stringBuilder.ToString();
    }
@@ -92,9 +95,9 @@
            }
            if (userId == bean.UserID)
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
        }
        return stringBuilder.ToString();
    }
@@ -120,9 +123,9 @@
            }
            if (userId == bean.UserID)
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
        }
        return stringBuilder.ToString();
    }
@@ -148,9 +151,9 @@
            }
            if (userId == bean.UserID)
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
        }
        return stringBuilder.ToString();
    }
@@ -177,9 +180,9 @@
            }
            if (productId.Equals(bean.Id))
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name);
        }
        return stringBuilder.ToString();
    }
@@ -211,9 +214,9 @@
            }
            if (productId.Equals(bean.Id))
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name);
        }
        return stringBuilder.ToString();
    }
web/web/GwOrder.ashx
@@ -67,7 +67,7 @@
        //Console.WriteLine("List.............[" + context.GetInt("name") + "][" + context.GetInt("classes") + "]");
        string spId = context.GetString("spId");
        string clientId = context.GetString("clientId");
        string clientName = context.GetString("clientName");
        string compay = context.GetString("compay");
        int flag = context.GetInt("flag");
        DateTime startDate = context.GetDateTime("startDate");
        DateTime endDate = context.GetDateTime("endDate");
@@ -78,7 +78,7 @@
            
        string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, "GWC");
        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, clientName, flag, startDate, endDate, pageSize, pageIndex, permissionsSQL, out recordCount);
        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, compay, flag, startDate, endDate, pageSize, pageIndex, permissionsSQL, out recordCount);
        string str1 = "";
        if (list != null && list.Count > 0)
@@ -96,10 +96,10 @@
                //str1 = str1 + "<td>" + bean.ComboId + "</td>";
                str1 = str1 + "<td>" + bean.BasicNum + "</td>";
                str1 = str1 + "<td>" + bean.GivingNum + "</td>";
                str1 = str1 + string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.OrderNumTotal + "</td>";
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.BeforeBalanceNum + "</td>";
                str1 = str1 + "<td>" + bean.Creator + "</td>";
                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
@@ -149,17 +149,18 @@
            {
                ++num;
                str1 += "<tr><td>" + bean.OrderId + "</td>";
                str1 = str1 + "<td>" + bean.SpId + "</td>";
                str1 = str1 + "<td>" + bean.ClientId + "-" + bean.ClientName + "</td>";
                //str1 += "<tr><td>" + bean.OrderId + "</td>";
                str1 = str1 + "<tr><td>" + bean.SpId + "</td>";
                str1 = str1 + "<td>" + bean.ClientId + "</td>";
                str1 = str1 + "<td>" + bean.Company + "</td>";
                str1 = str1 + "<td>" + ProductToName(bean.ProductId) + "</td>";
                //str1 = str1 + "<td>" + bean.ComboId + "</td>";
                str1 = str1 + "<td>" + bean.BasicNum + "</td>";
                str1 = str1 + "<td>" + bean.GivingNum + "</td>";
                str1 = str1 + string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.OrderNumTotal + "</td>";
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.BeforeBalanceNum + "</td>";
                str1 = str1 + "<td>" + bean.Creator + "</td>";
                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
@@ -228,24 +229,25 @@
            {
                ++num;
                str1 += "<tr><td>" + bean.OrderId + "</td>";
                //str1 += "<tr><td>" + bean.OrderId + "</td>";
                str1 = str1 + "<td>" + bean.SpId + "</td>";
                str1 = str1 + "<td>" + bean.ClientId + "-" + bean.ClientName + "</td>";
                str1 = str1 + "<td>" + bean.ClientId + "</td>";
                str1 = str1 + "<td>" + bean.Company + "</td>";
                str1 = str1 + "<td>" + ProductToName(bean.ProductId) + "</td>";
                //str1 = str1 + "<td>" + bean.ComboId + "</td>";
                str1 = str1 + "<td>" + bean.BasicNum + "</td>";
                str1 = str1 + "<td>" + bean.GivingNum + "</td>";
                str1 = str1 + string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.OrderNumTotal + "</td>";
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}元</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.OrderAmountTotal) / new Decimal(1000)));
                str1 = str1 + string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.PayAmount) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.BeforeBalanceNum + "</td>";
                str1 = str1 + "<td>" + bean.Creator + "</td>";
                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
                str1 = str1 + "<td>" + StatusToName(bean.Status) + "</td>";
                //str1 = str1 + "<td>" + bean.Remark + "</td>";
                str1 += "<td  class=\"text-right\">";
                str1 += "<td  class=\"text-center\">";
                str1 += string.Format("<a href=\"javascript:;\" data-orderid=\"{0}\" class=\"action-modal-detail btn  btn-success btn-xs\"><i class=\"fa fa-search\"></i>&nbsp;查看</a> ", (object) bean.OrderId);
                //str1 += string.Format("<a href=\"javascript:;\" data-orderid=\"{0}\" class=\"action-modal-audit btn  btn-success btn-xs\"><i class=\"fa fa-search\"></i>&nbsp;审核</a> ", (object) bean.OrderId);
                //if(bean.Status == 0) {
@@ -830,9 +832,9 @@
        if (classes == -1)
            return string.Empty;
        else if(classes == 0)
            return "0-产品分类";
            return "产品分类";
        else if(classes == 1)
            return "1-产品";
            return "产品";
        return string.Empty;
    }
@@ -843,9 +845,9 @@
        if (isDefault == -1)
            return string.Empty;
        else if(isDefault == 0)
            return "0-个性化";
            return "个性化";
        else if(isDefault == 1)
            return "1-系统默认";
            return "系统默认";
        return string.Empty;
    }
@@ -856,9 +858,9 @@
        if (isEnable == -1)
            return string.Empty;
        else if(isEnable == 0)
            return "0-停用";
            return "停用";
        else if(isEnable == 1)
            return "1-启用";
            return "启用";
        return string.Empty;
    }
@@ -880,15 +882,15 @@
        if (status == -1)
            return string.Empty;
        else if(status == 0)
            return "0-待审核(已提交)";
            return "待审核(已提交)";
        else if(status == 1)
            return "1-审核中";
            return "审核中";
        else if(status == 2)
            return "2-审核通过";
            return "审核通过";
        else if(status == 3)
            return "3-审核不通过";
            return "审核不通过";
        else if(status == 4)
            return "4-取消";
            return "取消";
        return string.Empty;
    }
web/web/GwOrderAudit.aspx
@@ -9,14 +9,14 @@
        function loadPageList() {
            var clientId = $("#ClientId").val();
            var clientName = $("#ClientName").val();
            var compay = $("#Compay").val();
            var spId = $("#SpId").val();
            var startDate = $("#StartTime").val();
            var endDate = $("#EndTime").val();
            $.ajax({
                url: "GwOrder.ashx",
                type: "POST",
                data: { action: "listAudit", clientId: clientId, clientName: clientName, spId: spId, startDate: startDate, endDate: endDate, flag: 0, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                data: { action: "listAudit", clientId: clientId, compay: compay, spId: spId, startDate: startDate, endDate: endDate, flag: 0, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                success: function (result) {
                    if (result.OK) {
                        $("#orderTable tbody").html(result.Message.Table);
@@ -205,8 +205,8 @@
            </div>
            <div class="form-group">
                <div class="input-group m-b">
                    <span class="input-group-addon">客户名称</span>
                    <input type="text" name="ClientName" id="ClientName" class="form-control col-md-2" />
                    <span class="input-group-addon">公司名称</span>
                    <input type="text" name="Compay" id="Compay" class="form-control col-md-2" />
                </div>
            </div>
            <div class="form-group">
@@ -236,24 +236,28 @@
        <table class="table table-striped table-bordered table-hover" id="orderTable">
            <thead>
                <tr class="header">
                    <!--
                    <th>订单ID
                    </th>
                    <th>账号ID
                    -->
                    <th>短信账号
                    </th>
                    <th>客户ID
                    <th>客户账号
                    </th>
                    <th>产品ID
                    <th>公司名称
                    </th>
                    <th>产品名称
                    </th>
                    <%--<th>套餐ID
                    </th>
                         --%>
                    <th>订单基本条数
                    <th>订单基本条数(条)
                    </th>
                    <th>订单赠送条数
                    <th>订单赠送条数(条)
                    </th>
                    <th>单价(元/条)
                    </th>
                    <th>订单总条数
                    <th>订单总条数(条)
                    </th>
                    <th>订单总金额(元)
                    </th>
@@ -267,7 +271,7 @@
                    </th>
                    <th>状态
                    </th>
                    <th class="text-right">操作
                    <th class="text-center">操作
                    </th>
                </tr>
            </thead>
@@ -301,14 +305,14 @@
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                账号ID</label>
                                短信账号</label>
                            <div class="col-sm-4 ">
                                <input type="text" class="form-control" name="spId" id="spId" value="" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                客户ID</label>
                                客户账号</label>
                            <div class="col-sm-4 ">
                                <select name="clientId" id="clientId" class="form-control">
                                    <%=GetClientOptions("0")%>
@@ -317,7 +321,7 @@
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                产品ID</label>
                                产品名称</label>
                            <div class="col-sm-4 ">
                                <select name="productId" id="productId" class="form-control">
                                    <%=GetProductOptions("0")%>
web/web/GwOrderComplete.aspx
@@ -9,14 +9,14 @@
        function loadPageList() {
            var clientId = $("#ClientId").val();
            var clientName = $("#ClientName").val();
            var compay = $("#Compay").val();
            var spId = $("#SpId").val();
            var startDate = $("#StartTime").val();
            var endDate = $("#EndTime").val();
            $.ajax({
                url: "GwOrder.ashx",
                type: "POST",
                data: { action: "listComplete", clientId: clientId, clientName: clientName, spId: spId, startDate: startDate, endDate: endDate, flag: 1, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                data: { action: "listComplete", clientId: clientId, compay: compay, spId: spId, startDate: startDate, endDate: endDate, flag: 1, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                success: function(result) {
                    if (result.OK) {
                        $("#orderTable tbody").html(result.Message.Table);
@@ -99,13 +99,13 @@
            </div>
            <div class="form-group">
                <div class="input-group m-b">
                    <span class="input-group-addon">客户名称</span>
                    <input type="text" name="ClientName" id="ClientName" class="form-control col-md-2" />
                    <span class="input-group-addon">公司名称</span>
                    <input type="text" name="Compay" id="Compay" class="form-control col-md-2" />
                </div>
            </div>
            <div class="form-group">
                <div class="input-group m-b">
                    <span class="input-group-addon">SP账号</span>
                    <span class="input-group-addon">短信账号</span>
                    <input type="text" name="SpId" id="SpId" class="form-control col-md-2" />
                </div>
            </div>
@@ -130,24 +130,28 @@
        <table class="table table-striped table-bordered table-hover" id="orderTable">
            <thead>
                <tr class="header">
                    <!--
                    <th>订单ID
                    </th>
                    <th>账号ID
                    -->
                    <th>短信账号
                    </th>
                    <th>客户ID
                    <th>客户账号
                    </th>
                    <th>产品ID
                    <th>公司名称
                    </th>
                    <th>产品名称
                    </th>
                    <%--<th>套餐ID
                    </th>
                         --%>
                    <th>订单基本条数
                    <th>订单基本条数(条)
                    </th>
                    <th>订单赠送条数
                    <th>订单赠送条数(条)
                    </th>
                    <th>单价(元/条)
                    </th>
                    <th>订单总条数
                    <th>订单总条数(条)
                    </th>
                    <th>订单总金额(元)
                    </th>
@@ -161,7 +165,7 @@
                    </th>
                    <th>状态
                    </th>
                    <th class="text-right">操作
                    <th class="text-center">操作
                    </th>
                </tr>
            </thead>
@@ -195,14 +199,14 @@
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                账号ID</label>
                                短信账号</label>
                            <div class="col-sm-4 ">
                                <input type="text" class="form-control" name="spId" id="spId" value="" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                客户ID</label>
                                客户账号</label>
                            <div class="col-sm-4 ">
                                <select name="clientId" id="clientId" class="form-control">
                                    <%=GetClientOptions("0")%>
@@ -211,7 +215,7 @@
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                产品ID</label>
                                产品名称</label>
                            <div class="col-sm-4 ">
                                <select name="productId" id="productId" class="form-control">
                                    <%=GetProductOptions("0")%>
web/web/GwProduct.ashx
@@ -87,12 +87,12 @@
                //str1 = str1 + "<td>" + (object)this.ClassesToName(bean.Classes) + "</td>";
                if (bean.RouterType == 1)
                {
                    str1 += "<td rowspan=\"1\"><div class=\"btn  btn-primary btn-xs\">点路由</div>";
                    str1 += "<td rowspan=\"1\"><span class='label label-primary'>通道</span>";
                    str1 += string.Format("<div>移动:{0}</div><div>电信:{1}</div><div>联通:{2}</div>", (object)this.GetOpName(bean.CmOpId), (object)this.GetOpName(bean.CtOpId), (object)this.GetOpName(bean.CuOpId));
                }
                else if (bean.RouterType == 3)
                {
                    str1 += "<td rowspan=\"1\"><div class=\"btn  btn-success  btn-xs\">组路由</div>";
                    str1 += "<td rowspan=\"1\"><span class='label label-success'>通道组</span>";
                    str1 += string.Format("<div>移动:{0}</div><div>电信:{1}</div><div>联通:{2}</div>", (object)this.GetGroupName(bean.CmGroupid), (object)this.GetGroupName(bean.CtGroupid), (object)this.GetGroupName(bean.CuGroupid));
                }
                else
@@ -117,7 +117,7 @@
                          "</td>"
                });
                str1 += string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 += string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000)));
                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
                str1 = string.Concat(new object[4]
                {
@@ -126,7 +126,7 @@
                         bean.Instructions,
                         "</td>"
                });
                str1 += "<td  class=\"text-right\">";
                str1 += "<td  class=\"text-center \">";
                str1 = bean.IsEnable != 0 ? str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"0\" class=\"action-update-status btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i>&nbsp;停用</a> ", (object) bean.Id ) : str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"1\" class=\"action-update-status btn  btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i>&nbsp;启用</a> ", (object) bean.Id );
                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-modal-edit btn  btn-success btn-xs\"><i class=\"fa fa-edit\"></i>&nbsp;编辑</a> ", (object) bean.Id);
                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-delete btn  btn-default btn-xs\"><i class=\"fa fa-trash\"></i>&nbsp;删除</a> ", (object) bean.Id);
@@ -176,7 +176,7 @@
                str1 = str1 + "<td>" + bean.CreateTime + "</td>";
                str1 = str1 + "<td>" + bean.Remark + "</td>";
                str1 += "<td  class=\"text-right\">";
                str1 += "<td  class=\"text-center\">";
                str1 = bean.IsEnable != 0 ? str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"0\" class=\"action-update-status btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i>&nbsp;停用</a> ", (object) bean.Id ) : str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"1\" class=\"action-update-status btn  btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i>&nbsp;启用</a> ", (object) bean.Id );
                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-modal-edit btn  btn-success btn-xs\"><i class=\"fa fa-edit\"></i>&nbsp;编辑</a> ", (object) bean.Id);
                str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-delete btn  btn-default btn-xs\"><i class=\"fa fa-trash\"></i>&nbsp;删除</a> ", (object) bean.Id);
@@ -760,9 +760,9 @@
        if (classes == -1)
            return string.Empty;
        else if(classes == 0)
            return "0-产品分类";
            return "产品分类";
        else if(classes == 1)
            return "1-产品";
            return "产品";
        return string.Empty;
    }
@@ -773,9 +773,9 @@
        if (isDefault == -1)
            return string.Empty;
        else if(isDefault == 0)
            return "0-个性化";
            return "<span class='label label-warning'>个性化</span>";
        else if(isDefault == 1)
            return "1-系统默认";
            return "<span class='label label-success'>系统默认</span>";
        return string.Empty;
    }
@@ -786,9 +786,9 @@
        if (isEnable == -1)
            return string.Empty;
        else if(isEnable == 0)
            return "0-停用";
            return "<span class='label label-default'>已停用</span>";
        else if(isEnable == 1)
            return "1-启用";
            return "<span class='label label-primary'>已启用</span>";
        return string.Empty;
    }
web/web/GwProduct.aspx
@@ -162,10 +162,21 @@
            //data的属性参数不能含有大写字母。
            var id = $(this).data("id");
            var isEnable = $(this).data("is_enable");
            var statusStr = "";
            if (isEnable == 0) {
                statusStr = "【停用】";
            }
            else {
                statusStr = "【启用】";
            }
            mytek.confirm("是否需要" + statusStr + "该信息?", "确认更新信息状态,请谨慎操作!", function (b) {
                if (b) {
            $.post("gwProduct.ashx", { "action": "updateStatus", id: id, isEnable: isEnable }, function (r) {
                mytek.alert(r.Message, r.OK, function () {
                    loadPageList();
                });
                    });
                }
            });
        });
@@ -236,13 +247,13 @@
                    </th>
                    <th>产品类别
                    </th>
                    <th>名称
                    <th>产品名称
                    </th>
                    <!--
                    <th>类别
                    </th>
                        -->
                    <th>通道
                    <th>通道或通道组
                    </th>
                    <th>是否默认
                    </th>
@@ -254,13 +265,13 @@
                    -->
                    <th>赠送条数
                    </th>
                    <th>参考单价
                    <th>参考单价(元/条)
                    </th>
                    <th>创建时间
                    </th>
                    <th>使用说明
                    </th>
                    <th class="text-right">操作
                    <th class="text-center">操作
                    </th>
                </tr>
            </thead>
@@ -299,7 +310,7 @@
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                父级分类ID</label>
                                父级分类</label>
                            <div class="col-sm-4 ">
                                <select name="parentId" id="parentId" class="form-control">
                                    <%=GetProductClassOptions("0")%>
@@ -371,18 +382,16 @@
                            <label class="col-sm-2 control-label">
                                排序</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="sort" id="sort" value=""
                                        maxlength="5" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')"
                                        oncontextmenu="return false" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group classes-span classes-span-1">
                            <label class="col-sm-2 control-label">
                                通道路由</label>
                            <div class="col-sm-10">
                                 <select name="RouterType" id="RouterType">
                            <div class="col-sm-4">
                                 <select name="RouterType" id="RouterType" class="form-control">
                                    <option value="1" >指定通道路由</option>
                                    <option value="3" >通道组路由模式</option>
                                </select>
@@ -392,24 +401,35 @@
                                <div style="padding: 5px">
                                    移动:<select name="cmOpId" id="cmOpId">
                                         <%=GetOpOptions(0)%>
                                    </select>&nbsp;&nbsp; 扩展参数:<input type="text" name="cmExtParams" id="cmExtParams" maxlength="600"
                                    </select>
                                    <!--
                                    &nbsp;&nbsp; 扩展参数:<input type="text" name="cmExtParams" id="cmExtParams" maxlength="600"
                                        value="" style="width: 50%;" placeholder="移动扩展参数" />
                                        -->
                                </div>
                                <div style="padding: 5px">
                                    联通:<select name="cuOpId" id="cuOpId">
                                         <%=GetOpOptions(0)%>
                                     </select>&nbsp;&nbsp; 扩展参数:<input type="text" name="cuExtParams" id="cuExtParams" maxlength="600"
                                     </select>
                                    <!--
                                    &nbsp;&nbsp; 扩展参数:<input type="text" name="cuExtParams" id="cuExtParams" maxlength="600"
                                        value="" style="width: 50%;" placeholder="联通扩展参数" />
                                        -->
                                </div>
                                <div style="padding: 5px">
                                    电信:<select name="ctOpId" id="ctOpId"> 
                                           <%=GetOpOptions(0)%>
                                    </select>&nbsp;&nbsp; 扩展参数:<input type="text" name="ctExtParams" id="ctExtParams" maxlength="600"
                                    </select>
                                    <!--
                                    &nbsp;&nbsp; 扩展参数:<input type="text" name="ctExtParams" id="ctExtParams" maxlength="600"
                                        value="" style="width: 50%;" placeholder="电信扩展参数" />
                                        -->
                                </div>
                                    <!--
                                <span class="help-block m-b-none">CMPP2.0,CMPP3.0协议支持扩展参数有:SERVICEID(服务代码/业务代码(最长10位)),FEECODE(费用代码(最长6位)),FEETYPE(费用类型),FEEUSERTYPE,FEETERMINALID(计费号码)
                                    SGIP支持扩展参数有:SERVICETYPE(业务代码(最长10位)),CHARGENUMBER(计费号码(最长21位)),FEEVALUE(收费值(最长6位)),GIVENVALUE,NODEID(节点(最长6位)),CONNTIMEOUT(连接超时)
                                    SMGP支持扩展参数有:SERVICEID(服务代码/业务代码(最长10位)),FIXEDFEE(包月费/封顶费(最长6位)),FEECODE(费用代码/资费代码(最大6位));</span>
                                        -->
                            </div>
                            <div class="router-type-span router-type-span-3">
                                <div style="padding: 5px">
@@ -441,7 +461,7 @@
                                参考单价</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="price" id="price" value="" maxlength="5"
                                    <input type="text" class="form-control" name="price" id="price" value="" maxlength="10"
                                        onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')"
                                        oncontextmenu="return false" /><span class="input-group-addon">元/条 </span>
                                </div>
@@ -452,7 +472,7 @@
                                默认赠送条数</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="5"
                                    <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="10"
                                        onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')"
                                        oncontextmenu="return false" /><span class="input-group-addon">条 </span>
                                </div>
@@ -461,8 +481,8 @@
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                备注</label>
                            <div class="col-sm-10 input-group m-b">
                                <input type="text" class="form-control" name="remark" id="remark" value="" />
                            <div class="col-sm-4">
                                <textarea class="form-control" name="remark" id="remark" rows="4" ></textarea>
                            </div>
                        </div>
                    </div>
web/web/GwProduct.aspx.cs
@@ -105,9 +105,9 @@
            }
            if (productId.Equals(bean.Id) )
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name);
            else
                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name);
        }
        return stringBuilder.ToString();
    }
web/web/GwSpPrePattern.aspx
@@ -146,7 +146,7 @@
                if (idArray.length == 0) {
                    idArray.push(patternID);
                    if (idArray.length == 0) {
                        mytek.alert("请选择要修改的账号!", false);
                        mytek.alert("请选择要修改的短信账号!", false);
                        return;
                    }
                }
@@ -224,11 +224,11 @@
    <div class="listCanvas">
        <div class="ibox">
            <div class="input-group m-b">
                <span class="input-group-addon">客户ID</span>
                <span class="input-group-addon">客户账号</span>
                <input type="text" name="ClientID" id="ClientID" class="form-control col-md-2" />
            </div>
            <div class="input-group m-b">
                <span class="input-group-addon">SPID</span>
                <span class="input-group-addon">短信账号</span>
                <input type="text" name="SpID" id="SpID" class="form-control col-md-2" />
            </div>
            <div class="input-group m-b">
@@ -245,10 +245,10 @@
                    <input type="checkbox" name="check-all-row" id="check-all-row" value="" />
                </th>
                <th class="col-md-1">
                    客户ID
                    客户账号
                </th>
                <th class="col-md-1">
                    SPID
                    短信账号
                </th>
                <th class="col-md-5">
                    报备内容
web/web/GwStatisProfit.aspx
@@ -153,6 +153,7 @@
                            周报表</option> --%>
                    
                            
                    </select>
                </div>
            </div>            
web/web/web.config
@@ -19,11 +19,16 @@
    <!--客户端IP和端口-->
    <add key="serverIp" value="8.129.227.30"/>
    <add key="clientPort" value="8888"/>
    <add key="connectionString" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=8.129.227.30)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID=SMGW)));User ID=smgw;Password=smgw2018"/>
    <!--IP转换地址返回的类别:0-全地址,1-国家编码, 2-国家,3-地区编码,4-地区名称,5-城市名称-->
    <add key="addressClasses" value="3"/>
      <!--初始密码:用于系统用户,客户-->
      <add key="initPwd" value="123456"/>
      <!--
    <add key="connectionString" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=8.129.227.30)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID=SMGW)));User ID=smgwtest;Password=smgwtest"/>
    <add key="connectionString" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=8.129.227.30)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID=SMGW)));User ID=smgw;Password=smgw2018"/>
-->
    <add key="connectionString" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=8.129.227.30)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID=SMGW)));User ID=smgwtest;Password=smgwtest"/>
</appSettings>
  <connectionStrings/>
  <system.web>