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.
 
 
 
 
 
 

233 lines
6.4 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. /// 日 期:2021-06-21 18:39
  12. /// 描 述:质量目标管理体系指标模块
  13. /// </summary>
  14. public class FillinFromBLL : FillinFromIBLL
  15. {
  16. private FillinFromService fillinFromService = new FillinFromService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return fillinFromService.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. public IEnumerable<FillinFromEntity> GetListByIds(string keyValue)
  43. {
  44. try
  45. {
  46. return fillinFromService.GetListByIds(keyValue);
  47. }
  48. catch (Exception ex)
  49. {
  50. if (ex is ExceptionEx)
  51. {
  52. throw;
  53. }
  54. else
  55. {
  56. throw ExceptionEx.ThrowBusinessException(ex);
  57. }
  58. }
  59. }
  60. /// <summary>
  61. /// 获取页面显示列表数据--数据上报用
  62. /// </summary>
  63. /// <param name="queryJson">查询参数</param>
  64. /// <returns></returns>
  65. public IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson)
  66. {
  67. try
  68. {
  69. return fillinFromService.GetPageListForReport(pagination, queryJson);
  70. }
  71. catch (Exception ex)
  72. {
  73. if (ex is ExceptionEx)
  74. {
  75. throw;
  76. }
  77. else
  78. {
  79. throw ExceptionEx.ThrowBusinessException(ex);
  80. }
  81. }
  82. }
  83. /// <summary>
  84. /// 获取FillinFrom表实体数据
  85. /// </summary>
  86. /// <param name="keyValue">主键</param>
  87. /// <returns></returns>
  88. public FillinFromEntity GetFillinFromEntity(string keyValue)
  89. {
  90. try
  91. {
  92. return fillinFromService.GetFillinFromEntity(keyValue);
  93. }
  94. catch (Exception ex)
  95. {
  96. if (ex is ExceptionEx)
  97. {
  98. throw;
  99. }
  100. else
  101. {
  102. throw ExceptionEx.ThrowBusinessException(ex);
  103. }
  104. }
  105. }
  106. /// <summary>
  107. /// 获取树形数据
  108. /// </summary>
  109. /// <returns></returns>
  110. public IEnumerable<TreeModel> GetTree(string queryJson)
  111. {
  112. try
  113. {
  114. List<TreeModel> treeList = new List<TreeModel>();
  115. var list = fillinFromService.GetSqlTree(queryJson);
  116. foreach (var item in list)
  117. {
  118. TreeModel node = new TreeModel
  119. {
  120. id = item.Id,
  121. text = item.WorderModule + "--" + item.ProjectName,
  122. value = item.Id,
  123. showcheck = false,
  124. checkstate = 0,
  125. isexpand = true,
  126. parentId = ""
  127. };
  128. treeList.Add(node);
  129. }
  130. return treeList.ToTree();
  131. }
  132. catch (Exception ex)
  133. {
  134. if (ex is ExceptionEx)
  135. {
  136. throw;
  137. }
  138. else
  139. {
  140. throw ExceptionEx.ThrowBusinessException(ex);
  141. }
  142. }
  143. }
  144. #endregion
  145. #region 提交数据
  146. /// <summary>
  147. /// 删除实体数据
  148. /// </summary>
  149. /// <param name="keyValue">主键</param>
  150. public void DeleteEntity(string keyValue)
  151. {
  152. try
  153. {
  154. fillinFromService.DeleteEntity(keyValue);
  155. }
  156. catch (Exception ex)
  157. {
  158. if (ex is ExceptionEx)
  159. {
  160. throw;
  161. }
  162. else
  163. {
  164. throw ExceptionEx.ThrowBusinessException(ex);
  165. }
  166. }
  167. }
  168. /// <summary>
  169. /// 保存实体数据(新增、修改)
  170. /// </summary>
  171. /// <param name="keyValue">主键</param>
  172. /// <param name="entity">实体</param>
  173. /// <returns></returns>
  174. public void SaveEntity(string keyValue, FillinFromEntity entity)
  175. {
  176. try
  177. {
  178. fillinFromService.SaveEntity(keyValue, entity);
  179. }
  180. catch (Exception ex)
  181. {
  182. if (ex is ExceptionEx)
  183. {
  184. throw;
  185. }
  186. else
  187. {
  188. throw ExceptionEx.ThrowBusinessException(ex);
  189. }
  190. }
  191. }
  192. #endregion
  193. #region 扩展数据
  194. /// <summary>
  195. /// 获取CdMajor表实体数据
  196. /// <param name="keyValue">主键</param>
  197. /// <summary>
  198. /// <returns></returns>
  199. public FillinFromEntity GetFillInNo(string keyValue)
  200. {
  201. try
  202. {
  203. return fillinFromService.GetFillInNo(keyValue);
  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. }