Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

290 Zeilen
8.4 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-04-02 16:44
  13. /// 描 述:学生考勤
  14. /// </summary>
  15. public class StuAttendanceBLL : StuAttendanceIBLL
  16. {
  17. private StuAttendanceService stuAttendanceService = new StuAttendanceService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 获取页面显示列表数据
  21. /// <summary>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<StuAttendanceEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return stuAttendanceService.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="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<StuAttendanceEntity> GetPageListOfUnrecord(Pagination pagination, string queryJson)
  48. {
  49. try
  50. {
  51. return stuAttendanceService.GetPageListOfUnrecord(pagination, queryJson);
  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. public IEnumerable<StuAttendanceEntity> GetAllList()
  66. {
  67. try
  68. {
  69. return stuAttendanceService.GetAllList();
  70. }
  71. catch (Exception ex)
  72. {
  73. if (ex is ExceptionEx)
  74. {
  75. throw;
  76. }
  77. else
  78. {
  79. throw ExceptionEx.ThrowBusinessException(ex);
  80. }
  81. }
  82. }
  83. /// <summary>
  84. /// 获取StuAttendance表实体数据
  85. /// <param name="keyValue">主键</param>
  86. /// <summary>
  87. /// <returns></returns>
  88. public StuAttendanceEntity GetStuAttendanceEntity(string keyValue)
  89. {
  90. try
  91. {
  92. return stuAttendanceService.GetStuAttendanceEntity(keyValue);
  93. }
  94. catch (Exception ex)
  95. {
  96. if (ex is ExceptionEx)
  97. {
  98. throw;
  99. }
  100. else
  101. {
  102. throw ExceptionEx.ThrowBusinessException(ex);
  103. }
  104. }
  105. }
  106. public List<StuAttendanceEntity> GetStuInfo(string academicYear, string semester, string lessonNo, string empNo, string classRoomNum, string lessonTime, DateTime lessonDate, string teachClassNo)
  107. {
  108. try
  109. {
  110. return stuAttendanceService.GetStuInfo(academicYear, semester, lessonNo, empNo, classRoomNum, lessonTime, lessonDate, teachClassNo);
  111. }
  112. catch (Exception ex)
  113. {
  114. if (ex is ExceptionEx)
  115. {
  116. throw;
  117. }
  118. else
  119. {
  120. throw ExceptionEx.ThrowBusinessException(ex);
  121. }
  122. }
  123. }
  124. public List<StuAttendanceEntity> GetStuLessonInfo(string account)
  125. {
  126. try
  127. {
  128. return stuAttendanceService.GetStuLessonInfo(account);
  129. }
  130. catch (Exception ex)
  131. {
  132. if (ex is ExceptionEx)
  133. {
  134. throw;
  135. }
  136. else
  137. {
  138. throw ExceptionEx.ThrowBusinessException(ex);
  139. }
  140. }
  141. }
  142. /// <summary>
  143. /// 考勤统计
  144. /// <summary>
  145. /// <param name="queryJson">查询参数</param>
  146. /// <returns></returns>
  147. public IEnumerable<StuAttendanceEntity> GetAttendanceStatisticPageList(Pagination pagination, string queryJson)
  148. {
  149. try
  150. {
  151. return stuAttendanceService.GetAttendanceStatisticPageList(pagination, queryJson);
  152. }
  153. catch (Exception ex)
  154. {
  155. if (ex is ExceptionEx)
  156. {
  157. throw;
  158. }
  159. else
  160. {
  161. throw ExceptionEx.ThrowBusinessException(ex);
  162. }
  163. }
  164. }
  165. /// <summary>
  166. /// 全校学生课程考勤
  167. /// <summary>
  168. /// <param name="queryJson">查询参数</param>
  169. /// <returns></returns>
  170. public IEnumerable<StuAttendanceEntity> GetAttendancePageList(Pagination pagination, string queryJson)
  171. {
  172. try
  173. {
  174. return stuAttendanceService.GetAttendancePageList(pagination, queryJson);
  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. /// <returns></returns>
  192. public StuAttendanceEntity GetStuAttendanceEntityByQuery(StuAttendanceLeaveEntity entity)
  193. {
  194. try
  195. {
  196. return stuAttendanceService.GetStuAttendanceEntityByQuery(entity);
  197. }
  198. catch (Exception ex)
  199. {
  200. if (ex is ExceptionEx)
  201. {
  202. throw;
  203. }
  204. else
  205. {
  206. throw ExceptionEx.ThrowBusinessException(ex);
  207. }
  208. }
  209. }
  210. #endregion
  211. #region 提交数据
  212. /// <summary>
  213. /// 删除实体数据
  214. /// <param name="keyValue">主键</param>
  215. /// <summary>
  216. /// <returns></returns>
  217. public void DeleteEntity(string keyValue)
  218. {
  219. try
  220. {
  221. stuAttendanceService.DeleteEntity(keyValue);
  222. }
  223. catch (Exception ex)
  224. {
  225. if (ex is ExceptionEx)
  226. {
  227. throw;
  228. }
  229. else
  230. {
  231. throw ExceptionEx.ThrowBusinessException(ex);
  232. }
  233. }
  234. }
  235. /// <summary>
  236. /// 保存实体数据(新增、修改)
  237. /// <param name="keyValue">主键</param>
  238. /// <summary>
  239. /// <returns></returns>
  240. public void SaveEntity(string keyValue, StuAttendanceEntity entity)
  241. {
  242. try
  243. {
  244. stuAttendanceService.SaveEntity(keyValue, entity);
  245. }
  246. catch (Exception ex)
  247. {
  248. if (ex is ExceptionEx)
  249. {
  250. throw;
  251. }
  252. else
  253. {
  254. throw ExceptionEx.ThrowBusinessException(ex);
  255. }
  256. }
  257. }
  258. #endregion
  259. public async Task<bool> AttendanceApply(string kqType, string lessonTime, string lessonDate, string classRoomNo, string dataJson, decimal? attenScore, string attenCondition)
  260. {
  261. var data = await stuAttendanceService.AttendanceApply(kqType, lessonTime, lessonDate, classRoomNo, dataJson, attenScore, attenCondition);
  262. return data;
  263. }
  264. public async Task<bool> AttendanceApply(string lessonTime, string lessonDate, string classRoomNo, string dataJson, decimal? attenScore, string attenCondition)
  265. {
  266. var data = await stuAttendanceService.AttendanceApply(lessonTime, lessonDate, classRoomNo, dataJson, attenScore, attenCondition);
  267. return data;
  268. }
  269. }
  270. }