You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ThermographyController.cs 6.3 KiB

4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.EducationalAdministration;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System;
  8. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  12. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2020-04-16 15:52
  15. /// 描 述:班级自诊打卡
  16. /// </summary>
  17. public class ThermographyController : MvcControllerBase
  18. {
  19. private ThermographyIBLL thermographyIBLL = new ThermographyBLL();
  20. private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
  21. #region 视图功能
  22. /// <summary>
  23. /// 主页面
  24. /// <summary>
  25. /// <returns></returns>
  26. [HttpGet]
  27. public ActionResult Index()
  28. {
  29. return View();
  30. }
  31. /// <summary>
  32. /// 主页面【提交】
  33. /// <summary>
  34. /// <returns></returns>
  35. [HttpGet]
  36. public ActionResult SubmitIndex()
  37. {
  38. return View();
  39. }
  40. /// <summary>
  41. /// 表单页
  42. /// <summary>
  43. /// <returns></returns>
  44. [HttpGet]
  45. public ActionResult Form()
  46. {
  47. return View();
  48. }
  49. /// <summary>
  50. /// 班级自诊打卡统计
  51. /// <summary>
  52. /// <returns></returns>
  53. [HttpGet]
  54. public ActionResult StatisticIndex()
  55. {
  56. return View();
  57. }
  58. /// <summary>
  59. /// 班级自诊打开结果
  60. /// <summary>
  61. /// <returns></returns>
  62. [HttpGet]
  63. public ActionResult IndexResult()
  64. {
  65. return View();
  66. }
  67. #endregion
  68. #region 获取数据
  69. /// <summary>
  70. /// 获取页面显示列表分页数据
  71. /// <summary>
  72. /// <param name="pagination">分页参数</param>
  73. /// <param name="queryJson">查询参数</param>
  74. /// <returns></returns>
  75. [HttpGet]
  76. [AjaxOnly]
  77. public ActionResult GetPageList(string pagination, string queryJson)
  78. {
  79. Pagination paginationobj = pagination.ToObject<Pagination>();
  80. var data = thermographyIBLL.GetPageList(paginationobj, queryJson);
  81. var jsonData = new
  82. {
  83. rows = data,
  84. total = paginationobj.total,
  85. page = paginationobj.page,
  86. records = paginationobj.records
  87. };
  88. return Success(jsonData);
  89. }
  90. /// <summary>
  91. /// 获取页面显示列表数据
  92. /// <summary>
  93. /// <param name="queryJson">查询参数</param>
  94. /// <returns></returns>
  95. [HttpGet]
  96. [AjaxOnly]
  97. public ActionResult GetList(string queryJson)
  98. {
  99. var data = thermographyIBLL.GetList(queryJson);
  100. return Success(data);
  101. }
  102. /// <summary>
  103. /// 获取表单数据
  104. /// <summary>
  105. /// <returns></returns>
  106. [HttpGet]
  107. [AjaxOnly]
  108. public ActionResult GetFormData(string keyValue)
  109. {
  110. var ThermographyData = thermographyIBLL.GetThermographyEntity(keyValue);
  111. var jsonData = new
  112. {
  113. Thermography = ThermographyData,
  114. };
  115. return Success(jsonData);
  116. }
  117. /// <summary>
  118. /// 获取页面显示列表分页数据
  119. /// <summary>
  120. /// <param name="pagination">分页参数</param>
  121. /// <param name="queryJson">查询参数</param>
  122. /// <returns></returns>
  123. [HttpGet]
  124. [AjaxOnly]
  125. public ActionResult GetPageListOfStudent(string queryJson)
  126. {
  127. var data = thermographyIBLL.GetPageListOfStudent(queryJson).OrderBy(x => x.PersonBeingMeasured);
  128. return Success(data);
  129. }
  130. /// <summary>
  131. /// 获取页面显示列表数据
  132. /// <summary>
  133. /// <param name="queryJson">查询参数</param>
  134. /// <returns></returns>
  135. [HttpGet]
  136. [AjaxOnly]
  137. public ActionResult GetListOfStatistic(string queryJson)
  138. {
  139. var data = thermographyIBLL.GetListOfStatistic(queryJson).OrderByDescending(x => x.MeasureDate).ThenByDescending(x => x.MeasureTime).ThenBy(x => x.ClassNo);
  140. return Success(data);
  141. }
  142. #endregion
  143. #region 提交数据
  144. /// <summary>
  145. /// 删除实体数据
  146. /// <param name="keyValue">主键</param>
  147. /// <summary>
  148. /// <returns></returns>
  149. [HttpPost]
  150. [AjaxOnly]
  151. public ActionResult DeleteForm(string keyValue)
  152. {
  153. thermographyIBLL.DeleteEntity(keyValue);
  154. return Success("删除成功!");
  155. }
  156. /// <summary>
  157. /// 保存实体数据(新增、修改)
  158. /// <param name="keyValue">主键</param>
  159. /// <summary>
  160. /// <returns></returns>
  161. [HttpPost]
  162. [ValidateAntiForgeryToken]
  163. [AjaxOnly]
  164. public ActionResult SaveForm(string keyValue, string strEntity)
  165. {
  166. UserInfo userInfo = LoginUserInfo.Get();
  167. ThermographyEntity entity = strEntity.ToObject<ThermographyEntity>();
  168. thermographyIBLL.SaveEntity(userInfo, keyValue, entity);
  169. return Success("保存成功!");
  170. }
  171. /// <summary>
  172. /// 生成上午批次的测量体温人员
  173. /// </summary>
  174. /// <param name="timeType"></param>
  175. /// <returns></returns>
  176. public ActionResult CreateMorningStudents(string timeType)
  177. {
  178. thermographyIBLL.CreateMorningStudents(timeType);
  179. return Success("生成成功");
  180. }
  181. /// <summary>
  182. /// 提交实体数据
  183. /// <param name="keyValue">主键</param>
  184. /// <summary>
  185. /// <returns></returns>
  186. [HttpPost]
  187. [AjaxOnly]
  188. public ActionResult DoSave(string measureTime, string rowdatas)
  189. {
  190. var userInfo = LoginUserInfo.Get();
  191. var entities = rowdatas.ToObject<List<ThermographyEntity>>();
  192. thermographyIBLL.SaveEntityList(measureTime, entities);
  193. return Success("提交成功!");
  194. }
  195. #endregion
  196. }
  197. }