| | |
| | | </site> |
| | | <site name="web" id="2"> |
| | | <application path="/" applicationPool="Clr4IntegratedAppPool"> |
| | | <virtualDirectory path="/" physicalPath="D:\Company\SMGW_NewWeb\web\web" /> |
| | | <virtualDirectory path="/" physicalPath="C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\web" /> |
| | | </application> |
| | | <bindings> |
| | | <binding protocol="http" bindingInformation="*:60960:localhost" /> |
| | |
| | | 73d59a519d75fba02045f94dbe09df43d113619d |
| | | 148a124d533dab517de60d4081ee6b355ffb0769 |
| | |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.dll |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.pdb |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\App_Code.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\App_Code.pdb |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Aspose.Cells.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Dao.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\bin\Debug\Ionic.Zip.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.CoreCompileInputs.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.CopyComplete |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.pdb |
| | |
| | | <Compile Include="GwSpDao.cs" /> |
| | | <Compile Include="SpSignatureInfo.cs" /> |
| | | <Compile Include="SysOperationLogDao.cs" /> |
| | | <Compile Include="SysXhDao.cs" /> |
| | | <Compile Include="UserDao.cs" /> |
| | | <Compile Include="GwAlarmDao.cs" /> |
| | | <Compile Include="GwAuditCacheDao.cs" /> |
| | |
| | | /// <summary> |
| | | /// 产品操作 |
| | | /// </summary> |
| | | public class GwProductDao |
| | | public class GwProductDao : IDisposable |
| | | { |
| | | public void Dispose() |
| | | { |
| | | } |
| | | |
| | | private static GwProductDao _instance; |
| | | public static GwProductDao Instance |
| | |
| | | } |
| | | return _instance; |
| | | } |
| | | } |
| | | |
| | | |
| | | public List<GwProduct> LoadInfoList(int classes, string name, int pageSize, int PageIndex, out int recordcount) |
| | | { |
| | | |
| | | List<GwProduct> list = new List<GwProduct>(); |
| | | recordcount = 0; |
| | | try |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.Append("from GW_PRODUCT where 1=1"); |
| | | if (classes == -1) |
| | | { |
| | | builder.Append(" AND (CLASSES != " + classes + " OR CLASSES IS NULL) " ); |
| | | } |
| | | else |
| | | { |
| | | builder.Append(" AND CLASSES = " + classes + " "); |
| | | } |
| | | if ((name != null) && (name != "")) |
| | | { |
| | | builder.Append(" and name like '%" + name + "%'"); |
| | | } |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("select count(*) as count " + builder.ToString(), OracleHelper.Connection)) |
| | | { |
| | | while (reader.Read()) |
| | | { |
| | | recordcount = this.ReadCount(reader); |
| | | } |
| | | } |
| | | using (OracleDataReader reader2 = OracleHelper.ExecuteReader(PubConstant.doOracleSql(PageIndex, pageSize, recordcount, "select * " + builder.ToString()).ToString() + " order by path, sort ", OracleHelper.Connection )) |
| | | { |
| | | while (reader2.Read()) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (this.ReadInfo(reader2, o)) |
| | | { |
| | | list.Add(o); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | LogHelper.Error(exception); |
| | | return list; |
| | | } |
| | | return list; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取产品及产品分类列表 |
| | | /// </summary> |
| | | /// <param name="clientID"></param> |
| | | /// <returns></returns> |
| | | public List<GwProduct> GwProductList(int classes, string name ) |
| | | { |
| | | List<GwProduct> list = new List<GwProduct>(); |
| | | //recordcount = 0; // |
| | | try |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("SELECT * FROM GW_PRODUCT WHERE CLASSES=:CLASSES AND NAME=:NAME ORDER BY ID "); |
| | | OracleParameter[] oracleParameterArray = new OracleParameter[2] |
| | | { |
| | | new OracleParameter(":CLASSES", (object) classes), new OracleParameter(":NAME", (object) ("%" + name + "%")) |
| | | }; |
| | | |
| | | |
| | | //using (OracleDataReader reader = OracleHelper.ExecuteReader("select count(*) as count " + builder.ToString(), OracleHelper.Connection, cmdParms)) |
| | | //{ |
| | | // while (reader.Read()) |
| | | // { |
| | | // recordcount = this.ReadCount(reader); |
| | | // } |
| | | //} |
| | | |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(stringBuilder.ToString() +" order by path, sort ", OracleHelper.Connection, oracleParameterArray)) |
| | | { |
| | | while (((DbDataReader)reader).Read()) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (this.ReadInfo(reader, o)) |
| | | list.Add(o); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error(ex); |
| | | return list; |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | //根据条件获取产品或产品分类的ID和名称 |
| | | public List<GwProduct> getAllList(GwProduct bean) |
| | | { |
| | | |
| | | List<GwProduct> list = new List<GwProduct>(); |
| | | try |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.Append("from GW_PRODUCT where 1=1"); |
| | | if (bean.Classes == -1) |
| | | { |
| | | builder.Append(" AND (CLASSES != " + bean.Classes + " OR CLASSES IS NULL) "); |
| | | } |
| | | else |
| | | { |
| | | builder.Append(" AND CLASSES = " + bean.Classes + " "); |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(bean.ParentId) ) |
| | | { |
| | | builder.Append(" AND PARENT_ID = " + bean.ParentId + " "); |
| | | } |
| | | |
| | | if (bean.IsDefault == -1) |
| | | { |
| | | builder.Append(" AND (IS_DEFAULT != " + bean.IsDefault + " OR IS_DEFAULT IS NULL) "); |
| | | } |
| | | else |
| | | { |
| | | builder.Append(" AND IS_DEFAULT = " + bean.IsDefault + " "); |
| | | } |
| | | |
| | | if (bean.IsEnable == -1) |
| | | { |
| | | builder.Append(" AND (IS_ENABLE != " + bean.IsEnable + " OR IS_ENABLE IS NULL) "); |
| | | } |
| | | else |
| | | { |
| | | builder.Append(" AND IS_ENABLE = " + bean.IsEnable + " "); |
| | | } |
| | | |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("select id, name, classes, is_enable, is_default " + builder.ToString() + " order by path, sort ", OracleHelper.Connection)) |
| | | { |
| | | while (reader.Read()) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (this.ReadInfo(reader, o)) |
| | | { |
| | | list.Add(o); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | LogHelper.Error(exception); |
| | | return list; |
| | | } |
| | | return list; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | //添加产品或产品分类信息 |
| | | public bool Add(GwProduct o) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("INSERT INTO GW_PRODUCT ( "); |
| | | stringBuilder.Append(" ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, ROUTER_TYPE, CM_OP_ID, CU_OP_ID, CT_OP_ID "); |
| | | stringBuilder.Append(" , CM_GROUPID, CU_GROUPID, CT_GROUPID, CM_EXT_PARAMS, CU_EXT_PARAMS, CT_EXT_PARAMS, PRICE, GIVING_NUM, REMARK, CREATE_TIME, CREATOR " ); |
| | | //stringBuilder.Append(" , UPDATE_TIME, UPDATEOR "); |
| | | stringBuilder.Append(" ) "); |
| | | stringBuilder.Append(" VALUES (:ID, :NAME, :ICON, :INSTRUCTIONS, :CLASSES, :PARENT_ID, :PATH, :IS_DEFAULT, :IS_ENABLE, :SORT, :ROUTER_TYPE, :CM_OP_ID, :CU_OP_ID, :CT_OP_ID " ); |
| | | stringBuilder.Append(" , :CM_GROUPID, :CU_GROUPID, :CT_GROUPID, :CM_EXT_PARAMS, :CU_EXT_PARAMS, :CT_EXT_PARAMS, :PRICE, :GIVING_NUM, :REMARK, :CREATE_TIME, :CREATOR " ); |
| | | //stringBuilder.Append(" , :UPDATE_TIME, :UPDATEOR "); |
| | | stringBuilder.Append(" ) "); |
| | | |
| | | string sql = stringBuilder.ToString(); |
| | | |
| | | return OracleHelper.ExecuteSql(sql, |
| | | OracleHelper.Connection, |
| | | new OracleParameter(":ID", (object)o.Id), |
| | | new OracleParameter(":NAME", (object)o.Name), |
| | | new OracleParameter(":ICON", (object)o.Icon), |
| | | new OracleParameter(":INSTRUCTIONS", (object)o.Instructions), |
| | | new OracleParameter(":CLASSES", (object)o.Classes), |
| | | new OracleParameter(":PARENT_ID", (object)o.ParentId), |
| | | new OracleParameter(":PATH", (object)o.Path), |
| | | new OracleParameter(":IS_DEFAULT", (object)o.IsDefault), |
| | | new OracleParameter(":IS_ENABLE", (object)o.IsEnable), |
| | | new OracleParameter(":SORT", (object)o.Sort), |
| | | new OracleParameter(":ROUTER_TYPE", (object)o.RouterType), |
| | | new OracleParameter(":CM_OP_ID", (object)o.CmOpId), |
| | | new OracleParameter(":CU_OP_ID", (object)o.CuOpId), |
| | | new OracleParameter(":CT_OP_ID", (object)o.CtOpId), |
| | | new OracleParameter(":CM_GROUPID", (object)o.CmGroupid), |
| | | new OracleParameter(":CU_GROUPID", (object)o.CuGroupid), |
| | | new OracleParameter(":CT_GROUPID", (object)o.CtGroupid), |
| | | new OracleParameter(":CM_EXT_PARAMS", (object)o.CmExtParams), |
| | | new OracleParameter(":CU_EXT_PARAMS", (object)o.CuExtParams), |
| | | new OracleParameter(":CT_EXT_PARAMS", (object)o.CtExtParams), |
| | | new OracleParameter(":PRICE", (object)o.Price), |
| | | new OracleParameter(":GIVING_NUM", (object)o.GivingNum), |
| | | new OracleParameter(":REMARK", (object)o.Remark), |
| | | new OracleParameter(":CREATE_TIME", (object)o.CreateTime), |
| | | new OracleParameter(":CREATOR", (object)o.Creator) |
| | | //, new OracleParameter(":UPDATE_TIME", (object)o.UpdateTime) |
| | | //, new OracleParameter(":UPDATEOR", (object)o.Updateor) |
| | | ) > 0; |
| | | } |
| | | |
| | | //删除 |
| | | public bool Delete(string id) |
| | | { |
| | | if (string.IsNullOrEmpty(id) ) |
| | | return false; |
| | | return OracleHelper.ExecuteSql("delete from GW_PRODUCT where ID=:ID", OracleHelper.Connection, new OracleParameter(":ID", (object)id)) > 0; |
| | | } |
| | | |
| | | //更新产品或产品分类信息 |
| | | public bool Update(GwProduct o) |
| | | { |
| | | OracleParameter[] cmdParms = new OracleParameter[] { |
| | | new OracleParameter(":ID", (object)o.Id), |
| | | new OracleParameter(":NAME", (object)o.Name), |
| | | new OracleParameter(":ICON", (object)o.Icon), |
| | | new OracleParameter(":INSTRUCTIONS", (object)o.Instructions), |
| | | new OracleParameter(":CLASSES", (object)o.Classes), |
| | | new OracleParameter(":PARENT_ID", (object)o.ParentId), |
| | | new OracleParameter(":PATH", (object)o.Path), |
| | | new OracleParameter(":IS_DEFAULT", (object)o.IsDefault), |
| | | new OracleParameter(":IS_ENABLE", (object)o.IsEnable), |
| | | new OracleParameter(":SORT", (object)o.Sort), |
| | | new OracleParameter(":ROUTER_TYPE", (object)o.RouterType), |
| | | new OracleParameter(":CM_OP_ID", (object)o.CmOpId), |
| | | new OracleParameter(":CU_OP_ID", (object)o.CuOpId), |
| | | new OracleParameter(":CT_OP_ID", (object)o.CtOpId), |
| | | new OracleParameter(":CM_GROUPID", (object)o.CmGroupid), |
| | | new OracleParameter(":CU_GROUPID", (object)o.CuGroupid), |
| | | new OracleParameter(":CT_GROUPID", (object)o.CtGroupid), |
| | | new OracleParameter(":CM_EXT_PARAMS", (object)o.CmExtParams), |
| | | new OracleParameter(":CU_EXT_PARAMS", (object)o.CuExtParams), |
| | | new OracleParameter(":CT_EXT_PARAMS", (object)o.CtExtParams), |
| | | new OracleParameter(":PRICE", (object)o.Price), |
| | | new OracleParameter(":GIVING_NUM", (object)o.GivingNum), |
| | | new OracleParameter(":REMARK", (object)o.Remark), |
| | | //new OracleParameter(":CREATE_TIME", (object)o.CreateTime), |
| | | //new OracleParameter(":CREATOR", (object)o.Creator), |
| | | new OracleParameter(":UPDATE_TIME", (object)o.UpdateTime), |
| | | new OracleParameter(":UPDATEOR", (object)o.Updateor) |
| | | }; |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("UPDATE GW_PRODUCT SET "); |
| | | stringBuilder.Append(" NAME=:NAME "); |
| | | stringBuilder.Append(" , ICON =:ICON "); |
| | | stringBuilder.Append(" , INSTRUCTIONS =:INSTRUCTIONS "); |
| | | stringBuilder.Append(" , CLASSES =:CLASSES "); |
| | | stringBuilder.Append(" , PARENT_ID =:PARENT_ID "); |
| | | stringBuilder.Append(" , PATH=:PATH, IS_DEFAULT=:IS_DEFAULT, IS_ENABLE=:IS_ENABLE, SORT=:SORT, ROUTER_TYPE=:ROUTER_TYPE "); |
| | | stringBuilder.Append(" , CM_OP_ID =:CM_OP_ID, CU_OP_ID=:CU_OP_ID, CT_OP_ID=:CT_OP_ID "); |
| | | stringBuilder.Append(" , CM_GROUPID=:CM_GROUPID, CU_GROUPID=:CU_GROUPID, CT_GROUPID=:CT_GROUPID, CM_EXT_PARAMS=:CM_EXT_PARAMS "); |
| | | stringBuilder.Append(" , CU_EXT_PARAMS =:CU_EXT_PARAMS, CT_EXT_PARAMS=:CT_EXT_PARAMS, PRICE=:PRICE, GIVING_NUM=:GIVING_NUM, REMARK=:REMARK "); |
| | | //stringBuilder.Append(" , CREATE_TIME =:CREATE_TIME, CREATOR=:CREATOR "); |
| | | stringBuilder.Append(" , UPDATE_TIME=:UPDATE_TIME, UPDATEOR=:UPDATEOR "); |
| | | stringBuilder.Append(" WHERE ID=:ID "); |
| | | |
| | | string sql = stringBuilder.ToString(); |
| | | return (OracleHelper.ExecuteSql(sql, OracleHelper.Connection, cmdParms) > 0); |
| | | } |
| | | |
| | | //获取信息 |
| | | public GwProduct Get(string productId) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (string.IsNullOrEmpty(productId)) |
| | | return o; |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from GW_PRODUCT where ID=:ID"), OracleHelper.Connection, new OracleParameter(":ID", (object)productId))) |
| | | { |
| | | if (((DbDataReader)reader).Read()) |
| | | { |
| | | this.ReadInfo(reader, o); |
| | | return o; |
| | | } |
| | | } |
| | | return o; |
| | | } |
| | | |
| | | //更新启用或停用 |
| | | public bool UpdateStatus(string id, string isEnable) |
| | | { |
| | | if (string.IsNullOrEmpty(id)) |
| | | return false; |
| | | return OracleHelper.ExecuteSql("UPDATE GW_PRODUCT SET IS_ENABLE=:IS_ENABLE where ID=:ID", OracleHelper.Connection, new OracleParameter(":IS_ENABLE", (object)isEnable), new OracleParameter(":ID", (object)id)) > 0; |
| | | } |
| | | |
| | | //更新关联的产品路径PATH |
| | | public bool UpdatePath(string id, string path) |
| | | { |
| | | if (string.IsNullOrEmpty(id)) |
| | | return false; |
| | | if (string.IsNullOrEmpty(path)) |
| | | return false; |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("UPDATE GW_PRODUCT SET PATH = :PATH||','||PARENT_ID "); |
| | | stringBuilder.Append(" WHERE ID IN ( "); |
| | | stringBuilder.Append(" SELECT ID FROM GW_PRODUCT START WITH ID = :ID CONNECT BY PRIOR ID = PARENT_ID "); |
| | | stringBuilder.Append(" ) "); |
| | | stringBuilder.Append(" AND ID NOT IN (:ID) "); |
| | | |
| | | return OracleHelper.ExecuteSql(stringBuilder.ToString(), OracleHelper.Connection, new OracleParameter(":PATH", (object)path), new OracleParameter(":ID", (object)id), new OracleParameter(":ID", (object)id)) > 0; |
| | | } |
| | | |
| | | //判断是否在产品中使用 |
| | | public int GwProductUseCount(string productId) |
| | | { |
| | | string str = string.Format("SELECT count(*) as Count from GW_PRODUCT where PARENT_ID=:PARENT_ID "); |
| | | List<OracleParameter> list = new List<OracleParameter>(); |
| | | int num = 0; |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(str.ToString(), OracleHelper.Connection, new OracleParameter(":PARENT_ID", (object)productId)) ) |
| | | { |
| | | while (((DbDataReader)reader).Read()) |
| | | num = this.ReadCount(reader); |
| | | } |
| | | return num; |
| | | } |
| | | |
| | | //判断是否在客户账号中使用 |
| | | public int GwSpUseCount(string productId) |
| | | { |
| | | string str = string.Format("SELECT count(*) as Count from GW_SP where PRODUCT_ID=:PRODUCT_ID "); |
| | | List<OracleParameter> list = new List<OracleParameter>(); |
| | | int num = 0; |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(str.ToString(), OracleHelper.Connection, new OracleParameter(":PRODUCT_ID", (object)productId))) |
| | | { |
| | | while (((DbDataReader)reader).Read()) |
| | | num = this.ReadCount(reader); |
| | | } |
| | | return num; |
| | | } |
| | | |
| | | //统计记录数 |
| | | private int ReadCount(OracleDataReader reader) |
| | | { |
| | | OracleReaderWrapper wrapper = new OracleReaderWrapper(reader); |
| | | return wrapper.GetInt("count", 0); |
| | | } |
| | | |
| | | //数据封装 |
| | | private bool ReadInfo(OracleDataReader reader, GwProduct o) |
| | | { |
| | | OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader); |
| | | o.Id = oracleReaderWrapper.GetString("ID", ""); |
| | | o.Name = oracleReaderWrapper.GetString("NAME", ""); |
| | | o.Icon = oracleReaderWrapper.GetString("ICON", ""); |
| | | o.Instructions = oracleReaderWrapper.GetString("INSTRUCTIONS", ""); |
| | | o.Classes = oracleReaderWrapper.GetInt("CLASSES", 0); |
| | | o.ParentId = oracleReaderWrapper.GetString("PARENT_ID", ""); |
| | | o.Path = oracleReaderWrapper.GetString("PATH", ""); |
| | | o.IsDefault = oracleReaderWrapper.GetInt("IS_DEFAULT", 0); |
| | | o.IsEnable = oracleReaderWrapper.GetInt("IS_ENABLE", 0); |
| | | o.Sort = oracleReaderWrapper.GetInt("SORT", 0); |
| | | o.RouterType = oracleReaderWrapper.GetInt("ROUTER_TYPE", 0); |
| | | o.CmOpId = oracleReaderWrapper.GetInt("CM_OP_ID", 0); |
| | | o.CuOpId = oracleReaderWrapper.GetInt("CU_OP_ID", 0); |
| | | o.CtOpId = oracleReaderWrapper.GetInt("CT_OP_ID", 0); |
| | | o.CmGroupid = oracleReaderWrapper.GetInt("CM_GROUPID", 0); |
| | | o.CuGroupid = oracleReaderWrapper.GetInt("CU_GROUPID", 0); |
| | | o.CtGroupid = oracleReaderWrapper.GetInt("CT_GROUPID", 0); |
| | | o.CmExtParams = oracleReaderWrapper.GetString("CM_EXT_PARAMS", ""); |
| | | o.CuExtParams = oracleReaderWrapper.GetString("CU_EXT_PARAMS", ""); |
| | | o.CtExtParams = oracleReaderWrapper.GetString("CT_EXT_PARAMS", ""); |
| | | o.Price = oracleReaderWrapper.GetInt("PRICE", 0); |
| | | o.GivingNum = oracleReaderWrapper.GetInt("GIVING_NUM", 0); |
| | | o.Remark = oracleReaderWrapper.GetString("REMARK", ""); |
| | | o.CreateTime = oracleReaderWrapper.GetDateTime("CREATE_TIME"); |
| | | o.Creator = oracleReaderWrapper.GetString("CREATOR", ""); |
| | | o.UpdateTime = oracleReaderWrapper.GetDateTime("UPDATE_TIME"); |
| | | o.Updateor = oracleReaderWrapper.GetString("UPDATEOR", ""); |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | // Decompiled with JetBrains decompiler |
| | | // Type: Dao.SysXhDao |
| | | // Assembly: Dao, Version=3.2.1.428, Culture=neutral, PublicKeyToken=c1a16487c920c3dc |
| | | // MVID: 22E6EB3F-6D25-4B57-BE09-AD2F5391CFA5 |
| | | // Assembly location: C:\Users\Administrator\Desktop\wwww\bin\Dao.dll |
| | | |
| | | using Common; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Oracle.DataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.Common; |
| | | using Model; |
| | | |
| | | namespace Dao |
| | | { |
| | | public class SysXhDao : IDisposable |
| | | { |
| | | |
| | | /** |
| | | * 根据产品ID获取产品信息 |
| | | * API_SP_NOTICE:通知短信API账号生成规则 |
| | | * API_SP_SECURITY_CODE:验证码短信API账号生成规则 |
| | | * API_SP_MARKETING:会员营销短信API账号生成规则 |
| | | * */ |
| | | public string getXh(string xhId) |
| | | { |
| | | SysXh o = new SysXh(); |
| | | if (string.IsNullOrEmpty(xhId) || string.Equals("0", xhId)) |
| | | return null; |
| | | |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from SYS_XH where XH_ID=:XH_ID"), OracleHelper.Connection, new OracleParameter(":XH_ID", (object)xhId))) |
| | | { |
| | | if (reader.RowSize <= 0) |
| | | { |
| | | return "无配置" + xhId + "序号规则"; |
| | | } |
| | | |
| | | //序号组合串 |
| | | string xhStr = ""; |
| | | if (((DbDataReader)reader).Read()) |
| | | { |
| | | this.ReadInfo(reader, o); |
| | | |
| | | //检查序号长度 |
| | | if (o.xhLength == 0 ) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | //检查序号前缀 |
| | | if (!string.IsNullOrEmpty(o.xhPrefix)) |
| | | { |
| | | xhStr += o.xhPrefix; |
| | | } |
| | | |
| | | //检查序号回归规则 |
| | | if (!string.IsNullOrEmpty(o.returnRules)) |
| | | { |
| | | //按年 |
| | | if (string.Equals("Y", o.returnRules) ) |
| | | { |
| | | //当前年不匹配时 |
| | | if (!string.Equals(DateTime.Now.ToString("yyyy"), o.currentReturnStr)) |
| | | { |
| | | o.currentNum = 1; |
| | | } |
| | | else |
| | | { |
| | | o.currentNum += 1; |
| | | } |
| | | //更新当前年 |
| | | o.currentReturnStr = DateTime.Now.ToString("yyyy"); |
| | | } |
| | | //按月 |
| | | else if (string.Equals("M", o.returnRules)) |
| | | { |
| | | //当前年月不匹配时 |
| | | if (!string.Equals(DateTime.Now.ToString("yyyyMM"), o.currentReturnStr)) |
| | | { |
| | | o.currentNum = 1; |
| | | } |
| | | else |
| | | { |
| | | o.currentNum += 1; |
| | | } |
| | | |
| | | //更新当前年月 |
| | | o.currentReturnStr = DateTime.Now.ToString("yyyyMM"); |
| | | } |
| | | //按日 |
| | | else if (string.Equals("D", o.returnRules)) |
| | | { |
| | | //当前年月日不匹配时 |
| | | if (!string.Equals(DateTime.Now.ToString("yyyyMMdd"), o.currentReturnStr)) |
| | | { |
| | | o.currentNum = 1; |
| | | } |
| | | else |
| | | { |
| | | o.currentNum += 1; |
| | | } |
| | | |
| | | //更新当前年月日 |
| | | o.currentReturnStr = DateTime.Now.ToString("yyyyMMdd"); |
| | | } |
| | | |
| | | xhStr += o.currentReturnStr; |
| | | } |
| | | else |
| | | { |
| | | o.currentNum += 1; |
| | | } |
| | | |
| | | string tmpXhStr = ""; |
| | | //判断序号长度 |
| | | if (o.xhLength > (xhStr.Length + o.currentNum.ToString().Length)) |
| | | { |
| | | for (int i = 0; i < (o.xhLength - xhStr.Length - o.currentNum.ToString().Length); i++) |
| | | { |
| | | //序数前补“0” |
| | | tmpXhStr += "0"; |
| | | } |
| | | tmpXhStr += o.currentNum ; |
| | | } |
| | | else if (o.xhLength == (xhStr.Length + o.currentNum.ToString().Length)) |
| | | { |
| | | tmpXhStr = o.currentNum.ToString(); |
| | | } |
| | | else |
| | | { |
| | | //序号溢出 |
| | | return "序号溢出"; |
| | | } |
| | | |
| | | //更新序号 |
| | | update(o); |
| | | |
| | | xhStr += tmpXhStr; |
| | | |
| | | return xhStr; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | public bool update(SysXh o) |
| | | { |
| | | string sql = ""; |
| | | sql += " update SYS_XH set XH_ID=:XH_ID, XH_PREFIX=:XH_PREFIX, RETURN_RULES=:RETURN_RULES, CURRENT_RETURN_STR=:CURRENT_RETURN_STR, CURRENT_NUM=:CURRENT_NUM "; |
| | | sql += " ,XH_LENGTH=:XH_LENGTH, REMARK=:REMARK "; |
| | | sql += " where XH_ID=:XH_ID "; |
| | | |
| | | return OracleHelper.ExecuteSql(sql, OracleHelper.Connection, |
| | | new OracleParameter(":XH_ID", (object)o.xhId), |
| | | new OracleParameter(":XH_PREFIX", (object)o.xhPrefix), |
| | | new OracleParameter(":RETURN_RULES", (object)o.returnRules), |
| | | new OracleParameter(":CURRENT_RETURN_STR", (object)o.currentReturnStr), |
| | | new OracleParameter(":CURRENT_NUM", (object)o.currentNum), |
| | | new OracleParameter(":XH_LENGTH", (object)o.xhLength), |
| | | new OracleParameter(":REMARK", (object)o.remark) |
| | | ) > 0; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 数据转换封装 |
| | | * */ |
| | | private bool ReadInfo(OracleDataReader reader, SysXh sysXh) |
| | | { |
| | | OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader); |
| | | sysXh.xhId = oracleReaderWrapper.GetString("XH_ID", ""); |
| | | sysXh.xhPrefix = oracleReaderWrapper.GetString("XH_PREFIX", ""); |
| | | sysXh.returnRules = oracleReaderWrapper.GetString("RETURN_RULES", ""); |
| | | sysXh.currentReturnStr = oracleReaderWrapper.GetString("CURRENT_RETURN_STR", ""); |
| | | sysXh.xhLength = oracleReaderWrapper.GetInt("XH_LENGTH", 0); |
| | | sysXh.currentNum = oracleReaderWrapper.GetInt("CURRENT_NUM", 0); |
| | | sysXh.remark = oracleReaderWrapper.GetString("remark", ""); |
| | | |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | |
| | | f49ea4d5ec2d8ff937394d4683aa2e9a9d5935d0 |
| | | 2f4ee5a304a64e1617ed59777b36c0169fa3e828 |
| | |
| | | D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CopyComplete |
| | | D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.dll |
| | | D:\Company\SMGW_NewWeb\web\Dao\obj\Debug\Dao.pdb |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Dao.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Dao.pdb |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CoreCompileInputs.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.csproj.CopyComplete |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Dao\obj\Debug\Dao.pdb |
| | |
| | | <Compile Include="Model\GwMobileArea.cs" /> |
| | | <Compile Include="Model\GwMoRoute.cs" /> |
| | | <Compile Include="Model\GwOpGroupItem.cs" /> |
| | | <Compile Include="Model\GwProduct.cs" /> |
| | | <Compile Include="Model\GwRmResend.cs" /> |
| | | <Compile Include="Model\GwSmsTask.cs" /> |
| | | <Compile Include="Model\GwStatisV3.cs" /> |
| | |
| | | <Compile Include="Model\LgSmsTask.cs" /> |
| | | <Compile Include="Model\MessageCenter.cs" /> |
| | | <Compile Include="Model\SysOperationLog.cs" /> |
| | | <Compile Include="Model\SysXh.cs" /> |
| | | <Compile Include="PageHandler.cs" /> |
| | | <Compile Include="PageContext.cs" /> |
| | | <Compile Include="MasterPageBase.cs"> |
New file |
| | |
| | | |
| | | using System; |
| | | |
| | | namespace Model |
| | | { |
| | | public class GwProduct |
| | | { |
| | | public string Id { get; set; } |
| | | |
| | | public string Name { get; set; } |
| | | |
| | | public string Icon { get; set; } |
| | | |
| | | public string Instructions { get; set; } |
| | | |
| | | public int Classes { get; set; } |
| | | |
| | | public string ParentId { get; set; } |
| | | |
| | | public string Path { get; set; } |
| | | |
| | | public int IsDefault { get; set; } |
| | | |
| | | public int IsEnable { get; set; } |
| | | |
| | | public int Sort { get; set; } |
| | | |
| | | public int RouterType { get; set; } |
| | | |
| | | public int CmOpId { get; set; } |
| | | |
| | | public int CuOpId { get; set; } |
| | | |
| | | public int CtOpId { get; set; } |
| | | |
| | | public string CmExtParams { get; set; } |
| | | |
| | | public string CuExtParams { get; set; } |
| | | |
| | | public string CtExtParams { get; set; } |
| | | |
| | | public int CmGroupid { get; set; } |
| | | |
| | | public int CuGroupid { get; set; } |
| | | |
| | | public int CtGroupid { get; set; } |
| | | |
| | | public int Price { get; set; } |
| | | |
| | | public int GivingNum { get; set; } |
| | | |
| | | public string Remark { get; set; } |
| | | |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | public string Creator { get; set; } |
| | | |
| | | public DateTime UpdateTime { get; set; } |
| | | |
| | | public string Updateor { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | using System.Text.RegularExpressions; |
| | | |
| | | namespace Model |
| | | { |
| | | public class SysXh |
| | | { |
| | | public string xhId { get; set; } |
| | | |
| | | public string xhPrefix { get; set; } //序号前缀 |
| | | |
| | | public string returnRules { get; set; } //回归规则:Y-按年、M-按月、D-按日 |
| | | |
| | | public string currentReturnStr { get; set; } //当前回归串 |
| | | |
| | | public int currentNum { get; set; } //当前序数 |
| | | |
| | | public int xhLength { get; set; } //序号长度 |
| | | |
| | | public string remark { get; set; } //备注 |
| | | } |
| | | |
| | | } |
| | |
| | | 39dc77968f868863dd739e41a7700ce06bba8c93 |
| | | 00bfb7d603acc6cb6309f95b0c5c17d4ff8f2b67 |
| | |
| | | D:\Company\SMGW_NewWeb\web\Lib\Model.pdb |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.dll |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb |
| | | <<<<<<< HEAD |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CopyComplete |
| | | ======= |
| | | C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Model.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Lib\Model.pdb |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CoreCompileInputs.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CopyComplete |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb |
| | | >>>>>>> a0bd27679af9591b30aec311b2e7ad4c1ef7357d |
| | |
| | | c546f08e5171d2ea11491af4c442ff223c9bb58c |
| | | 27f9b4fb5d36be9c155fb6557fe17e62c41ec4da |
| | |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CopyComplete |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb |
| | | <<<<<<< HEAD |
| | | ======= |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\UMCLib.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\UMCLib.pdb |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\bin\Debug\Newtonsoft.Json.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.AssemblyReference.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CoreCompileInputs.cache |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CopyComplete |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll |
| | | C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb |
| | | >>>>>>> a0bd27679af9591b30aec311b2e7ad4c1ef7357d |
| | |
| | | |
| | | public class GwAuditCacheHandler : PageHandler<SysUser> |
| | | { |
| | | |
| | | |
| | | //cessssssssssssssssss |
| | | |
| | | |
| | | private GwSpDao _Dao = new GwSpDao(); |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
New file |
| | |
| | | <%@ WebHandler Language="C#" Class="GwProductHandler" %> |
| | | using Dao; |
| | | using Model; |
| | | // using Newtonsoft.Json; |
| | | //using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Text.RegularExpressions; |
| | | using System.Web; |
| | | using System.IO; |
| | | using System.Diagnostics; |
| | | |
| | | public class GwProductHandler : PageHandler<SysUser> |
| | | { |
| | | private GwProductDao _Dao = new GwProductDao(); |
| | | private GwSpDao _GwSpDao = new GwSpDao(); |
| | | private GwOpGroupDao _GwOpGroupDao = new GwOpGroupDao(); |
| | | private SysXhDao _SysXhDao = new SysXhDao(); |
| | | |
| | | private List<GwOp> _OpList; |
| | | private List<GwOpGroup> _GroupList; |
| | | private List<GwProduct> _ProductList; //产品及产品分类 |
| | | //private List<GwProduct> _ProductClassList; //产品分类 |
| | | |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | { |
| | | case "delete": |
| | | return this.Delete(context); //删除 |
| | | case "update": |
| | | return this.Update(context); //修改 |
| | | case "add": |
| | | return this.Add(context); //添加 |
| | | case "list": |
| | | return this.List(context); //查询 |
| | | case "get": |
| | | return this.Get(context); //获取记录信息 |
| | | case "updateStatus": |
| | | return this.UpdateStatus(context); //启用或停用 |
| | | case "upLoad": |
| | | return this.UpLoad(context); //图标文件上传 |
| | | |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | } |
| | | } |
| | | |
| | | //加载产品及产品分类信息 |
| | | private JsonPageResult List(PageContext<SysUser> context) |
| | | { |
| | | //Console.WriteLine("List.............[" + context.GetInt("name") + "][" + context.GetInt("classes") + "]"); |
| | | int classes = context.GetInt("classes"); |
| | | string name = context.GetString("name"); |
| | | |
| | | int recordCount = 0; |
| | | int pageSize = context.GetInt("pageSize", 50); |
| | | int pageIndex = context.GetInt("pageIndex", 1); |
| | | |
| | | List<GwProduct> list = _Dao.LoadInfoList(classes, name, pageSize, pageIndex, out recordCount); |
| | | |
| | | string str1 = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | |
| | | int num = 0; |
| | | foreach (GwProduct bean in list) |
| | | { |
| | | ++num; |
| | | //str1 = str1 + (object) "<tr><td>" + "<img src=\"../static/images/productIcon/" + (object) bean.Icon + "\" >"; |
| | | if (bean.Classes == 1 && !string.IsNullOrEmpty(bean.Icon)) |
| | | { |
| | | str1 += "<tr><td>" + "<img src=\"../static/images/productIcon/" + (object)bean.Icon + "\" >" + "</td>"; |
| | | } |
| | | else |
| | | { |
| | | str1 += "<tr><td>" + (object)bean.Icon + "</td>"; |
| | | } |
| | | |
| | | str1 += "<td>" + bean.Name + "</td>"; |
| | | str1 = string.Concat(new object[4] |
| | | { |
| | | str1, |
| | | "<td>", |
| | | bean.Instructions, |
| | | "</td>" |
| | | }); |
| | | 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 += 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 += 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 |
| | | { |
| | | str1 += "<td rowspan=\"1\"></td>"; |
| | | } |
| | | str1 = str1 + "<td>" + ProductToName(bean.ParentId) + "</td>"; |
| | | str1 = str1 + "<td>" + IsDefaultToName(bean.IsDefault) + "</td>"; |
| | | str1 = str1 + "<td>" + IsEnableToName(bean.IsEnable) + "</td>"; |
| | | str1 = string.Concat(new object[4] |
| | | { |
| | | str1, |
| | | "<td>", |
| | | bean.Sort, |
| | | "</td>" |
| | | }); |
| | | str1 = string.Concat(new object[4] |
| | | { |
| | | str1, |
| | | "<td>", |
| | | bean.GivingNum, //默认赠送条数 |
| | | "</td>" |
| | | }); |
| | | |
| | | str1 += string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000))); |
| | | str1 = str1 + "<td>" + bean.CreateTime + "</td>"; |
| | | str1 += "<td class=\"text-right\">"; |
| | | 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> 停用</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> 启用</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> 编辑</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> 删除</a> ", (object) bean.Id); |
| | | str1 += "</td>"; |
| | | str1 += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str1 += "<tr><td colspan=\"13\" style=\"padding-left:5px; text-align: center;\">暂无信息</td></tr>"; |
| | | |
| | | return new JsonPageResult(true, new |
| | | { |
| | | Table = str1.ToString(), |
| | | TotalCount = recordCount |
| | | }); |
| | | } |
| | | |
| | | //通道运行状态或错误信息 |
| | | private string FormatOpError(int opStatus, int opError, string remark) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (opStatus == 0) |
| | | { |
| | | stringBuilder.Append("<span class=\"label label-default\">已停用</span>"); |
| | | } |
| | | else |
| | | { |
| | | stringBuilder.Append("<a data-html=\"true\" data-content=\"<pre style='width:200px;height:160px;'>" + HttpUtility.HtmlEncode(remark) + "</pre>\" type=\"button\" class=\"btn-xs\" data-trigger=\"click\" data-toggle=\"popover\" data-placement=\"left\">"); |
| | | if (opError == 0) |
| | | stringBuilder.Append("<span class=\"label label-primary\">正常</span>"); |
| | | else if (opError == 5) |
| | | stringBuilder.Append("<span class=\"label label-danger\">异常</span>"); |
| | | else |
| | | stringBuilder.Append("NA"); |
| | | stringBuilder.Append("</a>"); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | public bool IsInt(string input) |
| | | { |
| | | for (int index = 0; index < input.Length; ++index) |
| | | { |
| | | if (!char.IsNumber(input, index)) |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | //删除产品或产品分类 |
| | | private JsonPageResult Delete(PageContext<SysUser> context) |
| | | { |
| | | string ID = context.GetString("id"); |
| | | |
| | | if (this._Dao.GwProductUseCount(ID) > 0) |
| | | throw new ArgumentException("当前产品分类已在产品信息使用中,无法删除!"); |
| | | if (this._Dao.GwSpUseCount(ID) > 0) |
| | | throw new ArgumentException("当前产品在客户账号信息中使用,无法删除!"); |
| | | this._Dao.Delete(ID); |
| | | return new JsonPageResult(true, "删除信息成功!"); |
| | | |
| | | } |
| | | |
| | | //添加产品或产品分类 |
| | | private JsonPageResult Add(PageContext<SysUser> context) |
| | | { |
| | | |
| | | string id = _SysXhDao.getXh("GW_PRODUCT"); //获取生成产品ID |
| | | string name = context.GetString("name"); |
| | | int classes = context.GetInt("classes", -1); |
| | | string icon = ""; |
| | | string instructions = ""; |
| | | int isDefault = 0; |
| | | int sort = 0; |
| | | |
| | | int routerType = 0; |
| | | int cmOpId = 0; |
| | | int cuOpId = 0; |
| | | int ctOpId = 0; |
| | | string cmExtParams = ""; |
| | | string cuExtParams = ""; |
| | | string ctExtParams = ""; |
| | | int cmGroupid = 0; |
| | | int cuGroupid = 0; |
| | | int ctGroupid = 0; |
| | | int price = 0; |
| | | int givingNum = 0; |
| | | |
| | | string info = "" ; |
| | | if (classes == -1) { |
| | | throw new ArgumentException("请选择类别!"); |
| | | } |
| | | else |
| | | { |
| | | if(classes == 1) |
| | | { |
| | | info = "产品"; |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | } |
| | | else if (classes == 0) |
| | | { |
| | | info = "产品分类"; |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | //1-产品;0-分类 |
| | | if (classes==1) |
| | | { |
| | | icon = context.GetString("icon"); |
| | | instructions = context.GetString("instructions"); |
| | | isDefault = context.GetInt("isDefault", 0); |
| | | |
| | | int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 1); |
| | | price = num; |
| | | givingNum = context.GetInt("givingNum", 0); |
| | | sort = context.GetInt("sort", 0); |
| | | |
| | | routerType = context.GetInt("routerType", 1); |
| | | //路由类型:1-通道路由;3-通道组路由。 |
| | | if (routerType==1) |
| | | { |
| | | cmOpId = context.GetInt("cmOpId", 0); |
| | | cuOpId = context.GetInt("cuOpId", 0); |
| | | ctOpId = context.GetInt("ctOpId", 0); |
| | | cmExtParams = context.GetString("cmExtParams"); |
| | | cuExtParams = context.GetString("cuExtParams"); |
| | | ctExtParams = context.GetString("ctExtParams"); |
| | | |
| | | } |
| | | else if (routerType==3) |
| | | { |
| | | cmGroupid = context.GetInt("cmGroupid", 0); |
| | | cuGroupid = context.GetInt("cuGroupid", 0); |
| | | ctGroupid = context.GetInt("ctGroupid", 0); |
| | | |
| | | } |
| | | |
| | | } |
| | | string parentId = context.GetString("parentId", "0"); |
| | | string path = ""; |
| | | if (parentId.Equals("0")) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | int isEnable = context.GetInt("isEnable", 0); |
| | | |
| | | //int price = context.GetInt("price", 0); |
| | | //int givingNum = context.GetInt("givingNum", 0); |
| | | string remark = context.GetString("remark", ""); |
| | | DateTime createTime = DateTime.Now; |
| | | string creator = context.OperatorID; |
| | | //DateTime update_time = context.GetDateTime("update_time"); |
| | | //string updateor = context.GetString("updateor", ""); |
| | | |
| | | //校验 |
| | | if (classes == -1) { |
| | | throw new ArgumentException("请选择类别!"); |
| | | } |
| | | else |
| | | { |
| | | if(string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException("请输入名称!"); |
| | | } |
| | | //产品相关项校验 |
| | | if (classes == 1) |
| | | { |
| | | if (routerType==0 ) |
| | | throw new ArgumentException("请选择路由类型!"); |
| | | if (cmGroupid == 0 && cuGroupid == 0 && ctGroupid == 0 && routerType == 3 && classes==1) |
| | | throw new ArgumentException("至少指定一个通道组!"); |
| | | if (cmOpId == 0 && cuOpId == 0 && ctOpId == 0 && routerType == 1 && classes==1) |
| | | throw new ArgumentException("至少指定一个通道!"); |
| | | if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$")) |
| | | throw new Exception("序号必须为数字"); |
| | | if (!string.IsNullOrEmpty(context.GetString("price")) && !Regex.IsMatch(context.GetString("price"), "^[0-9]*$") && price<=0 ) |
| | | throw new Exception("参考单价不能小于等于0"); |
| | | if (!string.IsNullOrEmpty(context.GetString("givingNum")) && !Regex.IsMatch(context.GetString("givingNum"), "^[0-9]*$")) |
| | | throw new Exception("默认赠送条数必须为整数"); |
| | | } |
| | | //产品相关项校验 |
| | | else if (classes == 0) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | this._Dao.Add(new GwProduct() |
| | | { |
| | | Id = id, |
| | | Name = name, |
| | | Icon = icon, |
| | | Instructions = instructions, |
| | | Classes = classes, |
| | | ParentId = parentId, |
| | | Path = path, |
| | | IsDefault = isDefault, |
| | | IsEnable = isEnable, |
| | | Sort = sort, |
| | | RouterType = routerType, |
| | | CmOpId = cmOpId, |
| | | CuOpId = cuOpId, |
| | | CtOpId = ctOpId, |
| | | CmGroupid = cmGroupid, |
| | | CuGroupid = cuGroupid, |
| | | CtGroupid = ctGroupid, |
| | | CmExtParams = cmExtParams, |
| | | CuExtParams = cuExtParams, |
| | | CtExtParams = ctExtParams, |
| | | Price = price, //单价换算 |
| | | GivingNum = givingNum, |
| | | Remark = remark, |
| | | CreateTime = createTime, |
| | | Creator = creator |
| | | //UpdateTime = update_time, |
| | | //Updateor = updateor |
| | | |
| | | }); |
| | | return new JsonPageResult(true, info + "信息添加成功!"); |
| | | } |
| | | |
| | | //更新产品或产品分类 |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | string id = context.GetString("id"); |
| | | string name = context.GetString("name"); |
| | | int classes = context.GetInt("classes", -1); |
| | | string icon = ""; |
| | | string instructions = ""; |
| | | int isDefault = 0; |
| | | int sort = 0; |
| | | |
| | | int routerType = 0; |
| | | int cmOpId = 0; |
| | | int cuOpId = 0; |
| | | int ctOpId = 0; |
| | | string cmExtParams = ""; |
| | | string cuExtParams = ""; |
| | | string ctExtParams = ""; |
| | | int cmGroupid = 0; |
| | | int cuGroupid = 0; |
| | | int ctGroupid = 0; |
| | | int price = 0; |
| | | int givingNum = 0; |
| | | |
| | | string info = "" ; |
| | | if (classes == -1) { |
| | | throw new ArgumentException("请选择类别!"); |
| | | } |
| | | else |
| | | { |
| | | if(classes == 1) |
| | | { |
| | | info = "产品"; |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | } |
| | | else if (classes == 0) |
| | | { |
| | | info = "产品分类"; |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //1-产品;0-分类 |
| | | if (classes==1) |
| | | { |
| | | icon = context.GetString("icon"); |
| | | instructions = context.GetString("instructions"); |
| | | isDefault = context.GetInt("isDefault", 0); |
| | | |
| | | int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 1); |
| | | price = num; |
| | | givingNum = context.GetInt("givingNum", 0); |
| | | sort = context.GetInt("sort", 0); |
| | | |
| | | routerType = context.GetInt("routerType", 1); |
| | | //路由类型:1-通道路由;3-通道组路由。 |
| | | if (routerType==1) |
| | | { |
| | | cmOpId = context.GetInt("cmOpId", 0); |
| | | cuOpId = context.GetInt("cuOpId", 0); |
| | | ctOpId = context.GetInt("ctOpId", 0); |
| | | cmExtParams = context.GetString("cmExtParams"); |
| | | cuExtParams = context.GetString("cuExtParams"); |
| | | ctExtParams = context.GetString("ctExtParams"); |
| | | |
| | | } |
| | | else if (routerType==3) |
| | | { |
| | | cmGroupid = context.GetInt("cmGroupid", 0); |
| | | cuGroupid = context.GetInt("cuGroupid", 0); |
| | | ctGroupid = context.GetInt("ctGroupid", 0); |
| | | |
| | | } |
| | | |
| | | } |
| | | string parentId = context.GetString("parentId", "0"); |
| | | string path = ""; |
| | | if (parentId.Equals("0")) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | int isEnable = context.GetInt("isEnable", 0); |
| | | |
| | | string remark = context.GetString("remark", ""); |
| | | //DateTime createTime = context.GetDateTime("createTime"); |
| | | //int creator = context.GetInt("creator", 0); |
| | | //DateTime updateTime = context.GetDateTime("updateTime"); |
| | | DateTime updateTime = DateTime.Now; |
| | | string updateor = context.OperatorID; |
| | | |
| | | //校验 |
| | | if (classes == -1) { |
| | | throw new ArgumentException("请选择类别!"); |
| | | } |
| | | else |
| | | { |
| | | if(string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException("请输入名称!"); |
| | | } |
| | | //产品相关项校验 |
| | | if (classes == 1) |
| | | { |
| | | if (routerType==0 ) |
| | | throw new ArgumentException("请选择路由类型!"); |
| | | if (cmGroupid == 0 && cuGroupid == 0 && ctGroupid == 0 && routerType == 3 && classes==1) |
| | | throw new ArgumentException("至少指定一个通道组!"); |
| | | if (cmOpId == 0 && cuOpId == 0 && ctOpId == 0 && routerType == 1 && classes==1) |
| | | throw new ArgumentException("至少指定一个通道!"); |
| | | if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$")) |
| | | throw new Exception("序号必须为数字"); |
| | | if (!string.IsNullOrEmpty(context.GetString("price")) && !Regex.IsMatch(context.GetString("price"), "^[0-9]*$") && price<=0 ) |
| | | throw new Exception("参考单价不能小于等于0"); |
| | | if (!string.IsNullOrEmpty(context.GetString("givingNum")) && !Regex.IsMatch(context.GetString("givingNum"), "^[0-9]*$")) |
| | | throw new Exception("默认赠送条数必须为整数"); |
| | | } |
| | | //产品相关项校验 |
| | | else if (classes == 0) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | this._Dao.Update(new GwProduct() |
| | | { |
| | | Id = id, |
| | | Name = name, |
| | | Icon = icon, |
| | | Instructions = instructions, |
| | | Classes = classes, |
| | | ParentId = parentId, |
| | | Path = path, |
| | | IsDefault = isDefault, |
| | | IsEnable = isEnable, |
| | | Sort = sort, |
| | | RouterType = routerType, |
| | | CmOpId = cmOpId, |
| | | CuOpId = cuOpId, |
| | | CtOpId = ctOpId, |
| | | CmGroupid = cmGroupid, |
| | | CuGroupid = cuGroupid, |
| | | CtGroupid = ctGroupid, |
| | | CmExtParams = cmExtParams, |
| | | CuExtParams = cuExtParams, |
| | | CtExtParams = ctExtParams, |
| | | Price = price, //单价换算 |
| | | GivingNum = givingNum, |
| | | Remark = remark, |
| | | //CreateTime = createTime, |
| | | //Creator = creator, |
| | | UpdateTime = updateTime, |
| | | Updateor = updateor |
| | | |
| | | }); |
| | | |
| | | //更新关联的产品路径PATH |
| | | _Dao.UpdatePath(id, path); |
| | | |
| | | |
| | | return new JsonPageResult(true, info + "信息更新成功!"); |
| | | } |
| | | |
| | | //根据主键获取产品或产品分类信息 |
| | | private JsonPageResult Get(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, this._Dao.Get(context.GetString("id"))); |
| | | } |
| | | |
| | | //图标文件上传 |
| | | private JsonPageResult UpLoad(PageContext<SysUser> context) |
| | | { |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | HttpPostedFile httpPostedFile = context.Files["certPath"]; |
| | | if (httpPostedFile == null || httpPostedFile.FileName == "") |
| | | throw new Exception("请选择要上传的BMP(位图)、JPG、JPEG、PNG、GIF文件,并检查文件大小!"); |
| | | string extension = Path.GetExtension(httpPostedFile.FileName); |
| | | if (!extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) |
| | | && !extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) |
| | | && !extension.Equals(".png", StringComparison.OrdinalIgnoreCase) |
| | | && !extension.Equals(".gif", StringComparison.OrdinalIgnoreCase) |
| | | && !extension.Equals(".bmp", StringComparison.OrdinalIgnoreCase)) |
| | | throw new Exception("上传文件格式不正确,只允许上传BMP(位图)、JPG、JPEG、PNG、GIF文件!"); |
| | | if (httpPostedFile.ContentLength > 5242880 ) |
| | | throw new Exception("文件上传不能超过5M,请检查文件大小,是否有写权限!"); |
| | | |
| | | //string @string = context.GetString("ablackpool"); |
| | | //if (string.IsNullOrEmpty(@string)) |
| | | // throw new Exception("请选择黑名单池!"); |
| | | |
| | | List<Stream> outputStreamList = new List<Stream>(); |
| | | if (extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) |
| | | && extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) |
| | | && extension.Equals(".png", StringComparison.OrdinalIgnoreCase) |
| | | && extension.Equals(".gif", StringComparison.OrdinalIgnoreCase) |
| | | && extension.Equals(".bmp", StringComparison.OrdinalIgnoreCase)) |
| | | outputStreamList.Add(httpPostedFile.InputStream); |
| | | //else if (extension.Equals(".zip", StringComparison.OrdinalIgnoreCase)) |
| | | // ZipUtils.Decompression(httpPostedFile.InputStream, ref outputStreamList, true); |
| | | |
| | | //string fieldName = "c:/AYZH"; |
| | | //HttpContext httpContext = new HttpContext(); |
| | | //WebTool.SaveUploadFile(httpContext, fieldName); |
| | | |
| | | stopwatch.Stop(); |
| | | string str = "上传耗时:" + (object) stopwatch.ElapsedMilliseconds + "ms"; |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Message = "文件上传成功!", |
| | | Msg = str |
| | | }); |
| | | } |
| | | |
| | | //获取通道列表 |
| | | private List<GwOp> OpList |
| | | { |
| | | get |
| | | { |
| | | if (this._OpList == null) |
| | | { |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this._OpList = gwOpDao.LoadInfoList(); |
| | | } |
| | | return this._OpList; |
| | | } |
| | | } |
| | | |
| | | //加载产品及产品分类信息 |
| | | private List<GwProduct> ProductAllList() |
| | | { |
| | | GwProduct bean = new GwProduct(); |
| | | bean.Classes = -1; |
| | | bean.IsDefault = -1; |
| | | bean.IsEnable = -1; |
| | | |
| | | List<GwProduct> list = _Dao.getAllList(bean); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | //获取产品或产品分类列表 |
| | | private List<GwProduct> ProductList |
| | | { |
| | | get |
| | | { |
| | | if (this._ProductList == null) |
| | | { |
| | | this._ProductList = this.ProductAllList(); |
| | | } |
| | | return this._ProductList; |
| | | } |
| | | } |
| | | |
| | | //产品或产品分类ID转换名称 |
| | | private string ProductToName(string productId) |
| | | { |
| | | if (this.ProductList == null) |
| | | return string.Empty; |
| | | GwProduct bean = this.ProductList.Find((Predicate<GwProduct>)(product => product.Id == productId)); |
| | | if (bean != null) |
| | | //return string.Format("{0}-{1}", (object)bean.Id, (object)bean.Name); |
| | | return string.Format("{0}", (object)bean.Name); |
| | | return string.Empty; |
| | | } |
| | | |
| | | //更新信息启用或停用 |
| | | private JsonPageResult UpdateStatus(PageContext<SysUser> context) |
| | | { |
| | | string id = context.GetString("id"); |
| | | string isEnable = context.GetString("isEnable"); |
| | | |
| | | if(isEnable=="0") { |
| | | if (this._Dao.GwProductUseCount(id) > 0) |
| | | throw new ArgumentException("当前产品分类已在产品信息使用中,无法停用!"); |
| | | if (this._Dao.GwSpUseCount(id) > 0) |
| | | throw new ArgumentException("当前产品在客户账号信息中使用,无法停用!"); |
| | | } |
| | | this._Dao.UpdateStatus(id, isEnable); |
| | | return new JsonPageResult(true, "更新信息状态成功!"); |
| | | |
| | | } |
| | | |
| | | //获取通道组列表 |
| | | private List<GwOpGroup> GroupList |
| | | { |
| | | get |
| | | { |
| | | if (this._GroupList == null) |
| | | { |
| | | using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) |
| | | this._GroupList = gwOpGroupDao.GetGroupList(); |
| | | } |
| | | return this._GroupList; |
| | | } |
| | | } |
| | | |
| | | //通道ID转换名称 |
| | | private string GetOpName(int opID) |
| | | { |
| | | if (this.OpList == null) |
| | | return string.Empty; |
| | | GwOp gwOp = this.OpList.Find((Predicate<GwOp>)(op => op.OpID == opID)); |
| | | if (gwOp != null) |
| | | return string.Format("{0}-{1}", (object)gwOp.OpID, (object)gwOp.OpName); |
| | | return string.Empty; |
| | | } |
| | | |
| | | //产品类别转换名称 |
| | | private string ClassesToName(int classes) |
| | | { |
| | | if (classes == -1) |
| | | return string.Empty; |
| | | else if(classes == 0) |
| | | return "0-产品分类"; |
| | | else if(classes == 1) |
| | | return "1-产品"; |
| | | |
| | | return string.Empty; |
| | | } |
| | | |
| | | //产品是否默认转换名称 |
| | | private string IsDefaultToName(int isDefault) |
| | | { |
| | | if (isDefault == -1) |
| | | return string.Empty; |
| | | else if(isDefault == 0) |
| | | return "0-个性化"; |
| | | else if(isDefault == 1) |
| | | return "1-系统默认"; |
| | | |
| | | return string.Empty; |
| | | } |
| | | |
| | | //启用停用转换名称 |
| | | private string IsEnableToName(int isEnable) |
| | | { |
| | | if (isEnable == -1) |
| | | return string.Empty; |
| | | else if(isEnable == 0) |
| | | return "0-停用"; |
| | | else if(isEnable == 1) |
| | | return "1-启用"; |
| | | |
| | | return string.Empty; |
| | | } |
| | | |
| | | //通道组ID转换名称 |
| | | private string GetGroupName(int groupID) |
| | | { |
| | | if (this.GroupList == null) |
| | | return string.Empty; |
| | | GwOpGroup gwOpGroup = this.GroupList.Find((Predicate<GwOpGroup>)(group => group.GroupID == groupID)); |
| | | if (gwOpGroup != null) |
| | | return string.Format("{0}-{1}", (object)gwOpGroup.GroupID, (object)gwOpGroup.GroupName); |
| | | return string.Empty; |
| | | } |
| | | } |
New file |
| | |
| | | <%@ Page Language="C#" masterpagefile="~/Main.master" AutoEventWireup="true" CodeFile="GwProduct.aspx.cs" Inherits="_GwProduct" %> |
| | | <asp:Content runat="server" ID="Content1" ContentPlaceHolderID="head"> |
| | | <script type="text/javascript" language="javascript"> |
| | | $(document).ready(function() { |
| | | |
| | | //$(document).on("click", "[data-toggle='popover']", function () { |
| | | // $("[data-toggle='popover']").popover(); |
| | | //}) |
| | | var pagination = new Pagination(); |
| | | pagination.setPageIndex(1); |
| | | pagination.setPageSize(50); |
| | | |
| | | function loadPageList() { |
| | | var name = $("#Name").val(); |
| | | var classes = $("#Classes").val(); |
| | | $.ajax({ |
| | | url: "GwProduct.ashx", |
| | | type: "POST", |
| | | data: { action: "list", name: name, classes: classes, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() }, |
| | | success: function(result) { |
| | | if (result.OK) { |
| | | $("#productTable tbody").html(result.Message.Table); |
| | | pagination.setRecordCount(result.Message.TotalCount); |
| | | $("#pagination").html(pagination.getHtml()); |
| | | $("[data-toggle='popover']").popover(); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | $(document).on("click", ".action-modal-add", function() { |
| | | $("#productDialog .modal-title").text("添加产品或产品分类"); |
| | | $("#productDialog #action").val("add"); |
| | | $("#productDialog #id").val("").attr("readonly", false); |
| | | $("#productDialog #name").val(""); |
| | | $("#productDialog #icon").val(""); |
| | | $("#productDialog #instructions").val(""); |
| | | $("#productDialog #classes").val(""); |
| | | $("#productDialog #parentId").val(""); |
| | | //$("#productDialog #path").val(""); |
| | | $("#productDialog #isDefault").val(""); |
| | | $("#productDialog #isDnable").val(1); |
| | | $("#productDialog #sort").val(1); |
| | | $("#productDialog #routerType").val(1); |
| | | $("#productDialog #cmOpId").val(""); |
| | | $("#productDialog #cuOpId").val(""); |
| | | $("#productDialog #ctOpId").val(""); |
| | | $("#productDialog #cmGroupid").val(""); |
| | | $("#productDialog #cuGroupid").val(""); |
| | | $("#productDialog #ctGroupid").val(""); |
| | | $("#productDialog #cmExtParams").val(""); |
| | | $("#productDialog #cuExtParams").val(""); |
| | | $("#productDialog #ctExtParams").val(""); |
| | | $("#productDialog #price").val(0.00); |
| | | $("#productDialog #givingNum").val(0); |
| | | $("#productDialog #remark").val(""); |
| | | |
| | | $("#productDialog").modal("show"); |
| | | }); |
| | | |
| | | $("#productForm").ajaxForm({ |
| | | success: function(r) { |
| | | if (r.OK) { |
| | | mytek.alert(r.Message, r.OK, function() { |
| | | $("#productDialog").modal("hide"); |
| | | loadPageList(); |
| | | }); |
| | | } else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //选择图标下拉框 |
| | | $("#icon").on("change", function () { |
| | | console.log("icon:" + $(this).val()); |
| | | if ($(this).val() != "") { |
| | | document.getElementById('showImg').src = "../static/images/productIcon/" + $(this).val(); |
| | | } |
| | | }); |
| | | |
| | | $("#icon").trigger("change"); |
| | | |
| | | //选择类别下拉框,控制相关输入项显示 |
| | | $("#classes").on("change", function () { |
| | | $(".classes-span").hide(); |
| | | $(".classes-span-" + $(this).val()).show(); |
| | | }); |
| | | |
| | | $("#classes").trigger("change"); |
| | | |
| | | //选择路由类型下拉框,控制相关输入项显示 |
| | | $("#RouterType").on("change", function () { |
| | | $(".router-type-span").hide(); |
| | | $(".router-type-span-" + $(this).val()).show(); |
| | | }); |
| | | |
| | | $("#RouterType").trigger("change"); |
| | | |
| | | $(document).on("click", ".action-modal-edit", function() { |
| | | var id = $(this).data("id"); |
| | | $("#productDialog .modal-title").text("编辑产品或产品分类"); |
| | | $("#productDialog #id").val(id).attr("readonly", true); |
| | | |
| | | $.get("gwProduct.ashx", { "action": "get", id: id }, function(r) { |
| | | if (r.OK) { |
| | | $("#productDialog #action").val("update"); |
| | | $("#productDialog #id").val(r.Message.Id).attr("readonly", false); |
| | | $("#productDialog #name").val(r.Message.Name); |
| | | $("#productDialog #classes").val(r.Message.Classes); |
| | | $("#productDialog #parentId").val(r.Message.ParentId); |
| | | //$("#productDialog #path").val(r.Message.Path); |
| | | $("#productDialog #isDnable").val(r.Message.IsDnable); |
| | | $("#productDialog #remark").val(r.Message.Remark); |
| | | //产品 |
| | | if (r.Message.Classes == 1) { |
| | | $("#productDialog #icon").val(r.Message.Icon); |
| | | $("#productDialog #instructions").val(r.Message.Instructions); |
| | | $("#productDialog #isDefault").val(r.Message.IsDefault); |
| | | $("#productDialog #sort").val(r.Message.Sort); |
| | | $("#productDialog #routerType").val(r.Message.RouterType); |
| | | $("#productDialog #price").val(r.Message.Price/1000); //元条换算单位为厘条 |
| | | $("#productDialog #givingNum").val(r.Message.GivingNum); |
| | | if (r.Message.RouterType == 1) { |
| | | $("#productDialog #cmOpId").val(r.Message.CmOpId); |
| | | $("#productDialog #cuOpId").val(r.Message.CuOpId); |
| | | $("#productDialog #ctOpId").val(r.Message.CtOpId); |
| | | $("#productDialog #cmExtParams").val(r.Message.CmExtParams); |
| | | $("#productDialog #cuExtParams").val(r.Message.CuExtParams); |
| | | $("#productDialog #ctExtParams").val(r.Message.CtExtParams); |
| | | } |
| | | else { |
| | | $("#productDialog #cmGroupid").val(r.Message.CmGroupid); |
| | | $("#productDialog #cuGroupid").val(r.Message.CuGroupid); |
| | | $("#productDialog #ctGroupid").val(r.Message.CtGroupid); |
| | | |
| | | } |
| | | } |
| | | //产品分类 |
| | | else { |
| | | |
| | | } |
| | | |
| | | //设置类别 |
| | | $("#classes").trigger("change"); |
| | | |
| | | //设置图标 |
| | | $("#icon").trigger("change"); |
| | | |
| | | $("#productDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | }, "json"); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-update-status", function () { |
| | | //data的属性参数不能含有大写字母。 |
| | | var id = $(this).data("id"); |
| | | var isEnable = $(this).data("is_enable"); |
| | | $.post("gwProduct.ashx", { "action": "updateStatus", id: id, isEnable: isEnable }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-delete", function() { |
| | | var id = $(this).data("id"); |
| | | mytek.confirm("是否需要删除该信息?", "数据删除后将无法恢复,请谨慎操作!", function(b) { |
| | | if (b) { |
| | | $.post("gwProduct.ashx", { "action": "delete", id: id }, function(result) { |
| | | mytek.alert(result.Message, result.OK, function() { |
| | | loadPageList(); |
| | | }); |
| | | }, |
| | | "json"); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-btn-GwProductQuery", function() { |
| | | pagination.setPageIndex(1); |
| | | loadPageList(); |
| | | }); |
| | | |
| | | $(document).on("click", "a[data-index]", function() { |
| | | pagination.setPageIndex($(this).attr("data-index")); |
| | | loadPageList(); |
| | | }); |
| | | |
| | | //进入页面时执行查询 |
| | | loadPageList(); |
| | | |
| | | }); |
| | | </script> |
| | | </asp:Content> |
| | | <asp:Content runat="server" ID="Content2" ContentPlaceHolderID="title">产品或产品分类管理</asp:Content> |
| | | <asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server"> |
| | | |
| | | <form name="queryForm" method="get" action="GwProduct.aspx" id="queryForm" class="form-inline" |
| | | id="gwProductTable"> |
| | | <div class="m-b"> |
| | | <div class="form-group"> |
| | | <div class="input-group"> |
| | | <span class="input-group-addon">产品名称</span> |
| | | <input type="text" name="Name" id="Name" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group"> |
| | | <select name="Classes" id="Classes" class="form-control"> |
| | | <option value="-1">--请选择类别--</option> |
| | | <option value="0">产品分类</option> |
| | | <option value="1">产品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group"> |
| | | <input type="button" value="查询" class="btn btn-primary action-btn-GwProductQuery" /> |
| | | <input class=" btn btn-warning action-modal-add" value="添加产品" type="button" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="table table-striped table-bordered table-hover" id="productTable"> |
| | | <thead> |
| | | <tr class="header"> |
| | | <th>图标 |
| | | </th> |
| | | <th>名称 |
| | | </th> |
| | | <th>使用说明 |
| | | </th> |
| | | <th>类别 |
| | | </th> |
| | | <th>通道 |
| | | </th> |
| | | <th>父级产品分类ID |
| | | </th> |
| | | <th>是否默认 |
| | | </th> |
| | | <th>是否启用 |
| | | </th> |
| | | <th>排序 |
| | | </th> |
| | | <th>赠送条数 |
| | | </th> |
| | | <th>参考单价 |
| | | </th> |
| | | <th>创建时间 |
| | | </th> |
| | | <th class="text-right">操作 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | </tbody> |
| | | </table> |
| | | </form> |
| | | <div id="pagination"> |
| | | </div> |
| | | <div class="footBar"> |
| | | |
| | | </div> |
| | | |
| | | <div class="modal inmodal fade" id="productDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <form class="form-horizontal" id="productForm" name="productForm" method="post" action="gwProduct.ashx"> |
| | | <div class="modal-content "> |
| | | <div class="modal-header"> |
| | | <input type="hidden" class="form-control" name="action" id="action" value="update" /> |
| | | <input type="hidden" class="form-control" name="id" id="id" value="" /> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title">编辑产品资料</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 类别</label> |
| | | <div class="col-sm-4 "> |
| | | <select id="classes" name="classes" class="form-control"> |
| | | <option value="-1">--请选择类别--</option> |
| | | <option value="0" >产品分类</option> |
| | | <option value="1" selected>产品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 父级分类ID</label> |
| | | <div class="col-sm-4 "> |
| | | <select name="parentId" id="parentId"> |
| | | <%=GetProductClassOptions("0")%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group classes-span classes-span-1 "> |
| | | <label class="col-sm-2 control-label"> |
| | | 图标</label> |
| | | <div class="col-sm-4 "> |
| | | <div><img id="showImg" name="showImg" src=""></div> |
| | | <select id="icon" name="icon" class="form-control" > |
| | | <option value="">--请选择图标--</option> |
| | | <option value="marketingSMS-32.png" >marketingSMS-32.png</option> |
| | | <option value="noticeSMS-32.png" >noticeSMS-32.png</option> |
| | | <option value="VerificationCodeSMS-32.png" >VerificationCodeSMS-32.png</option> |
| | | </select> |
| | | </div> |
| | | <span class="help-block m-b-none">类别为产品时,产品的图标标识。 |
| | | </span> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 名称</label> |
| | | <div class="col-sm-4 "> |
| | | <input type="text" class="form-control" name="name" id="name" value="" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <label class="col-sm-2 control-label"> |
| | | 使用说明</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" class="form-control" name="instructions" id="instructions" value=""/> |
| | | </div> |
| | | </div> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 产品路径</label> |
| | | <div class="col-sm-4 "> |
| | | <input type="text" class="form-control" name="path" id="path" value="" /> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <label class="col-sm-2 control-label"> |
| | | 推广方式</label> |
| | | <div class="col-sm-4 "> |
| | | <select id="isDefault" name="isDefault" class="form-control"> |
| | | <option value="0" >个性客户</option> |
| | | <option value="1" >系统默认</option> |
| | | </select> |
| | | </div> |
| | | <span class="help-block m-b-none">个性化客户是指特殊推送给客户;系统默认是指系统默认可推送所有客户。</span> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 是否启用</label> |
| | | <div class="col-sm-4 "> |
| | | <select id="isEnable" name="isEnable" class="form-control"> |
| | | <option value="0" >停用</option> |
| | | <option value="1" selected>启用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <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"> |
| | | <option value="1" >指定通道路由</option> |
| | | <option value="3" >通道组路由模式</option> |
| | | </select> |
| | | |
| | | |
| | | <div class="router-type-span router-type-span-1"> |
| | | <div style="padding: 5px"> |
| | | 移动:<select name="cmOpId" id="cmOpId"> |
| | | <%=GetOpOptions(0)%> |
| | | </select> 扩展参数:<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> 扩展参数:<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> 扩展参数:<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"> |
| | | <label class="control-label "> |
| | | 移动通道组</label> |
| | | <select name="cmGroupid" id="cmGroupid"> |
| | | |
| | | <%=GetOpGroupOptions(0) %> |
| | | </select></div> |
| | | <div style="padding: 5px"> |
| | | <label class="control-label "> |
| | | 联通通道组</label> |
| | | <select name="cuGroupid" id="cuGroupid"> |
| | | |
| | | <%=GetOpGroupOptions(0)%> |
| | | </select></div> |
| | | <div style="padding: 5px"> |
| | | <label class="control-label"> |
| | | 电信通道组</label> |
| | | <select name="ctGroupid" id="ctGroupid"> |
| | | <%=GetOpGroupOptions(0)%> |
| | | </select></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <label class="col-sm-2 control-label"> |
| | | 参考单价</label> |
| | | <div class="col-sm-4"> |
| | | <div class="input-group"> |
| | | <input type="text" class="form-control" name="price" id="price" value="" maxlength="5" |
| | | onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">元/条 </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <label class="col-sm-2 control-label"> |
| | | 默认赠送条数</label> |
| | | <div class="col-sm-4"> |
| | | <div class="input-group"> |
| | | <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="5" |
| | | onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">条 </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-default" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- footBar --> |
| | | <div id="mask" class="mask"> |
| | | <span></span> |
| | | <img src="img/spinning-circles.svg" alt="载入中..." /> |
| | | </div> |
| | | </asp:Content> |
| | | |
| | | |
| | | |
New file |
| | |
| | | |
| | | using Common; |
| | | using Dao; |
| | | using Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Web; |
| | | using System.Web.Profile; |
| | | using System.Web.SessionState; |
| | | |
| | | public partial class _GwProduct : PageBase<SysUser>, IRequiresSessionState |
| | | { |
| | | protected List<GwProduct> GwProductList; |
| | | protected List<GwProduct> GwProductClassList; |
| | | protected List<GwOp> OpList; //通道信息列表 |
| | | protected List<GwOpGroup> OpGroupList; //通道组信息列表 |
| | | //public GwProduct GwProduct { get; protected set; } //用于存放产品编辑 |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | //权限控制 |
| | | this.CheckRight("601", FailedOperation.ErrorMsgOnly); |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) |
| | | this.OpGroupList = gwOpGroupDao.GetGroupList(); |
| | | |
| | | //获取启用的产品分类 |
| | | using (GwProductDao gwProductDao = new GwProductDao()) { |
| | | GwProduct bean = new GwProduct(); |
| | | bean.Classes = 0; |
| | | bean.IsEnable = -1; |
| | | this.GwProductClassList = gwProductDao.getAllList(bean); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //获取通道信息 |
| | | public string GetOpOptions(int opId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.OpList.Count == 0) |
| | | return "<option value=''>无通道信息</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)0, (object)"NA"); |
| | | foreach (GwOp gwOp in this.OpList) |
| | | { |
| | | //停用的通道不再显示 |
| | | if (gwOp.OpStatus == 0) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (opId == gwOp.OpID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)gwOp.OpID, (object)gwOp.OpName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)gwOp.OpID, (object)gwOp.OpName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取通道组 |
| | | /// </summary> |
| | | /// <param name="groupID"></param> |
| | | /// <returns></returns> |
| | | public string GetOpGroupOptions(int groupID) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) |
| | | { |
| | | List<GwOpGroup> groupList = gwOpGroupDao.GetGroupList(); |
| | | stringBuilder.AppendFormat("<option value=\"0\">不设置</option>"); |
| | | foreach (GwOpGroup gwOpGroup in groupList) |
| | | stringBuilder.AppendFormat("<option value='{0}' {2}>{1}</option>", (object)gwOpGroup.GroupID, (object)gwOpGroup.GroupName, gwOpGroup.GroupID == groupID ? (object)"selected" : (object)""); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //获取产品分类信息 |
| | | public string GetProductClassOptions(string productId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GwProductClassList.Count == 0) |
| | | return "<option value='0'>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)0, (object)"无"); |
| | | foreach (GwProduct bean in this.GwProductClassList) |
| | | { |
| | | //停用的产品分类不再显示 |
| | | if (bean.IsEnable == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //类别为产品不再显示 |
| | | if (bean.Classes == 1) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (productId.Equals(bean.Id) ) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | <li><a href="GwOpStop.aspx" class="J_menuItem">停用通道</a> </li> |
| | | </ul> |
| | | </li> |
| | | <li> |
| | | <a href="#"> |
| | | <i class="fa fa-rocket"></i> |
| | | <span class="nav-label">产品管理</span> |
| | | <span class="fa arrow"></span> |
| | | </a> |
| | | <ul class="nav nav-second-level"> |
| | | <!--<li><a href="pages/gwProduct/GwProduct.aspx" class="J_menuItem">产品列表</a> </li>--> |
| | | <li><a href="GwProduct.aspx" class="J_menuItem">产品列表</a> </li> |
| | | </ul> |
| | | </li> |
| | | |
| | | <li> |
| | | <a href="#"><i class="fa fa-user-secret"></i><span class="nav-label">客户管理 </span><span class="fa arrow"></span></a> |