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.
 
 
 
 
 
 

157 lines
4.6 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;
  7. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-10-28 11:48
  14. /// 描 述:学籍异动
  15. /// </summary>
  16. public class StuInfoBasicChangeController : MvcControllerBase
  17. {
  18. private StuInfoBasicChangeIBLL stuInfoBasicChangeIBLL = new StuInfoBasicChangeBLL();
  19. private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
  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. #endregion
  49. #region 获取数据
  50. /// <summary>
  51. /// 获取页面显示列表数据
  52. /// <summary>
  53. /// <param name="queryJson">查询参数</param>
  54. /// <returns></returns>
  55. [HttpGet]
  56. [AjaxOnly]
  57. public ActionResult GetPageList(string pagination, string queryJson)
  58. {
  59. Pagination paginationobj = pagination.ToObject<Pagination>();
  60. var data = stuInfoBasicChangeIBLL.GetPageList(paginationobj, queryJson);
  61. var jsonData = new
  62. {
  63. rows = data,
  64. total = paginationobj.total,
  65. page = paginationobj.page,
  66. records = paginationobj.records
  67. };
  68. return Success(jsonData);
  69. }
  70. /// <summary>
  71. /// 获取表单数据
  72. /// <summary>
  73. /// <returns></returns>
  74. [HttpGet]
  75. [AjaxOnly]
  76. public ActionResult GetFormData(string keyValue)
  77. {
  78. var StuInfoBasicChangeData = stuInfoBasicChangeIBLL.GetStuInfoBasicChangeEntity(keyValue);
  79. StuInfoBasicChangeData.Grade = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(StuInfoBasicChangeData.StuNo)?.Grade;
  80. var jsonData = new
  81. {
  82. StuInfoBasicChange = StuInfoBasicChangeData,
  83. };
  84. return Success(jsonData);
  85. }
  86. #endregion
  87. #region 提交数据
  88. /// <summary>
  89. /// 删除实体数据
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. [HttpPost]
  94. [AjaxOnly]
  95. public ActionResult DeleteForm(string keyValue)
  96. {
  97. stuInfoBasicChangeIBLL.DeleteEntity(keyValue);
  98. return Success("删除成功!");
  99. }
  100. /// <summary>
  101. /// 保存实体数据(新增、修改)
  102. /// <param name="keyValue">主键</param>
  103. /// <summary>
  104. /// <returns></returns>
  105. [HttpPost]
  106. [ValidateAntiForgeryToken]
  107. [AjaxOnly]
  108. public ActionResult SaveForm(string keyValue, string strEntity)
  109. {
  110. StuInfoBasicChangeEntity entity = strEntity.ToObject<StuInfoBasicChangeEntity>();
  111. var loginUserInfo = LoginUserInfo.Get();
  112. entity.CreateTime = DateTime.Now;
  113. entity.CreateUserId = loginUserInfo.account;
  114. entity.CheckStatus = 0;
  115. stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity);
  116. return Success("保存成功!");
  117. }
  118. /// <summary>
  119. /// 审核实体数据
  120. /// <param name="keyValue">主键</param>
  121. /// <summary>
  122. /// <returns></returns>
  123. [HttpPost]
  124. [AjaxOnly]
  125. public ActionResult CheckForm(string keyValue)
  126. {
  127. stuInfoBasicChangeIBLL.DoCheck(keyValue);
  128. return Success("操作成功!");
  129. }
  130. /// <summary>
  131. /// 去审核实体数据
  132. /// <param name="keyValue">主键</param>
  133. /// <summary>
  134. /// <returns></returns>
  135. [HttpPost]
  136. [AjaxOnly]
  137. public ActionResult UnCheckForm(string keyValue)
  138. {
  139. stuInfoBasicChangeIBLL.DoUnCheck(keyValue);
  140. return Success("操作成功!");
  141. }
  142. #endregion
  143. }
  144. }