特种设备修改,车辆管理人员管理合并,考试接口创建试卷和答题使用redis
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -23,7 +25,7 @@ namespace BLL
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Sys_HttpLog> GetSys_HttpLogByModle(Model.Sys_HttpLog table)
|
||||
public static IQueryable<Model.Sys_HttpLog> GetSys_HttpLogByModle(Model.Sys_HttpLog table)
|
||||
{
|
||||
var q = from x in db.Sys_HttpLog
|
||||
where
|
||||
@@ -32,15 +34,15 @@ namespace BLL
|
||||
(string.IsNullOrEmpty(table.HttpUrl) || x.HttpUrl.Contains(table.HttpUrl)) &&
|
||||
(string.IsNullOrEmpty(table.LogTxt) || x.LogTxt.Contains(table.LogTxt)) &&
|
||||
(string.IsNullOrEmpty(table.MeThod) || x.MeThod.Contains(table.MeThod)) //&&
|
||||
// (!table.LogTime.HasValue || (x.LogTime.HasValue && x.LogTime.Value.Date == table.LogTime.Value.Date))
|
||||
// (!table.LogTime.HasValue || (x.LogTime.HasValue && x.LogTime.Value.Date == table.LogTime.Value.Date))
|
||||
|
||||
select x
|
||||
select x
|
||||
;
|
||||
if (table.LogTime.HasValue)
|
||||
{
|
||||
q=q.Where(x=> x.LogTime.Value.Date.CompareTo(table.LogTime.Value.Date) == 0);
|
||||
q = q.Where(x => x.LogTime.Value.Date.CompareTo(table.LogTime.Value.Date) == 0);
|
||||
}
|
||||
return q.OrderByDescending(x=>x.LogTime ).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
@@ -48,7 +50,7 @@ namespace BLL
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Sys_HttpLog table, Grid Grid1)
|
||||
public static List<Sys_HttpLog> getListData(Model.Sys_HttpLog table, Grid Grid1)
|
||||
{
|
||||
var q = GetSys_HttpLogByModle(table);
|
||||
count = q.Count();
|
||||
@@ -56,19 +58,10 @@ namespace BLL
|
||||
{
|
||||
return null;
|
||||
}
|
||||
q= q.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
q = q.OrderByDescending(x => x.LogTime).Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize);
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.HttpLogId,
|
||||
x.LogTime,
|
||||
x.UserName,
|
||||
x.HttpUrl,
|
||||
x.LogTxt,
|
||||
x.MeThod,
|
||||
|
||||
};
|
||||
return (from x in q
|
||||
select x).ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -76,7 +69,10 @@ namespace BLL
|
||||
{
|
||||
return db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId);
|
||||
}
|
||||
|
||||
public static DateTime? GetSys_HttpLogMaxDate()
|
||||
{
|
||||
return db.Sys_HttpLog.Max(x => x.LogTime);
|
||||
}
|
||||
|
||||
public static void AddSys_HttpLog(Model.Sys_HttpLog newtable)
|
||||
{
|
||||
@@ -139,5 +135,12 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
public static void aa()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user