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.
 
 
 
 
 
 

217 lines
6.0 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2020-11-27 10:05
  12. /// 描 述:学生请假管理
  13. /// </summary>
  14. public class StuLeaveManagementBLL : StuLeaveManagementIBLL
  15. {
  16. private StuLeaveManagementService stuLeaveManagementService = new StuLeaveManagementService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<StuLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return stuLeaveManagementService.GetPageList(pagination, queryJson);
  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. /// 获取StuLeaveManagement表实体数据
  44. /// </summary>
  45. /// <param name="keyValue">主键</param>
  46. /// <returns></returns>
  47. public StuLeaveManagementEntity GetStuLeaveManagementEntity(string keyValue)
  48. {
  49. try
  50. {
  51. return stuLeaveManagementService.GetStuLeaveManagementEntity(keyValue);
  52. }
  53. catch (Exception ex)
  54. {
  55. if (ex is ExceptionEx)
  56. {
  57. throw;
  58. }
  59. else
  60. {
  61. throw ExceptionEx.ThrowBusinessException(ex);
  62. }
  63. }
  64. }
  65. /// <summary>
  66. /// 获取主表实体数据
  67. /// </summary>
  68. /// <param name="processId">流程实例ID</param>
  69. /// <returns></returns>
  70. public StuLeaveManagementEntity GetEntityByProcessId(string processId)
  71. {
  72. try
  73. {
  74. return stuLeaveManagementService.GetEntityByProcessId(processId);
  75. }
  76. catch (Exception ex)
  77. {
  78. if (ex is ExceptionEx)
  79. {
  80. throw;
  81. }
  82. else
  83. {
  84. throw ExceptionEx.ThrowBusinessException(ex);
  85. }
  86. }
  87. }
  88. #endregion
  89. #region 提交数据
  90. /// <summary>
  91. /// 删除实体数据
  92. /// </summary>
  93. /// <param name="keyValue">主键</param>
  94. public void DeleteEntity(string keyValue)
  95. {
  96. try
  97. {
  98. stuLeaveManagementService.DeleteEntity(keyValue);
  99. }
  100. catch (Exception ex)
  101. {
  102. if (ex is ExceptionEx)
  103. {
  104. throw;
  105. }
  106. else
  107. {
  108. throw ExceptionEx.ThrowBusinessException(ex);
  109. }
  110. }
  111. }
  112. /// <summary>
  113. /// 保存实体数据(新增、修改)
  114. /// </summary>
  115. /// <param name="keyValue">主键</param>
  116. /// <param name="entity">实体</param>
  117. /// <returns></returns>
  118. public void SaveEntity(string keyValue, StuLeaveManagementEntity entity)
  119. {
  120. try
  121. {
  122. stuLeaveManagementService.SaveEntity(keyValue, entity);
  123. }
  124. catch (Exception ex)
  125. {
  126. if (ex is ExceptionEx)
  127. {
  128. throw;
  129. }
  130. else
  131. {
  132. throw ExceptionEx.ThrowBusinessException(ex);
  133. }
  134. }
  135. }
  136. /// <summary>
  137. /// 提交实体数据
  138. /// </summary>
  139. /// <param name="keyValue">主键</param>
  140. public void DoSubmit(string keyValue, string status, string processId)
  141. {
  142. try
  143. {
  144. stuLeaveManagementService.DoSubmit(keyValue, status, processId);
  145. }
  146. catch (Exception ex)
  147. {
  148. if (ex is ExceptionEx)
  149. {
  150. throw;
  151. }
  152. else
  153. {
  154. throw ExceptionEx.ThrowServiceException(ex);
  155. }
  156. }
  157. }
  158. /// <summary>
  159. /// 审核实体数据
  160. /// </summary>
  161. /// <param name="keyValue">主键</param>
  162. public void ChangeStatusByProcessId(string status, string processId, string userId)
  163. {
  164. try
  165. {
  166. stuLeaveManagementService.ChangeStatusByProcessId(status, processId, userId);
  167. }
  168. catch (Exception ex)
  169. {
  170. if (ex is ExceptionEx)
  171. {
  172. throw;
  173. }
  174. else
  175. {
  176. throw ExceptionEx.ThrowServiceException(ex);
  177. }
  178. }
  179. }
  180. #endregion
  181. /// <summary>
  182. /// 未销假实体数据
  183. /// </summary>
  184. /// <param name="keyValue">主键</param>
  185. public int Num(string CreateUserNo)
  186. {
  187. try
  188. {
  189. return stuLeaveManagementService.CreateUserNo(CreateUserNo);
  190. }
  191. catch (Exception ex)
  192. {
  193. if (ex is ExceptionEx)
  194. {
  195. throw;
  196. }
  197. else
  198. {
  199. throw ExceptionEx.ThrowBusinessException(ex);
  200. }
  201. }
  202. }
  203. }
  204. }