|
@@ -81,11 +81,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
var strSql = new StringBuilder(); |
|
|
|
|
|
strSql.Append("SELECT "); |
|
|
|
|
|
strSql.Append(fieldSql); |
|
|
|
|
|
strSql.Append(" FROM Gz_Items t "); |
|
|
|
|
|
return this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(strSql.ToString(), pagination); |
|
|
|
|
|
|
|
|
var skip = pagination.rows * (pagination.page - 1); |
|
|
|
|
|
var qj = queryJson.ToJObject(); |
|
|
|
|
|
|
|
|
|
|
|
var query = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(); |
|
|
|
|
|
if(!qj["keyword"].IsEmpty()) |
|
|
|
|
|
{ |
|
|
|
|
|
var k = qj["keyword"].ToString(); |
|
|
|
|
|
query = query.Where(x => x.Name.Contains(k)); |
|
|
|
|
|
} |
|
|
|
|
|
pagination.records = query.Count(); |
|
|
|
|
|
|
|
|
|
|
|
query = query.Skip(skip).Take(pagination.rows); |
|
|
|
|
|
|
|
|
|
|
|
return query; |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|