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.

QualityReportController.cs 6.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.LR_Desktop;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using Learun.Application.TwoDevelopment.EducationalAdministration;
  7. namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2021-06-22 11:07
  14. /// 描 述:上报
  15. /// </summary>
  16. public class QualityReportController : MvcControllerBase
  17. {
  18. private QualityReportMainIBLL fualityReportMainIBLL = new QualityReportMainBLL();
  19. private QualityReportChildIBLL fualityReportChildIBLL = new QualityReportChildBLL();
  20. private FillinFromIBLL fillinFromIBLL = new FillinFromBLL();
  21. #region 视图功能
  22. /// <summary>
  23. /// 主页面
  24. /// <summary>
  25. /// <returns></returns>
  26. [HttpGet]
  27. public ActionResult Index()
  28. {
  29. return View();
  30. }
  31. /// <summary>
  32. /// 表单页
  33. /// <summary>
  34. /// <returns></returns>
  35. [HttpGet]
  36. public ActionResult Form()
  37. {
  38. return View();
  39. }
  40. /// <summary>
  41. /// 上报数据管理
  42. /// <summary>
  43. /// <returns></returns>
  44. [HttpGet]
  45. public ActionResult IndexReport()
  46. {
  47. return View();
  48. }
  49. /// <summary>
  50. /// 上报数据管理
  51. /// <summary>
  52. /// <returns></returns>
  53. [HttpGet]
  54. public ActionResult FormView()
  55. {
  56. return View();
  57. }
  58. #endregion
  59. #region 获取数据
  60. /// <summary>
  61. /// 获取树形结构数据
  62. /// </summary>
  63. /// <returns></returns>
  64. [HttpGet]
  65. [AjaxOnly]
  66. public ActionResult GetTree(string queryJson)
  67. {
  68. var data = fillinFromIBLL.GetTree(queryJson);
  69. return Success(data);
  70. }
  71. /// <summary>
  72. /// 获取页面显示列表数据
  73. /// </summary>
  74. /// <param name="pagination">分页参数</param>
  75. /// <param name="queryJson">查询参数</param>
  76. /// <returns></returns>
  77. [HttpGet]
  78. [AjaxOnly]
  79. public ActionResult GetPageListForReport(string pagination, string queryJson)
  80. {
  81. Pagination paginationobj = pagination.ToObject<Pagination>();
  82. var data = fillinFromIBLL.GetPageListForReport(paginationobj, queryJson);
  83. var jsonData = new
  84. {
  85. rows = data,
  86. total = paginationobj.total,
  87. page = paginationobj.page,
  88. records = paginationobj.records
  89. };
  90. return Success(jsonData);
  91. }
  92. /// <summary>
  93. /// 获取页面显示列表数据
  94. /// </summary>
  95. /// <param name="pagination">分页参数</param>
  96. /// <param name="queryJson">查询参数</param>
  97. /// <returns></returns>
  98. [HttpGet]
  99. [AjaxOnly]
  100. public ActionResult GetPageList(string pagination, string queryJson)
  101. {
  102. Pagination paginationobj = pagination.ToObject<Pagination>();
  103. var data = fualityReportMainIBLL.GetPageList(paginationobj, queryJson);
  104. var jsonData = new
  105. {
  106. rows = data,
  107. total = paginationobj.total,
  108. page = paginationobj.page,
  109. records = paginationobj.records
  110. };
  111. return Success(jsonData);
  112. }
  113. /// <summary>
  114. /// 获取页面显示列表数据
  115. /// </summary>
  116. /// <param name="queryJson">查询参数</param>
  117. /// <returns></returns>
  118. [HttpGet]
  119. [AjaxOnly]
  120. public ActionResult GetList(string queryJson)
  121. {
  122. var data = fualityReportMainIBLL.GetList(queryJson);
  123. return Success(data);
  124. }
  125. /// <summary>
  126. /// 判断是否可以上报
  127. /// </summary>
  128. /// <param name="keyValue">项目Id</param>
  129. /// <returns></returns>
  130. [HttpGet]
  131. [AjaxOnly]
  132. public ActionResult IsCanReport(string keyValue)
  133. {
  134. var str = fualityReportChildIBLL.IsCanReport(keyValue);
  135. if (!string.IsNullOrEmpty(str))
  136. {
  137. return Fail(str);
  138. }
  139. return Success("");
  140. }
  141. /// <summary>
  142. /// 获取表单数据
  143. /// </summary>
  144. /// <param name="keyValue">项目Id</param>
  145. /// <returns></returns>
  146. [HttpGet]
  147. [AjaxOnly]
  148. public ActionResult GetFormData(string keyValue,string mainId)
  149. {
  150. var ReportData = fualityReportChildIBLL.GetListByFillId(keyValue, mainId);
  151. return Success(ReportData);
  152. }
  153. #endregion
  154. #region 提交数据
  155. /// <summary>
  156. /// 保存实体数据(新增、修改)
  157. /// </summary>
  158. /// <param name="keyValue">主键</param>
  159. /// <param name="strEntity">实体</param>
  160. /// <returns></returns>
  161. [HttpPost]
  162. [ValidateAntiForgeryToken]
  163. [AjaxOnly]
  164. public ActionResult SaveList(string keyValue, List<QualityReportChildEntity> list)
  165. {
  166. fualityReportChildIBLL.SaveList(keyValue, list);
  167. return Success("保存成功!");
  168. }
  169. /// <summary>
  170. /// 提交
  171. /// </summary>
  172. /// <returns></returns>
  173. [HttpPost]
  174. [AjaxOnly]
  175. public ActionResult UpdateState(string keyValue, int Status)
  176. {
  177. fualityReportChildIBLL.UpdateState(keyValue, Status);
  178. return Success("操作成功!");
  179. }
  180. /// <summary>
  181. /// 删除
  182. /// </summary>
  183. /// <returns></returns>
  184. [HttpPost]
  185. [AjaxOnly]
  186. public ActionResult DeleteForm(string keyValue)
  187. {
  188. fualityReportChildIBLL.DeleteEntity(keyValue);
  189. return Success("删除成功!");
  190. }
  191. #endregion
  192. }
  193. }