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.
 
 
 
 
 
 

187 lines
5.3 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.LogisticsManagement
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2021-06-18 17:36
  12. /// 描 述:项目阶段管理
  13. /// </summary>
  14. public class ProjectPhaseManageBLL : ProjectPhaseManageIBLL
  15. {
  16. private ProjectPhaseManageService projectPhaseManageService = new ProjectPhaseManageService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<ProjectPhaseManageEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return projectPhaseManageService.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. /// 获取页面显示列表数据
  44. /// </summary>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<ProjectPhaseManageEntity> GetList(string queryJson)
  48. {
  49. try
  50. {
  51. return projectPhaseManageService.GetList(queryJson);
  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. /// 获取ProjectPhaseManage表实体数据
  67. /// </summary>
  68. /// <param name="keyValue">主键</param>
  69. /// <returns></returns>
  70. public ProjectPhaseManageEntity GetProjectPhaseManageEntity(string keyValue)
  71. {
  72. try
  73. {
  74. return projectPhaseManageService.GetProjectPhaseManageEntity(keyValue);
  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. /// 获取树形数据
  90. /// </summary>
  91. /// <param name="companylist">公司数据列表</param>
  92. /// <returns></returns>
  93. public IEnumerable<TreeModel> GetTree(IEnumerable<ProjectPhaseManageEntity> typelist)
  94. {
  95. try
  96. {
  97. List<TreeModel> treeList = new List<TreeModel>();
  98. foreach (var typeitem in typelist)
  99. {
  100. TreeModel node = new TreeModel
  101. {
  102. id = typeitem.Id,
  103. text = typeitem.Name,
  104. value = typeitem.Code,
  105. showcheck = false,
  106. checkstate = 0,
  107. isexpand = true,
  108. parentId = ""
  109. };
  110. treeList.Add(node);
  111. }
  112. return treeList.ToTree();
  113. }
  114. catch (Exception ex)
  115. {
  116. if (ex is ExceptionEx)
  117. {
  118. throw;
  119. }
  120. else
  121. {
  122. throw ExceptionEx.ThrowBusinessException(ex);
  123. }
  124. }
  125. }
  126. #endregion
  127. #region 提交数据
  128. /// <summary>
  129. /// 删除实体数据
  130. /// </summary>
  131. /// <param name="keyValue">主键</param>
  132. public void DeleteEntity(string keyValue)
  133. {
  134. try
  135. {
  136. projectPhaseManageService.DeleteEntity(keyValue);
  137. }
  138. catch (Exception ex)
  139. {
  140. if (ex is ExceptionEx)
  141. {
  142. throw;
  143. }
  144. else
  145. {
  146. throw ExceptionEx.ThrowBusinessException(ex);
  147. }
  148. }
  149. }
  150. /// <summary>
  151. /// 保存实体数据(新增、修改)
  152. /// </summary>
  153. /// <param name="keyValue">主键</param>
  154. /// <param name="entity">实体</param>
  155. /// <returns></returns>
  156. public void SaveEntity(string keyValue, ProjectPhaseManageEntity entity)
  157. {
  158. try
  159. {
  160. projectPhaseManageService.SaveEntity(keyValue, entity);
  161. }
  162. catch (Exception ex)
  163. {
  164. if (ex is ExceptionEx)
  165. {
  166. throw;
  167. }
  168. else
  169. {
  170. throw ExceptionEx.ThrowBusinessException(ex);
  171. }
  172. }
  173. }
  174. #endregion
  175. }
  176. }