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.
 
 
 
 
 
 

240 lines
6.7 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-12-08 12:19
  12. /// 描 述:排考2021新
  13. /// </summary>
  14. public class ArrangeExamTermNewBLL : ArrangeExamTermNewIBLL
  15. {
  16. private ArrangeExamTermNewService arrangeExamTermNewService = new ArrangeExamTermNewService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取列表数据
  20. /// </summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<ArrangeExamTermNewEntity> GetList(string queryJson)
  24. {
  25. try
  26. {
  27. return arrangeExamTermNewService.GetList(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="pagination">分页参数</param>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson)
  48. {
  49. try
  50. {
  51. return arrangeExamTermNewService.GetPageList(pagination, 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. public IEnumerable<ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson)
  66. {
  67. try
  68. {
  69. return arrangeExamTermNewService.GetItemPageList(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. /// 获取实体数据
  85. /// </summary>
  86. /// <param name="keyValue">主键</param>
  87. /// <returns></returns>
  88. public ArrangeExamTermNewEntity GetEntity(string keyValue)
  89. {
  90. try
  91. {
  92. return arrangeExamTermNewService.GetEntity(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. #endregion
  107. #region 提交数据
  108. /// <summary>
  109. /// 删除实体数据
  110. /// </summary>
  111. /// <param name="keyValue">主键</param>
  112. public void DeleteEntity(string keyValue)
  113. {
  114. try
  115. {
  116. arrangeExamTermNewService.DeleteEntity(keyValue);
  117. }
  118. catch (Exception ex)
  119. {
  120. if (ex is ExceptionEx)
  121. {
  122. throw;
  123. }
  124. else
  125. {
  126. throw ExceptionEx.ThrowBusinessException(ex);
  127. }
  128. }
  129. }
  130. /// <summary>
  131. /// 保存实体数据(新增、修改)
  132. /// </summary>
  133. /// <param name="keyValue">主键</param>
  134. /// <param name="entity">实体</param>
  135. public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity)
  136. {
  137. try
  138. {
  139. arrangeExamTermNewService.SaveEntity(keyValue, entity);
  140. }
  141. catch (Exception ex)
  142. {
  143. if (ex is ExceptionEx)
  144. {
  145. throw;
  146. }
  147. else
  148. {
  149. throw ExceptionEx.ThrowBusinessException(ex);
  150. }
  151. }
  152. }
  153. public List<TreeModel> GetClassTree()
  154. {
  155. try
  156. {
  157. var list = arrangeExamTermNewService.GetClassTree();
  158. List<TreeModel> treeList = new List<TreeModel>();
  159. foreach (var item in list)
  160. {
  161. TreeModel node = new TreeModel
  162. {
  163. id = item.ClassNo,
  164. text = item.ClassName,
  165. value = item.ClassNo,
  166. showcheck = false,
  167. checkstate = 0,
  168. isexpand = true,
  169. parentId = "0"
  170. };
  171. treeList.Add(node);
  172. }
  173. return treeList.ToTree();
  174. }
  175. catch (Exception ex)
  176. {
  177. if (ex is ExceptionEx)
  178. {
  179. throw;
  180. }
  181. else
  182. {
  183. throw ExceptionEx.ThrowBusinessException(ex);
  184. }
  185. }
  186. }
  187. public IEnumerable<ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson)
  188. {
  189. try
  190. {
  191. return arrangeExamTermNewService.GetPageListForClass(pagination, queryJson);
  192. }
  193. catch (Exception ex)
  194. {
  195. if (ex is ExceptionEx)
  196. {
  197. throw;
  198. }
  199. else
  200. {
  201. throw ExceptionEx.ThrowBusinessException(ex);
  202. }
  203. }
  204. }
  205. public IEnumerable<ArrangeExamTermNewEntity> GetPageListForLesson(Pagination pagination, string queryJson)
  206. {
  207. try
  208. {
  209. return arrangeExamTermNewService.GetPageListForLesson(pagination, queryJson);
  210. }
  211. catch (Exception ex)
  212. {
  213. if (ex is ExceptionEx)
  214. {
  215. throw;
  216. }
  217. else
  218. {
  219. throw ExceptionEx.ThrowBusinessException(ex);
  220. }
  221. }
  222. }
  223. #endregion
  224. }
  225. }