Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

144 linhas
4.2 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.AssetManagementSystem;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-09-11 10:23
  13. /// 描 述:资产调拨
  14. /// </summary>
  15. public class AllocationController : MvcControllerBase
  16. {
  17. private AllocationIBLL allocationIBLL = new AllocationBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 主页面
  21. /// <summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult Index()
  25. {
  26. return View();
  27. }
  28. /// <summary>
  29. /// 表单页
  30. /// <summary>
  31. /// <returns></returns>
  32. [HttpGet]
  33. public ActionResult Form()
  34. {
  35. return View();
  36. }
  37. #endregion
  38. #region 获取数据
  39. /// <summary>
  40. /// 获取页面显示列表数据
  41. /// <summary>
  42. /// <param name="queryJson">查询参数</param>
  43. /// <returns></returns>
  44. [HttpGet]
  45. [AjaxOnly]
  46. public ActionResult GetPageList(string pagination, string queryJson)
  47. {
  48. Pagination paginationobj = pagination.ToObject<Pagination>();
  49. var data = allocationIBLL.GetPageList(paginationobj, queryJson);
  50. var jsonData = new
  51. {
  52. rows = data,
  53. total = paginationobj.total,
  54. page = paginationobj.page,
  55. records = paginationobj.records
  56. };
  57. return Success(jsonData);
  58. }
  59. /// <summary>
  60. /// 获取表单数据
  61. /// <summary>
  62. /// <returns></returns>
  63. [HttpGet]
  64. [AjaxOnly]
  65. public ActionResult GetFormData(string keyValue)
  66. {
  67. var Ass_AllocationData = allocationIBLL.GetAss_AllocationEntity( keyValue );
  68. var jsonData = new {
  69. Ass_Allocation = Ass_AllocationData,
  70. };
  71. return Success(jsonData);
  72. }
  73. /// <summary>
  74. /// 获取表单数据
  75. /// <summary>
  76. /// <returns></returns>
  77. [HttpGet]
  78. [AjaxOnly]
  79. public ActionResult GetFormDataByProcessId(string processId)
  80. {
  81. var Ass_AllocationData = allocationIBLL.GetEntityByProcessId( processId );
  82. var jsonData = new {
  83. Ass_Allocation = Ass_AllocationData,
  84. };
  85. return Success(jsonData);
  86. }
  87. #endregion
  88. #region 提交数据
  89. /// <summary>
  90. /// 删除实体数据
  91. /// <param name="keyValue">主键</param>
  92. /// <summary>
  93. /// <returns></returns>
  94. [HttpPost]
  95. [AjaxOnly]
  96. public ActionResult DeleteForm(string keyValue)
  97. {
  98. allocationIBLL.DeleteEntity(keyValue);
  99. return Success("删除成功!");
  100. }
  101. /// <summary>
  102. /// 保存实体数据(新增、修改)
  103. /// <param name="keyValue">主键</param>
  104. /// <summary>
  105. /// <returns></returns>
  106. [HttpPost]
  107. [ValidateAntiForgeryToken]
  108. [AjaxOnly]
  109. public ActionResult SaveForm(string keyValue, string strEntity)
  110. {
  111. Ass_AllocationEntity entity = strEntity.ToObject<Ass_AllocationEntity>();
  112. allocationIBLL.SaveEntity(keyValue,entity);
  113. return Success("保存成功!");
  114. }
  115. #endregion
  116. #region 扩展数据
  117. /// <summary>
  118. /// 提交调拨申请单
  119. /// </summary>
  120. /// <param name="keyValue">调拨表主键</param>
  121. /// <param name="pastatus">审核状态</param>
  122. /// <param name="processId">流程Id</param>
  123. /// <returns></returns>
  124. public ActionResult ModifyStatus(string keyValue, int pastatus, string processId)
  125. {
  126. allocationIBLL.ModifyStatus(keyValue, pastatus, processId);
  127. return Success("提交成功!");
  128. }
  129. #endregion
  130. }
  131. }