public ActionResult GetLateList(string startTime, string endTime) { var list = LateReturnReportApp.GetListByClass(null, startTime, endTime).Select(p => new { inTime = p.InTime, count = p.F_Time }); return(Result.Success(list)); }
public ActionResult GetLateListByGrade(string gradeId, string startTime, string endTime) { var objlist = new List <object>(); var sysApp = new OrgService(); var classList = new List <Org>(); var divisList = new List <Org>(); sysApp.GetClassInfosByGradeId(gradeId, ref classList, ref divisList); var data = LateReturnReportApp.GetListByDivisList(divisList, classList, startTime, endTime); return(Result.Success(data)); }
public FileResult NoOutExport(string classId, string startTime, string endTime) { IDictionary <string, string> parms = new Dictionary <string, string>(); var exportSql = new ReportHelper().CreateSql("Dorm_NoOutReport", classId, startTime, endTime, ref parms); var dbParameter = CreateParms(parms); var reports = LateReturnReportApp.GetDataTable(exportSql, dbParameter); var ms = new NPOIExcel().ToExcelStream(reports, "长时间未出报表"); ms.Seek(0, SeekOrigin.Begin); var filename = "长时间未出报表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"; return(File(ms, "application/ms-excel", filename)); }
public ActionResult GetLateListByClass(string classId, string startTime, string endTime) { var list = LateReturnReportApp.GetListByClass(classId, startTime, endTime).Select(p => new { name = p.Name, className = p.Organ?.Name, address = p.Dorm?.Title, date = p.InTime, record = p.F_Time }); return(Result.Success(list)); }
public ActionResult GetLateListByStuId(string studentId, string startTime, string endTime) { if (string.IsNullOrEmpty(studentId)) { throw new System.Exception("请输入学生ID"); } var student = new StudentService().GetById(studentId); if (student == null) { throw new System.Exception("未找到学生"); } var list = LateReturnReportApp.GetLateListByStuId(studentId, startTime, endTime).Select(p => new { inTime = p.InTime, count = p.F_Time }); return(Result.Success(list)); }
public ActionResult GetLateReturnList(Pagination pagination, string startTime, string endTime, string classId) { var list = LateReturnReportApp.GetList(pagination, startTime, endTime, classId).Select(p => { var student = OriginalReportApp.GetOrganIdByStuNum(p.Account); return(new { Account = p.Account, Name = p.Name, DepartmentId = student?.DivisId, GradeId = student?.GradeId, ClassId = student?.ClassId, //Class = p.Class?.Name, Dorm = p.Dorm?.Title, College = p.College, InTime = p.InTime, Ftime = p.F_Time }); }).ToList(); return(Result.PagingRst(list, pagination.Records, pagination.Total)); }
public ActionResult GetLateListByDivis(string divisId, string startTime, string endTime) { var objlist = new List <object>(); var sysApp = new OrgService(); var classList = new List <Org>(); var name = sysApp.GetClassInfosByDivisId(divisId, ref classList); var list = LateReturnReportApp.GetListByClassList(classList.Select(p => p.Id).ToList(), startTime, endTime); var group = list.GroupBy(p => p.Class); foreach (var item in group) { var obj = new { classId = item.Key, className = classList.FirstOrDefault(p => p.Id.Equals(item.Key)).Name, count = item.Count() }; objlist.Add(obj); } return(Result.Success(list)); }