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.
 
 
 
 
 
 

249 lines
6.9 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Web.Mvc;
  5. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2022-11-23 10:48
  12. /// 描 述:阳光教育
  13. /// </summary>
  14. public class SunshineEducationController : MvcControllerBase
  15. {
  16. private SunshineEducationIBLL sunshineEducationIBLL = new SunshineEducationBLL();
  17. #region 视图功能
  18. /// <summary>
  19. /// 主页面
  20. /// </summary>
  21. /// <returns></returns>
  22. [HttpGet]
  23. public ActionResult Index()
  24. {
  25. return View();
  26. }
  27. /// <summary>
  28. /// 主页面
  29. /// </summary>
  30. /// <returns></returns>
  31. [HttpGet]
  32. public ActionResult IndexComplaint()
  33. {
  34. return View();
  35. }
  36. /// <summary>
  37. /// 主页面
  38. /// </summary>
  39. /// <returns></returns>
  40. [HttpGet]
  41. public ActionResult IndexHelp()
  42. {
  43. return View();
  44. }
  45. /// <summary>
  46. /// 主页面
  47. /// </summary>
  48. /// <returns></returns>
  49. [HttpGet]
  50. public ActionResult IndexPolicy()
  51. {
  52. return View();
  53. }
  54. /// <summary>
  55. /// 主页面
  56. /// </summary>
  57. /// <returns></returns>
  58. [HttpGet]
  59. public ActionResult IndexPraise()
  60. {
  61. return View();
  62. }
  63. /// <summary>
  64. /// 主页面
  65. /// </summary>
  66. /// <returns></returns>
  67. [HttpGet]
  68. public ActionResult IndexSuggest()
  69. {
  70. return View();
  71. }
  72. /// <summary>
  73. /// 表单页
  74. /// </summary>
  75. /// <returns></returns>
  76. [HttpGet]
  77. public ActionResult Form()
  78. {
  79. return View();
  80. }
  81. /// <summary>
  82. /// 表单页
  83. /// </summary>
  84. /// <returns></returns>
  85. [HttpGet]
  86. public ActionResult FormReply()
  87. {
  88. return View();
  89. }
  90. /// <summary>
  91. /// 表单页
  92. /// </summary>
  93. /// <returns></returns>
  94. public ActionResult UserForm()
  95. {
  96. return View();
  97. }
  98. #endregion
  99. #region 获取数据
  100. /// <summary>
  101. /// 身份
  102. /// </summary>
  103. /// <returns></returns>
  104. public ActionResult GetQuestionerIdentity(string ProblemType)
  105. {
  106. var data = sunshineEducationIBLL.GetQuestionerIdentity(ProblemType);
  107. return Success(data);
  108. }
  109. /// <summary>
  110. /// 部门班级
  111. /// </summary>
  112. /// <returns></returns>
  113. public ActionResult GetMatterType(string ProblemType)
  114. {
  115. var data = sunshineEducationIBLL.GetMatterType(ProblemType);
  116. return Success(data);
  117. }
  118. /// <summary>
  119. /// 身份证类型
  120. /// </summary>
  121. /// <returns></returns>
  122. public ActionResult GetMatterTypeContent(string ProblemType)
  123. {
  124. var data = sunshineEducationIBLL.GetMatterTypeContent(ProblemType);
  125. return Success(data);
  126. }
  127. /// <summary>
  128. /// 获取列表数据
  129. /// </summary>
  130. /// <param name="queryJson">查询参数</param>
  131. /// <returns></returns>
  132. [HttpGet]
  133. [AjaxOnly]
  134. public ActionResult GetList(string queryJson)
  135. {
  136. var data = sunshineEducationIBLL.GetList(queryJson);
  137. return Success(data);
  138. }
  139. /// <summary>
  140. /// 获取列表分页数据
  141. /// </summary>
  142. /// <param name="pagination">分页参数</param>
  143. /// <param name="queryJson">查询参数</param>
  144. /// <returns></returns>
  145. [HttpGet]
  146. [AjaxOnly]
  147. public ActionResult GetPageList(string pagination, string queryJson)
  148. {
  149. Pagination paginationobj = pagination.ToObject<Pagination>();
  150. var data = sunshineEducationIBLL.GetPageList(paginationobj, queryJson);
  151. var jsonData = new
  152. {
  153. rows = data,
  154. total = paginationobj.total,
  155. page = paginationobj.page,
  156. records = paginationobj.records
  157. };
  158. return Success(jsonData);
  159. }
  160. /// <summary>
  161. /// 获取表单数据
  162. /// </summary>
  163. /// <param name="keyValue">主键</param>
  164. /// <returns></returns>
  165. [HttpGet]
  166. [AjaxOnly]
  167. public ActionResult GetFormData(string keyValue)
  168. {
  169. var data = sunshineEducationIBLL.GetEntity(keyValue);
  170. data.Contents = WebHelper.HtmlDecode(data.Contents);
  171. return Success(data);
  172. }
  173. #endregion
  174. #region 提交数据
  175. /// <summary>
  176. /// 删除实体数据
  177. /// </summary>
  178. /// <param name="keyValue">主键</param>
  179. /// <returns></returns>
  180. [HttpPost]
  181. [AjaxOnly]
  182. public ActionResult DeleteForm(string keyValue)
  183. {
  184. sunshineEducationIBLL.DeleteEntity(keyValue);
  185. return Success("删除成功!");
  186. }
  187. /// <summary>
  188. /// 保存实体数据(新增、修改)
  189. /// </summary>
  190. /// <param name="keyValue">主键</param>
  191. /// <param name="entity">实体</param>
  192. /// <returns></returns>
  193. [HttpPost]
  194. [ValidateAntiForgeryToken]
  195. [AjaxOnly]
  196. [ValidateInput(false)]
  197. public ActionResult SaveForm(string keyValue, SunshineEducationEntity entity)
  198. {
  199. if (!string.IsNullOrEmpty(keyValue))
  200. {
  201. var data = sunshineEducationIBLL.GetEntity(keyValue);
  202. }
  203. else
  204. {
  205. entity.Contents = WebHelper.HtmlEncode(entity.Contents);
  206. }
  207. sunshineEducationIBLL.SaveEntity(keyValue, entity);
  208. return Success("保存成功!");
  209. }
  210. /// <summary>
  211. /// 受理中
  212. /// </summary>
  213. /// <param name="keyValue">主键</param>
  214. /// <returns></returns>
  215. [HttpPost]
  216. [AjaxOnly]
  217. public ActionResult ReplyForm(string keyValue)
  218. {
  219. sunshineEducationIBLL.ReplyEntity(keyValue);
  220. return Success("操作成功!");
  221. }
  222. /// <summary>
  223. /// 受理中
  224. /// </summary>
  225. /// <param name="keyValue">主键</param>
  226. /// <returns></returns>
  227. [HttpPost]
  228. [AjaxOnly]
  229. public ActionResult AuditorForm(string keyValue, SunshineEducationEntity entity)
  230. {
  231. sunshineEducationIBLL.AuditorEntity(keyValue, entity);
  232. return Success("操作成功!");
  233. }
  234. #endregion
  235. }
  236. }