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.

LR_KBKanBanInfoController.cs 4.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using Learun.Application.Base.SystemModule;
  2. using Learun.Application.Extention.DisplayBoardManage;
  3. using Learun.Util;
  4. using System.Web.Mvc;
  5. namespace Learun.Application.Web.Areas.LR_DisplayBoard.Controllers
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架
  9. /// Copyright (c) 2013-2018 上海力软信息技术有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2018-09-20 10:10
  12. /// 描 述:看板信息
  13. /// </summary>
  14. public class LR_KBKanBanInfoController : MvcControllerBase
  15. {
  16. private LR_KBKanBanInfoIBLL lR_KBKanBanInfoIBLL = new LR_KBKanBanInfoBLL();
  17. private LR_KBConfigInfoIBLL lR_KBConfigInfoIBLL = new LR_KBConfigInfoBLL();
  18. private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. if (Request["keyValue"] == null)//根据keyValue判断是否为新增
  37. {
  38. ViewBag.KanBanCode = codeRuleIBLL.GetBillCode("KanBanCode");//编号
  39. }
  40. return View();
  41. }
  42. /// <summary>
  43. /// 看板预览界面
  44. /// </summary>
  45. /// <returns></returns>
  46. [HttpGet]
  47. public ActionResult PreviewForm()
  48. {
  49. return View();
  50. }
  51. #endregion
  52. #region 获取数据
  53. /// <summary>
  54. /// 获取列表数据
  55. /// <summary>
  56. /// <returns></returns>
  57. [HttpGet]
  58. [AjaxOnly]
  59. public ActionResult GetList( string queryJson )
  60. {
  61. var data = lR_KBKanBanInfoIBLL.GetList(queryJson);
  62. return Success(data);
  63. }
  64. [HttpGet]
  65. [AjaxOnly]
  66. public ActionResult GetTemptList()
  67. {
  68. var data = lR_KBKanBanInfoIBLL.GetTemptList();
  69. return Success(data);
  70. }
  71. /// <summary>
  72. /// 获取列表分页数据
  73. /// <param name="pagination">分页参数</param>
  74. /// <summary>
  75. /// <returns></returns>
  76. [HttpGet]
  77. [AjaxOnly]
  78. public ActionResult GetPageList(string pagination, string queryJson)
  79. {
  80. Pagination paginationobj = pagination.ToObject<Pagination>();
  81. var data = lR_KBKanBanInfoIBLL.GetPageList(paginationobj, queryJson);
  82. var jsonData = new
  83. {
  84. rows = data,
  85. total = paginationobj.total,
  86. page = paginationobj.page,
  87. records = paginationobj.records
  88. };
  89. return Success(jsonData);
  90. }
  91. /// <summary>
  92. /// 获取表单数据
  93. /// <param name="keyValue">主键</param>
  94. /// <summary>
  95. /// <returns></returns>
  96. [HttpGet]
  97. [AjaxOnly]
  98. public ActionResult GetFormData(string keyValue)
  99. {
  100. var baseinfo = lR_KBKanBanInfoIBLL.GetEntity(keyValue);
  101. var configinfo = lR_KBConfigInfoIBLL.GetListByKBId(keyValue);
  102. var data = new
  103. {
  104. baseinfo = baseinfo,
  105. configinfo = configinfo
  106. };
  107. return Success(data);
  108. }
  109. #endregion
  110. #region 提交数据
  111. /// <summary>
  112. /// 删除实体数据
  113. /// <param name="keyValue">主键</param>
  114. /// <summary>
  115. /// <returns></returns>
  116. [HttpPost]
  117. [AjaxOnly]
  118. public ActionResult DeleteForm(string keyValue)
  119. {
  120. lR_KBKanBanInfoIBLL.DeleteEntity(keyValue);
  121. return Success("删除成功!");
  122. }
  123. /// <summary>
  124. /// 保存实体数据(新增、修改)
  125. /// <param name="keyValue">主键</param>
  126. /// <summary>
  127. /// <returns></returns>
  128. [HttpPost]
  129. [ValidateAntiForgeryToken]
  130. [AjaxOnly]
  131. public ActionResult SaveForm(string keyValue,string kanbaninfo,string kbconfigInfo)
  132. {
  133. lR_KBKanBanInfoIBLL.SaveEntity(keyValue, kanbaninfo, kbconfigInfo);
  134. if (string.IsNullOrEmpty(keyValue))
  135. {
  136. codeRuleIBLL.UseRuleSeed("KanBanCode");//新增占用看板编号
  137. }
  138. return Success("保存成功!");
  139. }
  140. #endregion
  141. }
  142. }