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.
 
 
 
 
 
 

162 lines
4.8 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.AssetManagementSystem;
  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.AssetManagementSystem.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2023-05-05 14:52
  15. /// 描 述:Ass_FixAssetsApply
  16. /// </summary>
  17. public class Ass_FixAssetsApplyController : MvcControllerBase
  18. {
  19. private Ass_FixAssetsApplyIBLL ass_FixAssetsApplyIBLL = new Ass_FixAssetsApplyBLL();
  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 IndexView()
  54. {
  55. return View();
  56. }
  57. #endregion
  58. #region 获取数据
  59. /// <summary>
  60. /// 获取页面显示列表数据
  61. /// </summary>
  62. /// <param name="pagination">分页参数</param>
  63. /// <param name="queryJson">查询参数</param>
  64. /// <returns></returns>
  65. [HttpGet]
  66. [AjaxOnly]
  67. public ActionResult GetPageList(string pagination, string queryJson)
  68. {
  69. Pagination paginationobj = pagination.ToObject<Pagination>();
  70. var data = ass_FixAssetsApplyIBLL.GetPageList(paginationobj, queryJson);
  71. var jsonData = new
  72. {
  73. rows = data,
  74. total = paginationobj.total,
  75. page = paginationobj.page,
  76. records = paginationobj.records
  77. };
  78. return Success(jsonData);
  79. }
  80. /// <summary>
  81. /// 获取表单数据
  82. /// </summary>
  83. /// <param name="keyValue">主键</param>
  84. /// <returns></returns>
  85. [HttpGet]
  86. [AjaxOnly]
  87. public ActionResult GetFormData(string keyValue)
  88. {
  89. var Ass_FixAssetsApplyData = ass_FixAssetsApplyIBLL.GetAss_FixAssetsApplyEntity(keyValue);
  90. var jsonData = new
  91. {
  92. Ass_FixAssetsApply = Ass_FixAssetsApplyData,
  93. };
  94. return Success(jsonData);
  95. }
  96. /// <summary>
  97. /// 获取表单数据
  98. /// </summary>
  99. /// <param name="processId">流程实例主键</param>
  100. /// <returns></returns>
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult GetFormDataByProcessId(string processId)
  104. {
  105. var Ass_FixAssetsApplyData = ass_FixAssetsApplyIBLL.GetEntityByProcessId(processId);
  106. var jsonData = new
  107. {
  108. Ass_FixAssetsApply = Ass_FixAssetsApplyData,
  109. };
  110. return Success(jsonData);
  111. }
  112. #endregion
  113. #region 提交数据
  114. /// <summary>
  115. /// 删除实体数据
  116. /// </summary>
  117. /// <param name="keyValue">主键</param>
  118. /// <returns></returns>
  119. [HttpPost]
  120. [AjaxOnly]
  121. public ActionResult DeleteForm(string keyValue)
  122. {
  123. ass_FixAssetsApplyIBLL.DeleteEntity(keyValue);
  124. return Success("删除成功!");
  125. }
  126. /// <summary>
  127. /// 保存实体数据(新增、修改)
  128. /// </summary>
  129. /// <param name="keyValue">主键</param>
  130. /// <param name="strEntity">实体</param>
  131. /// <returns></returns>
  132. [HttpPost]
  133. [ValidateAntiForgeryToken]
  134. [AjaxOnly]
  135. public ActionResult SaveForm(string keyValue, string strEntity)
  136. {
  137. Ass_FixAssetsApplyEntity entity = strEntity.ToObject<Ass_FixAssetsApplyEntity>();
  138. ass_FixAssetsApplyIBLL.SaveEntity(keyValue, entity);
  139. if (string.IsNullOrEmpty(keyValue))
  140. {
  141. }
  142. return Success("保存成功!");
  143. }
  144. [HttpPost]
  145. [AjaxOnly]
  146. public ActionResult ModifyStatus(string keyValue, int pastatus, string processId)
  147. {
  148. ass_FixAssetsApplyIBLL.ModifyStatus(keyValue, pastatus, processId);
  149. return Success("提交成功!");
  150. }
  151. #endregion
  152. }
  153. }