Exemple #1
0
        //14提现记录
        public ActionResult WithdrawRecord(int id = 1)
        {
            ViewBag.MenuIndex = 14;
            SystemUsers user = Session["UserInfo"] as SystemUsers;

            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            user = http.DoGetObject <SystemUsers>(ApplicationPropertys.WEBAPI_URL + "/User/GetUserInfo/" + user.ID);
            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            Session["UserInfo"] = user;
            ViewBag.PageName    = "提现记录";

            TransactionRecord_Parameter pag = new TransactionRecord_Parameter();

            pag.PageSize  = 15;
            pag.PageIndex = id;
            pag.UserId    = user.ID;
            ModelByCount <SystemRequestRecord> model = http.DoPostObject <ModelByCount <SystemRequestRecord> >(ApplicationPropertys.WEBAPI_URL + "/User/GetWithdrawRecord/", pag);

            ViewBag.Datas = model;
            return(View());
        }
Exemple #2
0
        //5登录日志
        public ActionResult UserRecord(int id = 1)
        {
            ViewBag.MenuIndex = 5;
            SystemUsers user = Session["UserInfo"] as SystemUsers;

            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            user = http.DoGetObject <SystemUsers>(ApplicationPropertys.WEBAPI_URL + "/User/GetUserInfo/" + user.ID);
            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            Session["UserInfo"] = user;
            ViewBag.PageName    = "登录日志";

            RQPagerDto pag = new RQPagerDto();

            pag.PageSize    = 15;
            pag.PageIndex   = id;
            pag.QueryFileds = " [Id],[OperatorUserId],[OperatorUserName],[OperatorType],[BusinessType],[OperatorTime],[OperatorContent],[OperatorIP] ";
            pag.Where       = " BusinessType = '登陆' AND OperatorUserId = " + user.ID + " AND DATEDIFF(day,OperatorTime,getdate()) <= 10 ";
            pag.OrderBy     = " ID DESC";
            ModelByCount <SystemLog> model = http.DoPostObject <ModelByCount <SystemLog> >(ApplicationPropertys.WEBAPI_URL + "/SystemLog/GetList/", pag);

            ViewBag.Datas = model;
            return(View());
        }
        /// <summary>
        /// 查询债权
        /// </summary>
        public JsonResult SearchClaims(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                //表单的实体

                if (form["title"] != null && !string.IsNullOrEmpty(form["title"]))
                {
                    string title = form["title"].ToString();
                    sbCon.AppendFormat(" and Title like '%{0}%'", title.Replace("'", ""));
                }
                //借款人姓名
                if (form["Borrower"] != null && !string.IsNullOrEmpty(form["Borrower"]))
                {
                    string Borrower = form["Borrower"].ToString();
                    sbCon.AppendFormat(" and Borrower like '%{0}%' ", Borrower.Replace("'", ""));
                }
                //债权审核状态
                if (form["isApproved"] != null && !string.IsNullOrEmpty(form["isApproved"]))
                {
                    string isApproved = form["isApproved"].ToString();
                    sbCon.AppendFormat(" and IsApproved ={0}", isApproved.Replace("'", ""));
                }
                //债权发布时间
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and PublishTime between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                //排序的东西
                string OrderBy = string.Empty;
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                //分页
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemClaims> pagerData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemClaims> >(string.Format("{0}Claims/GetList", this.WebApiUrl), pager);
                result = Json(new { total = pagerData.AllCount, rows = pagerData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
        public JsonResult SearchSysHelp(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                //提问内容
                if (form["askContent"] != null && !string.IsNullOrEmpty(form["askContent"]))
                {
                    string askContent = form["askContent"].ToString();
                    sbCon.AppendFormat(" and AskContent like '%{0}%'", askContent.Replace("'", ""));
                }
                //提问账号
                if (form["askAccount"] != null && !string.IsNullOrEmpty(form["askAccount"]))
                {
                    string askAccount = form["askAccount"].ToString();
                    sbCon.AppendFormat(" and AskAccount like '%{0}%'", askAccount.Replace("'", ""));
                }
                //问题类型
                if (form["helpType"] != null && !string.IsNullOrEmpty(form["helpType"]) &&
                    form["helpType"].ToString() != "0")
                {
                    string helpType = form["helpType"].ToString();
                    sbCon.AppendFormat(" and HelpType = {0} ", helpType.Replace("'", ""));
                }
                //提问日期
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and AskDate between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                //分页
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemHelp> pagerData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemHelp> >(string.Format("{0}SysSetting/GetHelpList", this.WebApiUrl), pager);
                result = Json(new { total = pagerData.AllCount, rows = pagerData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
Exemple #5
0
        public ModelByCount <SystemBorrowerApply> GetList(RQPagerDto pager)
        {
            int TotalCount = 0;
            List <SystemBorrowerApply>         list = helper.GetPagerList <SystemBorrowerApply>(out TotalCount, pager.PageSize, pager.PageIndex, pager.Where, pager.QueryFileds, pager.OrderBy);
            ModelByCount <SystemBorrowerApply> mc   = new ModelByCount <SystemBorrowerApply>();

            mc.AllCount = TotalCount;
            mc.ListAll  = list;
            return(mc);
        }
        /// <summary>
        /// 查询债权申请
        /// </summary>
        public JsonResult GetApplyRecord(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                //表单的实体

                //借款人姓名
                if (form["borrowerName"] != null && !string.IsNullOrEmpty(form["borrowerName"]))
                {
                    string borrowerName = form["borrowerName"].ToString();
                    sbCon.AppendFormat(" and BorrowerName = '{0}'", borrowerName.Replace("'", ""));
                }
                //申请状态
                if (form["borrowerType"] != null && !string.IsNullOrEmpty(form["borrowerType"]))
                {
                    string borrowerType = form["borrowerType"].ToString();
                    sbCon.AppendFormat(" and BorrowerType = {0} ", borrowerType.Replace("'", ""));
                }
                //申请日期
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and BorrowerTime between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemBorrowerApply> applyData = http.DoPostObject <ModelByCount <SystemBorrowerApply> >(string.Format("{0}/ClaimsApplay/GetList", ApplicationPropertys.WEBAPI_URL), pager);
                result = Json(new { total = applyData.AllCount, rows = applyData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
Exemple #7
0
        //投资列表页面
        public ActionResult Investment(int id = 1)
        {
            ViewBag.OnIndex = 2;
            RQPagerDto pag = new RQPagerDto();

            pag.PageSize  = 4;
            pag.PageIndex = id;
            pag.OrderBy   = " PublishTime DESC";
            ModelByCount <SystemClaims> model = http.DoPostObject <ModelByCount <SystemClaims> >(ApplicationPropertys.WEBAPI_URL + "/Claims/GetList/", pag);

            ViewBag.Datas = model;
            return(View());
        }
        public JsonResult SearchSystemDic(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                if (form["DicKey"] != null && !string.IsNullOrEmpty(form["DicKey"]))
                {
                    string DicKey = form["DicKey"].ToString();
                    sbCon.AppendFormat(" and DicKey ='{0}'", DicKey.Replace("'", ""));
                }
                if (form["DicValue"] != null && !string.IsNullOrEmpty(form["DicValue"]))
                {
                    string DicValue = form["DicValue"].ToString();
                    sbCon.AppendFormat(" and DicValue like '%{0}%'", DicValue.Replace("'", ""));
                }
                if (form["DicType"] != null &&
                    !string.IsNullOrEmpty(form["DicType"]))
                {
                    string DicType = form["DicType"].ToString();
                    sbCon.AppendFormat(" and DicType = '{0}'", DicType.Replace("'", ""));
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                //分页
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemDictionary> pagerData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemDictionary> >(string.Format("{0}SysSetting/GetDicList", this.WebApiUrl), pager);
                result = Json(new { total = pagerData.AllCount, rows = pagerData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
Exemple #9
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="form"></param>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public ActionResult SearchSmsRecord(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");

                if (form["sendMobile"] != null && form["sendMobile"].ToString() != "")
                {
                    string sendMobile = form["sendMobile"].ToString();
                    sbCon.AppendFormat(" and SendMobile = '{0}' ", sendMobile);
                }
                if (form["acceptMobile"] != null && form["acceptMobile"].ToString() != "")
                {
                    string acceptMobile = form["acceptMobile"].ToString();
                    sbCon.AppendFormat(" and AcceptMobile = '{0}' ", acceptMobile);
                }
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and AddTime between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemSmsRecord> userData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemSmsRecord> >(string.Format("{0}Sms/GetRecordList", this.WebApiUrl), pager);
                result = Json(new { total = userData.AllCount, rows = userData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
Exemple #10
0
        /// <summary>
        /// 资金流水
        /// </summary>
        /// <param name="par"></param>
        /// <returns></returns>
        public ModelByCount <TransactionRecord_Return> TransactionRecord(TransactionRecord_Parameter par)
        {
            ModelByCount <TransactionRecord_Return> model = new ModelByCount <TransactionRecord_Return>();
            SqlCommand cmd = db.GetStoredProcedureCommand("Proc_TransactionRecord");

            db.AddInputParameter(cmd, "@UserID", DbType.Int32, par.UserId);
            db.AddInputParameter(cmd, "@PageIndex", DbType.Int32, par.PageIndex);
            db.AddInputParameter(cmd, "@PageSize", DbType.Int32, par.PageSize);
            db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4);
            DataTable dt = db.ExecuteDataTable(cmd);

            model.PageIndex = par.PageIndex;
            model.PageSize  = par.PageSize;
            model.ListAll   = dt.CreateDataReader().ReaderToList <TransactionRecord_Return>();
            model.AllCount  = db.GetParameter(cmd, "@ReturnValue").Value.ToInt();
            return(model);
        }
Exemple #11
0
        /// <summary>
        /// 查找并分页
        /// </summary>
        /// <param name="key"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public ModelByCount <SystemHelp> GetHelps(string key, int pageIndex, int pageSize)
        {
            ModelByCount <SystemHelp> result = new ModelByCount <SystemHelp>();
            SqlCommand cmd = db.GetStoredProcedureCommand("Proc_GetHelpsByKeyPage");

            db.AddInputParameter(cmd, "@Key", DbType.String, "%" + key + "%");
            db.AddInputParameter(cmd, "@PageIndex", DbType.Int32, pageIndex);
            db.AddInputParameter(cmd, "@PageSize", DbType.Int32, pageSize);
            db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4);
            DataTable dt = db.ExecuteDataTable(cmd);

            result.ListAll   = dt.CreateDataReader().ReaderToList <SystemHelp>();
            result.PageIndex = pageIndex;
            result.PageSize  = pageSize;
            result.AllCount  = db.GetParameter(cmd, "@ReturnValue").Value.ToInt();
            return(result);
        }
Exemple #12
0
        /// <summary>
        /// 获取体现记录(分页)
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ModelByCount <SystemRequestRecord> GetWithdrawRecord(TransactionRecord_Parameter model)
        {
            ModelByCount <SystemRequestRecord> result = new ModelByCount <SystemRequestRecord>();
            SqlCommand cmd = db.GetStoredProcedureCommand("Proc_GetWithdrawRecord");

            db.AddInputParameter(cmd, "@UserID", DbType.Int32, model.UserId);
            db.AddInputParameter(cmd, "@PageIndex", DbType.Int32, model.PageIndex);
            db.AddInputParameter(cmd, "@PageSize", DbType.Int32, model.PageSize);
            db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4);
            DataTable dt = db.ExecuteDataTable(cmd);

            result.ListAll   = dt.CreateDataReader().ReaderToList <SystemRequestRecord>();
            result.PageIndex = model.PageIndex;
            result.PageSize  = model.PageSize;
            result.AllCount  = db.GetParameter(cmd, "@ReturnValue").Value.ToInt();
            return(result);
        }
Exemple #13
0
        public ActionResult SearchSmsTemplte(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");

                if (form["templateName"] != null && form["templateName"].ToString() != "")
                {
                    string templateName = form["templateName"].ToString();
                    sbCon.AppendFormat(" and TemplateName like '%{0}%' ", templateName);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemSmsTemplate> userData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemSmsTemplate> >(string.Format("{0}Sms/GetTemplateList", this.WebApiUrl), pager);
                result = Json(new { total = userData.AllCount, rows = userData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
Exemple #14
0
        //6投资统计(收益明细)
        public ActionResult TotalrevenueDetails(int id = 1)
        {
            ViewBag.MenuIndex = 6;
            SystemUsers user = Session["UserInfo"] as SystemUsers;

            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            user = http.DoGetObject <SystemUsers>(ApplicationPropertys.WEBAPI_URL + "/User/GetUserInfo/" + user.ID);
            if (null == user)
            {
                return(RedirectToAction("Login", "Home"));
            }
            Session["UserInfo"] = user;
            ViewBag.PageName    = "投资统计";

            Earnings_Parameter par = new Earnings_Parameter();

            par.UserID    = user.ID;
            par.SearchWay = 1;
            par.Datas     = 0;
            //查询统计总数
            Earnings_Return             result = http.DoPostObject <Earnings_Return>(ApplicationPropertys.WEBAPI_URL + "/User/Totalrevenue", par);
            TransactionRecord_Parameter pag    = new TransactionRecord_Parameter();

            pag.PageSize  = 15;
            pag.PageIndex = id;
            pag.UserId    = user.ID;
            //交易明细
            ModelByCount <TransactionRecord_Return> model = http.DoPostObject <ModelByCount <TransactionRecord_Return> >(ApplicationPropertys.WEBAPI_URL + "/User/TransactionRecord/", pag);

            ViewBag.Result = result;
            ViewBag.Record = model;
            return(View());
        }
Exemple #15
0
        public ActionResult SearchUsers(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                //查询投资借贷人
                StringBuilder sbCon = new StringBuilder();
                if (form["userType"] != null && !string.IsNullOrEmpty(form["userType"]))
                {
                    if (this.UserInfo.UserType == 2)
                    {
                        sbCon.AppendFormat(" UserType in(2,3) ");
                    }
                    else
                    {
                        sbCon.AppendFormat(" UserType = {0} ", this.UserInfo.UserType);
                    }
                }
                else
                {
                    sbCon.Append(" UserType=1 ");
                }
                //登录账号
                if (form["loginAccount"] != null && !string.IsNullOrEmpty(form["loginAccount"]))
                {
                    string loginAccount = form["loginAccount"].ToString();
                    sbCon.AppendFormat(" and (UserName like '%{0}%' or CellPhone like '%{0}%' )", loginAccount.Replace("'", ""));
                }
                //真实姓名
                if (form["realName"] != null && !string.IsNullOrEmpty(form["realName"]))
                {
                    string realName = form["realName"].ToString();
                    sbCon.AppendFormat(" and RealName like '%{0}%' ", realName.Replace("'", ""));
                }
                //身份证号
                if (form["idNumber"] != null && !string.IsNullOrEmpty(form["idNumber"]))
                {
                    string idNumber = form["idNumber"].ToString();
                    sbCon.AppendFormat(" and IDNumber like '%{0}%'", idNumber.Replace("'", ""));
                }
                //邮箱
                if (form["userEmail"] != null && !string.IsNullOrEmpty(form["userEmail"]))
                {
                    string userEmail = form["userEmail"].ToString();
                    sbCon.AppendFormat(" and UserEmail like '%{0}%'", userEmail.Replace("'", ""));
                }
                //账号状态
                if (form["userState"] != null && !string.IsNullOrEmpty(form["userState"]))
                {
                    string userState = form["userState"].ToString();
                    sbCon.AppendFormat(" and UserState ={0} ", userState.Replace("'", ""));
                }
                //表单的实体
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and RegTime between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemUsers> userData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemUsers> >(string.Format("{0}User/GetList", this.WebApiUrl), pager);
                result = Json(new { total = userData.AllCount, rows = userData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
        /// <summary>
        /// 查询系统日志
        /// </summary>
        /// <param name="form"></param>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public JsonResult SearchSystemLog(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                if (form["userId"] != null && !string.IsNullOrEmpty(form["userId"]))
                {
                    string userId = form["userId"].ToString();
                    sbCon.AppendFormat(" and OperatorUserId ='{0}'", userId.Replace("'", ""));
                }
                if (form["userName"] != null && !string.IsNullOrEmpty(form["userName"]))
                {
                    string userName = form["userName"].ToString();
                    sbCon.AppendFormat(" and OperatorUserName like '%{0}%'", userName.Replace("'", ""));
                }
                if (form["operatorType"] != null &&
                    !string.IsNullOrEmpty(form["operatorType"]) &&
                    form["operatorType"].ToString().Trim() != "0"
                    )
                {
                    string operatorType = form["operatorType"].ToString();
                    sbCon.AppendFormat(" and OperatorType = '{0}'", operatorType.Replace("'", ""));
                }
                if (form["businessType"] != null && !string.IsNullOrEmpty(form["businessType"]))
                {
                    string businessType = form["businessType"].ToString();
                    sbCon.AppendFormat(" and BusinessType = '{0}'", businessType.Replace("'", ""));
                }
                if (form["ip"] != null && !string.IsNullOrEmpty(form["ip"]))
                {
                    string ip = form["ip"].ToString();
                    sbCon.AppendFormat(" and OperatorIP = '{0}'", ip.Replace("'", ""));
                }
                if (form["opCon"] != null && !string.IsNullOrEmpty(form["opCon"]))
                {
                    string opCon = form["opCon"].ToString();
                    sbCon.AppendFormat(" and OperatorContent like '%{0}%'", opCon.Replace("'", ""));
                }
                //表单的实体
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and OperatorTime between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                //分页
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemLog> pagerData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemLog> >(string.Format("{0}SysSetting/GetLogList", this.WebApiUrl), pager);
                result = Json(new { total = pagerData.AllCount, rows = pagerData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }
        public JsonResult SearchRequestRecord(FormCollection form, int page = 1, int rows = 10)
        {
            JsonResult result = null;

            try
            {
                StringBuilder sbCon = new StringBuilder(" 1=1 ");
                //请求流水号
                if (form["requestNo"] != null && !string.IsNullOrEmpty(form["requestNo"]))
                {
                    string requestNo = form["requestNo"].ToString();
                    sbCon.AppendFormat(" and Id like '%{0}%'", requestNo.Replace("'", ""));
                }
                //请求金额
                if (form["requestMoney"] != null && !string.IsNullOrEmpty(form["requestMoney"]))
                {
                    string requestMoney = form["requestMoney"].ToString();
                    sbCon.AppendFormat(" and RequestMoney ={0} ", requestMoney.Replace("'", ""));
                }
                //请求类型
                if (form["requestType"] != null && !string.IsNullOrEmpty(form["requestType"]) &&
                    form["requestType"].ToString() != "0"
                    )
                {
                    string requestType = form["requestType"].ToString();
                    sbCon.AppendFormat(" and RequestType ={0} ", requestType.Replace("'", ""));
                }
                //请求处理状态
                if (form["operStatus"] != null && !string.IsNullOrEmpty(form["operStatus"]) &&
                    form["operStatus"].ToString() != "0"
                    )
                {
                    string requestOperStatus = form["operStatus"].ToString();
                    sbCon.AppendFormat(" and RequestOperStatus ={0} ", requestOperStatus.Replace("'", ""));
                }

                //表单的实体
                if (form["startDate"] != null && form["endDate"] != null)
                {
                    string startDate = DateTime.Parse(form["startDate"].ToString()).ToString("yyyy-MM-dd");
                    string endDate   = DateTime.Parse(form["endDate"].ToString()).ToString("yyyy-MM-dd");
                    sbCon.AppendFormat(" and RequestDate between '{0} 00:00:00' and '{1} 23:59:59' ", startDate, endDate);
                }
                string OrderBy = string.Empty;
                //排序的东西
                if (form["sort"] != null && form["order"] != null)
                {
                    string sort  = form["sort"].ToString();
                    string order = form["order"].ToString();
                    if (!string.IsNullOrEmpty(sort))
                    {
                        OrderBy = sort + " " + order;
                    }
                }
                //分页
                RQPagerDto pager = new RQPagerDto();
                pager.PageSize  = rows;
                pager.PageIndex = page;
                pager.Where     = sbCon.ToString();
                pager.OrderBy   = OrderBy;
                ModelByCount <SystemRequestRecord> pagerData = HttpHelper.CreatHelper().DoPostObject <ModelByCount <SystemRequestRecord> >(string.Format("{0}SysSetting/GetRequestRecordList", this.WebApiUrl), pager);
                result = Json(new { total = pagerData.AllCount, rows = pagerData.ListAll }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }