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.
 
 
 
 
 
 

308 lines
8.6 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. public async Task<bool> AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity)
  141. {
  142. try
  143. {
  144. return await arrangeExamTermService.AsyncArrangeExamDataNew(entity);
  145. }
  146. catch (Exception ex)
  147. {
  148. throw ex;
  149. }
  150. }
  151. /// <summary>
  152. /// 排考数据同步
  153. /// </summary>
  154. /// <returns></returns>
  155. public async Task<bool> AsyncArrangeExamData()
  156. {
  157. try
  158. {
  159. return await arrangeExamTermService.AsyncArrangeExamData();
  160. }
  161. catch (Exception ex)
  162. {
  163. if (ex is ExceptionEx)
  164. {
  165. throw;
  166. }
  167. else
  168. {
  169. throw ExceptionEx.ThrowBusinessException(ex);
  170. }
  171. }
  172. }
  173. /// <summary>
  174. /// 考试表
  175. /// </summary>
  176. /// <param name="startDate">查询开始时间</param>
  177. /// <param name="endDate">查询截止时间</param>
  178. /// <param name="classNo">班级号</param>
  179. /// <param name="empNo">监考教师号</param>
  180. /// <returns></returns>
  181. public IEnumerable<TimeTable> GetExamTable(string startDate, string endDate, string classNo, string empNo)
  182. {
  183. try
  184. {
  185. return arrangeExamTermService.GetExamTable(startDate, endDate, classNo, empNo);
  186. }
  187. catch (Exception ex)
  188. {
  189. if (ex is ExceptionEx)
  190. {
  191. throw;
  192. }
  193. else
  194. {
  195. throw ExceptionEx.ThrowBusinessException(ex);
  196. }
  197. }
  198. }
  199. /// <summary>
  200. /// 考试表-选修课【学子在线】
  201. /// </summary>
  202. /// <param name="startDate">查询开始时间</param>
  203. /// <param name="endDate">查询截止时间</param>
  204. /// <param name="stuNo">学号</param>
  205. /// <returns></returns>
  206. public IEnumerable<TimeTable> GetExamTableOfElectiveInStudent(string startDate, string endDate, string stuNo)
  207. {
  208. try
  209. {
  210. return arrangeExamTermService.GetExamTableOfElectiveInStudent(startDate, endDate, stuNo);
  211. }
  212. catch (Exception ex)
  213. {
  214. if (ex is ExceptionEx)
  215. {
  216. throw;
  217. }
  218. else
  219. {
  220. throw ExceptionEx.ThrowBusinessException(ex);
  221. }
  222. }
  223. }
  224. /// <summary>
  225. /// 考试表--班级下拉框信息
  226. /// </summary>
  227. /// <param name="startDate"></param>
  228. /// <returns></returns>
  229. public IEnumerable<SelectModel> GetClassData()
  230. {
  231. try
  232. {
  233. return arrangeExamTermService.GetClassData();
  234. }
  235. catch (Exception ex)
  236. {
  237. if (ex is ExceptionEx)
  238. {
  239. throw;
  240. }
  241. else
  242. {
  243. throw ExceptionEx.ThrowBusinessException(ex);
  244. }
  245. }
  246. }
  247. /// <summary>
  248. /// 考试表--教师下拉框信息
  249. /// </summary>
  250. /// <param name="startDate"></param>
  251. /// <returns></returns>
  252. public IEnumerable<SelectModel> GetTeacherData()
  253. {
  254. try
  255. {
  256. return arrangeExamTermService.GetTeacherData();
  257. }
  258. catch (Exception ex)
  259. {
  260. if (ex is ExceptionEx)
  261. {
  262. throw;
  263. }
  264. else
  265. {
  266. throw ExceptionEx.ThrowBusinessException(ex);
  267. }
  268. }
  269. }
  270. public bool GetAny()
  271. {
  272. try
  273. {
  274. return arrangeExamTermService.GetAny();
  275. }
  276. catch (Exception ex)
  277. {
  278. if (ex is ExceptionEx)
  279. {
  280. throw;
  281. }
  282. else
  283. {
  284. throw ExceptionEx.ThrowBusinessException(ex);
  285. }
  286. }
  287. }
  288. #endregion
  289. }
  290. }