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.
 
 
 
 
 
 

264 lines
7.1 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-06-17 14:54
  12. /// 描 述:学生处分管理
  13. /// </summary>
  14. public class StuPunishmentBLL : StuPunishmentIBLL
  15. {
  16. private StuPunishmentService stuPunishmentService = new StuPunishmentService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<StuPunishmentEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return stuPunishmentService.GetPageList(pagination, 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="queryJson">查询参数</param>
  45. /// <returns></returns>
  46. public IEnumerable<StuPunishmentEntity> GetPageList(string queryJson)
  47. {
  48. try
  49. {
  50. return stuPunishmentService.GetPageList(queryJson);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. public IEnumerable<StuPunishmentEntity> GetAllList()
  65. {
  66. try
  67. {
  68. return stuPunishmentService.GetAllList();
  69. }
  70. catch (Exception ex)
  71. {
  72. if (ex is ExceptionEx)
  73. {
  74. throw;
  75. }
  76. else
  77. {
  78. throw ExceptionEx.ThrowBusinessException(ex);
  79. }
  80. }
  81. }
  82. /// <summary>
  83. /// 获取StuPunishment表实体数据
  84. /// <param name="keyValue">主键</param>
  85. /// <summary>
  86. /// <returns></returns>
  87. public StuPunishmentEntity GetStuPunishmentEntity(string keyValue)
  88. {
  89. try
  90. {
  91. return stuPunishmentService.GetStuPunishmentEntity(keyValue);
  92. }
  93. catch (Exception ex)
  94. {
  95. if (ex is ExceptionEx)
  96. {
  97. throw;
  98. }
  99. else
  100. {
  101. throw ExceptionEx.ThrowBusinessException(ex);
  102. }
  103. }
  104. }
  105. #endregion
  106. #region 提交数据
  107. /// <summary>
  108. /// 删除实体数据
  109. /// <param name="keyValue">主键</param>
  110. /// <summary>
  111. /// <returns></returns>
  112. public void DeleteEntity(string keyValue)
  113. {
  114. try
  115. {
  116. stuPunishmentService.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. /// <param name="keyValue">主键</param>
  133. /// <summary>
  134. /// <returns></returns>
  135. public void SaveEntity(string keyValue, StuPunishmentEntity entity)
  136. {
  137. try
  138. {
  139. stuPunishmentService.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. #endregion
  154. #region 扩展数据
  155. /// <summary>
  156. /// 获取学年学期列表
  157. /// </summary>
  158. /// <returns></returns>
  159. public IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList()
  160. {
  161. try
  162. {
  163. return stuPunishmentService.GetAcademicAndSemesterList();
  164. }
  165. catch (Exception ex)
  166. {
  167. if (ex is ExceptionEx)
  168. {
  169. throw;
  170. }
  171. else
  172. {
  173. throw ExceptionEx.ThrowBusinessException(ex);
  174. }
  175. }
  176. }
  177. /// <summary>
  178. /// 获取页面显示列表数据
  179. /// <summary>
  180. /// <param name="queryJson">查询参数</param>
  181. /// <returns></returns>
  182. public IEnumerable<StuPunishmentEntity> GetPunishmentListByStuNo(string acdemic, string semester, string stuNo)
  183. {
  184. try
  185. {
  186. return stuPunishmentService.GetPunishmentListByStuNo(acdemic, semester, stuNo);
  187. }
  188. catch (Exception ex)
  189. {
  190. if (ex is ExceptionEx)
  191. {
  192. throw;
  193. }
  194. else
  195. {
  196. throw ExceptionEx.ThrowBusinessException(ex);
  197. }
  198. }
  199. }
  200. /// <summary>
  201. /// 获取页面显示列表数据
  202. /// <summary>
  203. /// <param name="queryJson">查询参数</param>
  204. /// <returns></returns>
  205. public IEnumerable<StuPunishmentEntity> GetPunishmentListByStuNo(string stuNo)
  206. {
  207. try
  208. {
  209. return stuPunishmentService.GetPunishmentListByStuNo(stuNo);
  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. /// <summary>
  224. /// 解除处分
  225. /// <param name="keyValue">主键</param>
  226. /// <summary>
  227. /// <returns></returns>
  228. public void DoCancelPunish(string keyValue, bool status)
  229. {
  230. try
  231. {
  232. stuPunishmentService.DoCancelPunish(keyValue, status);
  233. }
  234. catch (Exception ex)
  235. {
  236. if (ex is ExceptionEx)
  237. {
  238. throw;
  239. }
  240. else
  241. {
  242. throw ExceptionEx.ThrowBusinessException(ex);
  243. }
  244. }
  245. }
  246. #endregion
  247. }
  248. }