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.
 
 
 
 
 
 

158 lines
4.5 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Web.Mvc;
  5. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2022-05-18 11:08
  12. /// 描 述:一卡通交易流水
  13. /// </summary>
  14. public class MealCardRunTabController : MvcControllerBase
  15. {
  16. private MealCardRunTabIBLL mealCardRunTabIBLL = new MealCardRunTabBLL();
  17. #region 视图功能
  18. /// <summary>
  19. /// 主页面
  20. /// </summary>
  21. /// <returns></returns>
  22. [HttpGet]
  23. public ActionResult Index()
  24. {
  25. return View();
  26. }
  27. /// <summary>
  28. /// 表单页
  29. /// </summary>
  30. /// <returns></returns>
  31. [HttpGet]
  32. public ActionResult Form()
  33. {
  34. return View();
  35. }
  36. #endregion
  37. #region 获取数据
  38. /// <summary>
  39. /// 部门班级
  40. /// </summary>
  41. /// <returns></returns>
  42. public ActionResult GetDept()
  43. {
  44. var data = mealCardRunTabIBLL.GetDept();
  45. return Success(data);
  46. }
  47. /// <summary>
  48. /// 身份证类型
  49. /// </summary>
  50. /// <returns></returns>
  51. public ActionResult GetdentiName()
  52. {
  53. var data = mealCardRunTabIBLL.GetdentiName();
  54. return Success(data);
  55. }
  56. /// <summary>
  57. /// 流水类型
  58. /// </summary>
  59. /// <returns></returns>
  60. public ActionResult Getflowtype()
  61. {
  62. var data = mealCardRunTabIBLL.Getflowtype();
  63. return Success(data);
  64. }
  65. /// <summary>
  66. /// 餐次
  67. /// </summary>
  68. /// <returns></returns>
  69. public ActionResult Getseg()
  70. {
  71. var data = mealCardRunTabIBLL.Getseg();
  72. return Success(data);
  73. }
  74. /// <summary>
  75. /// 获取列表数据
  76. /// </summary>
  77. /// <param name="queryJson">查询参数</param>
  78. /// <returns></returns>
  79. [HttpGet]
  80. [AjaxOnly]
  81. public ActionResult GetList( string queryJson )
  82. {
  83. var data = mealCardRunTabIBLL.GetList(queryJson);
  84. return Success(data);
  85. }
  86. /// <summary>
  87. /// 获取列表分页数据
  88. /// </summary>
  89. /// <param name="pagination">分页参数</param>
  90. /// <param name="queryJson">查询参数</param>
  91. /// <returns></returns>
  92. [HttpGet]
  93. [AjaxOnly]
  94. public ActionResult GetPageList(string pagination, string queryJson)
  95. {
  96. Pagination paginationobj = pagination.ToObject<Pagination>();
  97. var data = mealCardRunTabIBLL.GetPageList(paginationobj, queryJson);
  98. var jsonData = new
  99. {
  100. rows = data,
  101. total = paginationobj.total,
  102. page = paginationobj.page,
  103. records = paginationobj.records
  104. };
  105. return Success(jsonData);
  106. }
  107. /// <summary>
  108. /// 获取表单数据
  109. /// </summary>
  110. /// <param name="keyValue">主键</param>
  111. /// <returns></returns>
  112. [HttpGet]
  113. [AjaxOnly]
  114. public ActionResult GetFormData(string keyValue)
  115. {
  116. var data = mealCardRunTabIBLL.GetEntity(keyValue);
  117. return Success(data);
  118. }
  119. #endregion
  120. #region 提交数据
  121. /// <summary>
  122. /// 删除实体数据
  123. /// </summary>
  124. /// <param name="keyValue">主键</param>
  125. /// <returns></returns>
  126. [HttpPost]
  127. [AjaxOnly]
  128. public ActionResult DeleteForm(string keyValue)
  129. {
  130. mealCardRunTabIBLL.DeleteEntity(keyValue);
  131. return Success("删除成功!");
  132. }
  133. /// <summary>
  134. /// 保存实体数据(新增、修改)
  135. /// </summary>
  136. /// <param name="keyValue">主键</param>
  137. /// <param name="entity">实体</param>
  138. /// <returns></returns>
  139. [HttpPost]
  140. [ValidateAntiForgeryToken]
  141. [AjaxOnly]
  142. public ActionResult SaveForm(string keyValue,MealCardRunTabEntity entity)
  143. {
  144. mealCardRunTabIBLL.SaveEntity(keyValue, entity);
  145. return Success("保存成功!");
  146. }
  147. #endregion
  148. }
  149. }