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.
 
 
 
 
 
 

148 lines
4.5 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.PersonnelManagement;
  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.PersonnelManagement.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2020-09-09 16:23
  15. /// 描 述:补卡申请
  16. /// </summary>
  17. public class ADR_AddApplyController : MvcControllerBase
  18. {
  19. private ADR_AddApplyIBLL aDR_AddApplyIBLL = new ADR_AddApplyBLL();
  20. private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();
  21. #region 视图功能
  22. /// <summary>
  23. /// 主页面
  24. /// <summary>
  25. /// <returns></returns>
  26. [HttpGet]
  27. public ActionResult Index()
  28. {
  29. return View();
  30. }
  31. /// <summary>
  32. /// 表单页
  33. /// <summary>
  34. /// <returns></returns>
  35. [HttpGet]
  36. public ActionResult Form()
  37. {
  38. return View();
  39. }
  40. #endregion
  41. #region 获取数据
  42. /// <summary>
  43. /// 获取页面显示列表数据
  44. /// </summary>
  45. /// <param name="pagination">分页参数</param>
  46. /// <param name="queryJson">查询参数</param>
  47. /// <returns></returns>
  48. [HttpGet]
  49. [AjaxOnly]
  50. public ActionResult GetPageList(string pagination, string queryJson)
  51. {
  52. Pagination paginationobj = pagination.ToObject<Pagination>();
  53. var data = aDR_AddApplyIBLL.GetPageList(paginationobj, queryJson);
  54. var jsonData = new
  55. {
  56. rows = data,
  57. total = paginationobj.total,
  58. page = paginationobj.page,
  59. records = paginationobj.records
  60. };
  61. return Success(jsonData);
  62. }
  63. /// <summary>
  64. /// 获取表单数据
  65. /// </summary>
  66. /// <param name="keyValue">主键</param>
  67. /// <returns></returns>
  68. [HttpGet]
  69. [AjaxOnly]
  70. public ActionResult GetFormData(string keyValue)
  71. {
  72. var ADR_AddApplyData = aDR_AddApplyIBLL.GetADR_AddApplyEntity( keyValue );
  73. var jsonData = new {
  74. ADR_AddApply = ADR_AddApplyData,
  75. };
  76. return Success(jsonData);
  77. }
  78. /// <summary>
  79. /// 获取表单数据
  80. /// </summary>
  81. /// <param name="processId">流程实例主键</param>
  82. /// <returns></returns>
  83. [HttpGet]
  84. [AjaxOnly]
  85. public ActionResult GetFormDataByProcessId(string processId)
  86. {
  87. var ADR_AddApplyData = aDR_AddApplyIBLL.GetEntityByProcessId( processId );
  88. var jsonData = new {
  89. ADR_AddApply = ADR_AddApplyData,
  90. };
  91. return Success(jsonData);
  92. }
  93. #endregion
  94. #region 提交数据
  95. /// <summary>
  96. /// 删除实体数据
  97. /// </summary>
  98. /// <param name="keyValue">主键</param>
  99. /// <returns></returns>
  100. [HttpPost]
  101. [AjaxOnly]
  102. public ActionResult DeleteForm(string keyValue)
  103. {
  104. aDR_AddApplyIBLL.DeleteEntity(keyValue);
  105. return Success("删除成功!");
  106. }
  107. /// <summary>
  108. /// 修改审批状态
  109. /// </summary>
  110. /// <param name="keyValue">主键</param>
  111. /// <returns></returns>
  112. [HttpPost]
  113. [AjaxOnly]
  114. public ActionResult ChangeStatusById(string keyValue,string processId)
  115. {
  116. aDR_AddApplyIBLL.ChangeStatusById(keyValue,processId);
  117. return Success("提交成功!");
  118. }
  119. /// <summary>
  120. /// 保存实体数据(新增、修改)
  121. /// </summary>
  122. /// <param name="keyValue">主键</param>
  123. /// <param name="strEntity">实体</param>
  124. /// <returns></returns>
  125. [HttpPost]
  126. [ValidateAntiForgeryToken]
  127. [AjaxOnly]
  128. public ActionResult SaveForm(string keyValue, string strEntity)
  129. {
  130. ADR_AddApplyEntity entity = strEntity.ToObject<ADR_AddApplyEntity>();
  131. aDR_AddApplyIBLL.SaveEntity(keyValue,entity);
  132. if (string.IsNullOrEmpty(keyValue))
  133. {
  134. }
  135. return Success("保存成功!");
  136. }
  137. #endregion
  138. }
  139. }