|
|
@@ -197,9 +197,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement |
|
|
|
var basedbname = BaseRepository().getDbConnection().Database; |
|
|
|
|
|
|
|
var strSql = new StringBuilder(); |
|
|
|
strSql.Append("select t.ID,t.UserNo,t.ClockStatus,u.F_RealName as UserName "); |
|
|
|
strSql.Append("select t.ID,t.UserNo,t.ClockStatus,u.F_RealName as UserName,d.f_fullname as department "); |
|
|
|
strSql.Append(" from ADR_Record t "); |
|
|
|
strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on u.F_EnCode=t.UserNo "); |
|
|
|
strSql.Append(" left join " + basedbname + ".dbo.LR_Base_Department d on d.F_DepartmentId=u.F_DepartmentId "); |
|
|
|
strSql.Append(" where 1=1 "); |
|
|
|
var queryParam = queryJson.ToJObject(); |
|
|
|
// 虚拟参数 |
|
|
@@ -468,7 +469,41 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement |
|
|
|
} |
|
|
|
//totalResult.Where(x => x.ClockStatus == ClockStatus); |
|
|
|
} |
|
|
|
return totalResult.OrderBy(x => x.ClockDate).ThenBy(x => x.UserNo).ThenBy(x => x.TimePeriodNo); |
|
|
|
var result= totalResult; |
|
|
|
if (pagination.sidx== "UserName") |
|
|
|
{ |
|
|
|
if (pagination.sord=="ASC") |
|
|
|
{ |
|
|
|
result = totalResult.OrderBy(x => x.UserName).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result = totalResult.OrderByDescending(x => x.UserName).ToList(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (pagination.sidx == "UserNo") |
|
|
|
{ |
|
|
|
if (pagination.sord == "ASC") |
|
|
|
{ |
|
|
|
result = totalResult.OrderBy(x => x.UserNo).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result = totalResult.OrderByDescending(x => x.UserNo).ToList(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (pagination.sidx == "Department") |
|
|
|
{ |
|
|
|
if (pagination.sord == "ASC") |
|
|
|
{ |
|
|
|
result = totalResult.OrderBy(x => x.Department).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result = totalResult.OrderByDescending(x => x.Department).ToList(); |
|
|
|
} |
|
|
|
} |
|
|
|
return result;// totalResult.OrderBy(x => x.ClockDate).ThenBy(x => x.UserNo).ThenBy(x => x.TimePeriodNo); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|