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.
 
 
 
 
 
 

197 lines
6.1 KiB

  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. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2022-06-17 11:00
  14. /// 描 述:体温上报
  15. /// </summary>
  16. public class HealthPunchStuController : MvcControllerBase
  17. {
  18. private HealthPunchStuIBLL healthPunchStuIBLL = new HealthPunchStuBLL();
  19. private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
  20. #region 视图功能
  21. /// <summary>
  22. /// 主页面
  23. /// <summary>
  24. /// <returns></returns>
  25. [HttpGet]
  26. public ActionResult Index()
  27. {
  28. return View();
  29. }
  30. /// <summary>
  31. /// 表单页
  32. /// <summary>
  33. /// <returns></returns>
  34. [HttpGet]
  35. public ActionResult Form()
  36. {
  37. return View();
  38. }
  39. /// <summary>
  40. /// 表单页
  41. /// <summary>
  42. /// <returns></returns>
  43. [HttpGet]
  44. public ActionResult Statistics()
  45. {
  46. return View();
  47. }
  48. /// <summary>
  49. /// 表单页
  50. /// <summary>
  51. /// <returns></returns>
  52. /// <returns></returns>
  53. [HttpGet]
  54. public ActionResult StatisticsTeach()
  55. {
  56. return View();
  57. }
  58. #endregion
  59. #region 获取数据
  60. /// <summary>
  61. /// 获取页面显示列表数据
  62. /// </summary>
  63. /// <param name="pagination">分页参数</param>
  64. /// <param name="queryJson">查询参数</param>
  65. /// <returns></returns>
  66. [HttpGet]
  67. [AjaxOnly]
  68. public ActionResult GetPageList(string pagination, string queryJson)
  69. {
  70. Pagination paginationobj = pagination.ToObject<Pagination>();
  71. var data = healthPunchStuIBLL.GetPageList(paginationobj, queryJson);
  72. var jsonData = new
  73. {
  74. rows = data,
  75. total = paginationobj.total,
  76. page = paginationobj.page,
  77. records = paginationobj.records
  78. };
  79. return Success(jsonData);
  80. }
  81. /// <summary>
  82. /// 获取表单数据
  83. /// </summary>
  84. /// <param name="keyValue">主键</param>
  85. /// <returns></returns>
  86. [HttpGet]
  87. [AjaxOnly]
  88. public ActionResult GetFormData(string keyValue)
  89. {
  90. var HealthPunchStuData = healthPunchStuIBLL.GetHealthPunchStuEntity(keyValue);
  91. var jsonData = new
  92. {
  93. HealthPunchStu = HealthPunchStuData,
  94. };
  95. return Success(jsonData);
  96. }
  97. /// <summary>
  98. /// 获取页面显示列表数据
  99. /// </summary>
  100. /// <param name="pagination">分页参数</param>
  101. /// <param name="queryJson">查询参数</param>
  102. /// <returns></returns>
  103. [HttpGet]
  104. [AjaxOnly]
  105. public ActionResult GetStatistics(string pagination, string queryJson)
  106. {
  107. Pagination paginationobj = pagination.ToObject<Pagination>();
  108. var data = healthPunchStuIBLL.GetStatistics(paginationobj, queryJson);
  109. var jsonData = new
  110. {
  111. rows = data,
  112. total = paginationobj.total,
  113. page = paginationobj.page,
  114. records = paginationobj.records
  115. };
  116. return Success(jsonData);
  117. }
  118. /// <summary>
  119. /// 获取页面显示列表数据
  120. /// </summary>
  121. /// <param name="pagination">分页参数</param>
  122. /// <param name="queryJson">查询参数</param>
  123. /// <returns></returns>
  124. [HttpGet]
  125. [AjaxOnly]
  126. public ActionResult GetStatisticsTeach(string pagination, string queryJson)
  127. {
  128. Pagination paginationobj = pagination.ToObject<Pagination>();
  129. var data = healthPunchStuIBLL.GetStatisticsTeach(paginationobj, queryJson);
  130. var jsonData = new
  131. {
  132. rows = data,
  133. total = paginationobj.total,
  134. page = paginationobj.page,
  135. records = paginationobj.records
  136. };
  137. return Success(jsonData);
  138. }
  139. #endregion
  140. #region 提交数据
  141. /// <summary>
  142. /// 删除实体数据
  143. /// </summary>
  144. /// <param name="keyValue">主键</param>
  145. /// <returns></returns>
  146. [HttpPost]
  147. [AjaxOnly]
  148. public ActionResult DeleteForm(string keyValue)
  149. {
  150. healthPunchStuIBLL.DeleteEntity(keyValue);
  151. return Success("删除成功!");
  152. }
  153. /// <summary>
  154. /// 保存实体数据(新增、修改)
  155. /// </summary>
  156. /// <param name="keyValue">主键</param>
  157. /// <param name="strEntity">实体</param>
  158. /// <returns></returns>
  159. [HttpPost]
  160. [ValidateAntiForgeryToken]
  161. [AjaxOnly]
  162. public ActionResult SaveForm(string keyValue, string strEntity)
  163. {
  164. HealthPunchStuEntity entity = strEntity.ToObject<HealthPunchStuEntity>();
  165. healthPunchStuIBLL.SaveEntity(keyValue, entity);
  166. return Success("保存成功!");
  167. }
  168. /// <summary>
  169. /// 保存实体数据(新增、修改)
  170. /// </summary>
  171. /// <param name="keyValue">主键</param>
  172. /// <param name="strEntity">实体</param>
  173. /// <returns></returns>
  174. [HttpPost]
  175. [ValidateAntiForgeryToken]
  176. [AjaxOnly]
  177. public ActionResult PunchCard(string keyValue, string strEntity)
  178. {
  179. HealthPunchStuEntity entity = strEntity.ToObject<HealthPunchStuEntity>();
  180. var result = healthPunchStuIBLL.PunchCard(keyValue, entity);
  181. return Success(result);
  182. }
  183. #endregion
  184. }
  185. }