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.
 
 
 
 
 
 

149 lines
4.1 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.CRM
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创 建:超级管理员
  10. /// 日 期:2017-07-11 14:48
  11. /// 描 述:应收账款
  12. /// </summary>
  13. public class CrmReceivableBLL : CrmReceivableIBLL
  14. {
  15. private CrmReceivableService crmReceivableService = new CrmReceivableService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取收款单列表
  19. /// </summary>
  20. /// <param name="pagination">分页</param>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns>返回分页列表</returns>
  23. public IEnumerable<CrmOrderEntity> GetPaymentPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return crmReceivableService.GetPaymentPageList(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. /// <param name="orderId">订单主键</param>
  45. /// <returns></returns>
  46. public IEnumerable<CrmReceivableEntity> GetPaymentRecord(string orderId)
  47. {
  48. try
  49. {
  50. return crmReceivableService.GetPaymentRecord(orderId);
  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. #endregion
  65. #region 提交数据
  66. /// <summary>
  67. /// 保存表单(新增)
  68. /// </summary>
  69. /// <param name="entity">实体对象</param>
  70. /// <returns></returns>
  71. public void SaveEntity(CrmReceivableEntity entity)
  72. {
  73. try
  74. {
  75. crmReceivableService.SaveEntity(entity);
  76. }
  77. catch (Exception ex)
  78. {
  79. if (ex is ExceptionEx)
  80. {
  81. throw;
  82. }
  83. else
  84. {
  85. throw ExceptionEx.ThrowBusinessException(ex);
  86. }
  87. }
  88. }
  89. #endregion
  90. #region 报表
  91. /// <summary>
  92. /// 获取收款列表
  93. /// </summary>
  94. /// <param name="queryJson">查询参数</param>
  95. /// <returns>返回列表</returns>
  96. public IEnumerable<ReceivableReportModel> GetReportList(string queryJson)
  97. {
  98. try
  99. {
  100. return crmReceivableService.GetList(queryJson);
  101. }
  102. catch (Exception ex)
  103. {
  104. if (ex is ExceptionEx)
  105. {
  106. throw;
  107. }
  108. else
  109. {
  110. throw ExceptionEx.ThrowBusinessException(ex);
  111. }
  112. }
  113. }
  114. /// <summary>
  115. /// 获取列表
  116. /// </summary>
  117. /// <param name="pagination">分页</param>
  118. /// <param name="queryJson">查询参数</param>
  119. /// <returns>返回分页列表</returns>
  120. public IEnumerable<ReceivableReportModel> GetReportPageList(Pagination pagination, string queryJson)
  121. {
  122. try
  123. {
  124. return crmReceivableService.GetPageList(pagination, queryJson);
  125. }
  126. catch (Exception ex)
  127. {
  128. if (ex is ExceptionEx)
  129. {
  130. throw;
  131. }
  132. else
  133. {
  134. throw ExceptionEx.ThrowBusinessException(ex);
  135. }
  136. }
  137. }
  138. #endregion
  139. }
  140. }