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.
 
 
 
 
 
 

164 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:23
  13. /// 描 述:扫码入教学楼统计
  14. /// </summary>
  15. public class R_EnterBuildingController : MvcControllerBase
  16. {
  17. private R_EnterBuildingIBLL r_EnterBuildingIBLL = new R_EnterBuildingBLL();
  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_EnterBuildingIBLL.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. /// <summary>
  76. /// 获取页面显示列表数据
  77. /// <summary>
  78. /// <param name="queryJson">查询参数</param>
  79. /// <returns></returns>
  80. [HttpGet]
  81. [AjaxOnly]
  82. public ActionResult GetList(string queryJson)
  83. {
  84. var data = r_EnterBuildingIBLL.GetList(queryJson);
  85. return Success(data);
  86. }
  87. /// <summary>
  88. /// 获取表单数据
  89. /// <summary>
  90. /// <returns></returns>
  91. [HttpGet]
  92. [AjaxOnly]
  93. public ActionResult GetFormData(string keyValue)
  94. {
  95. var R_EnterBuildingData = r_EnterBuildingIBLL.GetR_EnterBuildingEntity( keyValue );
  96. var jsonData = new {
  97. R_EnterBuilding = R_EnterBuildingData,
  98. };
  99. return Success(jsonData);
  100. }
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult DeptReportInfo(string queryJson)
  104. {
  105. var data = r_EnterBuildingIBLL.DeptReport(queryJson);
  106. return Success(data);
  107. }
  108. [HttpGet]
  109. [AjaxOnly]
  110. public ActionResult MajorReportInfo(string queryJson)
  111. {
  112. var data = r_EnterBuildingIBLL.MajorReport(queryJson);
  113. return Success(data);
  114. }
  115. [HttpGet]
  116. [AjaxOnly]
  117. public ActionResult ClassReportInfo(string queryJson)
  118. {
  119. var data = r_EnterBuildingIBLL.ClassReport(queryJson);
  120. return Success(data);
  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_EnterBuildingIBLL.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_EnterBuildingEntity entity = strEntity.ToObject<R_EnterBuildingEntity>();
  147. r_EnterBuildingIBLL.SaveEntity(userInfo,keyValue,entity);
  148. return Success("保存成功!");
  149. }
  150. #endregion
  151. }
  152. }