| | |
| | | /** |
| | | * 查询统计功能 |
| | | */ |
| | | public List<GwClient> LoadInfoList(string clientID, string clientName, string company, string agent) |
| | | public List<GwClient> LoadInfoList(string clientID, string clientName, string company, string agent, string permissionsSQL) |
| | | { |
| | | |
| | | |
| | |
| | | ((DbParameter)oracleParameterArray[3]).Value = (object)("%" + agent + "%"); |
| | | stringBuilder.Append(" and Agent like :Agent"); |
| | | } |
| | | |
| | | //客户权限SQL脚本 |
| | | stringBuilder.Append(permissionsSQL); |
| | | |
| | | stringBuilder.Append(" order by CREATE_TIME DESC,CLIENT_ID DESC"); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("select * " + stringBuilder.ToString(), OracleHelper.Connection, oracleParameterArray)) |
| | | { |
| | |
| | | return OracleHelper.Execute(PubConstant.doOracleSql(100000, stringBuilder.ToString()).ToString(), OracleHelper.Connection, oracleParameterArray); |
| | | } |
| | | |
| | | public List<GwSp> LoadInfoList(string spId, string apId, string clientId) |
| | | public List<GwSp> LoadInfoList(string spId, string apId, string clientId, string permissionsSQL) |
| | | { |
| | | List<GwSp> list1 = new List<GwSp>(); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | |
| | | list2.Add(new OracleParameter(":ClientID", (object) clientId)); |
| | | stringBuilder.Append(" and CLIENT_ID=:ClientID"); |
| | | } |
| | | stringBuilder.Append(" order by SP_ID DESC"); |
| | | |
| | | //客户权限SQL脚本 |
| | | stringBuilder.Append(permissionsSQL); |
| | | |
| | | stringBuilder.Append(" order by SP_ID DESC"); |
| | | using (OracleDataReader reader = OracleHelper.ExecuteReader("select * " + stringBuilder.ToString(), OracleHelper.Connection, list2.ToArray())) |
| | | { |
| | | while (((DbDataReader) reader).Read()) |
| | |
| | | return OracleHelper.Execute("SELECT * FROM\r\n(\r\nselect STATIS_TIME,\r\nNVL(SUM(AP_STATUS0),0) as AP_STATUS0,\r\nNVL(SUM(AP_STATUS1),0) as AP_STATUS1,\r\nNVL(SUM(AP_STATUS2),0) as AP_STATUS2,\r\nNVL(SUM(AP_STATUS3),0) as AP_STATUS3,\r\nNVL(SUM(AP_STATUS4),0) as AP_STATUS4,\r\nNVL(SUM(AP_STATUS5),0) as AP_STATUS5\r\n from GW_SM_STATIS_V3 where CLIENT_ID=:CLIENT_ID GROUP BY STATIS_TIME ORDER BY STATIS_TIME DESC) WHERE ROWNUM < 30 ORDER BY STATIS_TIME ASC", OracleHelper.Connection, new OracleParameter(":CLIENT_ID", (object) clientID)); |
| | | } |
| | | |
| | | //public List<GwStatisV3Item> Query(DateTime startTime, DateTime endTime, string clientID, string spID, string apID, string opID, string timeExpression, StatisOption so) |
| | | public List<GwStatisV3Item> Query(DateTime startTime, DateTime endTime, string clientID, string spID, string apID, string opID, string timeExpression, string permissionsSQL, StatisOption so) |
| | | { |
| | | List<GwStatisV3Item> list = new List<GwStatisV3Item>(); |
| | |
| | | |
| | | public partial class ExportDocument : PageBase<SysUser>, IRequiresSessionState |
| | | { |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | _userId = this.AppContext.SessionObject.UserID; |
| | | _userType = this.AppContext.SessionObject.UserType; |
| | | _account = this.AppContext.SessionObject.Account; |
| | | |
| | | switch (this.AppContext.GetString("action")) |
| | | { |
| | | case "exPortGwSp": |
| | |
| | | string statistype = this.AppContext.GetString("Statistype"); |
| | | StatisOption statisoption = (StatisOption)this.AppContext.GetInt("Statisoption"); |
| | | |
| | | string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | List<GwOp> opList; |
| | | |
| | | using (GwOpDao dao = new GwOpDao()) |
| | |
| | | |
| | | using (GwClientDao dao = new GwClientDao()) |
| | | { |
| | | clientList = dao.LoadInfoList("", "", "", ""); |
| | | clientList = dao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | |
| | | List<GwAp> apList; |
| | |
| | | apList = dao.LoadInfoList("", "", "", out recordCount, 99999, 1); |
| | | } |
| | | |
| | | |
| | | GwStatisV3Dao _Dao = new GwStatisV3Dao(); |
| | | var list = _Dao.Query(Convert.ToDateTime(beginTime), Convert.ToDateTime(endTime), clientId, spid, apMid, opid, statistype, (StatisOption)statisoption); |
| | | var list = _Dao.Query(Convert.ToDateTime(beginTime), Convert.ToDateTime(endTime), clientId, spid, apMid, opid, statistype, permissionsSQL, (StatisOption)statisoption); |
| | | |
| | | List<Model.GwStatisV3> statisList = new List<Model.GwStatisV3>(); |
| | | foreach (GwStatisV3Item item in list) |
| | |
| | | |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 公司名称(全称) |
| | | 客户名称 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="company" id="company" value="" class="form-control" /> |
| | |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <a class="btn btn-xs btn-primary action-generate-password ">生成密码</a> |
| | | <a class="btn btn-xs btn-success action-generate-password ">复制密码</a> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 客户名称 <span style="color:red">*</span> |
| | | 联系人 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="clientName" id="clientName" value="" class="form-control" /> |
| | |
| | | public partial class _GwMoRoute : PageBase<SysUser>, IRequiresSessionState |
| | | { |
| | | private List<GwOp> OpList; |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | |
| | | public GwSp GwSp { get; protected set; } |
| | | |
| | | public string SpID |
| | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("306", FailedOperation.ErrorMsgOnly); |
| | | |
| | | _userId = this.AppContext.SessionObject.UserID; |
| | | _userType = this.AppContext.SessionObject.UserType; |
| | | _account = this.AppContext.SessionObject.Account; |
| | | |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | if (!string.IsNullOrEmpty(this.SpID)) |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", ""); |
| | | string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | stringBuilder.Append("<option value=\"\">暂无帐号</option>"); |
| | |
| | | { |
| | | if (this._ClientList == null) |
| | | { |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | this._ClientList = gwClientDao.LoadInfoList("", "", "", ""); |
| | | using (GwClientDao gwClientDao = new GwClientDao()) { |
| | | string permissionsSQL = gwClientDao.GetClientPermissions(_userId, _userType, null); |
| | | this._ClientList = gwClientDao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | } |
| | | return this._ClientList; |
| | | } |
| | |
| | | private List<GwClient> ClientList; |
| | | private List<GwAp> ApList; |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | string permissionsSQL = null; |
| | | |
| | | |
| | | public StatisOption SelectedOptions { get; set; } |
| | | |
| | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("502", FailedOperation.ErrorMsgOnly); |
| | | |
| | | _userId = this.AppContext.SessionObject.UserID; |
| | | _userType = this.AppContext.SessionObject.UserType; |
| | | _account = this.AppContext.SessionObject.Account; |
| | | permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", ""); |
| | | { |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | using (GwApDao gwApDao = new GwApDao()) |
| | | this.ApList = gwApDao.LoadInfoList(); |
| | | if (this.IsPostBack) |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", ""); |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | stringBuilder.Append("<option value=\"\">暂无客户信息</option>"); |
| | |
| | | private List<GwClient> ClientList; |
| | | private List<GwAp> ApList; |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | string permissionsSQL = null; |
| | | |
| | | public StatisOption SelectedOptions { get; set; } |
| | | |
| | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("502", FailedOperation.ErrorMsgOnly); |
| | | permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", ""); |
| | | { |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | using (GwApDao gwApDao = new GwApDao()) |
| | | this.ApList = gwApDao.LoadInfoList(); |
| | | if (this.IsPostBack) |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", ""); |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | stringBuilder.Append("<option value=\"\">暂无帐号信息</option>"); |
| | |
| | | |
| | | public partial class _GwStatisRefund : PageBase<SysUser>, IRequiresSessionState |
| | | { |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | string permissionsSQL = null; |
| | | |
| | | public string SelectedSpID { get; set; } |
| | | |
| | | public string StatisType { get; set; } |
| | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("502", FailedOperation.ErrorMsgOnly); |
| | | permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | if (this.IsPostBack) |
| | | return; |
| | | this.SelectedOptions = StatisOption.None; |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", ""); |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | stringBuilder.Append("<option value=\"\">暂无客户信息</option>"); |
| | |
| | | string opID = context.GetString("opid"); |
| | | string statistype = context.GetString("statistype"); |
| | | StatisOption statisoption = (StatisOption)context.GetInt("statisoption"); |
| | | |
| | | string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | List<GwOp> opList; |
| | | |
| | |
| | | |
| | | using (GwClientDao dao = new GwClientDao()) |
| | | { |
| | | clientList = dao.LoadInfoList("", "", "", ""); |
| | | clientList = dao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | |
| | | List<GwAp> apList; |
| | |
| | | |
| | | apList = dao.LoadInfoList("", "", "", out recordCount, 99999, 1); |
| | | } |
| | | |
| | | //var list = _Dao.Query(beginTime, endTime, clientID, spID, apID, opID, statistype, (StatisOption)statisoption); |
| | | |
| | | //根据系统用户获取有权限客户 |
| | | string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | var list = _Dao.Query(beginTime, endTime, clientID, spID, apID, opID, statistype, permissionsSQL, (StatisOption)statisoption); |
| | | |
| | | System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
| | |
| | | private List<GwOp> OpList; |
| | | private List<GwClient> ClientList; |
| | | private List<GwAp> ApList; |
| | | |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | string permissionsSQL = null; |
| | | |
| | | public StatisOption SelectedOptions { get; set; } |
| | | |
| | | public DateTime StartTime { get; set; } |
| | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.CheckRight("502", FailedOperation.ErrorMsgOnly); |
| | | |
| | | _userId = this.AppContext.SessionObject.UserID; |
| | | _userType = this.AppContext.SessionObject.UserType; |
| | | _account = this.AppContext.SessionObject.Account; |
| | | permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); |
| | | |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", ""); |
| | | { |
| | | this.ClientList = gwClientDao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | } |
| | | using (GwApDao gwApDao = new GwApDao()) |
| | | this.ApList = gwApDao.LoadInfoList(); |
| | | if (this.IsPostBack) |
| | |
| | | return string.Empty; |
| | | GwClient gwClient = this.ClientList.Find((Predicate<GwClient>)(client => client.ClientID == clientID)); |
| | | if (gwClient != null) |
| | | return string.Format("{0}-{1}", (object)gwClient.ClientID, (object)gwClient.ClientName); |
| | | return string.Format("{0}", (object)gwClient.ClientName); |
| | | return string.Format("{0}", (object)clientID); |
| | | } |
| | | |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (GwSpDao gwSpDao = new GwSpDao()) |
| | | { |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", ""); |
| | | List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | stringBuilder.Append("<option value=\"\">暂无客户信息</option>"); |
| | |
| | | protected List<GwOp> OpList; |
| | | protected List<GwProduct> GwProductList; |
| | | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | |
| | | |
| | | public GwSp GwSp { get; protected set; } |
| | |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | _userId = this.AppContext.SessionObject.UserID; |
| | | _userType = this.AppContext.SessionObject.UserType; |
| | | _account = this.AppContext.SessionObject.Account; |
| | | |
| | | using (GwApDao gwApDao = new GwApDao()) |
| | | this.ApList = gwApDao.LoadInfoList(); |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | |
| | | { |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | { |
| | | string permissionsSQL = gwClientDao.GetClientPermissions(_userId, _userType, null); |
| | | string str = ""; |
| | | List<GwClient> list = gwClientDao.LoadInfoList("", "", "", ""); |
| | | List<GwClient> list = gwClientDao.LoadInfoList("", "", "", "", permissionsSQL); |
| | | if (list.Count == 0) |
| | | { |
| | | str += string.Format("<option value=\"\">尚未创建客户信息</option>"); |
| | |
| | | else |
| | | { |
| | | foreach (GwClient gwClient in list) |
| | | str = !(clientId == gwClient.ClientID) ? str + string.Format("<option value=\"{0}\">{0}-{1}</option>", (object)gwClient.ClientID, (object)gwClient.ClientName) : str + string.Format("<option value=\"{0}\" selected>{0}-{1}</option>", (object)gwClient.ClientID, (object)gwClient.ClientName); |
| | | str = !(clientId == gwClient.ClientID) ? str + string.Format("<option value=\"{0}\">{1}</option>", (object)gwClient.ClientID, (object)gwClient.ClientName) : str + string.Format("<option value=\"{0}\" selected>{1}</option>", (object)gwClient.ClientID, (object)gwClient.ClientName); |
| | | } |
| | | return str; |
| | | } |