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.
 
 
 
 
 
 

189 lines
5.5 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Application.TwoDevelopment.StudentWork;
  3. using Learun.Util;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web.Mvc;
  7. namespace Learun.Application.Web.Areas.StudentWork.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2023-03-16 17:18
  14. /// 描 述:家庭经济信息(辅导员)
  15. /// </summary>
  16. public class FamilyEconomyController : MvcControllerBase
  17. {
  18. private FamilyEconomyIBLL familyEconomyIBLL = new FamilyEconomyBLL();
  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. var logUser = LoginUserInfo.Get();
  38. var ClassNos = "";
  39. var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList();
  40. if (Classinfo.Any())
  41. {
  42. foreach (var item in Classinfo)
  43. {
  44. ClassNos += item.ClassNo + ",";
  45. }
  46. }
  47. ViewBag.ClassNo = ClassNos.TrimEnd(',');
  48. return View();
  49. }
  50. /// <summary>
  51. /// 主页面【二级学院】
  52. /// </summary>
  53. /// <returns></returns>
  54. [HttpGet]
  55. public ActionResult IndexOfTwo()
  56. {
  57. return View();
  58. }
  59. /// <summary>
  60. /// 主页面【学工部】
  61. /// </summary>
  62. /// <returns></returns>
  63. [HttpGet]
  64. public ActionResult IndexOfThree()
  65. {
  66. return View();
  67. }
  68. /// <summary>
  69. /// 主页面【学生】
  70. /// </summary>
  71. /// <returns></returns>
  72. [HttpGet]
  73. public ActionResult IndexOfStudent()
  74. {
  75. return View();
  76. }
  77. #endregion
  78. #region 获取数据
  79. /// <summary>
  80. /// 获取列表数据
  81. /// </summary>
  82. /// <param name="queryJson">查询参数</param>
  83. /// <returns></returns>
  84. [HttpGet]
  85. [AjaxOnly]
  86. public ActionResult GetList(string queryJson)
  87. {
  88. var data = familyEconomyIBLL.GetList(queryJson);
  89. return Success(data);
  90. }
  91. /// <summary>
  92. /// 获取列表分页数据
  93. /// </summary>
  94. /// <param name="pagination">分页参数</param>
  95. /// <param name="queryJson">查询参数</param>
  96. /// <returns></returns>
  97. [HttpGet]
  98. [AjaxOnly]
  99. public ActionResult GetPageList(string pagination, string queryJson)
  100. {
  101. Pagination paginationobj = pagination.ToObject<Pagination>();
  102. var data = familyEconomyIBLL.GetPageList(paginationobj, queryJson);
  103. var jsonData = new
  104. {
  105. rows = data,
  106. total = paginationobj.total,
  107. page = paginationobj.page,
  108. records = paginationobj.records
  109. };
  110. return Success(jsonData);
  111. }
  112. /// <summary>
  113. /// 获取表单数据
  114. /// </summary>
  115. /// <param name="keyValue">主键</param>
  116. /// <returns></returns>
  117. [HttpGet]
  118. [AjaxOnly]
  119. public ActionResult GetFormData(string keyValue)
  120. {
  121. var data = familyEconomyIBLL.GetEntity(keyValue);
  122. return Success(data);
  123. }
  124. #endregion
  125. #region 提交数据
  126. /// <summary>
  127. /// 删除实体数据
  128. /// </summary>
  129. /// <param name="keyValue">主键</param>
  130. /// <returns></returns>
  131. [HttpPost]
  132. [AjaxOnly]
  133. public ActionResult DeleteForm(string keyValue)
  134. {
  135. familyEconomyIBLL.DeleteEntity(keyValue);
  136. return Success("删除成功!");
  137. }
  138. /// <summary>
  139. /// 保存实体数据(新增、修改)
  140. /// </summary>
  141. /// <param name="keyValue">主键</param>
  142. /// <param name="entity">实体</param>
  143. /// <returns></returns>
  144. [HttpPost]
  145. [ValidateAntiForgeryToken]
  146. [AjaxOnly]
  147. public ActionResult SaveForm(string keyValue, FamilyEconomyEntity entity)
  148. {
  149. familyEconomyIBLL.SaveEntity(keyValue, entity);
  150. return Success("保存成功!");
  151. }
  152. /// <summary>
  153. /// 提交
  154. /// </summary>
  155. /// <param name="keyValue">主键</param>
  156. /// <returns></returns>
  157. [HttpPost]
  158. [AjaxOnly]
  159. public ActionResult DoSubmit(string keyValue, string status, string step)
  160. {
  161. familyEconomyIBLL.DoSubmit(keyValue, status, step);
  162. return Success("操作成功!");
  163. }
  164. /// <summary>
  165. /// 退回
  166. /// </summary>
  167. /// <param name="keyValue">主键</param>
  168. /// <returns></returns>
  169. [HttpPost]
  170. [AjaxOnly]
  171. public ActionResult DoBack(string keyValue, string status, string step)
  172. {
  173. familyEconomyIBLL.DoBack(keyValue, status, step);
  174. return Success("操作成功!");
  175. }
  176. #endregion
  177. }
  178. }