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.
 
 
 
 
 
 

160 lines
5.0 KiB

  1. using System;
  2. using Learun.Util;
  3. using System.Data;
  4. using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
  5. using System.Web.Mvc;
  6. using System.Collections.Generic;
  7. using Learun.Application.Organization;
  8. namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2021-05-27 17:42
  15. /// 描 述:基础信息上报
  16. /// </summary>
  17. public class FD_BudgetBasicsController : MvcControllerBase
  18. {
  19. private FD_BudgetBasicsIBLL fD_BudgetBasicsIBLL = new FD_BudgetBasicsBLL();
  20. private DepartmentIBLL departmentIBLL = new DepartmentBLL();
  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. var userInfo = LoginUserInfo.Get();
  39. ViewBag.Name = userInfo.realName;
  40. var dept = departmentIBLL.GetEntity(userInfo.departmentId);
  41. ViewBag.Dept = dept == null ? "" : dept.F_FullName;
  42. ViewBag.Date = DateTime.Now;
  43. return View();
  44. }
  45. #endregion
  46. #region 获取数据
  47. /// <summary>
  48. /// 获取页面显示列表数据
  49. /// </summary>
  50. /// <param name="pagination">分页参数</param>
  51. /// <param name="queryJson">查询参数</param>
  52. /// <returns></returns>
  53. [HttpGet]
  54. [AjaxOnly]
  55. public ActionResult GetPageList(string pagination, string queryJson)
  56. {
  57. Pagination paginationobj = pagination.ToObject<Pagination>();
  58. var data = fD_BudgetBasicsIBLL.GetPageList(paginationobj, queryJson);
  59. var jsonData = new
  60. {
  61. rows = data,
  62. total = paginationobj.total,
  63. page = paginationobj.page,
  64. records = paginationobj.records
  65. };
  66. return Success(jsonData);
  67. }
  68. /// <summary>
  69. /// 获取表单数据
  70. /// </summary>
  71. /// <param name="keyValue">主键</param>
  72. /// <returns></returns>
  73. [HttpGet]
  74. [AjaxOnly]
  75. public ActionResult GetFormData(string keyValue)
  76. {
  77. var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue);
  78. var jsonData = new
  79. {
  80. FD_BudgetBasics = FD_BudgetBasicsData,
  81. };
  82. return Success(jsonData);
  83. }
  84. /// <summary>
  85. /// 获取表单数据
  86. /// </summary>
  87. /// <param name="keyValue">主键</param>
  88. /// <returns></returns>
  89. [HttpGet]
  90. [AjaxOnly]
  91. public ActionResult GetFormDataByProcessId(string processId)
  92. {
  93. var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFormDataByProcessId(processId);
  94. var jsonData = new
  95. {
  96. FD_BudgetBasics = FD_BudgetBasicsData,
  97. };
  98. return Success(jsonData);
  99. }
  100. #endregion
  101. #region 提交数据
  102. /// <summary>
  103. /// 删除实体数据
  104. /// </summary>
  105. /// <param name="keyValue">主键</param>
  106. /// <returns></returns>
  107. [HttpPost]
  108. [AjaxOnly]
  109. public ActionResult DeleteForm(string keyValue)
  110. {
  111. var entity = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue);
  112. entity.BIsDelete = true;
  113. entity.BDeleteTime = DateTime.Now;
  114. entity.BDeleteUser = LoginUserInfo.Get().userId;
  115. fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity);
  116. return Success("删除成功!");
  117. }
  118. /// <summary>
  119. /// 保存实体数据(新增、修改)
  120. /// </summary>
  121. /// <param name="keyValue">主键</param>
  122. /// <param name="strEntity">实体</param>
  123. /// <returns></returns>
  124. [HttpPost]
  125. [ValidateAntiForgeryToken]
  126. [AjaxOnly]
  127. public ActionResult SaveForm(string keyValue, string strEntity)
  128. {
  129. FD_BudgetBasicsEntity entity = strEntity.ToObject<FD_BudgetBasicsEntity>();
  130. fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity);
  131. if (string.IsNullOrEmpty(keyValue))
  132. {
  133. }
  134. return Success("保存成功!");
  135. }
  136. /// <summary>
  137. /// 提交资助变更
  138. /// </summary>
  139. /// <param name="keyValue"></param>
  140. /// <returns></returns>
  141. [HttpPost]
  142. [AjaxOnly]
  143. public ActionResult ChangeStatusById(string keyValue, string processId)
  144. {
  145. fD_BudgetBasicsIBLL.ChangeStatusById(keyValue, 1, processId);
  146. return Success("操作成功!");
  147. }
  148. #endregion
  149. }
  150. }