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.
 
 
 
 
 
 

166 lines
4.8 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.EducationalAdministration;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using System;
  7. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2020-03-30 14:11
  14. /// 描 述:工作简历
  15. /// </summary>
  16. public class PM_ResumeController : MvcControllerBase
  17. {
  18. private PM_ResumeIBLL pM_ResumeIBLL = new PM_ResumeBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. return View();
  37. }
  38. /// <summary>
  39. /// 主页面-统计
  40. /// <summary>
  41. /// <returns></returns>
  42. [HttpGet]
  43. public ActionResult StatisticIndex()
  44. {
  45. return View();
  46. }
  47. #endregion
  48. #region 获取数据
  49. /// <summary>
  50. /// 获取页面显示列表数据
  51. /// <summary>
  52. /// <param name="queryJson">查询参数</param>
  53. /// <returns></returns>
  54. [HttpGet]
  55. [AjaxOnly]
  56. public ActionResult GetPageList(string pagination, string queryJson)
  57. {
  58. Pagination paginationobj = pagination.ToObject<Pagination>();
  59. var data = pM_ResumeIBLL.GetPageList(paginationobj, queryJson);
  60. var jsonData = new
  61. {
  62. rows = data,
  63. total = paginationobj.total,
  64. page = paginationobj.page,
  65. records = paginationobj.records
  66. };
  67. return Success(jsonData);
  68. }
  69. /// <summary>
  70. /// 获取表单数据
  71. /// <summary>
  72. /// <returns></returns>
  73. [HttpGet]
  74. [AjaxOnly]
  75. public ActionResult GetFormData(string keyValue)
  76. {
  77. var PM_ResumeData = pM_ResumeIBLL.GetPM_ResumeEntity(keyValue);
  78. var jsonData = new
  79. {
  80. PM_Resume = PM_ResumeData,
  81. };
  82. return Success(jsonData);
  83. }
  84. /// <summary>
  85. /// 获取页面显示列表数据
  86. /// <summary>
  87. /// <param name="queryJson">查询参数</param>
  88. /// <returns></returns>
  89. [HttpGet]
  90. [AjaxOnly]
  91. public ActionResult GetPageStatisticList(string pagination, string queryJson)
  92. {
  93. Pagination paginationobj = pagination.ToObject<Pagination>();
  94. var data = pM_ResumeIBLL.GetPageStatisticList(paginationobj, queryJson);
  95. var jsonData = new
  96. {
  97. rows = data,
  98. total = paginationobj.total,
  99. page = paginationobj.page,
  100. records = paginationobj.records
  101. };
  102. return Success(jsonData);
  103. }
  104. #endregion
  105. #region 提交数据
  106. /// <summary>
  107. /// 删除实体数据
  108. /// <param name="keyValue">主键</param>
  109. /// <summary>
  110. /// <returns></returns>
  111. [HttpPost]
  112. [AjaxOnly]
  113. public ActionResult DeleteForm(string keyValue)
  114. {
  115. pM_ResumeIBLL.DeleteEntity(keyValue);
  116. return Success("删除成功!");
  117. }
  118. /// <summary>
  119. /// 保存实体数据(新增、修改)
  120. /// <param name="keyValue">主键</param>
  121. /// <summary>
  122. /// <returns></returns>
  123. [HttpPost]
  124. [ValidateAntiForgeryToken]
  125. [AjaxOnly]
  126. public ActionResult SaveForm(string keyValue, string strEntity)
  127. {
  128. var loginUserInfo = LoginUserInfo.Get();
  129. PM_ResumeEntity entity = strEntity.ToObject<PM_ResumeEntity>();
  130. entity.Updater = loginUserInfo.userId;
  131. entity.UpdateTime = DateTime.Now;
  132. pM_ResumeIBLL.SaveEntity(keyValue, entity);
  133. return Success("保存成功!");
  134. }
  135. /// <summary>
  136. /// 提交
  137. /// </summary>
  138. /// <param name="keyValue"></param>
  139. /// <param name="empId"></param>
  140. /// <returns></returns>
  141. public ActionResult Submit(string empId,bool status)
  142. {
  143. pM_ResumeIBLL.Submit(empId,status);
  144. if (status)
  145. {
  146. return Success("提交成功!");
  147. }
  148. else
  149. {
  150. return Success("取消提交成功");
  151. }
  152. }
  153. #endregion
  154. }
  155. }