Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

140 rindas
4.0 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.03.09
  11. /// 描 述:订单管理
  12. /// </summary>
  13. public class CrmOrderBLL : CrmOrderIBLL
  14. {
  15. private CrmOrderService crmOrderService = new CrmOrderService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 订单列表
  19. /// </summary>
  20. /// <returns></returns>
  21. public IEnumerable<CrmOrderEntity> GetPageList(Pagination pagination, string queryJson, string custmerQuerySql)
  22. {
  23. try
  24. {
  25. return crmOrderService.GetPageList(pagination, queryJson, custmerQuerySql);
  26. }
  27. catch (Exception ex)
  28. {
  29. if (ex is ExceptionEx)
  30. {
  31. throw;
  32. }
  33. else
  34. {
  35. throw ExceptionEx.ThrowBusinessException(ex);
  36. }
  37. }
  38. }
  39. /// <summary>
  40. /// 获取订单信息主键
  41. /// </summary>
  42. /// <param name="keyValue">主键</param>
  43. /// <returns></returns>
  44. public CrmOrderEntity GetCrmOrderEntity(string keyValue)
  45. {
  46. try
  47. {
  48. return crmOrderService.GetCrmOrderEntity(keyValue);
  49. }
  50. catch (Exception ex)
  51. {
  52. if (ex is ExceptionEx)
  53. {
  54. throw;
  55. }
  56. else
  57. {
  58. throw ExceptionEx.ThrowBusinessException(ex);
  59. }
  60. }
  61. }
  62. /// <summary>
  63. /// 获取订单产品明细数据
  64. /// </summary>
  65. /// <param name="orderId">订单主键</param>
  66. /// <returns></returns>
  67. public IEnumerable<CrmOrderProductEntity> GetCrmOrderProductEntity(string orderId)
  68. {
  69. try
  70. {
  71. return crmOrderService.GetCrmOrderProductEntity(orderId);
  72. }
  73. catch (Exception ex)
  74. {
  75. if (ex is ExceptionEx)
  76. {
  77. throw;
  78. }
  79. else
  80. {
  81. throw ExceptionEx.ThrowBusinessException(ex);
  82. }
  83. }
  84. }
  85. #endregion
  86. #region 提交数据
  87. /// <summary>
  88. /// 删除数据
  89. /// </summary>
  90. /// <param name="keyValue">主键</param>
  91. public void DeleteEntity(string keyValue)
  92. {
  93. try
  94. {
  95. crmOrderService.DeleteEntity(keyValue);
  96. }
  97. catch (Exception ex)
  98. {
  99. if (ex is ExceptionEx)
  100. {
  101. throw;
  102. }
  103. else
  104. {
  105. throw ExceptionEx.ThrowBusinessException(ex);
  106. }
  107. }
  108. }
  109. /// <summary>
  110. /// 保存表单(新增、修改)
  111. /// </summary>
  112. /// <param name="keyValue">主键值</param>
  113. /// <param name="crmOrderEntity">实体对象</param>
  114. /// <param name="CrmOrderProductEntity">明细实体对象</param>
  115. /// <returns></returns>
  116. public void SaveEntity(string keyValue, CrmOrderEntity crmOrderEntity, List<CrmOrderProductEntity> crmOrderProductList)
  117. {
  118. try
  119. {
  120. crmOrderService.SaveEntity(keyValue, crmOrderEntity, crmOrderProductList);
  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. }