No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

323 líneas
9.4 KiB

  1. using System;
  2. using Learun.Util;
  3. using System.Data;
  4. using Learun.Application.TwoDevelopment.EducationalAdministration;
  5. using System.Web.Mvc;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Web;
  9. using Learun.Application.Web.Controllers;
  10. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  11. {
  12. /// <summary>
  13. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  14. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  15. /// 创 建:超级管理员
  16. /// 日 期:2019-04-11 10:31
  17. /// 描 述:公文发送
  18. /// </summary>
  19. public class Sys_SendFileController : MvcControllerBase
  20. {
  21. private Sys_SendFileIBLL sys_SendFileIBLL = new Sys_SendFileBLL();
  22. #region 视图功能
  23. /// <summary>
  24. /// 主页面
  25. /// <summary>
  26. /// <returns></returns>
  27. [HttpGet]
  28. public ActionResult Index()
  29. {
  30. return View();
  31. }
  32. [HttpGet]
  33. public ActionResult IndexDocument()
  34. {
  35. return View();
  36. }
  37. /// <summary>
  38. /// 公文下发表单页
  39. /// </summary>
  40. /// <returns></returns>
  41. [HttpGet]
  42. public ActionResult IssueForm()
  43. {
  44. return View();
  45. }
  46. /// <summary>
  47. /// 主页面【党政公文下发】
  48. /// <summary>
  49. /// <returns></returns>
  50. [HttpGet]
  51. public ActionResult IndexParty()
  52. {
  53. return View();
  54. }
  55. [HttpGet]
  56. public ActionResult FormDocument()
  57. {
  58. return View();
  59. }
  60. /// <summary>
  61. /// 表单页
  62. /// <summary>
  63. /// <returns></returns>
  64. [HttpGet]
  65. public ActionResult Form()
  66. {
  67. return View();
  68. }
  69. /// <summary>
  70. /// 表单页【党政公文下发】
  71. /// <summary>
  72. /// <returns></returns>
  73. [HttpGet]
  74. public ActionResult FormParty()
  75. {
  76. return View();
  77. }
  78. [HttpGet]
  79. public ActionResult FormView()
  80. {
  81. return View();
  82. }
  83. [HttpGet]
  84. public ActionResult FormDocumentView()
  85. {
  86. return View();
  87. }
  88. /// <summary>
  89. /// 【党政公文下发】
  90. /// </summary>
  91. /// <returns></returns>
  92. [HttpGet]
  93. public ActionResult FormPartyView()
  94. {
  95. return View();
  96. }
  97. [HttpGet]
  98. public ActionResult ReadList()
  99. {
  100. return View();
  101. }
  102. [HttpGet]
  103. public ActionResult ReadListDocument()
  104. {
  105. return View();
  106. }
  107. /// <summary>
  108. /// 【党政公文下发】
  109. /// </summary>
  110. /// <returns></returns>
  111. [HttpGet]
  112. public ActionResult ReadListParty()
  113. {
  114. return View();
  115. }
  116. #endregion
  117. #region 获取数据
  118. /// <summary>
  119. /// 获取页面显示列表数据
  120. /// <summary>
  121. /// <param name="queryJson">查询参数</param>
  122. /// <returns></returns>
  123. [HttpGet]
  124. [AjaxOnly]
  125. public ActionResult GetPageList(string pagination, string queryJson)
  126. {
  127. Pagination paginationobj = pagination.ToObject<Pagination>();
  128. var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1);
  129. var jsonData = new
  130. {
  131. rows = data,
  132. total = paginationobj.total,
  133. page = paginationobj.page,
  134. records = paginationobj.records
  135. };
  136. return Success(jsonData);
  137. }
  138. [HttpGet]
  139. [AjaxOnly]
  140. public ActionResult GetPageListDocument(string pagination, string queryJson)
  141. {
  142. Pagination paginationobj = pagination.ToObject<Pagination>();
  143. var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 2);
  144. var jsonData = new
  145. {
  146. rows = data,
  147. total = paginationobj.total,
  148. page = paginationobj.page,
  149. records = paginationobj.records
  150. };
  151. return Success(jsonData);
  152. }
  153. [HttpGet]
  154. [AjaxOnly]
  155. public ActionResult GetPageListParty(string pagination, string queryJson)
  156. {
  157. Pagination paginationobj = pagination.ToObject<Pagination>();
  158. var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3);
  159. var jsonData = new
  160. {
  161. rows = data,
  162. total = paginationobj.total,
  163. page = paginationobj.page,
  164. records = paginationobj.records
  165. };
  166. return Success(jsonData);
  167. }
  168. /// <summary>
  169. /// 获取表单数据
  170. /// <summary>
  171. /// <returns></returns>
  172. [HttpGet]
  173. [AjaxOnly]
  174. public ActionResult GetFormData(string keyValue)
  175. {
  176. var Sys_SendFileData = sys_SendFileIBLL.GetSys_SendFileEntity(keyValue);
  177. Sys_SendFileData.Contents = HttpUtility.HtmlDecode(Sys_SendFileData.Contents);
  178. var jsonData = new
  179. {
  180. Sys_SendFile = Sys_SendFileData,
  181. };
  182. return Success(jsonData);
  183. }
  184. [HttpGet]
  185. [AjaxOnly]
  186. public ActionResult GetFormDataView(string keyValue)
  187. {
  188. var Sys_SendFileData = sys_SendFileIBLL.GetSys_SendFileEntity(keyValue);
  189. Sys_SendFileData.Contents = HttpUtility.HtmlDecode(Sys_SendFileData.Contents);
  190. var jsonData = new
  191. {
  192. Sys_SendFile = Sys_SendFileData,
  193. };
  194. return Success(jsonData);
  195. }
  196. /// <summary>
  197. /// 获取表单数据
  198. /// <summary>
  199. /// <returns></returns>
  200. [HttpGet]
  201. [AjaxOnly]
  202. public ActionResult GetFormDataByProcessId(string processId)
  203. {
  204. var Sys_SendFileData = sys_SendFileIBLL.GetEntityByProcessId(processId);
  205. var jsonData = new
  206. {
  207. Sys_SendFile = Sys_SendFileData,
  208. };
  209. return Success(jsonData);
  210. }
  211. #endregion
  212. #region 提交数据
  213. /// <summary>
  214. /// 删除实体数据
  215. /// <param name="keyValue">主键</param>
  216. /// <summary>
  217. /// <returns></returns>
  218. [HttpPost]
  219. [AjaxOnly]
  220. public ActionResult DeleteForm(string keyValue)
  221. {
  222. sys_SendFileIBLL.DeleteEntity(keyValue);
  223. return Success("删除成功!");
  224. }
  225. /// <summary>
  226. /// 保存实体数据(新增、修改)
  227. /// <param name="keyValue">主键</param>
  228. /// <summary>
  229. /// <returns></returns>
  230. [HttpPost]
  231. [ValidateAntiForgeryToken]
  232. [AjaxOnly]
  233. [ValidateInput(false)]
  234. public ActionResult SaveForm(string keyValue, string strEntity)
  235. {
  236. Sys_SendFileEntity entity = strEntity.ToObject<Sys_SendFileEntity>();
  237. if (string.IsNullOrEmpty(keyValue))
  238. {
  239. entity.STypeId = 1;
  240. }
  241. sys_SendFileIBLL.SaveEntity(keyValue, entity);
  242. return Success("保存成功!");
  243. }
  244. [HttpPost]
  245. [ValidateAntiForgeryToken]
  246. [AjaxOnly]
  247. [ValidateInput(false)]
  248. public ActionResult SaveFormDocument(string keyValue, string strEntity)
  249. {
  250. Sys_SendFileEntity entity = strEntity.ToObject<Sys_SendFileEntity>();
  251. if (string.IsNullOrEmpty(keyValue))
  252. {
  253. entity.STypeId = 2;
  254. }
  255. sys_SendFileIBLL.SaveEntity(keyValue, entity);
  256. return Success("保存成功!");
  257. }
  258. [HttpPost]
  259. [ValidateAntiForgeryToken]
  260. [AjaxOnly]
  261. [ValidateInput(false)]
  262. public ActionResult SaveFormParty(string keyValue, string strEntity)
  263. {
  264. Sys_SendFileEntity entity = strEntity.ToObject<Sys_SendFileEntity>();
  265. if (string.IsNullOrEmpty(keyValue))
  266. {
  267. entity.STypeId = 3;
  268. }
  269. sys_SendFileIBLL.SaveEntity(keyValue, entity);
  270. return Success("保存成功!");
  271. }
  272. /// <summary>
  273. /// 提交
  274. /// </summary>
  275. /// <param name="keyValue"></param>
  276. /// <returns></returns>
  277. [HttpPost]
  278. [AjaxOnly]
  279. public ActionResult ChangeStatusById(string keyValue, string processId)
  280. {
  281. sys_SendFileIBLL.ChangeStatusById(keyValue, 1, processId);
  282. return Success("操作成功!");
  283. }
  284. [HttpPost]
  285. [AjaxOnly]
  286. public ActionResult ChangeStatusByIdDocument(string keyValue)
  287. {
  288. string guid = Guid.NewGuid().ToString();
  289. sys_SendFileIBLL.ChangeStatusById(keyValue, 2, guid);
  290. sys_SendFileIBLL.ChangeStatusByProcessId(guid, 2);
  291. return Success("操作成功!");
  292. }
  293. /// <summary>
  294. /// 结束下发
  295. /// </summary>
  296. /// <param name="keyValue"></param>
  297. /// <returns></returns>
  298. [HttpPost]
  299. [AjaxOnly]
  300. public ActionResult OverIssue(string keyValue)
  301. {
  302. string guid = Guid.NewGuid().ToString();
  303. sys_SendFileIBLL.OverIssue(keyValue);
  304. return Success("下发成功!");
  305. }
  306. #endregion
  307. }
  308. }