|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- using Learun.Util;
- using System.Data;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using System.Web.Mvc;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using Learun.Application.Base.SystemModule;
-
- namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-04-11 10:08
- /// 描 述:公文收发
- /// </summary>
- public class Sys_ReceiveFileController : MvcControllerBase
- {
- private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL();
- private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL();
-
- #region 视图功能
-
- /// <summary>
- /// 主页面
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult FormReadDocument()
- {
- return View();
- }
- [HttpGet]
- public ActionResult IndexDocument()
- {
- return View();
- }
- /// <summary>
- /// 指定接收人表单页
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult SpecifyReceiverForm()
- {
- return View();
- }
- /// <summary>
- /// 主页面【党政公文查阅】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexParty()
- {
- return View();
- }
- /// <summary>
- /// 主页面【党政公文查阅】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexGWJS()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult FormDocument()
- {
- return View();
- }
- /// <summary>
- /// 表单页【党政公文查阅】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormParty()
- {
- return View();
- }
-
- #endregion
-
- #region 获取数据
-
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取批示信息
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetInstructions(string keyValue)
- {
- var data = sys_ReceiveFileIBLL.GetInstructions(keyValue);
- var jsonData = new
- {
- rows = data,
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageListByUserId(string pagination, string queryJson)
- {
- var UserInfoEntity = LoginUserInfo.Get();
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, queryJson, UserInfoEntity.userId);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取表单数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var Sys_ReceiveFileData = sys_ReceiveFileIBLL.GetSys_ReceiveFileEntity(keyValue);
- Sys_ReceiveFileData.Contents = HttpUtility.HtmlDecode(Sys_ReceiveFileData.Contents);
- var jsonData = new
- {
- Sys_ReceiveFile = Sys_ReceiveFileData,
- };
- return Success(jsonData);
- }
-
- [HttpGet]
- [AjaxOnly]
- public ActionResult CheckRUrl(string keyValue)
- {
- var fileEntity = annexesFileIbll.GetList(keyValue);
- if (fileEntity != null && fileEntity.Count() > 0)
- {
- return Json(true, JsonRequestBehavior.AllowGet);
- }
- return Json(false, JsonRequestBehavior.AllowGet);
- }
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- sys_ReceiveFileIBLL.VirtualDeleteEntity(keyValue);
- return Success("删除成功!");
- }
- /// <summary>
- /// 设置批示状态为已处理
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult DisPose(string keyValue)
- {
- sys_ReceiveFileIBLL.DisPose(keyValue);
- return Success("操作成功!");
- }
- /// <summary>
- /// 重置
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult Reset(string keyValue)
- {
- sys_ReceiveFileIBLL.Reset(keyValue);
- return Success("操作成功!");
- }
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, string strEntity)
- {
- Sys_ReceiveFileEntity entity = strEntity.ToObject<Sys_ReceiveFileEntity>();
- sys_ReceiveFileIBLL.SaveEntity(keyValue, entity);
- return Success("保存成功!");
- }
-
-
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult Issue(string strEntity)
- {
- Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
- sys_ReceiveFileIBLL.Issue(entity);
- return Success("保存成功!");
- }
-
-
- /// <summary>
- /// 公文接收 下发指定接收人
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult ReceiveDocumentIssue(string strEntity)
- {
- Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
- sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
- return Success("保存成功!");
- }
-
- /// <summary>
- /// 主任批示
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult ZhuRenP(string strEntity)
- {
- Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
- entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP();
- //entity.SpecifyReceiver = "System";
- sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
- return Success("发送成功");
- }
-
- /// <summary>
- /// 校长批示
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult XiaoZhangP(string strEntity)
- {
- Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
- entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP();
- //entity.SpecifyReceiver = "System";
- sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
- return Success("发送成功");
- }
-
-
- /// <summary>
- /// 查看实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult Read(string keyValue)
- {
- sys_ReceiveFileIBLL.ReadEntity(keyValue);
- return Success("保存成功!");
- }
- #endregion
-
- }
- }
|