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.

MeetingManagementController.cs 6.7 KiB

4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. [HttpGet]
  66. public ActionResult IndexAll()
  67. {
  68. return View();
  69. }
  70. [HttpGet]
  71. public ActionResult qrCode()
  72. {
  73. return View();
  74. }
  75. #endregion
  76. #region 获取数据
  77. /// <summary>
  78. /// 获取页面显示列表分页数据
  79. /// <summary>
  80. /// <param name="pagination">分页参数</param>
  81. /// <param name="queryJson">查询参数</param>
  82. /// <returns></returns>
  83. [HttpGet]
  84. [AjaxOnly]
  85. public ActionResult GetPageList(string pagination, string queryJson)
  86. {
  87. Pagination paginationobj = pagination.ToObject<Pagination>();
  88. var data = meetingManagementIBLL.GetPageList(paginationobj, queryJson);
  89. var jsonData = new
  90. {
  91. rows = data,
  92. total = paginationobj.total,
  93. page = paginationobj.page,
  94. records = paginationobj.records
  95. };
  96. return Success(jsonData);
  97. }
  98. /// <summary>
  99. /// 获取页面显示列表数据
  100. /// <summary>
  101. /// <param name="queryJson">查询参数</param>
  102. /// <returns></returns>
  103. [HttpGet]
  104. [AjaxOnly]
  105. public ActionResult GetList(string queryJson)
  106. {
  107. var data = meetingManagementIBLL.GetList(queryJson);
  108. return Success(data);
  109. }
  110. /// <summary>
  111. /// 获取表单数据
  112. /// <summary>
  113. /// <returns></returns>
  114. [HttpGet]
  115. [AjaxOnly]
  116. public ActionResult GetFormData(string keyValue)
  117. {
  118. var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity(keyValue);
  119. var jsonData = new
  120. {
  121. MeetingManagement = MeetingManagementData,
  122. };
  123. return Success(jsonData);
  124. }
  125. /// <summary>
  126. /// 获取表单数据
  127. /// <summary>
  128. /// <returns></returns>
  129. [HttpGet]
  130. [AjaxOnly]
  131. public ActionResult GetFormDataByProcessId(string processId)
  132. {
  133. var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntityByProcessId(processId);
  134. var jsonData = new
  135. {
  136. MeetingManagement = MeetingManagementData,
  137. };
  138. return Success(jsonData);
  139. }
  140. #endregion
  141. #region 提交数据
  142. /// <summary>
  143. /// 删除实体数据
  144. /// <param name="keyValue">主键</param>
  145. /// <summary>
  146. /// <returns></returns>
  147. [HttpPost]
  148. [AjaxOnly]
  149. public ActionResult DeleteForm(string keyValue)
  150. {
  151. meetingManagementIBLL.DeleteEntity(keyValue);
  152. return Success("删除成功!");
  153. }
  154. /// <summary>
  155. /// 保存实体数据(新增、修改)
  156. /// <param name="keyValue">主键</param>
  157. /// <summary>
  158. /// <returns></returns>
  159. [HttpPost]
  160. [ValidateAntiForgeryToken]
  161. [AjaxOnly]
  162. public ActionResult SaveForm(string keyValue, string strEntity)
  163. {
  164. UserInfo userInfo = LoginUserInfo.Get();
  165. MeetingManagementEntity entity = strEntity.ToObject<MeetingManagementEntity>();
  166. //判断会议场地是否被占用
  167. var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity);
  168. if (isOccupy)
  169. {
  170. return Fail("会议场地当前时间段已被占用!");
  171. }
  172. entity.CreateUser = userInfo.userId;
  173. entity.CreateTime = DateTime.Now;
  174. entity.CheckStatus = "0";
  175. meetingManagementIBLL.SaveEntity(userInfo, keyValue, entity);
  176. return Success("保存成功!");
  177. }
  178. /// <summary>
  179. /// 审核实体数据
  180. /// <param name="keyValue">主键</param>
  181. /// <summary>
  182. /// <returns></returns>
  183. [HttpPost]
  184. [AjaxOnly]
  185. public ActionResult DoCheck(string keyValue, string status)
  186. {
  187. UserInfo userInfo = LoginUserInfo.Get();
  188. meetingManagementIBLL.DoCheck(userInfo, keyValue, status);
  189. return Success("操作成功!");
  190. }
  191. /// <summary>
  192. /// 提交实体数据
  193. /// <param name="keyValue">主键</param>
  194. /// <summary>
  195. /// <returns></returns>
  196. [HttpPost]
  197. [AjaxOnly]
  198. public ActionResult DoSubmit(string keyValue, string status, string processId)
  199. {
  200. //判断会议场地是否被占用
  201. var entity = meetingManagementIBLL.GetMeetingManagementEntity(keyValue);
  202. var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity);
  203. if (isOccupy)
  204. {
  205. return Fail("会议场地当前时间段已被占用!");
  206. }
  207. meetingManagementIBLL.DoSubmit(keyValue, status, processId);
  208. return Success("操作成功!");
  209. }
  210. #endregion
  211. }
  212. }