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.
 
 
 
 
 
 

176 rivejä
5.3 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 Learun.Application.Base.SystemModule;
  8. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2022-08-30 11:05
  15. /// 描 述:学生证书管理
  16. /// </summary>
  17. public class StudentCertificateController : MvcControllerBase
  18. {
  19. private StudentCertificateIBLL studentCertificateIBLL = new StudentCertificateBLL();
  20. private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();
  21. private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
  22. #region 视图功能
  23. /// <summary>
  24. /// 主页面
  25. /// <summary>
  26. /// <returns></returns>
  27. [HttpGet]
  28. public ActionResult Index()
  29. {
  30. return View();
  31. }
  32. /// <summary>
  33. /// 表单页
  34. /// <summary>
  35. /// <returns></returns>
  36. [HttpGet]
  37. public ActionResult Form()
  38. {
  39. return View();
  40. }
  41. /// <summary>
  42. /// 修改分值
  43. /// <summary>
  44. /// <returns></returns>
  45. [HttpGet]
  46. public ActionResult FormScore()
  47. {
  48. return View();
  49. }
  50. #endregion
  51. #region 获取数据
  52. /// <summary>
  53. /// 获取页面显示列表数据
  54. /// </summary>
  55. /// <param name="pagination">分页参数</param>
  56. /// <param name="queryJson">查询参数</param>
  57. /// <returns></returns>
  58. [HttpGet]
  59. [AjaxOnly]
  60. public ActionResult GetPageList(string pagination, string queryJson)
  61. {
  62. Pagination paginationobj = pagination.ToObject<Pagination>();
  63. var data = studentCertificateIBLL.GetPageList(paginationobj, queryJson);
  64. var jsonData = new
  65. {
  66. rows = data,
  67. total = paginationobj.total,
  68. page = paginationobj.page,
  69. records = paginationobj.records
  70. };
  71. return Success(jsonData);
  72. }
  73. /// <summary>
  74. /// 获取表单数据
  75. /// </summary>
  76. /// <param name="keyValue">主键</param>
  77. /// <returns></returns>
  78. [HttpGet]
  79. [AjaxOnly]
  80. public ActionResult GetFormData(string keyValue)
  81. {
  82. var StudentCertificateData = studentCertificateIBLL.GetStudentCertificateEntity(keyValue);
  83. var jsonData = new
  84. {
  85. StudentCertificate = StudentCertificateData,
  86. };
  87. return Success(jsonData);
  88. }
  89. /// <summary>
  90. /// 获取表单数据
  91. /// </summary>
  92. /// <param name="keyValue">主键</param>
  93. /// <returns></returns>
  94. [HttpGet]
  95. [AjaxOnly]
  96. public ActionResult GetStuData(string stuno, string stuname)
  97. {
  98. var stuData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname);
  99. return Success(stuData);
  100. }
  101. /// <summary>
  102. /// 获取表单数据
  103. /// </summary>
  104. /// <param name="processId">流程实例主键</param>
  105. /// <returns></returns>
  106. [HttpGet]
  107. [AjaxOnly]
  108. public ActionResult GetFormDataByProcessId(string processId)
  109. {
  110. var StudentCertificateData = studentCertificateIBLL.GetEntityByProcessId(processId);
  111. var jsonData = new
  112. {
  113. StudentCertificate = StudentCertificateData,
  114. };
  115. return Success(jsonData);
  116. }
  117. #endregion
  118. #region 提交数据
  119. /// <summary>
  120. /// 删除实体数据
  121. /// </summary>
  122. /// <param name="keyValue">主键</param>
  123. /// <returns></returns>
  124. [HttpPost]
  125. [AjaxOnly]
  126. public ActionResult DeleteForm(string keyValue)
  127. {
  128. studentCertificateIBLL.DeleteEntity(keyValue);
  129. return Success("删除成功!");
  130. }
  131. /// <summary>
  132. /// 保存实体数据(新增、修改)
  133. /// </summary>
  134. /// <param name="keyValue">主键</param>
  135. /// <param name="strEntity">实体</param>
  136. /// <returns></returns>
  137. [HttpPost]
  138. [ValidateAntiForgeryToken]
  139. [AjaxOnly]
  140. public ActionResult SaveForm(string keyValue, string strEntity)
  141. {
  142. StudentCertificateEntity entity = strEntity.ToObject<StudentCertificateEntity>();
  143. studentCertificateIBLL.SaveEntity(keyValue, entity);
  144. if (string.IsNullOrEmpty(keyValue))
  145. {
  146. }
  147. return Success("保存成功!");
  148. }
  149. /// <summary>
  150. /// 提交
  151. /// </summary>
  152. /// <param name="keyValue"></param>
  153. /// <returns></returns>
  154. [HttpPost]
  155. [AjaxOnly]
  156. public ActionResult ChangeStatusById(string keyValue, string processId)
  157. {
  158. studentCertificateIBLL.ChangeStatusById(keyValue, 1, processId);
  159. return Success("操作成功!");
  160. }
  161. #endregion
  162. }
  163. }