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.
 
 
 
 
 
 

258 lines
7.8 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Web.Mvc;
  6. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2023-03-13 10:37
  13. /// 描 述:定制功能助学金
  14. /// </summary>
  15. public class StuFellowshipController : MvcControllerBase
  16. {
  17. private StuFellowshipIBLL stuFellowshipIBLL = new StuFellowshipBLL();
  18. private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
  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. 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 FormView()
  56. {
  57. var logUser = LoginUserInfo.Get();
  58. var ClassNos = "";
  59. var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList();
  60. if (Classinfo.Any())
  61. {
  62. foreach (var item in Classinfo)
  63. {
  64. ClassNos += item.ClassNo + ",";
  65. }
  66. }
  67. ViewBag.ClassNo = ClassNos.TrimEnd(',');
  68. return View();
  69. }
  70. /// <summary>
  71. /// 主页面【二级学院】
  72. /// </summary>
  73. /// <returns></returns>
  74. [HttpGet]
  75. public ActionResult IndexOfTwo()
  76. {
  77. return View();
  78. }
  79. /// <summary>
  80. /// 主页面【学工部】
  81. /// </summary>
  82. /// <returns></returns>
  83. [HttpGet]
  84. public ActionResult IndexOfThree()
  85. {
  86. return View();
  87. }
  88. /// <summary>
  89. /// 主页面【学生】
  90. /// </summary>
  91. /// <returns></returns>
  92. [HttpGet]
  93. public ActionResult IndexOfStudent()
  94. {
  95. return View();
  96. }
  97. /// <summary>
  98. /// 表单页【学生】
  99. /// </summary>
  100. /// <returns></returns>
  101. [HttpGet]
  102. public ActionResult FormOfStudent()
  103. {
  104. var logUser = LoginUserInfo.Get();
  105. var stuinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(logUser.account);
  106. ViewBag.StuNo = stuinfo?.StuNo;
  107. ViewBag.StuName = stuinfo?.StuName;
  108. ViewBag.DeptNo = stuinfo?.DeptNo;
  109. ViewBag.ClassNo = stuinfo?.ClassNo;
  110. ViewBag.IdentityCardNo = stuinfo?.IdentityCardNo;
  111. ViewBag.OpenBank = stuinfo?.DepositBank;
  112. ViewBag.OpenAccount = stuinfo?.BankCard;
  113. return View();
  114. }
  115. /// <summary>
  116. /// 主页面【统计】
  117. /// </summary>
  118. /// <returns></returns>
  119. [HttpGet]
  120. public ActionResult StatisticIndex()
  121. {
  122. return View();
  123. }
  124. #endregion
  125. #region 获取数据
  126. /// <summary>
  127. /// 获取列表数据
  128. /// </summary>
  129. /// <param name="queryJson">查询参数</param>
  130. /// <returns></returns>
  131. [HttpGet]
  132. [AjaxOnly]
  133. public ActionResult GetList(string queryJson)
  134. {
  135. var data = stuFellowshipIBLL.GetList(queryJson);
  136. return Success(data);
  137. }
  138. /// <summary>
  139. /// 获取列表分页数据
  140. /// </summary>
  141. /// <param name="pagination">分页参数</param>
  142. /// <param name="queryJson">查询参数</param>
  143. /// <returns></returns>
  144. [HttpGet]
  145. [AjaxOnly]
  146. public ActionResult GetPageList(string pagination, string queryJson)
  147. {
  148. Pagination paginationobj = pagination.ToObject<Pagination>();
  149. var data = stuFellowshipIBLL.GetPageList(paginationobj, queryJson);
  150. var jsonData = new
  151. {
  152. rows = data,
  153. total = paginationobj.total,
  154. page = paginationobj.page,
  155. records = paginationobj.records
  156. };
  157. return Success(jsonData);
  158. }
  159. /// <summary>
  160. /// 获取表单数据
  161. /// </summary>
  162. /// <param name="keyValue">主键</param>
  163. /// <returns></returns>
  164. [HttpGet]
  165. [AjaxOnly]
  166. public ActionResult GetFormData(string keyValue)
  167. {
  168. //var data = stuFellowshipIBLL.GetEntity(keyValue);
  169. //return Success(data);
  170. var stuFellowshipData = stuFellowshipIBLL.GetEntity(keyValue);
  171. var jsonData = new
  172. {
  173. StuFellowship = stuFellowshipData,
  174. };
  175. return Success(jsonData);
  176. }
  177. /// <summary>
  178. /// 获取统计列表数据
  179. /// </summary>
  180. /// <param name="queryJson">查询参数</param>
  181. /// <returns></returns>
  182. [HttpGet]
  183. [AjaxOnly]
  184. public ActionResult GetStatisticList(string queryJson)
  185. {
  186. var data = stuFellowshipIBLL.GetStatisticList(queryJson);
  187. return Success(data);
  188. }
  189. #endregion
  190. #region 提交数据
  191. /// <summary>
  192. /// 删除实体数据
  193. /// </summary>
  194. /// <param name="keyValue">主键</param>
  195. /// <returns></returns>
  196. [HttpPost]
  197. [AjaxOnly]
  198. public ActionResult DeleteForm(string keyValue)
  199. {
  200. stuFellowshipIBLL.DeleteEntity(keyValue);
  201. return Success("删除成功!");
  202. }
  203. /// <summary>
  204. /// 保存实体数据(新增、修改)
  205. /// </summary>
  206. /// <param name="keyValue">主键</param>
  207. /// <param name="entity">实体</param>
  208. /// <returns></returns>
  209. [HttpPost]
  210. [ValidateAntiForgeryToken]
  211. [AjaxOnly]
  212. public ActionResult SaveForm(string keyValue, string strEntity)
  213. {
  214. StuFellowshipEntity entity = strEntity.ToObject<StuFellowshipEntity>();
  215. stuFellowshipIBLL.SaveEntity(keyValue, entity);
  216. return Success("保存成功!");
  217. }
  218. /// <summary>
  219. /// 提交
  220. /// </summary>
  221. /// <param name="keyValue">主键</param>
  222. /// <returns></returns>
  223. [HttpPost]
  224. [AjaxOnly]
  225. public ActionResult DoSubmit(string keyValue, string status, string step)
  226. {
  227. stuFellowshipIBLL.DoSubmit(keyValue, status, step);
  228. return Success("操作成功!");
  229. }
  230. /// <summary>
  231. /// 退回
  232. /// </summary>
  233. /// <param name="keyValue">主键</param>
  234. /// <returns></returns>
  235. [HttpPost]
  236. [AjaxOnly]
  237. public ActionResult DoBack(string keyValue, string status, string step)
  238. {
  239. stuFellowshipIBLL.DoBack(keyValue, status, step);
  240. return Success("操作成功!");
  241. }
  242. #endregion
  243. }
  244. }