using Learun.Util; using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; using System.Linq; using System; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { /// /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 /// Copyright (c) 2013-2018 北京泉江科技有限公司 /// 创 建:超级管理员 /// 日 期:2020-04-16 15:52 /// 描 述:班级自诊打卡 /// public class ThermographyController : MvcControllerBase { private ThermographyIBLL thermographyIBLL = new ThermographyBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); #region 视图功能 /// /// 主页面 /// /// [HttpGet] public ActionResult Index() { return View(); } /// /// 主页面【提交】 /// /// [HttpGet] public ActionResult SubmitIndex() { return View(); } /// /// 表单页 /// /// [HttpGet] public ActionResult Form() { return View(); } /// /// 班级自诊打卡统计 /// /// [HttpGet] public ActionResult StatisticIndex() { return View(); } /// /// 班级自诊打开结果 /// /// [HttpGet] public ActionResult IndexResult() { return View(); } #endregion #region 获取数据 /// /// 获取页面显示列表分页数据 /// /// 分页参数 /// 查询参数 /// [HttpGet] [AjaxOnly] public ActionResult GetPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); var data = thermographyIBLL.GetPageList(paginationobj, queryJson); var jsonData = new { rows = data, total = paginationobj.total, page = paginationobj.page, records = paginationobj.records }; return Success(jsonData); } /// /// 获取页面显示列表数据 /// /// 查询参数 /// [HttpGet] [AjaxOnly] public ActionResult GetList(string queryJson) { var data = thermographyIBLL.GetList(queryJson); return Success(data); } /// /// 获取表单数据 /// /// [HttpGet] [AjaxOnly] public ActionResult GetFormData(string keyValue) { var ThermographyData = thermographyIBLL.GetThermographyEntity(keyValue); var jsonData = new { Thermography = ThermographyData, }; return Success(jsonData); } /// /// 获取页面显示列表分页数据 /// /// 分页参数 /// 查询参数 /// [HttpGet] [AjaxOnly] public ActionResult GetPageListOfStudent(string queryJson) { var data = thermographyIBLL.GetPageListOfStudent(queryJson).OrderBy(x => x.PersonBeingMeasured); return Success(data); } /// /// 获取页面显示列表数据 /// /// 查询参数 /// [HttpGet] [AjaxOnly] public ActionResult GetListOfStatistic(string queryJson) { var data = thermographyIBLL.GetListOfStatistic(queryJson).OrderByDescending(x => x.MeasureDate).ThenByDescending(x => x.MeasureTime).ThenBy(x => x.ClassNo); return Success(data); } #endregion #region 提交数据 /// /// 删除实体数据 /// 主键 /// /// [HttpPost] [AjaxOnly] public ActionResult DeleteForm(string keyValue) { thermographyIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } /// /// 保存实体数据(新增、修改) /// 主键 /// /// [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity) { UserInfo userInfo = LoginUserInfo.Get(); ThermographyEntity entity = strEntity.ToObject(); thermographyIBLL.SaveEntity(userInfo, keyValue, entity); return Success("保存成功!"); } /// /// 生成上午批次的测量体温人员 /// /// /// public ActionResult CreateMorningStudents(string timeType) { thermographyIBLL.CreateMorningStudents(timeType); return Success("生成成功"); } /// /// 提交实体数据 /// 主键 /// /// [HttpPost] [AjaxOnly] public ActionResult DoSave(string measureTime, string rowdatas) { var userInfo = LoginUserInfo.Get(); var entities = rowdatas.ToObject>(); thermographyIBLL.SaveEntityList(measureTime, entities); return Success("提交成功!"); } #endregion } }