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.
 
 
 
 
 
 

166 lines
5.2 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.EducationalAdministration;
  4. using System.Web.Mvc;
  5. using Learun.Application.TwoDevelopment.LR_CodeDemo;
  6. using System.Collections.Generic;
  7. using System;
  8. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2021-03-26 15:23
  15. /// 描 述:学生违纪管理
  16. /// </summary>
  17. public class StuDisciplineManagementController : MvcControllerBase
  18. {
  19. private StuDisciplineManagementIBLL stuDisciplineManagementIBLL = new StuDisciplineManagementBLL();
  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 FormView()
  45. {
  46. return View();
  47. }
  48. /// <summary>
  49. /// 主页面-学生查看
  50. /// <summary>
  51. /// <returns></returns>
  52. [HttpGet]
  53. public ActionResult IndexOfStudent()
  54. {
  55. return View();
  56. }
  57. #endregion
  58. #region 获取数据
  59. /// <summary>
  60. /// 获取页面显示列表数据
  61. /// </summary>
  62. /// <param name="pagination">分页参数</param>
  63. /// <param name="queryJson">查询参数</param>
  64. /// <returns></returns>
  65. [HttpGet]
  66. [AjaxOnly]
  67. public ActionResult GetPageList(string pagination, string queryJson)
  68. {
  69. Pagination paginationobj = pagination.ToObject<Pagination>();
  70. var data = stuDisciplineManagementIBLL.GetPageList(paginationobj, queryJson);
  71. var jsonData = new
  72. {
  73. rows = data,
  74. total = paginationobj.total,
  75. page = paginationobj.page,
  76. records = paginationobj.records
  77. };
  78. return Success(jsonData);
  79. }
  80. /// <summary>
  81. /// 获取表单数据
  82. /// </summary>
  83. /// <param name="keyValue">主键</param>
  84. /// <returns></returns>
  85. [HttpGet]
  86. [AjaxOnly]
  87. public ActionResult GetFormData(string keyValue)
  88. {
  89. var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetStuDisciplineManagementEntity( keyValue );
  90. var jsonData = new {
  91. StuDisciplineManagement = StuDisciplineManagementData,
  92. };
  93. return Success(jsonData);
  94. }
  95. /// <summary>
  96. /// 获取表单数据
  97. /// </summary>
  98. /// <param name="processId">流程实例主键</param>
  99. /// <returns></returns>
  100. [HttpGet]
  101. [AjaxOnly]
  102. public ActionResult GetFormDataByProcessId(string processId)
  103. {
  104. var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetEntityByProcessId( processId );
  105. var jsonData = new {
  106. StuDisciplineManagement = StuDisciplineManagementData,
  107. };
  108. return Success(jsonData);
  109. }
  110. #endregion
  111. #region 提交数据
  112. /// <summary>
  113. /// 删除实体数据
  114. /// </summary>
  115. /// <param name="keyValue">主键</param>
  116. /// <returns></returns>
  117. [HttpPost]
  118. [AjaxOnly]
  119. public ActionResult DeleteForm(string keyValue)
  120. {
  121. stuDisciplineManagementIBLL.DeleteEntity(keyValue);
  122. return Success("删除成功!");
  123. }
  124. /// <summary>
  125. /// 保存实体数据(新增、修改)
  126. /// </summary>
  127. /// <param name="keyValue">主键</param>
  128. /// <param name="strEntity">实体</param>
  129. /// <returns></returns>
  130. [HttpPost]
  131. [ValidateAntiForgeryToken]
  132. [AjaxOnly]
  133. public ActionResult SaveForm(string keyValue, string strEntity)
  134. {
  135. var userInfo = LoginUserInfo.Get();
  136. StuDisciplineManagementEntity entity = strEntity.ToObject<StuDisciplineManagementEntity>();
  137. entity.CheckStatus = "0";
  138. entity.CreateTime = DateTime.Now;
  139. entity.CreateUserId = userInfo.userId;
  140. stuDisciplineManagementIBLL.SaveEntity(keyValue,entity);
  141. return Success("保存成功!");
  142. }
  143. /// <summary>
  144. /// 提交实体数据
  145. /// </summary>
  146. /// <param name="keyValue">主键</param>
  147. /// <returns></returns>
  148. [HttpPost]
  149. [AjaxOnly]
  150. public ActionResult DoSubmit(string keyValue, string status, string processId)
  151. {
  152. stuDisciplineManagementIBLL.DoSubmit(keyValue, status, processId);
  153. return Success("提交成功!");
  154. }
  155. #endregion
  156. }
  157. }