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.
 
 
 
 
 
 

166 lines
4.7 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. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2024-09-12 09:46
  13. /// 描 述:安全排查流程
  14. /// </summary>
  15. public class SafetyCheckController : MvcControllerBase
  16. {
  17. private SafetyCheckIBLL safetyCheckIBLL = new SafetyCheckBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 主页面
  21. /// <summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult Index()
  25. {
  26. return View();
  27. }
  28. /// <summary>
  29. /// 表单页
  30. /// <summary>
  31. /// <returns></returns>
  32. [HttpGet]
  33. public ActionResult Form()
  34. {
  35. return View();
  36. }
  37. /// <summary>
  38. /// 表单查看页
  39. /// <summary>
  40. /// <returns></returns>
  41. [HttpGet]
  42. public ActionResult FormView()
  43. {
  44. return View();
  45. }
  46. /// <summary>
  47. /// 部门审查
  48. /// </summary>
  49. /// <returns></returns>
  50. [HttpGet]
  51. public ActionResult FormCheck()
  52. {
  53. return View();
  54. }
  55. #endregion
  56. #region 获取数据
  57. /// <summary>
  58. /// 获取页面显示列表数据
  59. /// </summary>
  60. /// <param name="pagination">分页参数</param>
  61. /// <param name="queryJson">查询参数</param>
  62. /// <returns></returns>
  63. [HttpGet]
  64. [AjaxOnly]
  65. public ActionResult GetPageList(string pagination, string queryJson)
  66. {
  67. Pagination paginationobj = pagination.ToObject<Pagination>();
  68. var data = safetyCheckIBLL.GetPageList(paginationobj, queryJson);
  69. var jsonData = new
  70. {
  71. rows = data,
  72. total = paginationobj.total,
  73. page = paginationobj.page,
  74. records = paginationobj.records
  75. };
  76. return Success(jsonData);
  77. }
  78. /// <summary>
  79. /// 获取表单数据
  80. /// </summary>
  81. /// <param name="keyValue">主键</param>
  82. /// <returns></returns>
  83. [HttpGet]
  84. [AjaxOnly]
  85. public ActionResult GetFormData(string keyValue)
  86. {
  87. var SafetyCheckData = safetyCheckIBLL.GetSafetyCheckEntity(keyValue);
  88. var jsonData = new
  89. {
  90. SafetyCheck = SafetyCheckData,
  91. };
  92. return Success(jsonData);
  93. }
  94. #endregion
  95. #region 提交数据
  96. /// <summary>
  97. /// 删除实体数据
  98. /// </summary>
  99. /// <param name="keyValue">主键</param>
  100. /// <returns></returns>
  101. [HttpPost]
  102. [AjaxOnly]
  103. public ActionResult DeleteForm(string keyValue)
  104. {
  105. safetyCheckIBLL.DeleteEntity(keyValue);
  106. return Success("删除成功!");
  107. }
  108. /// <summary>
  109. /// 保存实体数据(新增、修改)
  110. /// </summary>
  111. /// <param name="keyValue">主键</param>
  112. /// <param name="strEntity">实体</param>
  113. /// <returns></returns>
  114. [HttpPost]
  115. [ValidateAntiForgeryToken]
  116. [AjaxOnly]
  117. public ActionResult SaveForm(string keyValue, string strEntity)
  118. {
  119. SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>();
  120. safetyCheckIBLL.SaveEntity(keyValue, entity);
  121. if (!string.IsNullOrEmpty(keyValue))
  122. {
  123. }
  124. return Success("保存成功!");
  125. }
  126. #endregion
  127. /// <summary>
  128. /// 提交
  129. /// </summary>
  130. /// <param name="keyValue"></param>
  131. /// <returns></returns>
  132. [HttpPost]
  133. [AjaxOnly]
  134. public ActionResult SubmitForm(string keyValue)
  135. {
  136. safetyCheckIBLL.SubmitEnity(keyValue);
  137. return Success("提交成功!");
  138. }
  139. [HttpPost]
  140. [AjaxOnly]
  141. public ActionResult DepartmentForm(string keyValue, string strEntity)
  142. {
  143. SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>();
  144. if (entity.Status != 0)
  145. {
  146. entity.Status = 2;
  147. }
  148. else
  149. {
  150. entity.Status = 0;
  151. }
  152. safetyCheckIBLL.SaveEntity(keyValue, entity);
  153. return Success("操作成功!");
  154. }
  155. }
  156. }