Esempio n. 1
0
        public ActionResult GetDormRecords(string studentId, string date)
        {
            if (string.IsNullOrEmpty(date))
            {
                throw new System.Exception("请输入日期");
            }
            if (string.IsNullOrEmpty(studentId))
            {
                throw new System.Exception("请输入学生ID");
            }
            var student = new StudentService().GetById(studentId);

            if (student == null)
            {
                throw new System.Exception("未找到学生");
            }
            var classInfo = new OrgService().GetById(student.ClassId);
            var list      = OriginalReportApp.GetOriginalListBydate(studentId, date);
            var data      = new
            {
                name      = student.Name,
                classname = classInfo.Name,
                records   = list.Select(p => new { p.InOut, p.Date, p.ChannelName })
            };

            return(Result.Success(data));
        }
Esempio n. 2
0
        public ActionResult GetOriginalListByDate(GetOriginalListByDateParms parms)
        {
            if (string.IsNullOrEmpty(parms.Date))
            {
                throw new System.Exception("请输入日期");
            }
            var pagination = new Pagination()
            {
                Page = parms.PageIndex, Rows = parms.PageSize
            };
            var list = OriginalReportApp.GetOriginalListBydate(pagination, parms.UserId, parms.Date);

            return(Result.PagingRst(list, pagination.Records, pagination.Total));
        }