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.
 
 
 
 
 
 

297 lines
8.2 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. using System.Threading.Tasks;
  6. using static Learun.Application.TwoDevelopment.EducationalAdministration.ArrangeExamTermService;
  7. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-05-24 10:27
  14. /// 描 述:排考数据同步
  15. /// </summary>
  16. public class ArrangeExamTermBLL : ArrangeExamTermIBLL
  17. {
  18. private ArrangeExamTermService arrangeExamTermService = new ArrangeExamTermService();
  19. #region 获取数据
  20. /// <summary>
  21. /// 获取页面显示列表数据
  22. /// <summary>
  23. /// <param name="queryJson">查询参数</param>
  24. /// <returns></returns>
  25. public IEnumerable<ArrangeExamTermEntity> GetPageList(Pagination pagination, string queryJson)
  26. {
  27. try
  28. {
  29. return arrangeExamTermService.GetPageList(pagination, queryJson);
  30. }
  31. catch (Exception ex)
  32. {
  33. if (ex is ExceptionEx)
  34. {
  35. throw;
  36. }
  37. else
  38. {
  39. throw ExceptionEx.ThrowBusinessException(ex);
  40. }
  41. }
  42. }
  43. /// <summary>
  44. /// 获取ArrangeExamTerm表实体数据
  45. /// <param name="keyValue">主键</param>
  46. /// <summary>
  47. /// <returns></returns>
  48. public ArrangeExamTermEntity GetArrangeExamTermEntity(string keyValue)
  49. {
  50. try
  51. {
  52. return arrangeExamTermService.GetArrangeExamTermEntity(keyValue);
  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. /// 获取ArrangeExamTerm表实体数据
  68. /// <param name="academicYearNo">学年</param>
  69. /// <param name="semester">学期</param>
  70. /// <summary>
  71. /// <returns></returns>
  72. public ArrangeExamTermEntity GetArrangeExamTermEntityByYear(string academicYearNo, string semester)
  73. {
  74. try
  75. {
  76. return arrangeExamTermService.GetArrangeExamTermEntityByYear(academicYearNo, semester);
  77. }
  78. catch (Exception ex)
  79. {
  80. if (ex is ExceptionEx)
  81. {
  82. throw;
  83. }
  84. else
  85. {
  86. throw ExceptionEx.ThrowBusinessException(ex);
  87. }
  88. }
  89. }
  90. #endregion
  91. #region 提交数据
  92. /// <summary>
  93. /// 删除实体数据
  94. /// <param name="keyValue">主键</param>
  95. /// <summary>
  96. /// <returns></returns>
  97. public void DeleteEntity(string keyValue)
  98. {
  99. try
  100. {
  101. arrangeExamTermService.DeleteEntity(keyValue);
  102. }
  103. catch (Exception ex)
  104. {
  105. if (ex is ExceptionEx)
  106. {
  107. throw;
  108. }
  109. else
  110. {
  111. throw ExceptionEx.ThrowBusinessException(ex);
  112. }
  113. }
  114. }
  115. /// <summary>
  116. /// 保存实体数据(新增、修改)
  117. /// <param name="keyValue">主键</param>
  118. /// <summary>
  119. /// <returns></returns>
  120. public void SaveEntity(string keyValue, ArrangeExamTermEntity entity)
  121. {
  122. try
  123. {
  124. arrangeExamTermService.SaveEntity(keyValue, entity);
  125. }
  126. catch (Exception ex)
  127. {
  128. if (ex is ExceptionEx)
  129. {
  130. throw;
  131. }
  132. else
  133. {
  134. throw ExceptionEx.ThrowBusinessException(ex);
  135. }
  136. }
  137. }
  138. #endregion
  139. #region 扩展数据
  140. /// <summary>
  141. /// 排考数据同步
  142. /// </summary>
  143. /// <returns></returns>
  144. public async Task<bool> AsyncArrangeExamData()
  145. {
  146. try
  147. {
  148. return await arrangeExamTermService.AsyncArrangeExamData();
  149. }
  150. catch (Exception ex)
  151. {
  152. if (ex is ExceptionEx)
  153. {
  154. throw;
  155. }
  156. else
  157. {
  158. throw ExceptionEx.ThrowBusinessException(ex);
  159. }
  160. }
  161. }
  162. /// <summary>
  163. /// 考试表
  164. /// </summary>
  165. /// <param name="startDate">查询开始时间</param>
  166. /// <param name="endDate">查询截止时间</param>
  167. /// <param name="classNo">班级号</param>
  168. /// <param name="empNo">监考教师号</param>
  169. /// <returns></returns>
  170. public IEnumerable<TimeTable> GetExamTable(string startDate, string endDate, string classNo, string empNo)
  171. {
  172. try
  173. {
  174. return arrangeExamTermService.GetExamTable(startDate, endDate, classNo, empNo);
  175. }
  176. catch (Exception ex)
  177. {
  178. if (ex is ExceptionEx)
  179. {
  180. throw;
  181. }
  182. else
  183. {
  184. throw ExceptionEx.ThrowBusinessException(ex);
  185. }
  186. }
  187. }
  188. /// <summary>
  189. /// 考试表-选修课【学子在线】
  190. /// </summary>
  191. /// <param name="startDate">查询开始时间</param>
  192. /// <param name="endDate">查询截止时间</param>
  193. /// <param name="stuNo">学号</param>
  194. /// <returns></returns>
  195. public IEnumerable<TimeTable> GetExamTableOfElectiveInStudent(string startDate, string endDate, string stuNo)
  196. {
  197. try
  198. {
  199. return arrangeExamTermService.GetExamTableOfElectiveInStudent(startDate, endDate, stuNo);
  200. }
  201. catch (Exception ex)
  202. {
  203. if (ex is ExceptionEx)
  204. {
  205. throw;
  206. }
  207. else
  208. {
  209. throw ExceptionEx.ThrowBusinessException(ex);
  210. }
  211. }
  212. }
  213. /// <summary>
  214. /// 考试表--班级下拉框信息
  215. /// </summary>
  216. /// <param name="startDate"></param>
  217. /// <returns></returns>
  218. public IEnumerable<SelectModel> GetClassData()
  219. {
  220. try
  221. {
  222. return arrangeExamTermService.GetClassData();
  223. }
  224. catch (Exception ex)
  225. {
  226. if (ex is ExceptionEx)
  227. {
  228. throw;
  229. }
  230. else
  231. {
  232. throw ExceptionEx.ThrowBusinessException(ex);
  233. }
  234. }
  235. }
  236. /// <summary>
  237. /// 考试表--教师下拉框信息
  238. /// </summary>
  239. /// <param name="startDate"></param>
  240. /// <returns></returns>
  241. public IEnumerable<SelectModel> GetTeacherData()
  242. {
  243. try
  244. {
  245. return arrangeExamTermService.GetTeacherData();
  246. }
  247. catch (Exception ex)
  248. {
  249. if (ex is ExceptionEx)
  250. {
  251. throw;
  252. }
  253. else
  254. {
  255. throw ExceptionEx.ThrowBusinessException(ex);
  256. }
  257. }
  258. }
  259. public bool GetAny()
  260. {
  261. try
  262. {
  263. return arrangeExamTermService.GetAny();
  264. }
  265. catch (Exception ex)
  266. {
  267. if (ex is ExceptionEx)
  268. {
  269. throw;
  270. }
  271. else
  272. {
  273. throw ExceptionEx.ThrowBusinessException(ex);
  274. }
  275. }
  276. }
  277. #endregion
  278. }
  279. }