| | |
| | | </site> |
| | | <site name="web" id="2"> |
| | | <application path="/" applicationPool="Clr4IntegratedAppPool"> |
| | | <virtualDirectory path="/" physicalPath="C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\web" /> |
| | | <virtualDirectory path="/" physicalPath="C:\AYZH\work\Git_Rep\SMGW_NewWeb\web\web" /> |
| | | </application> |
| | | <bindings> |
| | | <binding protocol="http" bindingInformation="*:60960:localhost" /> |
| | |
| | | 67fef8bd265e3351d06b7b87fad510aa955c58ab |
| | | 148a124d533dab517de60d4081ee6b355ffb0769 |
| | |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.csproj.CopyComplete |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.dll |
| | | D:\Company\SMGW_NewWeb\web\App_Code\obj\Debug\App_Code.pdb |
| | | 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="GwClientPayMentDao.cs" /> |
| | | <Compile Include="GwMobileAreaDao.cs" /> |
| | | <Compile Include="GwMoRouteDao.cs" /> |
| | | <Compile Include="GwProductDao.cs" /> |
| | | <Compile Include="GwRmResendDao.cs" /> |
| | | <Compile Include="GwSpPrePattern.cs" /> |
| | | <Compile Include="GwSpPrePatternDao.cs" /> |
| | |
| | | <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" /> |
New file |
| | |
| | | // Decompiled with JetBrains decompiler |
| | | // Type: Dao.GwStatisV3Dao |
| | | // 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; |
| | | using System.Text; |
| | | |
| | | namespace Dao |
| | | { |
| | | public class GwProductDao : IDisposable |
| | | { |
| | | |
| | | public List<GwProduct> LoadInfoList(string name, string classes, string is_default, string op_group_id, int pageIndex, int pageSize, out int recordCount) |
| | | { |
| | | List<GwProduct> list1 = new List<GwProduct>(); |
| | | recordCount = 0; |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("from GW_PRODUCT where 1=1"); |
| | | List<OracleParameter> list2 = new List<OracleParameter>(); |
| | | if (name != null && name != "") |
| | | { |
| | | list2.Add(new OracleParameter(":name", (object)name)); |
| | | stringBuilder.Append(" and name=:name"); |
| | | } |
| | | if (classes != null && classes != "") |
| | | { |
| | | list2.Add(new OracleParameter(":classes", (object)int.Parse(classes)) ); |
| | | stringBuilder.Append(" and classes=:classes"); |
| | | } |
| | | if (is_default != null && is_default != "") |
| | | { |
| | | list2.Add(new OracleParameter(":is_default", (object)int.Parse(is_default))); |
| | | stringBuilder.Append(" and is_default=:is_default"); |
| | | } |
| | | if (op_group_id != null && op_group_id != "") |
| | | { |
| | | list2.Add(new OracleParameter(":op_group_id", (object)int.Parse(op_group_id))); |
| | | stringBuilder.Append(" and op_group_id=:op_group_id"); |
| | | } |
| | | |
| | | stringBuilder.Append(" order by ID DESC"); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("select count(*) as count " + stringBuilder.ToString(), OracleHelper.Connection, list2.ToArray())) |
| | | { |
| | | while (((DbDataReader)reader).Read()) |
| | | recordCount = this.ReadCount(reader); |
| | | } |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(PubConstant.doOracleSql(pageIndex, pageSize, recordCount, "select * " + stringBuilder.ToString()).ToString(), OracleHelper.Connection, list2.ToArray())) |
| | | { |
| | | while (((DbDataReader)reader).Read()) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (this.ReadInfo(reader, o)) |
| | | list1.Add(o); |
| | | } |
| | | } |
| | | return list1; |
| | | } |
| | | |
| | | private int ReadCount(OracleDataReader reader) |
| | | { |
| | | int @int; |
| | | try |
| | | { |
| | | @int = new OracleReaderWrapper(reader).GetInt("count", 0); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error(ex); |
| | | return 0; |
| | | } |
| | | return @int; |
| | | } |
| | | |
| | | |
| | | public DataTable getClientProduct(string clientID) |
| | | { |
| | | string sql = ""; |
| | | sql += "select aa.*, c.balance, (c.basic_num + c.giving_num ) available_num from " |
| | | + "( " |
| | | + " select a.id client_product_id, a.client_id, a.sp_id, a.activate_status, " |
| | | + " b.id product_id, b.name, b.icon, b.instructions, b.classes, b.parent_id, " |
| | | + " b.path, b.is_default, b.is_enable, b.sort, b.giving_num, b.remark " |
| | | + " from gw_client_product a, gw_product b " |
| | | + " where a.product_id = b.id " |
| | | + " ) aa " |
| | | + " left join gw_sp c " |
| | | + " on aa.sp_id = c.id and aa.client_id = :clientId "; //参数:客户ID |
| | | |
| | | return OracleHelper.Execute(sql, OracleHelper.Connection, new OracleParameter(":clientId", (object)clientID)); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品分类列表 |
| | | * */ |
| | | public List<GwProduct> getGwProductClassList() |
| | | { |
| | | List<GwProduct> list = new List<GwProduct>(); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from GW_PRODUCT where IS_ENABLE = 1 AND CLASSES=0 "), OracleHelper.Connection )) |
| | | { |
| | | while (reader != null && ((DbDataReader)reader).Read()) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (this.ReadInfo(reader, o)) |
| | | list.Add(o); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 根据产品ID获取产品信息 |
| | | * */ |
| | | public GwProduct find(string productId) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | if (string.IsNullOrEmpty(productId)) |
| | | throw new ArgumentException("产品ID为空!"); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select * from GW_PRODUCT where ID=:productId"), OracleHelper.Connection, new OracleParameter(":productId", (object)productId))) |
| | | { |
| | | if (((DbDataReader)reader).Read()) |
| | | { |
| | | this.ReadInfo(reader, o); |
| | | return o; |
| | | } |
| | | } |
| | | return o; |
| | | } |
| | | |
| | | //修改 |
| | | public bool Update(GwProduct o) |
| | | { |
| | | string sql = ""; |
| | | sql += "update GW_PRODUCT set NAME=:NAME ,ICON=:ICON, INSTRUCTIONS=:INSTRUCTIONS, CLASSES=:CLASSES, PARENT_ID=:PARENT_ID, PATH=:PATH "; |
| | | sql += " , IS_DEFAULT=:IS_DEFAULT, IS_ENABLE=:IS_ENABLE, SORT=:SORT, OP_GROUP_ID=:OP_GROUP_ID, API_SP_XH_ID=:API_SP_XH_ID, GIVING_NUM=:GIVING_NUM, REMARK=:REMARK "; |
| | | sql += " where ID=:ID "; |
| | | |
| | | return OracleHelper.ExecuteSql(sql, OracleHelper.Connection, |
| | | 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.parent_id), |
| | | new OracleParameter(":PATH", (object)o.path), |
| | | new OracleParameter(":IS_DEFAULT", (object)o.is_default), |
| | | new OracleParameter(":IS_ENABLE", (object)o.is_enable), |
| | | new OracleParameter(":SORT", (object)o.sort), |
| | | new OracleParameter(":OP_GROUP_ID", (object)o.op_group_id), |
| | | new OracleParameter(":API_SP_XH_ID", (object)o.api_sp_xh_id), |
| | | new OracleParameter(":GIVING_NUM", (object)o.giving_num), |
| | | new OracleParameter(":REMARK", (object)o.remark), |
| | | new OracleParameter(":ID", (object)o.id) |
| | | ) > 0; |
| | | } |
| | | |
| | | //添加 |
| | | public bool Add(GwProduct o) |
| | | { |
| | | string sql = ""; |
| | | sql += "insert into GW_PRODUCT(ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, OP_GROUP_ID, API_SP_XH_ID, GIVING_NUM, REMARK ) "; |
| | | sql += " values(:ID, :NAME, :ICON, :INSTRUCTIONS, :CLASSES, :PARENT_ID, :PATH, :IS_DEFAULT, :IS_ENABLE, :SORT, :OP_GROUP_ID, :API_SP_XH_ID, :GIVING_NUM, :REMARK) "; |
| | | |
| | | 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.parent_id), |
| | | new OracleParameter(":PATH", (object)o.path), |
| | | new OracleParameter(":IS_DEFAULT", (object)o.is_default), |
| | | new OracleParameter(":IS_ENABLE", (object)o.is_enable), |
| | | new OracleParameter(":SORT", (object)o.sort), |
| | | new OracleParameter(":OP_GROUP_ID", (object)o.op_group_id), |
| | | new OracleParameter(":API_SP_XH_ID", (object)o.api_sp_xh_id), |
| | | new OracleParameter(":GIVING_NUM", (object)o.giving_num), |
| | | new OracleParameter(":REMARK", (object)o.remark) |
| | | ) > 0; |
| | | } |
| | | |
| | | //更新产品启停状态 |
| | | public bool UpdateIs_enable(string productId, int is_enable) |
| | | { |
| | | return OracleHelper.ExecuteSql("UPDATE GW_PRODUCT SET IS_ENABLE=:IS_ENABLE WHERE ID=:ID", OracleHelper.Connection, new OracleParameter(":IS_ENABLE", (object)is_enable), new OracleParameter(":ID", (object)productId)) > 0; |
| | | } |
| | | |
| | | //删除产品 |
| | | public bool Delete(string product_id) |
| | | { |
| | | if (string.IsNullOrEmpty(product_id) || string.Equals("0", product_id)) |
| | | return false; |
| | | return OracleHelper.ExecuteSql("delete from GW_PRODUCT where ID=:ID", OracleHelper.Connection, new OracleParameter(":ID", (object)product_id)) > 0; |
| | | } |
| | | |
| | | //检查产品名称 |
| | | public bool IsNameExists(string name) |
| | | { |
| | | if (string.IsNullOrEmpty(name) || string.Equals("0", name)) |
| | | return true; |
| | | using (OracleDataReader oracleDataReader = OracleHelper.ExecuteReader(string.Format("select * from GW_PRODUCT where NAME=:NAME and IS_ENABLE=1 "), OracleHelper.Connection, new OracleParameter(":NAME", (object)name))) |
| | | return ((DbDataReader)oracleDataReader).Read(); |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 数据转换封装 |
| | | * */ |
| | | private bool ReadInfo(OracleDataReader reader, GwProduct gwProduct) |
| | | { |
| | | OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader); |
| | | gwProduct.id = oracleReaderWrapper.GetString("id", ""); |
| | | gwProduct.name = oracleReaderWrapper.GetString("name", ""); |
| | | gwProduct.icon = oracleReaderWrapper.GetString("icon", ""); |
| | | gwProduct.instructions = oracleReaderWrapper.GetString("instructions", ""); |
| | | gwProduct.classes = oracleReaderWrapper.GetInt("classes", 0); |
| | | gwProduct.parent_id = oracleReaderWrapper.GetString("parent_id", ""); |
| | | gwProduct.path = oracleReaderWrapper.GetString("path", ""); |
| | | gwProduct.is_default = oracleReaderWrapper.GetInt("is_default", -1); |
| | | gwProduct.is_enable = oracleReaderWrapper.GetInt("is_enable", -1); |
| | | gwProduct.sort = oracleReaderWrapper.GetInt("sort", 0); |
| | | gwProduct.giving_num = oracleReaderWrapper.GetInt("giving_num", 0); |
| | | gwProduct.op_group_id = oracleReaderWrapper.GetInt("op_group_id", -1); |
| | | gwProduct.remark = oracleReaderWrapper.GetString("remark", ""); |
| | | gwProduct.api_sp_xh_id = oracleReaderWrapper.GetString("api_sp_xh_id", ""); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public DataTable GetClientCount(string clientID) |
| | | { |
| | | return OracleHelper.Execute("select * from gw_client_product a where a.client_id = :clientId", OracleHelper.Connection, new OracleParameter(":clientId", (object) clientID) ); |
| | | } |
| | | |
| | | //导出查询 |
| | | public DataTable LoadGwProductDataTable(string name, string classes, string is_default, string op_group_id) |
| | | { |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("select ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, OP_GROUP_ID, API_SP_XH_ID, GIVING_NUM, REMARK from GW_PRODUCT where 1=1"); |
| | | OracleParameter[] oracleParameterArray = new OracleParameter[3]; |
| | | if (name != null && name != "") |
| | | { |
| | | oracleParameterArray[0] = new OracleParameter(":name", (OracleDbType)126); |
| | | ((DbParameter)oracleParameterArray[0]).Value = (object)name; |
| | | stringBuilder.Append(" and name=:name"); |
| | | } |
| | | if (classes != null && classes != "") |
| | | { |
| | | oracleParameterArray[1] = new OracleParameter(":classes", (OracleDbType)112); |
| | | ((DbParameter)oracleParameterArray[1]).Value = (object)classes; |
| | | stringBuilder.Append(" and classes=:classes"); |
| | | } |
| | | if (is_default != null && is_default != "") |
| | | { |
| | | oracleParameterArray[1] = new OracleParameter(":is_default", (OracleDbType)112); |
| | | ((DbParameter)oracleParameterArray[1]).Value = (object)is_default; |
| | | stringBuilder.Append(" and is_default=:is_default"); |
| | | } |
| | | if (op_group_id != null && op_group_id != "") |
| | | { |
| | | oracleParameterArray[2] = new OracleParameter(":op_group_id", (OracleDbType)126); |
| | | ((DbParameter)oracleParameterArray[2]).Value = (object)op_group_id; |
| | | stringBuilder.Append(" and op_group_id=:op_group_id"); |
| | | } |
| | | return OracleHelper.Execute(PubConstant.doOracleSql(100000, stringBuilder.ToString()).ToString(), OracleHelper.Connection, oracleParameterArray); |
| | | } |
| | | } |
| | | } |
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_NAME=:XH_NAME, 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_NAME", (object)o.xhName), |
| | | 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 List<SysXh> GetSysXhList() |
| | | { |
| | | List<SysXh> list = new List<SysXh>(); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("SELECT * FROM SYS_XH ORDER BY XH_NAME ", OracleHelper.Connection)) |
| | | { |
| | | while (reader != null && ((DbDataReader)reader).Read()) |
| | | { |
| | | SysXh o = new SysXh(); |
| | | if (this.ReadInfo(reader, o)) |
| | | { |
| | | list.Add(o); |
| | | } |
| | | |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 数据转换封装 |
| | | * */ |
| | | private bool ReadInfo(OracleDataReader reader, SysXh sysXh) |
| | | { |
| | | OracleReaderWrapper oracleReaderWrapper = new OracleReaderWrapper(reader); |
| | | sysXh.xhId = oracleReaderWrapper.GetString("XH_ID", ""); |
| | | sysXh.xhName = oracleReaderWrapper.GetString("XH_NAME", ""); |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | d5ec7438d89fe18e3bec35b6f500682586a1659d |
| | | 99191e045427b8c77772d20e0f9eacbeab5c5bd3 |
| | |
| | | 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" /> |
| | | <Compile Include="PageBase.cs" /> |
| | | <Compile Include="MasterPageBase.cs"> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="PageBase.cs"> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Model\GwAp.cs" /> |
| | | <Compile Include="Model\SysMenu.cs" /> |
| | | <Compile Include="Model\SysUserMenu.cs" /> |
New file |
| | |
| | | |
| | | |
| | | 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 parent_id { get; set; } |
| | | |
| | | public string path { get; set; } |
| | | |
| | | public int is_default { get; set; } |
| | | |
| | | public int is_enable { get; set; } |
| | | |
| | | public int sort { get; set; } |
| | | |
| | | public int op_group_id { get; set; } |
| | | |
| | | public int giving_num { get; set; } |
| | | |
| | | public string remark { get; set; } |
| | | |
| | | public string api_sp_xh_id { get; set; } //API账号生成规则 |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | using System.Text.RegularExpressions; |
| | | |
| | | namespace Model |
| | | { |
| | | public class SysXh |
| | | { |
| | | public string xhId { get; set; } |
| | | public string xhName { 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; } //备注 |
| | | } |
| | | |
| | | } |
| | |
| | | d136e7243de12f847333601a3e3b0ceb3bb3ede8 |
| | | 386caef0a68152082007ea9053d4fd5b4b62f129 |
| | |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.dll |
| | | D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb |
| | | 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 |
| | |
| | | <<<<<<< HEAD |
| | | ba5129b8c35f1e2785f99668fd04dd28b6d68368 |
| | | ======= |
| | | c546f08e5171d2ea11491af4c442ff223c9bb58c |
| | | >>>>>>> Release |
| | | 27f9b4fb5d36be9c155fb6557fe17e62c41ec4da |
| | |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll |
| | | D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb |
| | | 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 |
| | |
| | | case "exportGwStatisV3"://导出统计报表 |
| | | this.ExprortGwStatisV3(); |
| | | break; |
| | | case "exGwProduct": |
| | | this.ExGwProduct(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | |
| | | webTool.Export(dataTable, dictionary, "日志_" + sDate, this.Context.Response); |
| | | } |
| | | } |
| | | |
| | | //产品导出Excel |
| | | private void ExGwProduct() |
| | | { |
| | | string name = this.AppContext.GetString("name"); |
| | | string classes = this.AppContext.GetString("classes"); |
| | | string is_default = this.AppContext.GetString("is_default"); |
| | | string op_group_id = this.AppContext.GetString("op_group_id"); |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | { |
| | | DataTable dataTable = gwProductDao.LoadGwProductDataTable(name, classes, is_default, op_group_id); |
| | | WebTool webTool = new WebTool(); |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | //dictionary["产品ID"] = "ID"; |
| | | dictionary["产品名称"] = "NAME"; |
| | | //dictionary["图标"] = "ICON"; |
| | | dictionary["使用说明"] = "INSTRUCTIONS"; |
| | | dictionary["类别"] = "CLASSES"; |
| | | dictionary["父级产品分类"] = "PARENT_ID"; |
| | | //dictionary["路径"] = "PATH"; |
| | | dictionary["是否默认"] = "IS_DEFAULT"; |
| | | dictionary["是否启用"] = "IS_ENABLE"; |
| | | dictionary["排序"] = "SORT"; |
| | | dictionary["默认通道"] = "OP_GROUP_ID"; |
| | | dictionary["API账号生成规则"] = "API_SP_XH_ID"; |
| | | dictionary["默认赠送条数"] = "GIVING_NUM"; |
| | | dictionary["备注"] = "REMARK"; |
| | | webTool.Export(dataTable, dictionary, "PRODUCT_" + (object)DateTime.Now.Ticks, this.Context.Response); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <%@ WebHandler Language="C#" Class="GwProductHandler" %> |
| | | |
| | | using Common; |
| | | using Dao; |
| | | using Model; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Web; |
| | | using System.IO; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | public class GwProductHandler : PageHandler<SysUser> |
| | | { |
| | | private GwProductDao _Dao = new GwProductDao(); |
| | | private SysXhDao sysXhDao = new SysXhDao(); |
| | | private List<GwOp> _OpList; |
| | | private List<GwOpGroup> _GwOpGroupList; |
| | | private List<SysXh> _SysXhList; |
| | | private List<GwProduct> _GwProductClassList; //产品分类列表 |
| | | |
| | | private List<GwOp> OpList |
| | | { |
| | | get |
| | | { |
| | | if (this._OpList == null) |
| | | { |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this._OpList = gwOpDao.LoadInfoList(); |
| | | } |
| | | return this._OpList; |
| | | } |
| | | } |
| | | |
| | | //获取产品分类列表 |
| | | private List<GwProduct> GwProductClassList |
| | | { |
| | | get |
| | | { |
| | | if (this._GwProductClassList == null) |
| | | { |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | this._GwProductClassList = gwProductDao.getGwProductClassList(); |
| | | } |
| | | return this._GwProductClassList; |
| | | } |
| | | } |
| | | |
| | | //获取通道组列表 |
| | | private List<GwOpGroup> GwOpGroupList |
| | | { |
| | | get |
| | | { |
| | | if (this._GwOpGroupList == null) |
| | | { |
| | | using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) |
| | | this._GwOpGroupList = gwOpGroupDao.GetGroupList(); |
| | | } |
| | | return this._GwOpGroupList; |
| | | } |
| | | } |
| | | |
| | | //获取序号规则列表 |
| | | private List<SysXh> SysXhList |
| | | { |
| | | get |
| | | { |
| | | if (this._SysXhList == null) |
| | | { |
| | | using (SysXhDao sysXhDao = new SysXhDao()) |
| | | this._SysXhList = sysXhDao.GetSysXhList(); |
| | | } |
| | | return this._SysXhList; |
| | | } |
| | | } |
| | | |
| | | |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | { |
| | | |
| | | case "LoadGwProductPageList": |
| | | return this.LoadGwProductPageList(context); |
| | | case "getGwProduct": |
| | | return this.GetGwProduct(context); |
| | | case "delete": |
| | | return this.Delete(context); |
| | | case "add": |
| | | return this.Add(context); |
| | | case "update": |
| | | return this.Update(context); |
| | | case "updateIs_enable": |
| | | return this.UpdateIs_enable(context); |
| | | |
| | | case "getGwspDetailed": |
| | | return this.GetGwspDetailed(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | } |
| | | } |
| | | |
| | | |
| | | private JsonPageResult GetGwspDetailed(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("spID"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("获取SPID错误"); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | GwSp gwSp = gwSpDao.Get(@string); |
| | | string[] strArray = gwSp.McExpression.Split(new char[1] |
| | | { |
| | | ';' |
| | | }, StringSplitOptions.RemoveEmptyEntries); |
| | | string str = (Convert.ToInt32(strArray[0]) != 0 ? strArray[0] + "条/1分钟;" : "") + (Convert.ToInt32(strArray[1]) != 0 ? strArray[1] + "条/5分钟;" : "") + (Convert.ToInt32(strArray[2]) != 0 ? strArray[2] + "条/10分钟;" : "") + (Convert.ToInt32(strArray[3]) != 0 ? strArray[3] + "条/半小时;" : "") + (Convert.ToInt32(strArray[4]) != 0 ? strArray[4] + "条/1小时;" : "") + (Convert.ToInt32(strArray[5]) != 0 ? strArray[5] + "条/4小时;" : "") + (Convert.ToInt32(strArray[6]) != 0 ? strArray[6] + "条/6小时;" : "") + (Convert.ToInt32(strArray[7]) != 0 ? strArray[7] + "条/12小时;" : "") + (Convert.ToInt32(strArray[8]) != 0 ? strArray[8] + "条/24小时;" : ""); |
| | | return new JsonPageResult(true, (object)new |
| | | { |
| | | Get = gwSp, |
| | | McExpression = str |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载产品页面列表 |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <returns></returns> |
| | | private JsonPageResult LoadGwProductPageList(PageContext<SysUser> context) |
| | | { |
| | | string name = context.GetString("name"); |
| | | string classes = context.GetString("classes"); |
| | | string is_default = context.GetString("is_default"); |
| | | string op_group_id = context.GetString("op_group_id")=="0" ? "": context.GetString("op_group_id"); |
| | | int recordCount = 0; |
| | | int pageSize = context.GetInt("pageSize", 20); |
| | | int pageIndex = context.GetInt("pageIndex", 1); |
| | | |
| | | GwProductDao gwProductDao = new GwProductDao(); |
| | | |
| | | //加载产品列表信息 |
| | | List<GwProduct> list = gwProductDao.LoadInfoList(name, classes, is_default, op_group_id, pageIndex, pageSize, out recordCount); |
| | | string str1 = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | foreach (GwProduct gwProduct in list) |
| | | { |
| | | str1 = str1 + "<tr><td rowspan=\"1\" ><input type=\"checkbox\"name=\"checkbox\" value=\"" + gwProduct.id + "\"/></td><td rowspan=\"1\">" + gwProduct.name ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + "<img src=\'" + gwProduct.icon + "' />" ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + gwProduct.instructions ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + classesToName(gwProduct.classes) ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + this.gwProductClassToName(gwProduct.parent_id) ; |
| | | str1 += "</td>"; |
| | | //str1 = str1 + "<td>" + gwProduct.path ; |
| | | //str1 += "</td>"; |
| | | str1 = str1 + "<td>" + isDefaultToName(gwProduct.is_default) ; |
| | | str1 += "</td>"; |
| | | //str1 = str1 + "<td>" + isEnableToName(gwProduct.is_enable) ; |
| | | str1 = str1 + "<td>" + GetStatusText(gwProduct.is_enable, gwProduct.id) ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + gwProduct.sort ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + this.opGroupIdToName(gwProduct.op_group_id) ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + this.apiSpXhIdToName(gwProduct.api_sp_xh_id) ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + gwProduct.giving_num ; |
| | | str1 += "</td>"; |
| | | str1 = str1 + "<td>" + gwProduct.remark ; |
| | | str1 += "</td>"; |
| | | str1 += "<td rowspan=\"1\" class=\"text-right\">"; |
| | | if (context.HasRight("3023")) |
| | | str1 += string.Format(" <a class=\"btn-block btn btn-primary btn-xs action-modal-edit\" data-id=\"{0}\"><i class=\"fa fa-edit\"></i> 编辑</a>", (object)gwProduct.id); |
| | | if (context.HasRight("3024")) |
| | | str1 += string.Format(" <a class=\"btn-block btn btn-xs btn-default action-delete\" data-id=\"{0}\"><i class=\"fa fa-trash\"></i> 删除</a>", (object)gwProduct.id); |
| | | str1 += "</td>"; |
| | | str1 += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str1 += "<tr><td colspan=\"14\" style=\"padding-left:5px; text-align: center;\">暂无信息</td></tr>"; |
| | | return new JsonPageResult(true, (object)new |
| | | { |
| | | Table = str1.ToString(), |
| | | TotalCount = recordCount |
| | | }); |
| | | } |
| | | |
| | | //根据产品ID获取产品信息 |
| | | private JsonPageResult GetGwProduct(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, this._Dao.find(context.GetString("id"))); |
| | | } |
| | | |
| | | //产品类别转换名称 |
| | | private string classesToName(int classes) |
| | | { |
| | | string str = ""; |
| | | switch (classes) |
| | | { |
| | | case 0: |
| | | str = "产品分类"; |
| | | break; |
| | | case 1: |
| | | str = "产品"; |
| | | break; |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | //产品ID转换名称 |
| | | public string gwProductClassToName(string gwProductId) |
| | | { |
| | | |
| | | if (this.GwProductClassList == null) |
| | | return string.Empty; |
| | | GwProduct newGwProduct = this.GwProductClassList.Find((Predicate<GwProduct>)(gwProduct => gwProduct.id == gwProductId)); |
| | | if (newGwProduct != null) |
| | | return string.Format("{0}<div class=\"text-muted\">{1}</div>", (object)newGwProduct.id, (object)newGwProduct.name); |
| | | |
| | | return string.Format("{0}", (object)gwProductId); |
| | | |
| | | } |
| | | |
| | | //是否默认转换名称 |
| | | private string isDefaultToName(int isDefault) |
| | | { |
| | | string str = ""; |
| | | switch (isDefault) |
| | | { |
| | | case 0: |
| | | str = "否"; |
| | | break; |
| | | case 1: |
| | | str = "是"; |
| | | break; |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | //是否启用转换名称 |
| | | private string isEnableToName(int isDefault) |
| | | { |
| | | string str = ""; |
| | | switch (isDefault) |
| | | { |
| | | case 0: |
| | | str = "停用"; |
| | | break; |
| | | case 1: |
| | | str = "启用"; |
| | | break; |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | //通道组转换名称 |
| | | public string opGroupIdToName(int opGroupId) |
| | | { |
| | | |
| | | if (this.GwOpGroupList == null) |
| | | return string.Empty; |
| | | GwOpGroup newGwOpGroup = this.GwOpGroupList.Find((Predicate<GwOpGroup>)(gwGroup => gwGroup.GroupID == opGroupId)); |
| | | if (newGwOpGroup != null) |
| | | return string.Format("{0}<div class=\"text-muted\">{1}</div>", (object)newGwOpGroup.GroupID, (object)newGwOpGroup.GroupName); |
| | | |
| | | return string.Format("{0}", (object)opGroupId); |
| | | |
| | | } |
| | | |
| | | //序号规则ID转换名称 |
| | | public string apiSpXhIdToName(string api_sp_xh_id) |
| | | { |
| | | |
| | | if (this.SysXhList == null) |
| | | return string.Empty; |
| | | SysXh newSysXh = this.SysXhList.Find((Predicate<SysXh>)(sysXh => sysXh.xhId == api_sp_xh_id)); |
| | | if (newSysXh != null) |
| | | return string.Format("{0}<div class=\"text-muted\">{1}</div>", (object)newSysXh.xhId, (object)newSysXh.xhName); |
| | | |
| | | return string.Format("{0}", (object)api_sp_xh_id); |
| | | |
| | | foreach (SysXh sysXh in this.SysXhList) |
| | | { |
| | | if (api_sp_xh_id == sysXh.xhId) |
| | | return sysXh.xhName; |
| | | else |
| | | continue; |
| | | } |
| | | |
| | | return "序号规则未定义"; |
| | | |
| | | } |
| | | |
| | | //产品是否启用 |
| | | private string GetStatusText(int is_enable, string productId) |
| | | { |
| | | if (is_enable == 0) |
| | | return string.Format("<span class=\"action-updateStatus btn btn-xs btn-default\" data-is_enable=\"1\" data-id=\"{0}\">已停用</span>", (object)productId); |
| | | return string.Format("<span class=\"action-updateStatus btn btn-xs btn-success \" data-is_enable=\"0\" data-id=\"{0}\">已启用</span>", (object)productId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //根据父级产品ID获取产品路径 |
| | | public string getProductPath(string parent_id, string productId) |
| | | { |
| | | string path = ""; |
| | | if (string.IsNullOrEmpty(parent_id) || parent_id == "0" || this.GwProductClassList == null) |
| | | { |
| | | path += "0" + "," + productId; |
| | | return path; |
| | | } |
| | | |
| | | GwProduct newGwProduct = this.GwProductClassList.Find((Predicate<GwProduct>)(gwProduct => gwProduct.id == parent_id)); |
| | | if (newGwProduct == null) |
| | | { |
| | | path += "0" + "," + productId; |
| | | return path; |
| | | } |
| | | else if (newGwProduct != null) |
| | | { |
| | | path += (object)newGwProduct.path + "," + productId; |
| | | return path; |
| | | } |
| | | |
| | | return productId; |
| | | |
| | | } |
| | | |
| | | |
| | | public bool IsInt(string input) |
| | | { |
| | | for (int index = 0; index < input.Length; ++index) |
| | | { |
| | | if (!char.IsNumber(input, index)) |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | private string FormatIpHtml(string p) |
| | | { |
| | | if (string.IsNullOrEmpty(p)) |
| | | return string.Empty; |
| | | return p.Replace("|", "<br/>"); |
| | | } |
| | | |
| | | |
| | | //保存更新后的账号信息 |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | o.id = context.GetString("id"); |
| | | o.name = context.GetString("name"); |
| | | //o.icon = context.GetString("icon"); |
| | | o.instructions = context.GetString("instructions"); |
| | | o.classes = context.GetInt("classes", 0); |
| | | o.parent_id = context.GetString("parent_id"); |
| | | //o.path = context.GetString("path"); |
| | | o.path = getProductPath(o.parent_id, o.id); |
| | | o.is_default = context.GetInt("is_default", 0); |
| | | o.is_enable = context.GetInt("is_enable", 0); |
| | | o.sort = context.GetInt("sort", 0); |
| | | o.op_group_id = context.GetInt("op_group_id", 0); |
| | | o.api_sp_xh_id = context.GetString("api_sp_xh_id"); |
| | | o.giving_num = context.GetInt("giving_num", 0); |
| | | o.remark = context.GetString("remark"); |
| | | |
| | | if (string.IsNullOrEmpty(o.name)) |
| | | throw new Exception("请输入产品名称!"); |
| | | if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$")) |
| | | throw new Exception("序号必须为数字"); |
| | | |
| | | //上传保存文件 |
| | | HttpFileCollection _file = HttpContext.Current.Request.Files; |
| | | if (_file.Count > 0) |
| | | { |
| | | long size = _file[0].ContentLength; //文件大小 |
| | | string type = _file[0].ContentType; //文件类型 |
| | | string name = _file[0].FileName; //文件名 |
| | | string _tp = Path.GetExtension(name);//文件扩展名 |
| | | if (_tp.ToLower() == ".jpg" || _tp.ToLower() == ".jpeg" || _tp.ToLower() == ".gif" || _tp.ToLower() == ".png") |
| | | { |
| | | Stream stream = _file[0].InputStream;//获取文件流 |
| | | string savaName = o.id + "-" + DateTime.Now.ToString("yyyyMMddHHssmm") + _tp; //保存文件。文件名 |
| | | string filepath = "\\static\\images\\productIcon\\" + savaName; |
| | | string path = AppDomain.CurrentDomain.BaseDirectory + filepath;//图片路径 |
| | | _file[0].SaveAs(path); |
| | | |
| | | o.icon = filepath; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("非图片文件,请重新选择!"); |
| | | } |
| | | |
| | | }else |
| | | { |
| | | if(o.classes==0) |
| | | { |
| | | o.icon = ""; |
| | | }else { |
| | | o.icon = context.GetString("icon"); |
| | | } |
| | | } |
| | | |
| | | this._Dao.Update(o); |
| | | return new JsonPageResult(true, (object)("产品" + o.name + "修改成功!")); |
| | | } |
| | | |
| | | private JsonPageResult Add(PageContext<SysUser> context) |
| | | { |
| | | GwProduct o = new GwProduct(); |
| | | //o.id = context.GetString("id"); |
| | | o.id = sysXhDao.getXh("GW_PRODUCT"); |
| | | o.name = context.GetString("name"); |
| | | //o.icon = context.GetString("icon"); |
| | | o.instructions = context.GetString("instructions"); |
| | | o.classes = context.GetInt("classes", 0); |
| | | o.parent_id = context.GetString("parent_id"); |
| | | //o.path = context.GetString("path"); |
| | | o.path = getProductPath(o.parent_id, o.id); |
| | | o.is_default = context.GetInt("is_default", 0); |
| | | o.is_enable = context.GetInt("is_enable", 0); |
| | | o.sort = context.GetInt("sort", 0); |
| | | o.op_group_id = context.GetInt("op_group_id", 0); |
| | | o.api_sp_xh_id = context.GetString("api_sp_xh_id"); |
| | | o.giving_num = context.GetInt("giving_num", 0); |
| | | o.remark = context.GetString("remark"); |
| | | |
| | | if (string.IsNullOrEmpty(o.name)) |
| | | throw new Exception("请输入产品名称!"); |
| | | if (!string.IsNullOrEmpty(context.GetString("sort")) && !Regex.IsMatch(context.GetString("sort"), "^[0-9]*$")) |
| | | throw new Exception("序号必须为数字"); |
| | | |
| | | if (this._Dao.IsNameExists(o.name)) |
| | | throw new Exception("产品名称已经存在,请重新填写!"); |
| | | |
| | | //上传保存文件 |
| | | HttpFileCollection _file = HttpContext.Current.Request.Files; |
| | | if (_file.Count > 0) |
| | | { |
| | | long size = _file[0].ContentLength; //文件大小 |
| | | string type = _file[0].ContentType; //文件类型 |
| | | string name = _file[0].FileName; //文件名 |
| | | string _tp = Path.GetExtension(name);//文件扩展名 |
| | | if (_tp.ToLower() == ".jpg" || _tp.ToLower() == ".jpeg" || _tp.ToLower() == ".gif" || _tp.ToLower() == ".png") |
| | | { |
| | | Stream stream = _file[0].InputStream;//获取文件流 |
| | | string savaName = o.id + "-" + DateTime.Now.ToString("yyyyMMddHHssmm") + _tp; //保存文件。文件名 |
| | | string filepath = "\\static\\images\\productIcon\\" + savaName; |
| | | string path = AppDomain.CurrentDomain.BaseDirectory + filepath;//图片路径 |
| | | _file[0].SaveAs(path); |
| | | |
| | | o.icon = filepath; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("非图片文件,请重新选择!"); |
| | | } |
| | | } |
| | | |
| | | this._Dao.Add(o); |
| | | return new JsonPageResult(true, (object)("产品" + o.name + "添加成功!")); |
| | | } |
| | | |
| | | //更新产品启停状态 |
| | | private JsonPageResult UpdateIs_enable(PageContext<SysUser> context) |
| | | { |
| | | string productId = context.GetString("productId"); |
| | | int is_enable = context.GetInt("is_enable"); |
| | | if (string.IsNullOrEmpty(productId)) |
| | | throw new ArgumentException("获取产品状态参数失败"); |
| | | if (!this._Dao.UpdateIs_enable(productId, is_enable)) |
| | | throw new ArgumentNullException("修改产品状态失败!"); |
| | | |
| | | return new JsonPageResult(true, (object)"更改产品状态成功!"); |
| | | } |
| | | |
| | | private JsonPageResult Delete(PageContext<SysUser> context) |
| | | { |
| | | string productId = context.GetString("productId"); |
| | | if (string.IsNullOrEmpty(productId)) |
| | | throw new ArgumentException("产品ID为空!"); |
| | | this._Dao.Delete(productId); |
| | | return new JsonPageResult(true, (object)("产品" + productId + "删除成功!")); |
| | | } |
| | | |
| | | private JsonPageResult GetPrePattern(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, (object)new GwSpPrePatternDao().Get(context.GetString("patternID"))); |
| | | } |
| | | } |
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 () { |
| | | |
| | | var pagination = new Pagination(); |
| | | pagination.setPageIndex(1); |
| | | pagination.setPageSize(20); |
| | | |
| | | //查询 |
| | | function loadPageList() { |
| | | var name = $("#_name").val(); |
| | | var classes = $("#_classes").val(); |
| | | var is_default = $("#_is_default").val(); |
| | | var op_group_id = $("#_op_group_id").val(); |
| | | $.ajax({ |
| | | url: "GwProduct.ashx", |
| | | type: "POST", |
| | | data: { action: "LoadGwProductPageList", name: name, classes: classes, is_default: is_default, op_group_id: op_group_id, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#gwspTable tbody").html(result.Message.Table); |
| | | pagination.setRecordCount(result.Message.TotalCount); |
| | | $("#pagination").html(pagination.getHtml()); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //导出Excel |
| | | $(document).on("click", ".action-export", function () { |
| | | var name = $("#_name").val(); |
| | | var classes = $("#_classes").val(); |
| | | var is_default = $("#_is_default").val(); |
| | | var op_group_id = $("#_op_group_id").val(); |
| | | var url = "ExportDocument.aspx?action=exGwProduct&name=" + name + "&classes=" + classes + "&is_default=" + is_default + "&op_group_id=" + op_group_id + ""; |
| | | window.location.href = url; |
| | | }); |
| | | |
| | | $(document).on("click", "a[data-index]", function () { |
| | | pagination.setPageIndex($(this).attr("data-index")); |
| | | loadPageList(); |
| | | }); |
| | | |
| | | $("#checkAll").click(function () { |
| | | $("input[name='checkbox']").prop("checked", $(this).is(":checked")); |
| | | }); |
| | | |
| | | |
| | | $("#gwProductForm").ajaxForm({ |
| | | success: function (r) { |
| | | if (r.OK) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | $("#gwProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | }); |
| | | } else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //添加产品 |
| | | $(document).on("click", ".action-create", function () { |
| | | $("#gwProductDialog .modal-title").text("添加产品"); |
| | | $("#gwProductDialog #action").val("add"); |
| | | //$("#gwProductDialog #id").val("").attr("readonly", false); |
| | | $("#gwProductDialog #name").val(""); |
| | | //$("#gwProductDialog #icon").val(""); |
| | | $("#gwProductDialog #img_icon").attr("src", ""); |
| | | $("#gwProductDialog #icon_file").val(""); |
| | | $("#gwProductDialog #instructions").val(""); |
| | | $("#gwProductDialog #classes").val(""); |
| | | $("#gwProductDialog #parent_id").val(""); |
| | | //$("#gwProductDialog #path").val(""); |
| | | $("#gwProductDialog #is_default").val(""); |
| | | $("#gwProductDialog #is_enable").val("1"); //添加时启用 |
| | | $("#gwProductDialog #sort").val(""); |
| | | $("#gwProductDialog #op_group_id").val(""); |
| | | $("#gwProductDialog #api_sp_xh_id").val(""); |
| | | $("#gwProductDialog #giving_num").val(""); |
| | | $("#gwProductDialog #remark").val(""); |
| | | |
| | | $("#gwProductDialog").modal("show"); |
| | | }); |
| | | |
| | | //编辑产品 |
| | | $(document).on("click", ".action-modal-edit", function () { |
| | | var id = $(this).data("id"); |
| | | $("#gwProductDialog .modal-title").text("编辑产品"); |
| | | $("#gwProductDialog #id").val(id).attr("readonly", true); |
| | | |
| | | $.get("GwProduct.ashx", { "action": "getGwProduct", id: id }, function (r) { |
| | | if (r.OK) { |
| | | $("#gwProductDialog #action").val("update"); |
| | | $("#gwProductDialog #id").val(r.Message.id); |
| | | $("#gwProductDialog #name").val(r.Message.name); |
| | | $("#gwProductDialog #icon").val(r.Message.icon); |
| | | $("#gwProductDialog #img_icon").attr("src", r.Message.icon); |
| | | $("#gwProductDialog #icon_file").val(""); |
| | | $("#gwProductDialog #instructions").val(r.Message.instructions); |
| | | $("#gwProductDialog #classes").val(r.Message.classes); |
| | | $("#gwProductDialog #parent_id").val(r.Message.parent_id); |
| | | //$("#gwProductDialog #path").val(r.Message.path); |
| | | $("#gwProductDialog #is_default").val(r.Message.is_default); |
| | | $("#gwProductDialog #is_enable").val(r.Message.is_enable); |
| | | $("#gwProductDialog #sort").val(r.Message.sort); |
| | | $("#gwProductDialog #op_group_id").val(r.Message.op_group_id); |
| | | $("#gwProductDialog #api_sp_xh_id").val(r.Message.api_sp_xh_id); |
| | | $("#gwProductDialog #giving_num").val(r.Message.giving_num); |
| | | //$("#gwProductDialog #splitMode").iCheck(r.Message.SplitMode == 1 ? "check" : "uncheck"); |
| | | //$("#gwProductDialog #clearFixMode").iCheck(r.Message.ClearFixMode == 1 ? "check" : "uncheck"); |
| | | $("#gwProductDialog #remark").val(r.Message.remark); |
| | | //$("#gwProductDialog #price").val(r.Message.Price / 1000); |
| | | |
| | | $("#gwProductDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | }, "json"); |
| | | }); |
| | | |
| | | //产品面板保存 |
| | | $(document).on("click", ".action-save", function (e) { |
| | | e.preventDefault(); |
| | | $("#gwProductForm").ajaxSubmit({ |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | mytek.alert(result.Message, result.OK, function () { |
| | | $("#gwProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | }); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //启用或停用 |
| | | $(document).on("click", ".action-updateStatus", function () { |
| | | var productId = $(this).attr("data-id"); |
| | | var is_enable = $(this).attr("data-is_enable"); |
| | | mytek.confirm("是否需要修改该产品状态?", "是否操作!", function (b) { |
| | | if (b) { |
| | | $.post("GwProduct.ashx", { action: "updateIs_enable", productId: productId, is_enable: is_enable }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //删除 |
| | | $(document).on("click", ".action-delete", function () { |
| | | var productId = $(this).data("id"); |
| | | mytek.confirm("是否需要删除该产品?", "产品删除后将无法恢复,请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $.post("GwProduct.ashx", { action: "delete", productId: productId }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-query", function () { |
| | | pagination.setPageIndex(1); |
| | | 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="thisForm" method="get" action="GwProduct.aspx" id="thisForm"> |
| | | <div class="listCanvas form-inline"> |
| | | <div class="ibox"> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">产品名称</span> |
| | | <input type="text" name="_name" id="_name" class="form-control col-md-2" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <select name="_classes" class="form-control" id="_classes"> |
| | | <option value="">类别</option> |
| | | <option value="0">产品分类</option> |
| | | <option value="1">产品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <select name="_is_default" class="form-control" id="_is_default"> |
| | | <option value="">是否默认</option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <select name="_op_group_id" class="form-control" id="_op_group_id"> |
| | | <%=GetGroupOptionsAll() %> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <input type="button" value="查询" class="btn btn-primary action-query" /> |
| | | <input type="button" class="btn btn-info action-export" value="导出数据" /> |
| | | <input class="btn btn-warning action-create" value="创建产品" type="button" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <div class="table-responsive"> |
| | | <table class="table table-striped table-bordered table-hover" id="gwspTable"> |
| | | <thead> |
| | | <tr class="header"> |
| | | <th> |
| | | <input type='checkbox' name='checkAll' id='checkAll' /> |
| | | </th> |
| | | <th> |
| | | 产品名称 |
| | | </th> |
| | | <th> |
| | | 图标 |
| | | </th> |
| | | <th> |
| | | 使用说明 |
| | | </th> |
| | | <th> |
| | | 类别 |
| | | </th> |
| | | <th> |
| | | 父级产品分类ID |
| | | </th> |
| | | <!-- |
| | | <th> |
| | | 产品路径 |
| | | </th> |
| | | --> |
| | | <th> |
| | | 是否默认 |
| | | </th> |
| | | <th> |
| | | 是否启用 |
| | | </th> |
| | | <th> |
| | | 排序 |
| | | </th> |
| | | <th> |
| | | 默认通道组 |
| | | </th> |
| | | <th> |
| | | API账号生成规则 |
| | | </th> |
| | | <th> |
| | | 默认赠送条数 |
| | | </th> |
| | | <th> |
| | | 备注 |
| | | </th> |
| | | <th colspan="4"> |
| | | 操作 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div id="pagination"> |
| | | </div> |
| | | |
| | | <div class="modal inmodal fade" id="gwProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <form class="form-horizontal" id="gwProductForm" name="gwProductForm" method="post" action="GwProduct.ashx"> |
| | | <input type="hidden" class="form-control" name="action" id="action" value="update" /> |
| | | <div class="modal-content "> |
| | | <div class="modal-body"> |
| | | <div class="modal-header"> |
| | | <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="form-group" id="div_id" style="display:none"> |
| | | <label class="col-sm-4 control-label"> |
| | | 产品ID</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" class="form-control" name="id" id="id" value="" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 产品名称</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" class="form-control" name="name" id="name" value="" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 图标 |
| | | </label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="hidden" class="form-control" name="icon" id="icon" value="" /> |
| | | <img src="" name="img_icon" id="img_icon" alt="" /><input type="file" name="icon_file" id="icon_file" class="file-loading" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 使用说明</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" name="instructions" id="instructions" class="form-control" value="" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 类别</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select class="form-control" name="classes" id="classes"> |
| | | <option value="">类别</option> |
| | | <option value="0">产品分类</option> |
| | | <option value="1">产品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 父级产品分类</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select class="form-control" name="parent_id" id="parent_id"> |
| | | <%=GetGwProductClassOptionsAll() %> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 是否默认</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select name="is_default" class="form-control" id="is_default"> |
| | | <option value="">是否默认</option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 是否启用</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select name="is_enable" class="form-control" id="is_enable"> |
| | | <option value="">是否启用</option> |
| | | <option value="0">停用</option> |
| | | <option value="1">启用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 排序</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" name="sort" id="sort" class="form-control" |
| | | value="" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">序号越小越前</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 默认通道组</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select class="form-control" name="op_group_id" id="op_group_id"> |
| | | <%=GetGroupOptionsAll() %> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | API账号生成规则</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <select class="form-control" name="api_sp_xh_id" id="api_sp_xh_id"> |
| | | <%=GetSysXhOptionsAll() %> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 默认赠送条数</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" name="giving_num" id="giving_num" class="form-control" |
| | | value="" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">条</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 备注</label> |
| | | <div class="col-sm-8 input-group"> |
| | | <input type="text" name="remark" id="remark" class="form-control" 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 action-save"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="mask" class="mask"> |
| | | <span></span> |
| | | <img src="img/spinning-circles.svg" alt="载入中..." /></div> |
| | | </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<GwOp> OpList; |
| | | protected List<GwProduct> getGwProductClassList; //产品分类 |
| | | protected List<GwOpGroup> GroupList; |
| | | protected List<GwAp> ApList; |
| | | protected List<SysXh> SysXhList; |
| | | |
| | | public IEnumerable<GwDiverter> DiverterList { get; set; } |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("302", FailedOperation.HistoryGoBack); |
| | | using (GwApDao gwApDao = new GwApDao()) |
| | | this.ApList = gwApDao.LoadInfoList(); |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | this.getGwProductClassList = gwProductDao.getGwProductClassList(); |
| | | using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) |
| | | this.GroupList = gwOpGroupDao.GetGroupList(); |
| | | using (GwDiverterDao gwDiverterDao = new GwDiverterDao()) |
| | | this.DiverterList = (IEnumerable<GwDiverter>)gwDiverterDao.LoadList(); |
| | | using (SysXhDao sysXhDao = new SysXhDao()) |
| | | this.SysXhList = sysXhDao.GetSysXhList(); |
| | | |
| | | } |
| | | |
| | | //产品分类下拉框数据 |
| | | public string GetGwProductClassOptionsAll() |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.getGwProductClassList.Count == 0) |
| | | return "<option value=''>无产品分类信息</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", 0, "--请选择产品分类--"); |
| | | foreach (GwProduct gwProduct in this.getGwProductClassList) |
| | | { |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{0}-{1}</option>", gwProduct.id, gwProduct.name); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //通道组下拉框数据 |
| | | public string GetGroupOptionsAll() |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GroupList.Count == 0) |
| | | return "<option value=''>无通道组信息</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", 0, "--请选择通道组--"); |
| | | foreach (GwOpGroup gwOpGroup in this.GroupList) |
| | | { |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{0}-{1}</option>", gwOpGroup.GroupID, gwOpGroup.GroupName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //序号规则下拉框数据 |
| | | public string GetSysXhOptionsAll() |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.SysXhList.Count == 0) |
| | | return "<option value=''>无序号规则信息</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", 0, "--请选择序号规则--"); |
| | | foreach (SysXh sysXh in this.SysXhList) |
| | | { |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{0}-{1}</option>", sysXh.xhId, sysXh.xhName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | public string GetGroupOptions(int groupID) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GroupList.Count == 0) |
| | | return "<option value=''>无通道组信息</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", 0, "设置为空"); |
| | | foreach (GwOpGroup gwOpGroup in this.GroupList) |
| | | { |
| | | if (groupID == gwOpGroup.GroupID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", gwOpGroup.GroupID, gwOpGroup.GroupName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", gwOpGroup.GroupID, gwOpGroup.GroupName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | 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 GwStatisV3Page : PageBase<SysUser>, IRequiresSessionState |
| | |
| | | <!--<li><a href="GwRptCode.aspx" class="J_menuItem">扣量状态设置</a> </li>--> |
| | | <li><a href="GwMobileArea.aspx" class="J_menuItem">区域号段管理</a> </li> |
| | | <li><a href="SysUser.aspx" class="J_menuItem">系统账号管理</a> </li> |
| | | <li><a href="GwProduct.aspx" class="J_menuItem">产品管理</a> </li> |
| | | <li><a href="tablespace.aspx" class="J_menuItem">数据库表空间</a> </li> |
| | | <li><a href="Setting.aspx" class="J_menuItem">系统参数设置</a> </li> |
| | | |
| | |
| | | 在 Dao.GwSmDao.LoadInfoListcount(String apID, String opName, String clientID, String spID, String destnationId, String sDate, String beginTime, String endTime, String content, String opstat, Int32 TStatus, Int32& recordcount) 位置 D:\Company\SMGW_NewWeb\web\Dao\GwSmDao.cs:行号 197
|
| | | >>>>>>> Release
|
| | |
|
| | | #35 2021-09-26 14:19:27,636 Common.dll OracleHelper.ExecuteReader ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 7248 |
| | | 会话 ID: 81 序列号: 9801
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(CommandBehavior behavior)
|
| | | 在 Common.OracleHelper.ExecuteReader(String sql, OracleConnection x, OracleParameter[] cmdParms) 位置 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Common\OracleHelper.cs:行号 219
|
| | |
|
| | | #42 2021-09-26 14:32:56,924 Common.dll OracleHelper.Execute SQL=SELECT * FROM GW_ALARM_LOG WHERE RESTORE_FLAG=0 and rownum < 10 ORDER BY ALARM_ID DESC Message=ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 5640 |
| | | 会话 ID: 208 序列号: 44898
|
| | |
|
| | | #22 2021-09-27 16:49:48,131 Common.dll OracleHelper.ExecuteReader ORA-00904: "OP_GROUP_ID": 标识符无效
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(CommandBehavior behavior)
|
| | | 在 Common.OracleHelper.ExecuteReader(String sql, OracleConnection x, OracleParameter[] cmdParms) 位置 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Common\OracleHelper.cs:行号 219
|
| | |
|
| | | #27 2021-09-30 10:17:56,581 Common.dll OracleHelper.Execute SQL=SELECT * FROM GW_ALARM_LOG WHERE RESTORE_FLAG=0 and rownum < 10 ORDER BY ALARM_ID DESC Message=ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 17820 |
| | | 会话 ID: 14 序列号: 14066
|
| | |
|
| | |
| | | 在 Dao.GwSmDao.LoadInfoListcount(String apID, String opName, String clientID, String spID, String destnationId, String sDate, String beginTime, String endTime, String content, String opstat, Int32 TStatus, Int32& recordcount) 位置 D:\Company\SMGW_NewWeb\web\Dao\GwSmDao.cs:行号 197
|
| | | >>>>>>> Release
|
| | |
|
| | | #35 2021-09-26 14:19:27,636 Common.dll OracleHelper.ExecuteReader ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 7248 |
| | | 会话 ID: 81 序列号: 9801
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(CommandBehavior behavior)
|
| | | 在 Common.OracleHelper.ExecuteReader(String sql, OracleConnection x, OracleParameter[] cmdParms) 位置 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Common\OracleHelper.cs:行号 219
|
| | |
|
| | | #42 2021-09-26 14:32:56,924 Common.dll OracleHelper.Execute SQL=SELECT * FROM GW_ALARM_LOG WHERE RESTORE_FLAG=0 and rownum < 10 ORDER BY ALARM_ID DESC Message=ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 5640 |
| | | 会话 ID: 208 序列号: 44898
|
| | |
|
| | | #22 2021-09-27 16:49:48,131 Common.dll OracleHelper.ExecuteReader ORA-00904: "OP_GROUP_ID": 标识符无效
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
|
| | | 在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(CommandBehavior behavior)
|
| | | 在 Common.OracleHelper.ExecuteReader(String sql, OracleConnection x, OracleParameter[] cmdParms) 位置 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Common\OracleHelper.cs:行号 219
|
| | |
|
| | | #27 2021-09-30 10:17:56,581 Common.dll OracleHelper.Execute SQL=SELECT * FROM GW_ALARM_LOG WHERE RESTORE_FLAG=0 and rownum < 10 ORDER BY ALARM_ID DESC Message=ORA-03113: 通信通道的文件结尾 |
| | | 进程 ID: 17820 |
| | | 会话 ID: 14 序列号: 14066
|
| | |
|