25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

Sys_SendComplaintController.cs 6.5 KiB

4 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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. using System.Linq;
  8. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  12. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2019-04-16 17:09
  15. /// 描 述:发送投诉意见
  16. /// </summary>
  17. public class Sys_SendComplaintController : MvcControllerBase
  18. {
  19. private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL();
  20. private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL();
  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. ViewBag.ComplaintCode = "TS_" + CommonHelper.CreateNo();
  39. return View();
  40. }
  41. /// <summary>
  42. /// 表单查看页
  43. /// <summary>
  44. /// <returns></returns>
  45. [HttpGet]
  46. public ActionResult FormView()
  47. {
  48. return View();
  49. }
  50. /// <summary>
  51. /// 主页面-学工部
  52. /// <summary>
  53. /// <returns></returns>
  54. [HttpGet]
  55. public ActionResult IndexList()
  56. {
  57. return View();
  58. }
  59. /// <summary>
  60. /// 指派表单页面
  61. /// <summary>
  62. /// <returns></returns>
  63. [HttpGet]
  64. public ActionResult FormList()
  65. {
  66. return View();
  67. }
  68. /// <summary>
  69. /// 指派表单查看页面
  70. /// <summary>
  71. /// <returns></returns>
  72. [HttpGet]
  73. public ActionResult FormListView()
  74. {
  75. return View();
  76. }
  77. /// <summary>
  78. /// 回复情况页面
  79. /// <summary>
  80. /// <returns></returns>
  81. [HttpGet]
  82. public ActionResult ReplyList()
  83. {
  84. return View();
  85. }
  86. #endregion
  87. #region 获取数据
  88. /// <summary>
  89. /// 获取页面显示列表数据
  90. /// <summary>
  91. /// <param name="queryJson">查询参数</param>
  92. /// <returns></returns>
  93. [HttpGet]
  94. [AjaxOnly]
  95. public ActionResult GetPageList(string pagination, string queryJson)
  96. {
  97. Pagination paginationobj = pagination.ToObject<Pagination>();
  98. var data = sys_SendComplaintIBLL.GetPageList(paginationobj, queryJson);
  99. var jsonData = new
  100. {
  101. rows = data,
  102. total = paginationobj.total,
  103. page = paginationobj.page,
  104. records = paginationobj.records
  105. };
  106. return Success(jsonData);
  107. }
  108. /// <summary>
  109. /// 获取表单数据
  110. /// <summary>
  111. /// <returns></returns>
  112. [HttpGet]
  113. [AjaxOnly]
  114. public ActionResult GetFormData(string keyValue)
  115. {
  116. var Sys_SendComplaintData = sys_SendComplaintIBLL.GetSys_SendComplaintEntity(keyValue);
  117. var jsonData = new
  118. {
  119. Sys_SendComplaint = Sys_SendComplaintData,
  120. };
  121. return Success(jsonData);
  122. }
  123. #endregion
  124. #region 提交数据
  125. /// <summary>
  126. /// 删除实体数据
  127. /// <param name="keyValue">主键</param>
  128. /// <summary>
  129. /// <returns></returns>
  130. [HttpPost]
  131. [AjaxOnly]
  132. public ActionResult DeleteForm(string keyValue)
  133. {
  134. sys_SendComplaintIBLL.DeleteEntity(keyValue);
  135. return Success("删除成功!");
  136. }
  137. /// <summary>
  138. /// 保存实体数据(新增、修改)
  139. /// <param name="keyValue">主键</param>
  140. /// <summary>
  141. /// <returns></returns>
  142. [HttpPost]
  143. [ValidateAntiForgeryToken]
  144. [AjaxOnly]
  145. public ActionResult SaveForm(string keyValue, string strEntity)
  146. {
  147. var UserInfoEntity = LoginUserInfo.Get();
  148. Sys_SendComplaintEntity entity = strEntity.ToObject<Sys_SendComplaintEntity>();
  149. entity.CreateUserId = UserInfoEntity.userId;
  150. entity.CreateUserName = UserInfoEntity.realName;
  151. entity.CreateTime = DateTime.Now;
  152. entity.SendFlag = 0;
  153. entity.DelFlag = false;
  154. entity.AssignFlag = 0;
  155. entity.ReplyFlag = 0;
  156. sys_SendComplaintIBLL.SaveEntity(keyValue, entity);
  157. return Success("保存成功!");
  158. }
  159. #endregion
  160. #region 扩展数据
  161. /// <summary>
  162. /// 提交实体数据
  163. /// <param name="keyValue">主键</param>
  164. /// <summary>
  165. /// <returns></returns>
  166. [HttpPost]
  167. [AjaxOnly]
  168. public ActionResult SubmitForm(string keyValue)
  169. {
  170. sys_SendComplaintIBLL.SubmitEntity(keyValue);
  171. return Success("提交成功!");
  172. }
  173. /// <summary>
  174. /// 指派
  175. /// <param name="keyValue">主键</param>
  176. /// <summary>
  177. /// <returns></returns>
  178. [HttpPost]
  179. [ValidateAntiForgeryToken]
  180. [AjaxOnly]
  181. public ActionResult AssignForm(string keyValue, string strEntity)
  182. {
  183. var UserInfoEntity = LoginUserInfo.Get();
  184. Sys_SendComplaintEntity entity = strEntity.ToObject<Sys_SendComplaintEntity>();
  185. entity.SenderId = UserInfoEntity.userId;
  186. entity.Sender = UserInfoEntity.realName;
  187. sys_SendComplaintIBLL.AssignSaveEntity(keyValue, entity);
  188. return Success("保存成功!");
  189. }
  190. /// <summary>
  191. /// 获取回复消息列表
  192. /// <summary>
  193. /// <returns></returns>
  194. [HttpGet]
  195. [AjaxOnly]
  196. public ActionResult GetReplyList(string keyValue)
  197. {
  198. var Sys_ReceiveComplaintList = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintList(keyValue).Where(x => x.ReplyFlag == 1).OrderByDescending(x => x.ReplyTime);
  199. var jsonData = new
  200. {
  201. Sys_ReceiveComplaint = Sys_ReceiveComplaintList,
  202. };
  203. return Success(jsonData);
  204. }
  205. #endregion
  206. }
  207. }