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.

Sys_ReceiveFileController.cs 9.4 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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. using System.Web;
  8. using Learun.Application.Base.SystemModule;
  9. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  10. {
  11. /// <summary>
  12. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  13. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  14. /// 创 建:超级管理员
  15. /// 日 期:2019-04-11 10:08
  16. /// 描 述:公文收发
  17. /// </summary>
  18. public class Sys_ReceiveFileController : MvcControllerBase
  19. {
  20. private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL();
  21. private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL();
  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 FormReadDocument()
  34. {
  35. return View();
  36. }
  37. [HttpGet]
  38. public ActionResult IndexDocument()
  39. {
  40. return View();
  41. }
  42. /// <summary>
  43. /// 指定接收人表单页
  44. /// </summary>
  45. /// <returns></returns>
  46. [HttpGet]
  47. public ActionResult SpecifyReceiverForm()
  48. {
  49. return View();
  50. }
  51. /// <summary>
  52. /// 主页面【党政公文查阅】
  53. /// </summary>
  54. /// <returns></returns>
  55. [HttpGet]
  56. public ActionResult IndexParty()
  57. {
  58. return View();
  59. }
  60. /// <summary>
  61. /// 主页面【党政公文查阅】
  62. /// </summary>
  63. /// <returns></returns>
  64. [HttpGet]
  65. public ActionResult IndexGWJS()
  66. {
  67. return View();
  68. }
  69. /// <summary>
  70. /// 表单页
  71. /// <summary>
  72. /// <returns></returns>
  73. [HttpGet]
  74. public ActionResult Form()
  75. {
  76. return View();
  77. }
  78. [HttpGet]
  79. public ActionResult FormDocument()
  80. {
  81. return View();
  82. }
  83. /// <summary>
  84. /// 表单页【党政公文查阅】
  85. /// <summary>
  86. /// <returns></returns>
  87. [HttpGet]
  88. public ActionResult FormParty()
  89. {
  90. return View();
  91. }
  92. #endregion
  93. #region 获取数据
  94. /// <summary>
  95. /// 获取页面显示列表数据
  96. /// <summary>
  97. /// <param name="queryJson">查询参数</param>
  98. /// <returns></returns>
  99. [HttpGet]
  100. [AjaxOnly]
  101. public ActionResult GetPageList(string pagination, string queryJson)
  102. {
  103. Pagination paginationobj = pagination.ToObject<Pagination>();
  104. var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson);
  105. var jsonData = new
  106. {
  107. rows = data,
  108. total = paginationobj.total,
  109. page = paginationobj.page,
  110. records = paginationobj.records
  111. };
  112. return Success(jsonData);
  113. }
  114. /// <summary>
  115. /// 获取批示信息
  116. /// <summary>
  117. /// <param name="queryJson">查询参数</param>
  118. /// <returns></returns>
  119. [HttpGet]
  120. [AjaxOnly]
  121. public ActionResult GetInstructions(string keyValue)
  122. {
  123. var data = sys_ReceiveFileIBLL.GetInstructions(keyValue);
  124. var jsonData = new
  125. {
  126. rows = data,
  127. };
  128. return Success(jsonData);
  129. }
  130. /// <summary>
  131. /// 获取页面显示列表数据
  132. /// <summary>
  133. /// <param name="queryJson">查询参数</param>
  134. /// <returns></returns>
  135. [HttpGet]
  136. [AjaxOnly]
  137. public ActionResult GetPageListByUserId(string pagination, string queryJson)
  138. {
  139. var UserInfoEntity = LoginUserInfo.Get();
  140. Pagination paginationobj = pagination.ToObject<Pagination>();
  141. var data = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, queryJson, UserInfoEntity.userId);
  142. var jsonData = new
  143. {
  144. rows = data,
  145. total = paginationobj.total,
  146. page = paginationobj.page,
  147. records = paginationobj.records
  148. };
  149. return Success(jsonData);
  150. }
  151. /// <summary>
  152. /// 获取表单数据
  153. /// <summary>
  154. /// <returns></returns>
  155. [HttpGet]
  156. [AjaxOnly]
  157. public ActionResult GetFormData(string keyValue)
  158. {
  159. var Sys_ReceiveFileData = sys_ReceiveFileIBLL.GetSys_ReceiveFileEntity(keyValue);
  160. Sys_ReceiveFileData.Contents = HttpUtility.HtmlDecode(Sys_ReceiveFileData.Contents);
  161. var jsonData = new
  162. {
  163. Sys_ReceiveFile = Sys_ReceiveFileData,
  164. };
  165. return Success(jsonData);
  166. }
  167. [HttpGet]
  168. [AjaxOnly]
  169. public ActionResult CheckRUrl(string keyValue)
  170. {
  171. var fileEntity = annexesFileIbll.GetList(keyValue);
  172. if (fileEntity != null && fileEntity.Count() > 0)
  173. {
  174. return Json(true, JsonRequestBehavior.AllowGet);
  175. }
  176. return Json(false, JsonRequestBehavior.AllowGet);
  177. }
  178. #endregion
  179. #region 提交数据
  180. /// <summary>
  181. /// 删除实体数据
  182. /// <param name="keyValue">主键</param>
  183. /// <summary>
  184. /// <returns></returns>
  185. [HttpPost]
  186. [AjaxOnly]
  187. public ActionResult DeleteForm(string keyValue)
  188. {
  189. sys_ReceiveFileIBLL.VirtualDeleteEntity(keyValue);
  190. return Success("删除成功!");
  191. }
  192. /// <summary>
  193. /// 设置批示状态为已处理
  194. /// <param name="keyValue">主键</param>
  195. /// <summary>
  196. /// <returns></returns>
  197. [HttpGet]
  198. [AjaxOnly]
  199. public ActionResult DisPose(string keyValue)
  200. {
  201. sys_ReceiveFileIBLL.DisPose(keyValue);
  202. return Success("操作成功!");
  203. }
  204. /// <summary>
  205. /// 重置
  206. /// <param name="keyValue">主键</param>
  207. /// <summary>
  208. /// <returns></returns>
  209. [HttpGet]
  210. [AjaxOnly]
  211. public ActionResult Reset(string keyValue)
  212. {
  213. sys_ReceiveFileIBLL.Reset(keyValue);
  214. return Success("操作成功!");
  215. }
  216. /// <summary>
  217. /// 保存实体数据(新增、修改)
  218. /// <param name="keyValue">主键</param>
  219. /// <summary>
  220. /// <returns></returns>
  221. [HttpPost]
  222. [ValidateAntiForgeryToken]
  223. [AjaxOnly]
  224. public ActionResult SaveForm(string keyValue, string strEntity)
  225. {
  226. Sys_ReceiveFileEntity entity = strEntity.ToObject<Sys_ReceiveFileEntity>();
  227. sys_ReceiveFileIBLL.SaveEntity(keyValue, entity);
  228. return Success("保存成功!");
  229. }
  230. /// <summary>
  231. /// 保存实体数据(新增、修改)
  232. /// <param name="keyValue">主键</param>
  233. /// <summary>
  234. /// <returns></returns>
  235. [HttpPost]
  236. [ValidateAntiForgeryToken]
  237. [AjaxOnly]
  238. public ActionResult Issue(string strEntity)
  239. {
  240. Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
  241. sys_ReceiveFileIBLL.Issue(entity);
  242. return Success("保存成功!");
  243. }
  244. /// <summary>
  245. /// 公文接收 下发指定接收人
  246. /// <param name="keyValue">主键</param>
  247. /// <summary>
  248. /// <returns></returns>
  249. [HttpPost]
  250. [ValidateAntiForgeryToken]
  251. [AjaxOnly]
  252. public ActionResult ReceiveDocumentIssue(string strEntity)
  253. {
  254. Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
  255. sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
  256. return Success("保存成功!");
  257. }
  258. /// <summary>
  259. /// 主任批示
  260. /// </summary>
  261. /// <returns></returns>
  262. [HttpPost]
  263. [AjaxOnly]
  264. public ActionResult ZhuRenP(string strEntity)
  265. {
  266. Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
  267. entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP();
  268. //entity.SpecifyReceiver = "System";
  269. sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
  270. return Success("发送成功");
  271. }
  272. /// <summary>
  273. /// 校长批示
  274. /// </summary>
  275. /// <returns></returns>
  276. [HttpPost]
  277. [AjaxOnly]
  278. public ActionResult XiaoZhangP(string strEntity)
  279. {
  280. Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
  281. entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP();
  282. //entity.SpecifyReceiver = "System";
  283. sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
  284. return Success("发送成功");
  285. }
  286. /// <summary>
  287. /// 查看实体数据
  288. /// <param name="keyValue">主键</param>
  289. /// <summary>
  290. /// <returns></returns>
  291. [HttpPost]
  292. [AjaxOnly]
  293. public ActionResult Read(string keyValue)
  294. {
  295. sys_ReceiveFileIBLL.ReadEntity(keyValue);
  296. return Success("保存成功!");
  297. }
  298. #endregion
  299. }
  300. }