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.
 
 
 
 
 
 

198 lines
5.9 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-02-18 14:27
  15. /// 描 述:教材订单管理
  16. /// </summary>
  17. public class TextBookIndentController : MvcControllerBase
  18. {
  19. private TextBookIndentIBLL textBookIndentIBLL = new TextBookIndentBLL();
  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 FormDetail()
  54. {
  55. return View();
  56. }
  57. /// <summary>
  58. /// 查看
  59. /// <summary>
  60. /// <returns></returns>
  61. [HttpGet]
  62. public ActionResult FormLook()
  63. {
  64. return View();
  65. }
  66. #endregion
  67. #region 获取数据
  68. /// <summary>
  69. /// 获取页面显示列表数据
  70. /// </summary>
  71. /// <param name="pagination">分页参数</param>
  72. /// <param name="queryJson">查询参数</param>
  73. /// <returns></returns>
  74. [HttpGet]
  75. [AjaxOnly]
  76. public ActionResult GetPageList(string pagination, string queryJson)
  77. {
  78. Pagination paginationobj = pagination.ToObject<Pagination>();
  79. var data = textBookIndentIBLL.GetPageList(paginationobj, queryJson);
  80. var jsonData = new
  81. {
  82. rows = data,
  83. total = paginationobj.total,
  84. page = paginationobj.page,
  85. records = paginationobj.records
  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 GetFormData(string keyValue)
  97. {
  98. var TextBookIndentData = textBookIndentIBLL.GetTextBookIndentEntity(keyValue);
  99. var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);
  100. var jsonData = new
  101. {
  102. TextBookIndent = TextBookIndentData,
  103. TextBookIndentDetail = TextBookIndentDetailData,
  104. };
  105. return Success(jsonData);
  106. }
  107. /// <summary>
  108. /// 获取表单数据
  109. /// </summary>
  110. /// <param name="processId">流程实例主键</param>
  111. /// <returns></returns>
  112. [HttpGet]
  113. [AjaxOnly]
  114. public ActionResult GetFormDataByProcessId(string processId)
  115. {
  116. var TextBookIndentData = textBookIndentIBLL.GetEntityByProcessId(processId);
  117. var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);
  118. var jsonData = new
  119. {
  120. TextBookIndent = TextBookIndentData,
  121. TextBookIndentDetail = TextBookIndentDetailData,
  122. };
  123. return Success(jsonData);
  124. }
  125. /// <summary>
  126. /// 学年下拉框(四位)
  127. /// </summary>
  128. /// <returns></returns>
  129. [HttpGet]
  130. [AjaxOnly]
  131. public ActionResult GetAcademicYear()
  132. {
  133. var data = WebHelper.GenerateNearByYear();
  134. return Success(data);
  135. }
  136. #endregion
  137. #region 提交数据
  138. /// <summary>
  139. /// 删除实体数据
  140. /// </summary>
  141. /// <param name="keyValue">主键</param>
  142. /// <returns></returns>
  143. [HttpPost]
  144. [AjaxOnly]
  145. public ActionResult DeleteForm(string keyValue)
  146. {
  147. textBookIndentIBLL.DeleteEntity(keyValue);
  148. return Success("删除成功!");
  149. }
  150. /// <summary>
  151. /// 保存实体数据(新增、修改)
  152. /// </summary>
  153. /// <param name="keyValue">主键</param>
  154. /// <param name="strEntity">实体</param>
  155. /// <returns></returns>
  156. [HttpPost]
  157. [ValidateAntiForgeryToken]
  158. [AjaxOnly]
  159. public ActionResult SaveForm(string keyValue, string strEntity,string strTextBookIndentDetailList)
  160. {
  161. TextBookIndentEntity entity = strEntity.ToObject<TextBookIndentEntity>();
  162. List<TextBookIndentDetailEntity> textBookIndentDetail = strTextBookIndentDetailList.ToObject<List<TextBookIndentDetailEntity>>();
  163. textBookIndentIBLL.SaveEntity(keyValue, entity, textBookIndentDetail);
  164. return Success("保存成功!");
  165. }
  166. #endregion
  167. #region 扩展数据
  168. /// <summary>
  169. /// 提交订单
  170. /// </summary>
  171. /// <param name="keyValue"></param>
  172. /// <returns></returns>
  173. [HttpPost]
  174. [AjaxOnly]
  175. public ActionResult ModifyStatus(string keyValue, string processId)
  176. {
  177. textBookIndentIBLL.ModifyStatus(keyValue, processId);
  178. return Success("操作成功!");
  179. }
  180. #endregion
  181. }
  182. }