|
|
@@ -63,6 +63,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement |
|
|
|
dp.Add("UserName", "%" + queryParam["UserName"].ToString() + "%", DbType.String); |
|
|
|
strSql.Append(" AND emp.F_RealName Like @UserName "); |
|
|
|
} |
|
|
|
if (!queryParam["UserNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("UserNo", queryParam["UserNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.UserNo = @UserNo "); |
|
|
|
} |
|
|
|
if (!queryParam["Department"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("Department", queryParam["Department"].ToString(), DbType.String); |
|
|
@@ -249,12 +254,18 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement |
|
|
|
{ |
|
|
|
date = queryParam["Date"].ToDate().ToDateString(); |
|
|
|
} |
|
|
|
|
|
|
|
var strSql = new StringBuilder(); |
|
|
|
strSql.Append("select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADType,t.ADTime,t.ClockTime,t.ClockStatus "); |
|
|
|
strSql.Append(" from " + basedbname + ".dbo.LR_Base_User u "); |
|
|
|
strSql.Append(" left join ADR_Record t on u.F_EnCode=t.UserNo and t.ADYear='" + date.Substring(0, 4) + "' and t.ADMonth='" + date.Substring(5, 2) + "' and t.ADDay='" + date.Substring(8, 2) + "' "); |
|
|
|
strSql.Append(" where u.F_Description='教师' AND u.F_DeleteMark = 0 AND u.F_EnabledMark = 1 and u.F_Encode is not null "); |
|
|
|
strSql.Append(" from " + basedbname + ".dbo.LR_Base_User u "); |
|
|
|
strSql.Append(" inner join EmpInfo emp on u.F_EnCode=emp.EmpNo "); |
|
|
|
strSql.Append(" left join ADR_Record t on u.F_EnCode=t.UserNo and t.ADYear='" + date.Substring(0, 4) + "' and t.ADMonth='" + date.Substring(5, 2) + "' and t.ADDay='" + date.Substring(8, 2) + "' "); |
|
|
|
strSql.Append(" where u.F_Description='教师' AND u.F_DeleteMark = 0 AND u.F_EnabledMark = 1 and u.F_Encode is not null "); |
|
|
|
|
|
|
|
var UserNoPrev = Config.GetValue("ADR_RecordUserNoPrev"); |
|
|
|
if (!string.IsNullOrEmpty(UserNoPrev)) |
|
|
|
{ |
|
|
|
strSql.Append(" and u.F_encode like '" + UserNoPrev + "%' "); |
|
|
|
} |
|
|
|
// 虚拟参数 |
|
|
|
var dp = new DynamicParameters(new { }); |
|
|
|
if (!queryParam["UserNo"].IsEmpty()) |
|
|
|