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.

PM_WorkerTechnologyController.cs 4.9 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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:08
  14. /// 描 述:工人技术等级经历
  15. /// </summary>
  16. public class PM_WorkerTechnologyController : MvcControllerBase
  17. {
  18. private PM_WorkerTechnologyIBLL pM_WorkerTechnologyIBLL = new PM_WorkerTechnologyBLL();
  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_WorkerTechnologyIBLL.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_WorkerTechnologyData = pM_WorkerTechnologyIBLL.GetPM_WorkerTechnologyEntity( keyValue );
  78. var jsonData = new {
  79. PM_WorkerTechnology = PM_WorkerTechnologyData,
  80. };
  81. return Success(jsonData);
  82. }
  83. /// <summary>
  84. /// 获取页面显示列表数据
  85. /// <summary>
  86. /// <param name="queryJson">查询参数</param>
  87. /// <returns></returns>
  88. [HttpGet]
  89. [AjaxOnly]
  90. public ActionResult GetPageStatisticList(string pagination, string queryJson)
  91. {
  92. Pagination paginationobj = pagination.ToObject<Pagination>();
  93. var data = pM_WorkerTechnologyIBLL.GetPageStatisticList(paginationobj, queryJson);
  94. var jsonData = new
  95. {
  96. rows = data,
  97. total = paginationobj.total,
  98. page = paginationobj.page,
  99. records = paginationobj.records
  100. };
  101. return Success(jsonData);
  102. }
  103. #endregion
  104. #region 提交数据
  105. /// <summary>
  106. /// 删除实体数据
  107. /// <param name="keyValue">主键</param>
  108. /// <summary>
  109. /// <returns></returns>
  110. [HttpPost]
  111. [AjaxOnly]
  112. public ActionResult DeleteForm(string keyValue)
  113. {
  114. pM_WorkerTechnologyIBLL.DeleteEntity(keyValue);
  115. return Success("删除成功!");
  116. }
  117. /// <summary>
  118. /// 保存实体数据(新增、修改)
  119. /// <param name="keyValue">主键</param>
  120. /// <summary>
  121. /// <returns></returns>
  122. [HttpPost]
  123. [ValidateAntiForgeryToken]
  124. [AjaxOnly]
  125. public ActionResult SaveForm(string keyValue, string strEntity)
  126. {
  127. var loginUserInfo = LoginUserInfo.Get();
  128. PM_WorkerTechnologyEntity entity = strEntity.ToObject<PM_WorkerTechnologyEntity>();
  129. entity.Updater = loginUserInfo.userId;
  130. entity.UpdateTime = DateTime.Now;
  131. pM_WorkerTechnologyIBLL.SaveEntity(keyValue,entity);
  132. return Success("保存成功!");
  133. }
  134. /// <summary>
  135. /// 提交
  136. /// </summary>
  137. /// <param name="keyValue"></param>
  138. /// <param name="empId"></param>
  139. /// <returns></returns>
  140. public ActionResult Submit(string empId,bool status)
  141. {
  142. pM_WorkerTechnologyIBLL.Submit(empId,status);
  143. if (status)
  144. {
  145. return Success("提交成功!");
  146. }
  147. else
  148. {
  149. return Success("取消提交成功");
  150. }
  151. }
  152. #endregion
  153. }
  154. }