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.
 
 
 
 
 
 

163 lines
4.7 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. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2020-04-21 09:27
  13. /// 描 述:扫码入校记录
  14. /// </summary>
  15. public class R_EnterSchoolController : MvcControllerBase
  16. {
  17. private R_EnterSchoolIBLL r_EnterSchoolIBLL = new R_EnterSchoolBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 主页面
  21. /// <summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult Index()
  25. {
  26. return View();
  27. }
  28. /// <summary>
  29. /// 表单页
  30. /// <summary>
  31. /// <returns></returns>
  32. [HttpGet]
  33. public ActionResult Form()
  34. {
  35. return View();
  36. }
  37. [HttpGet]
  38. public ActionResult DeptReport()
  39. {
  40. return View();
  41. }
  42. [HttpGet]
  43. public ActionResult MajorReport()
  44. {
  45. return View();
  46. }
  47. [HttpGet]
  48. public ActionResult ClassReport()
  49. {
  50. return View();
  51. }
  52. #endregion
  53. #region 获取数据
  54. /// <summary>
  55. /// 获取页面显示列表分页数据
  56. /// <summary>
  57. /// <param name="pagination">分页参数</param>
  58. /// <param name="queryJson">查询参数</param>
  59. /// <returns></returns>
  60. [HttpGet]
  61. [AjaxOnly]
  62. public ActionResult GetPageList(string pagination, string queryJson)
  63. {
  64. Pagination paginationobj = pagination.ToObject<Pagination>();
  65. var data = r_EnterSchoolIBLL.GetPageList(paginationobj, queryJson);
  66. var jsonData = new
  67. {
  68. rows = data,
  69. total = paginationobj.total,
  70. page = paginationobj.page,
  71. records = paginationobj.records
  72. };
  73. return Success(jsonData);
  74. }
  75. [HttpGet]
  76. [AjaxOnly]
  77. public ActionResult DeptReportInfo(string queryJson)
  78. {
  79. var data = r_EnterSchoolIBLL.DeptReport(queryJson);
  80. return Success(data);
  81. }
  82. [HttpGet]
  83. [AjaxOnly]
  84. public ActionResult MajorReportInfo(string queryJson)
  85. {
  86. var data = r_EnterSchoolIBLL.MajorReport(queryJson);
  87. return Success(data);
  88. }
  89. [HttpGet]
  90. [AjaxOnly]
  91. public ActionResult ClassReportInfo(string queryJson)
  92. {
  93. var data = r_EnterSchoolIBLL.ClassReport(queryJson);
  94. return Success(data);
  95. }
  96. /// <summary>
  97. /// 获取页面显示列表数据
  98. /// <summary>
  99. /// <param name="queryJson">查询参数</param>
  100. /// <returns></returns>
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult GetList(string queryJson)
  104. {
  105. var data = r_EnterSchoolIBLL.GetList(queryJson);
  106. return Success(data);
  107. }
  108. /// <summary>
  109. /// 获取表单数据
  110. /// <summary>
  111. /// <returns></returns>
  112. [HttpGet]
  113. [AjaxOnly]
  114. public ActionResult GetFormData(string keyValue)
  115. {
  116. var R_EnterSchoolData = r_EnterSchoolIBLL.GetR_EnterSchoolEntity( keyValue );
  117. var jsonData = new {
  118. R_EnterSchool = R_EnterSchoolData,
  119. };
  120. return Success(jsonData);
  121. }
  122. #endregion
  123. #region 提交数据
  124. /// <summary>
  125. /// 删除实体数据
  126. /// <param name="keyValue">主键</param>
  127. /// <summary>
  128. /// <returns></returns>
  129. [HttpPost]
  130. [AjaxOnly]
  131. public ActionResult DeleteForm(string keyValue)
  132. {
  133. r_EnterSchoolIBLL.DeleteEntity(keyValue);
  134. return Success("删除成功!");
  135. }
  136. /// <summary>
  137. /// 保存实体数据(新增、修改)
  138. /// <param name="keyValue">主键</param>
  139. /// <summary>
  140. /// <returns></returns>
  141. [HttpPost]
  142. [ValidateAntiForgeryToken]
  143. [AjaxOnly]
  144. public ActionResult SaveForm(string keyValue, string strEntity)
  145. {
  146. UserInfo userInfo = LoginUserInfo.Get(); R_EnterSchoolEntity entity = strEntity.ToObject<R_EnterSchoolEntity>();
  147. r_EnterSchoolIBLL.SaveEntity(userInfo,keyValue,entity);
  148. return Success("保存成功!");
  149. }
  150. #endregion
  151. }
  152. }