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.
 
 
 
 
 
 

266 lines
7.8 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. #endregion
  189. #region 提交数据
  190. /// <summary>
  191. /// 删除实体数据
  192. /// <param name="keyValue">主键</param>
  193. /// <summary>
  194. /// <returns></returns>
  195. public void DeleteEntity(string keyValue)
  196. {
  197. try
  198. {
  199. stuAttendanceService.DeleteEntity(keyValue);
  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. /// <param name="keyValue">主键</param>
  216. /// <summary>
  217. /// <returns></returns>
  218. public void SaveEntity(string keyValue, StuAttendanceEntity entity)
  219. {
  220. try
  221. {
  222. stuAttendanceService.SaveEntity(keyValue, entity);
  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. #endregion
  237. public async Task<bool> AttendanceApply(string kqType, string lessonTime, string lessonDate, string classRoomNo, string dataJson, decimal? attenScore, string attenCondition)
  238. {
  239. var data = await stuAttendanceService.AttendanceApply(kqType, lessonTime, lessonDate, classRoomNo, dataJson, attenScore, attenCondition);
  240. return data;
  241. }
  242. public async Task<bool> AttendanceApply(string lessonTime, string lessonDate, string classRoomNo, string dataJson, decimal? attenScore, string attenCondition)
  243. {
  244. var data = await stuAttendanceService.AttendanceApply(lessonTime, lessonDate, classRoomNo, dataJson, attenScore, attenCondition);
  245. return data;
  246. }
  247. }
  248. }