Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

233 linhas
6.2 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.AssetManagementSystem
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2022-11-07 14:25
  12. /// 描 述:经费开支申报
  13. /// </summary>
  14. public class FundsApplyBLL : FundsApplyIBLL
  15. {
  16. private FundsApplyService fundsApplyService = new FundsApplyService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<FundsApplyEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return fundsApplyService.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. /// 获取FundsApply表实体数据
  44. /// </summary>
  45. /// <param name="keyValue">主键</param>
  46. /// <returns></returns>
  47. public FundsApplyEntity GetFundsApplyEntity(string keyValue)
  48. {
  49. try
  50. {
  51. return fundsApplyService.GetFundsApplyEntity(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 FundsApplyEntity GetEntityByProcessId(string processId)
  71. {
  72. try
  73. {
  74. return fundsApplyService.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. /// <summary>
  89. /// 获取FundsApply表实体数据
  90. /// </summary>
  91. /// <param name="keyValue">主键</param>
  92. /// <returns></returns>
  93. public string GetCode()
  94. {
  95. try
  96. {
  97. return fundsApplyService.GetCode();
  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. /// 获取FundsApply表实体数据
  113. /// </summary>
  114. /// <param name="keyValue">主键</param>
  115. /// <returns></returns>
  116. public string SaveCode(string Code, string keyValue)
  117. {
  118. try
  119. {
  120. return fundsApplyService.SaveCode(Code,keyValue);
  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. #region 提交数据
  136. /// <summary>
  137. /// 删除实体数据
  138. /// </summary>
  139. /// <param name="keyValue">主键</param>
  140. public void DeleteEntity(string keyValue)
  141. {
  142. try
  143. {
  144. fundsApplyService.DeleteEntity(keyValue);
  145. }
  146. catch (Exception ex)
  147. {
  148. if (ex is ExceptionEx)
  149. {
  150. throw;
  151. }
  152. else
  153. {
  154. throw ExceptionEx.ThrowBusinessException(ex);
  155. }
  156. }
  157. }
  158. /// <summary>
  159. /// 保存实体数据(新增、修改)
  160. /// </summary>
  161. /// <param name="keyValue">主键</param>
  162. /// <param name="entity">实体</param>
  163. public void SaveEntity(string keyValue, FundsApplyEntity entity, List<FundsApplyDetailEntity> detailList)
  164. {
  165. try
  166. {
  167. fundsApplyService.SaveEntity(keyValue, entity, detailList);
  168. }
  169. catch (Exception ex)
  170. {
  171. if (ex is ExceptionEx)
  172. {
  173. throw;
  174. }
  175. else
  176. {
  177. throw ExceptionEx.ThrowBusinessException(ex);
  178. }
  179. }
  180. }
  181. public void ChangeStatusById(string keyValue, int status, string processId)
  182. {
  183. try
  184. {
  185. fundsApplyService.ChangeStatusById(keyValue, status, processId);
  186. }
  187. catch (Exception ex)
  188. {
  189. if (ex is ExceptionEx)
  190. {
  191. throw;
  192. }
  193. else
  194. {
  195. throw ExceptionEx.ThrowBusinessException(ex);
  196. }
  197. }
  198. }
  199. public void ChangeStatusByProcessId(string processId, int status)
  200. {
  201. try
  202. {
  203. fundsApplyService.ChangeStatusByProcessId(processId, status);
  204. }
  205. catch (Exception ex)
  206. {
  207. if (ex is ExceptionEx)
  208. {
  209. throw;
  210. }
  211. else
  212. {
  213. throw ExceptionEx.ThrowBusinessException(ex);
  214. }
  215. }
  216. }
  217. #endregion
  218. }
  219. }