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.
 
 
 
 
 
 

200 lines
5.9 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.PersonnelManagement;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using System;
  7. namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2021-02-21 10:07
  14. /// 描 述:会议管理
  15. /// </summary>
  16. public class MeetingManagementController : MvcControllerBase
  17. {
  18. private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL();
  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 FormView()
  44. {
  45. return View();
  46. }
  47. /// <summary>
  48. /// 主页面-我申请的会议
  49. /// <summary>
  50. /// <returns></returns>
  51. [HttpGet]
  52. public ActionResult IndexOfMyApply()
  53. {
  54. return View();
  55. }
  56. /// <summary>
  57. /// 主页面-我申请的会议
  58. /// <summary>
  59. /// <returns></returns>
  60. [HttpGet]
  61. public ActionResult IndexOfMyJoin()
  62. {
  63. return View();
  64. }
  65. #endregion
  66. #region 获取数据
  67. /// <summary>
  68. /// 获取页面显示列表分页数据
  69. /// <summary>
  70. /// <param name="pagination">分页参数</param>
  71. /// <param name="queryJson">查询参数</param>
  72. /// <returns></returns>
  73. [HttpGet]
  74. [AjaxOnly]
  75. public ActionResult GetPageList(string pagination, string queryJson)
  76. {
  77. Pagination paginationobj = pagination.ToObject<Pagination>();
  78. var data = meetingManagementIBLL.GetPageList(paginationobj, queryJson);
  79. var jsonData = new
  80. {
  81. rows = data,
  82. total = paginationobj.total,
  83. page = paginationobj.page,
  84. records = paginationobj.records
  85. };
  86. return Success(jsonData);
  87. }
  88. /// <summary>
  89. /// 获取页面显示列表数据
  90. /// <summary>
  91. /// <param name="queryJson">查询参数</param>
  92. /// <returns></returns>
  93. [HttpGet]
  94. [AjaxOnly]
  95. public ActionResult GetList(string queryJson)
  96. {
  97. var data = meetingManagementIBLL.GetList(queryJson);
  98. return Success(data);
  99. }
  100. /// <summary>
  101. /// 获取表单数据
  102. /// <summary>
  103. /// <returns></returns>
  104. [HttpGet]
  105. [AjaxOnly]
  106. public ActionResult GetFormData(string keyValue)
  107. {
  108. var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity(keyValue);
  109. var jsonData = new
  110. {
  111. MeetingManagement = MeetingManagementData,
  112. };
  113. return Success(jsonData);
  114. }
  115. /// <summary>
  116. /// 获取表单数据
  117. /// <summary>
  118. /// <returns></returns>
  119. [HttpGet]
  120. [AjaxOnly]
  121. public ActionResult GetFormDataByProcessId(string processId)
  122. {
  123. var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntityByProcessId(processId);
  124. var jsonData = new
  125. {
  126. MeetingManagement = MeetingManagementData,
  127. };
  128. return Success(jsonData);
  129. }
  130. #endregion
  131. #region 提交数据
  132. /// <summary>
  133. /// 删除实体数据
  134. /// <param name="keyValue">主键</param>
  135. /// <summary>
  136. /// <returns></returns>
  137. [HttpPost]
  138. [AjaxOnly]
  139. public ActionResult DeleteForm(string keyValue)
  140. {
  141. meetingManagementIBLL.DeleteEntity(keyValue);
  142. return Success("删除成功!");
  143. }
  144. /// <summary>
  145. /// 保存实体数据(新增、修改)
  146. /// <param name="keyValue">主键</param>
  147. /// <summary>
  148. /// <returns></returns>
  149. [HttpPost]
  150. [ValidateAntiForgeryToken]
  151. [AjaxOnly]
  152. public ActionResult SaveForm(string keyValue, string strEntity)
  153. {
  154. UserInfo userInfo = LoginUserInfo.Get();
  155. MeetingManagementEntity entity = strEntity.ToObject<MeetingManagementEntity>();
  156. entity.CreateUser = userInfo.userId;
  157. entity.CreateTime = DateTime.Now;
  158. entity.CheckStatus = "0";
  159. meetingManagementIBLL.SaveEntity(userInfo, keyValue, entity);
  160. return Success("保存成功!");
  161. }
  162. /// <summary>
  163. /// 审核实体数据
  164. /// <param name="keyValue">主键</param>
  165. /// <summary>
  166. /// <returns></returns>
  167. [HttpPost]
  168. [AjaxOnly]
  169. public ActionResult DoCheck(string keyValue, string status)
  170. {
  171. UserInfo userInfo = LoginUserInfo.Get();
  172. meetingManagementIBLL.DoCheck(userInfo, keyValue, status);
  173. return Success("操作成功!");
  174. }
  175. /// <summary>
  176. /// 提交实体数据
  177. /// <param name="keyValue">主键</param>
  178. /// <summary>
  179. /// <returns></returns>
  180. [HttpPost]
  181. [AjaxOnly]
  182. public ActionResult DoSubmit(string keyValue, string status, string processId)
  183. {
  184. meetingManagementIBLL.DoSubmit(keyValue, status, processId);
  185. return Success("操作成功!");
  186. }
  187. #endregion
  188. }
  189. }