var date = datest.ToDate().AddDays(i).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.ADphoto,t.ADType,emp.Photo,t.img,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
strSql.Append($"select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADphoto,t.ADType,emp.Photo,emp.CompilationCategory,t.img,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
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) + "' ");