示例#1
0
        /// <summary>
        /// 系统服务根概数据查询
        /// zhoub 20150902
        /// </summary>
        /// <param name="logmodel"></param>
        /// <returns></returns>
        public JsonResult SurveyList(SearchExceptionLogModel model)
        {
            var result = this._exceptionLogService.GetExceptionLogSurvey();
            List <ExceptionLogModel> ds = result.Data;
            var data = new
            {
                rows  = ds,
                total = ds.Count
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        /// <summary>
        /// 系统服务日志数据查询
        /// zhoub 20150902
        /// </summary>
        /// <param name="logmodel"></param>
        /// <returns></returns>
        public JsonResult List(SearchExceptionLogModel model)
        {
            model.PagedIndex = model.PagedIndex == 0 ? 0 : model.PagedIndex;
            model.PagedSize  = model.PagedSize == 0 ? 10 : model.PagedSize;

            var result = this._exceptionLogService.GetExceptionLogList(model);
            List <ExceptionLogModel> ds = result.Data;
            var data = new
            {
                rows  = ds,
                total = result.Data.TotalCount
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        /// <summary>
        /// 分页查询
        /// zhoub 20150902
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ResultModel GetExceptionLogList(SearchExceptionLogModel model)
        {
            var tb = _database.Db.ExceptionLog;

            var where = new SimpleExpression(1, 1, SimpleExpressionType.Equal);

            if (model.ElId > 0)
            {
                where = new SimpleExpression(where, tb.ElId == model.ElId, SimpleExpressionType.And);
            }
            if (!string.IsNullOrEmpty(model.ServiceName))
            {
                where = tb.ServiceName.Like("%" + model.ServiceName.Trim() + "%");
            }
            if (model.Status > 0)
            {
                where = new SimpleExpression(where, tb.Status == model.Status, SimpleExpressionType.And);
            }
            if (model.ResultType > 0)
            {
                where = new SimpleExpression(where, tb.ResultType == model.ResultType, SimpleExpressionType.And);
            }
            if (!string.IsNullOrEmpty(model.HandleId))
            {
                where = new SimpleExpression(where, tb.HandleId == model.HandleId, SimpleExpressionType.And);
            }
            if (model.BeginOperateTime != null)
            {
                //查询开始时间
                where = new SimpleExpression(where, tb.CreateDT >= model.BeginOperateTime, SimpleExpressionType.And);
            }

            if (model.EndOperateTime != null)
            {
                //结束 时间
                where = new SimpleExpression(where, tb.CreateDT < Convert.ToDateTime(model.EndOperateTime).AddDays(1), SimpleExpressionType.And);
            }

            var result = new ResultModel
            {
                Data =
                    new SimpleDataPagedList <ExceptionLogModel>(tb.FindAll(where).OrderByCreateDTDescending(),
                                                                model.PagedIndex, model.PagedSize)
            };

            return(result);
        }
示例#4
0
        /// <summary>
        /// 数据异常处理查询
        /// zhoub 20150902
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Create(long?id)
        {
            ExceptionLogModel model = new ExceptionLogModel();

            if (id.HasValue)
            {
                SearchExceptionLogModel smodel = new SearchExceptionLogModel();
                smodel.ElId       = id.Value;
                smodel.PagedIndex = 0;
                smodel.PagedSize  = 100;
                //查询列表
                List <ExceptionLogModel> List = this._exceptionLogService.GetExceptionLogList(smodel).Data;
                if (List != null && List.Count > 0)
                {
                    model = List[0];
                }
            }
            return(PartialView(model));
        }