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.
 
 
 
 
 
 

163 lines
4.7 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.WorkFlow
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创建人:陈彬彬
  10. /// 日 期:2017.04.17
  11. /// 描 述:工作流委托规则
  12. /// </summary>
  13. public class WfDelegateRuleBLL : WfDelegateRuleIBLL
  14. {
  15. private WfDelegateRuleService wfDelegateRuleService = new WfDelegateRuleService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取分页列表
  19. /// </summary>
  20. /// <param name="pagination">分页参数</param>
  21. /// <param name="keyword">关键字(被委托人)</param>
  22. /// <param name="userInfo">用户信息</param>
  23. /// <returns></returns>
  24. public IEnumerable<WfDelegateRuleEntity> GetPageList(Pagination pagination, string keyword, UserInfo userInfo)
  25. {
  26. try
  27. {
  28. return wfDelegateRuleService.GetPageList(pagination, keyword, userInfo);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. /// <summary>
  43. /// 根据委托人获取委托记录
  44. /// </summary>
  45. /// <returns></returns>
  46. public IEnumerable<WfDelegateRuleEntity> GetList(UserInfo userInfo)
  47. {
  48. try
  49. {
  50. return wfDelegateRuleService.GetList(userInfo);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. /// <summary>
  65. /// 获取关联的模板数据
  66. /// </summary>
  67. /// <returns></returns>
  68. public IEnumerable<WfDelegateRuleRelationEntity> GetRelationList(string keyValue)
  69. {
  70. try
  71. {
  72. return wfDelegateRuleService.GetRelationList(keyValue);
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowServiceException(ex);
  83. }
  84. }
  85. }
  86. #endregion
  87. #region 提交数据
  88. /// <summary>
  89. /// 删除实体
  90. /// </summary>
  91. /// <param name="keyValue">主键</param>
  92. public void DeleteEntity(string keyValue)
  93. {
  94. try
  95. {
  96. wfDelegateRuleService.DeleteEntity(keyValue);
  97. }
  98. catch (Exception ex)
  99. {
  100. if (ex is ExceptionEx)
  101. {
  102. throw;
  103. }
  104. else
  105. {
  106. throw ExceptionEx.ThrowBusinessException(ex);
  107. }
  108. }
  109. }
  110. /// <summary>
  111. /// 保存实体
  112. /// </summary>
  113. /// <param name="keyValue">主键</param>
  114. /// <param name="wfDelegateRuleEntity">实体数据</param>
  115. /// <param name="schemeInfoList">关联模板主键</param>
  116. public void SaveEntity(string keyValue, WfDelegateRuleEntity wfDelegateRuleEntity, string[] schemeInfoList)
  117. {
  118. try
  119. {
  120. wfDelegateRuleService.SaveEntity(keyValue, wfDelegateRuleEntity, schemeInfoList);
  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. /// <summary>
  135. /// 更新委托规则状态信息
  136. /// </summary>
  137. /// <param name="keyValue">主键</param>
  138. /// <param name="state"></param>
  139. public void UpdateState(string keyValue, int state)
  140. {
  141. try
  142. {
  143. wfDelegateRuleService.UpdateState(keyValue, state);
  144. }
  145. catch (Exception ex)
  146. {
  147. if (ex is ExceptionEx)
  148. {
  149. throw;
  150. }
  151. else
  152. {
  153. throw ExceptionEx.ThrowBusinessException(ex);
  154. }
  155. }
  156. }
  157. #endregion
  158. }
  159. }