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.

TSProcessBLL.cs 3.8 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.Extention.TaskScheduling
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架
  8. /// Copyright (c) 2013-2018 上海力软信息技术有限公司
  9. /// 创 建:超级管理员
  10. /// 日 期:2019-01-09 16:07
  11. /// 描 述:任务进程
  12. /// </summary>
  13. public class TSProcessBLL: TSProcessIBLL
  14. {
  15. private TSProcessService processService = new TSProcessService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取页面显示列表数据
  19. /// <summary>
  20. /// <param name="pagination">分页参数</param>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<TSProcessEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return processService.GetPageList(pagination, queryJson);
  28. }
  29. catch (Exception ex)
  30. {
  31. if (ex is ExceptionEx)
  32. {
  33. throw;
  34. }
  35. else
  36. {
  37. throw ExceptionEx.ThrowBusinessException(ex);
  38. }
  39. }
  40. }
  41. /// <summary>
  42. /// 获取需要执行的任务实例
  43. /// </summary>
  44. /// <returns></returns>
  45. public IEnumerable<TSProcessEntity> GetList()
  46. {
  47. try
  48. {
  49. return processService.GetList();
  50. }
  51. catch (Exception ex)
  52. {
  53. if (ex is ExceptionEx)
  54. {
  55. throw;
  56. }
  57. else
  58. {
  59. throw ExceptionEx.ThrowBusinessException(ex);
  60. }
  61. }
  62. }
  63. /// <summary>
  64. /// 获取LR_TS_Process表实体数据
  65. /// <param name="keyValue">主键</param>
  66. /// <summary>
  67. /// <returns></returns>
  68. public TSProcessEntity GetProcessEntity(string keyValue)
  69. {
  70. try
  71. {
  72. return processService.GetProcessEntity(keyValue);
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowBusinessException(ex);
  83. }
  84. }
  85. }
  86. #endregion
  87. #region 提交数据
  88. /// <summary>
  89. /// 删除实体数据
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. public void DeleteEntity(string keyValue)
  94. {
  95. try
  96. {
  97. processService.DeleteEntity(keyValue);
  98. }
  99. catch (Exception ex)
  100. {
  101. if (ex is ExceptionEx)
  102. {
  103. throw;
  104. }
  105. else
  106. {
  107. throw ExceptionEx.ThrowBusinessException(ex);
  108. }
  109. }
  110. }
  111. /// <summary>
  112. /// 保存实体数据(新增、修改)
  113. /// <param name="keyValue">主键</param>
  114. /// <summary>
  115. /// <returns></returns>
  116. public void SaveEntity(string keyValue, TSProcessEntity entity)
  117. {
  118. try
  119. {
  120. processService.SaveEntity(keyValue, entity);
  121. }
  122. catch (Exception ex)
  123. {
  124. if (ex is ExceptionEx)
  125. {
  126. throw;
  127. }
  128. else
  129. {
  130. throw ExceptionEx.ThrowBusinessException(ex);
  131. }
  132. }
  133. }
  134. #endregion
  135. }
  136. }