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.
 
 
 
 
 
 

279 lines
8.5 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. using System.Threading.Tasks;
  6. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-05-14 09:49
  13. /// 描 述:选修课排课
  14. /// </summary>
  15. public class ArrangeLessonTermOfElectiveBLL : ArrangeLessonTermOfElectiveIBLL
  16. {
  17. private ArrangeLessonTermOfElectiveService arrangeLessonTermOfElectiveService = new ArrangeLessonTermOfElectiveService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 获取页面显示列表数据
  21. /// <summary>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<ArrangeLessonTermOfElectiveEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return arrangeLessonTermOfElectiveService.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. /// 获取ArrangeLessonTermOfElective表实体数据
  44. /// <param name="keyValue">主键</param>
  45. /// <summary>
  46. /// <returns></returns>
  47. public ArrangeLessonTermOfElectiveEntity GetArrangeLessonTermOfElectiveEntity(string keyValue)
  48. {
  49. try
  50. {
  51. return arrangeLessonTermOfElectiveService.GetArrangeLessonTermOfElectiveEntity(keyValue);
  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. #endregion
  66. #region 提交数据
  67. /// <summary>
  68. /// 删除实体数据
  69. /// <param name="keyValue">主键</param>
  70. /// <summary>
  71. /// <returns></returns>
  72. public void DeleteEntity(string keyValue)
  73. {
  74. try
  75. {
  76. arrangeLessonTermOfElectiveService.DeleteEntity(keyValue);
  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. /// <summary>
  91. /// 保存实体数据(新增、修改)
  92. /// <param name="keyValue">主键</param>
  93. /// <summary>
  94. /// <returns></returns>
  95. public void SaveEntity(string keyValue, ArrangeLessonTermOfElectiveEntity entity)
  96. {
  97. try
  98. {
  99. arrangeLessonTermOfElectiveService.SaveEntity(keyValue, entity);
  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. #endregion
  114. #region 扩展数据
  115. /// <summary>
  116. /// 按条件清空排课数据
  117. /// </summary>
  118. /// <returns></returns>
  119. public async Task<bool> AsyncModifyArrangeLessonDataByCondition(ArrangeLessonTermOfElectiveEntity entity)
  120. {
  121. var data = await arrangeLessonTermOfElectiveService.AsyncModifyArrangeLessonOfElectiveDataByCondition(entity);
  122. return data;
  123. }
  124. /// <summary>
  125. /// 按条件同步排课数据
  126. /// </summary>
  127. /// <returns></returns>
  128. public async Task<bool> AsyncArrangeLessonDataByCondition(ArrangeLessonTermOfElectiveEntity entity)
  129. {
  130. var data = await arrangeLessonTermOfElectiveService.AsyncArrangeLessonOfElectiveDataByCondition(entity);
  131. return data;
  132. }
  133. /// <summary>
  134. /// 同步选修排课系统数据
  135. /// </summary>
  136. /// <returns></returns>
  137. public async Task<bool> AsyncArrangeLessonOfElectiveData()
  138. {
  139. try
  140. {
  141. return await arrangeLessonTermOfElectiveService.AsyncArrangeLessonOfElectiveData();
  142. }
  143. catch (Exception ex)
  144. {
  145. if (ex is ExceptionEx)
  146. {
  147. throw;
  148. }
  149. else
  150. {
  151. throw ExceptionEx.ThrowBusinessException(ex);
  152. }
  153. }
  154. }
  155. /// <summary>
  156. /// 清空当前学期选修排课数据
  157. /// </summary>
  158. /// <returns></returns>
  159. public async Task<bool> AsyncModifyArrangeLessonOfElectiveData()
  160. {
  161. try
  162. {
  163. return await arrangeLessonTermOfElectiveService.AsyncModifyArrangeLessonOfElectiveData();
  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="userAccount">账号</param>
  181. /// <param name="userType">用户类型 学生 教师</param>
  182. /// <param name="startDate">查询开始时间</param>
  183. /// <param name="endDate">查询截止时间</param>
  184. /// <returns></returns>
  185. public IEnumerable<TimeTable> GetTimeTable(string userAccount, string userType, string startDate, string endDate)
  186. {
  187. try
  188. {
  189. return arrangeLessonTermOfElectiveService.GetTimeTable(userAccount, userType, startDate, endDate);
  190. }
  191. catch (Exception ex)
  192. {
  193. if (ex is ExceptionEx)
  194. {
  195. throw;
  196. }
  197. else
  198. {
  199. throw ExceptionEx.ThrowBusinessException(ex);
  200. }
  201. }
  202. }
  203. /// <summary>
  204. /// 选修课课程表【教务】
  205. /// </summary>
  206. /// <param name="startDate">查询开始时间</param>
  207. /// <param name="endDate">查询截止时间</param>
  208. /// <param name="classNo">班级编号</param>
  209. /// <param name="empNo">教师编号</param>
  210. /// <returns></returns>
  211. public IEnumerable<TimeTable> GetTimeTableInEducation(string startDate, string endDate, string classNo, string empNo, string schoolId)
  212. {
  213. try
  214. {
  215. return arrangeLessonTermOfElectiveService.GetTimeTableInEducation(startDate, endDate, classNo, empNo, schoolId);
  216. }
  217. catch (Exception ex)
  218. {
  219. if (ex is ExceptionEx)
  220. {
  221. throw;
  222. }
  223. else
  224. {
  225. throw ExceptionEx.ThrowBusinessException(ex);
  226. }
  227. }
  228. }
  229. /// <summary>
  230. /// 获取相关课程考勤的学生信息--选修课
  231. /// </summary>
  232. /// <param name="year"></param>
  233. /// <param name="semester"></param>
  234. /// <param name="empno"></param>
  235. /// <param name="lessonNo"></param>
  236. /// <param name="teachClassNo"></param>
  237. /// <param name="lessonSortNo"></param>
  238. /// <param name="classRoomNo"></param>
  239. /// <param name="lessonTime"></param>
  240. /// <returns></returns>
  241. public IEnumerable<StuSelectLessonListEntity> AttendanceStudents(Pagination pagination, string queryJson)
  242. {
  243. try
  244. {
  245. return arrangeLessonTermOfElectiveService.AttendanceStudents(pagination, queryJson);
  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. #endregion
  260. }
  261. }