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.
 
 
 
 
 
 

218 satır
6.1 KiB

  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.Linq;
  7. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-10-22 16:58
  14. /// 描 述:文件接收
  15. /// </summary>
  16. public class SYS_ReceiveDocumentController : MvcControllerBase
  17. {
  18. private SYS_ReceiveDocumentIBLL sYS_ReceiveDocumentIBLL = new SYS_ReceiveDocumentBLL();
  19. private Sys_ReceiveFileIBLL receiveFileIbll=new Sys_ReceiveFileBLL();
  20. #region 视图功能
  21. /// <summary>
  22. /// 主页面
  23. /// <summary>
  24. /// <returns></returns>
  25. [HttpGet]
  26. public ActionResult Index()
  27. {
  28. return View();
  29. }
  30. /// <summary>
  31. /// 表单页
  32. /// <summary>
  33. /// <returns></returns>
  34. [HttpGet]
  35. public ActionResult Form()
  36. {
  37. return View();
  38. }
  39. /// <summary>
  40. /// 表单页
  41. /// <summary>
  42. /// <returns></returns>
  43. [HttpGet]
  44. public ActionResult FormView()
  45. {
  46. return View();
  47. }
  48. /// <summary>
  49. /// 指派人列表
  50. /// <summary>
  51. /// <returns></returns>
  52. [HttpGet]
  53. public ActionResult IssueForm()
  54. {
  55. return View();
  56. }
  57. /// <summary>
  58. /// 阅读详情
  59. /// <summary>
  60. /// <returns></returns>
  61. [HttpGet]
  62. public ActionResult ReadList()
  63. {
  64. return View();
  65. }
  66. /// <summary>
  67. /// 打印页面
  68. /// <summary>
  69. /// <returns></returns>
  70. [HttpGet]
  71. public ActionResult PrintView()
  72. {
  73. return View();
  74. }
  75. #endregion
  76. #region 获取数据
  77. /// <summary>
  78. /// 获取页面显示列表数据
  79. /// <summary>
  80. /// <param name="queryJson">查询参数</param>
  81. /// <returns></returns>
  82. [HttpGet]
  83. [AjaxOnly]
  84. public ActionResult GetPageList(string pagination, string queryJson)
  85. {
  86. Pagination paginationobj = pagination.ToObject<Pagination>();
  87. var data = sYS_ReceiveDocumentIBLL.GetPageList(paginationobj, queryJson);
  88. var jsonData = new
  89. {
  90. rows = data,
  91. total = paginationobj.total,
  92. page = paginationobj.page,
  93. records = paginationobj.records
  94. };
  95. return Success(jsonData);
  96. }
  97. /// <summary>
  98. /// 获取表单数据
  99. /// <summary>
  100. /// <returns></returns>
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult GetFormData(string keyValue)
  104. {
  105. var Sys_ReceiveDocumentData = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue);
  106. var jsonData = new
  107. {
  108. Sys_ReceiveDocument = Sys_ReceiveDocumentData,
  109. };
  110. return Success(jsonData);
  111. }
  112. /// <summary>
  113. /// 获取表单数据
  114. /// <summary>
  115. /// <returns></returns>
  116. [HttpGet]
  117. [AjaxOnly]
  118. public ActionResult GetFormDataByProcessId(string processId)
  119. {
  120. var Sys_ReceiveDocumentData = sYS_ReceiveDocumentIBLL.GetEntityByProcessId(processId);
  121. var jsonData = new
  122. {
  123. Sys_ReceiveDocument = Sys_ReceiveDocumentData,
  124. };
  125. return Success(jsonData);
  126. }
  127. public ActionResult PrintInfo(string keyValue)
  128. {
  129. var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue);
  130. var entityItem = receiveFileIbll.GetPageListBySendId(keyValue).ToList().Where(a=>a.ReadTime!=null).OrderBy(a=>a.ReadTime);
  131. object data = new
  132. {
  133. entity,
  134. entityItem
  135. };
  136. return Success(data);
  137. }
  138. #endregion
  139. #region 提交数据
  140. /// <summary>
  141. /// 删除实体数据
  142. /// <param name="keyValue">主键</param>
  143. /// <summary>
  144. /// <returns></returns>
  145. [HttpPost]
  146. [AjaxOnly]
  147. public ActionResult DeleteForm(string keyValue)
  148. {
  149. sYS_ReceiveDocumentIBLL.DeleteEntity(keyValue);
  150. return Success("删除成功!");
  151. }
  152. /// <summary>
  153. /// 结束下发
  154. /// <param name="keyValue">主键</param>
  155. /// <summary>
  156. /// <returns></returns>
  157. [HttpPost]
  158. [AjaxOnly]
  159. public ActionResult OverIssue(string keyValue)
  160. {
  161. var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue);
  162. if (null != entity)
  163. {
  164. entity.RSendFlag = "4";
  165. sYS_ReceiveDocumentIBLL.SaveEntity(keyValue, entity);
  166. }
  167. return Success("操作成功!");
  168. }
  169. /// <summary>
  170. /// 保存实体数据(新增、修改)
  171. /// <param name="keyValue">主键</param>
  172. /// <summary>
  173. /// <returns></returns>
  174. [HttpPost]
  175. [ValidateAntiForgeryToken]
  176. [AjaxOnly]
  177. [ValidateInput(false)]
  178. public ActionResult SaveForm(string keyValue, string strEntity)
  179. {
  180. Sys_ReceiveDocumentEntity entity = strEntity.ToObject<Sys_ReceiveDocumentEntity>();
  181. sYS_ReceiveDocumentIBLL.SaveEntity(keyValue, entity);
  182. return Success("保存成功!");
  183. }
  184. /// <summary>
  185. /// 提交申请
  186. /// </summary>
  187. /// <param name="keyValue"></param>
  188. /// <returns></returns>
  189. [HttpPost]
  190. [AjaxOnly]
  191. public ActionResult ChangeStatusById(string keyValue, string processId)
  192. {
  193. sYS_ReceiveDocumentIBLL.ChangeStatusById(keyValue, 1, processId);
  194. return Success("操作成功!");
  195. }
  196. #endregion
  197. }
  198. }