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.
 
 
 
 
 
 

253 lines
6.8 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-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2019-08-21 17:28
  12. /// 描 述:成绩比例设置
  13. /// </summary>
  14. public class ClassPlanBLL : ClassPlanIBLL
  15. {
  16. private ClassPlanService classPlanService = new ClassPlanService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return classPlanService.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="pagination">分页参数</param>
  46. /// <param name="queryJson">查询参数</param>
  47. /// <returns></returns>
  48. public IEnumerable<OpenLessonPlanEntity> GetPageListForSchool(Pagination pagination, string queryJson)
  49. {
  50. try
  51. {
  52. return classPlanService.GetPageListForSchool(pagination, queryJson);
  53. }
  54. catch (Exception ex)
  55. {
  56. if (ex is ExceptionEx)
  57. {
  58. throw;
  59. }
  60. else
  61. {
  62. throw ExceptionEx.ThrowBusinessException(ex);
  63. }
  64. }
  65. }
  66. /// <summary>
  67. /// 获取OpenLessonPlan表实体数据
  68. /// </summary>
  69. /// <param name="keyValue">主键</param>
  70. /// <returns></returns>
  71. public OpenLessonPlanEntity GetClassPlanEntity(string keyValue)
  72. {
  73. try
  74. {
  75. return classPlanService.GetClassPlanEntity(keyValue);
  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="keyValue">主键</param>
  95. public void DeleteEntity(string keyValue)
  96. {
  97. try
  98. {
  99. classPlanService.DeleteEntity(keyValue);
  100. }
  101. catch (Exception ex)
  102. {
  103. if (ex is ExceptionEx)
  104. {
  105. throw;
  106. }
  107. else
  108. {
  109. throw ExceptionEx.ThrowBusinessException(ex);
  110. }
  111. }
  112. }
  113. /// <summary>
  114. /// 保存实体数据(新增、修改)
  115. /// </summary>
  116. /// <param name="keyValue">主键</param>
  117. /// <param name="entity">实体</param>
  118. /// <returns></returns>
  119. public void SaveEntity(string keyValue, OpenLessonPlanEntity entity)
  120. {
  121. try
  122. {
  123. classPlanService.SaveEntity(keyValue, entity);
  124. }
  125. catch (Exception ex)
  126. {
  127. if (ex is ExceptionEx)
  128. {
  129. throw;
  130. }
  131. else
  132. {
  133. throw ExceptionEx.ThrowBusinessException(ex);
  134. }
  135. }
  136. }
  137. #endregion
  138. #region 扩展数据
  139. /// <summary>
  140. /// 去重
  141. /// </summary>
  142. /// <param name="School"></param>
  143. /// <param name="Year"></param>
  144. /// <param name="Semester"></param>
  145. /// <param name="Dept"></param>
  146. /// <param name="Major"></param>
  147. /// <param name="Grade"></param>
  148. /// <param name="Lesson"></param>
  149. /// <returns></returns>
  150. public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
  151. string Major, string Grade, string Lesson)
  152. {
  153. try
  154. {
  155. return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson);
  156. }
  157. catch (Exception ex)
  158. {
  159. if (ex is ExceptionEx)
  160. {
  161. throw;
  162. }
  163. else
  164. {
  165. throw ExceptionEx.ThrowBusinessException(ex);
  166. }
  167. }
  168. }
  169. /// <summary>
  170. /// 删除实体数据
  171. /// </summary>
  172. /// <param name="keyValue">主键</param>
  173. public void DelRelation(string keyValue)
  174. {
  175. try
  176. {
  177. classPlanService.DeleteEntity(keyValue);
  178. }
  179. catch (Exception ex)
  180. {
  181. if (ex is ExceptionEx)
  182. {
  183. throw;
  184. }
  185. else
  186. {
  187. throw ExceptionEx.ThrowBusinessException(ex);
  188. }
  189. }
  190. }
  191. /// <summary>
  192. /// 保存实体数据(新增、修改)
  193. /// <param name="keyValue">主键</param>
  194. /// <summary>
  195. /// <returns></returns>
  196. public List<OpenLessonPlanEntity> GetListById(string keyValue)
  197. {
  198. try
  199. {
  200. return classPlanService.GetListById(keyValue);
  201. }
  202. catch (Exception ex)
  203. {
  204. if (ex is ExceptionEx)
  205. {
  206. throw;
  207. }
  208. else
  209. {
  210. throw ExceptionEx.ThrowBusinessException(ex);
  211. }
  212. }
  213. }
  214. public void SaveEntityList(string keyValue, List<OpenLessonPlanEntity> entity)
  215. {
  216. try
  217. {
  218. classPlanService.SaveEntityList(keyValue, entity);
  219. }
  220. catch (Exception ex)
  221. {
  222. if (ex is ExceptionEx)
  223. {
  224. throw;
  225. }
  226. else
  227. {
  228. throw ExceptionEx.ThrowBusinessException(ex);
  229. }
  230. }
  231. }
  232. #endregion
  233. }
  234. }