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.
 
 
 
 
 
 

448 lines
13 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2019-05-14 10:02
  12. /// 描 述:选修课课程信息
  13. /// </summary>
  14. public class OpenLessonPlanOfElectiveBLL : OpenLessonPlanOfElectiveIBLL
  15. {
  16. private OpenLessonPlanOfElectiveService openLessonPlanOfElectiveService = new OpenLessonPlanOfElectiveService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return openLessonPlanOfElectiveService.GetPageList(pagination, queryJson);
  28. }
  29. catch (Exception ex)
  30. {
  31. if (ex is ExceptionEx)
  32. {
  33. throw;
  34. }
  35. else
  36. {
  37. throw ExceptionEx.ThrowBusinessException(ex);
  38. }
  39. }
  40. }
  41. /// <summary>
  42. /// 获取页面显示列表数据
  43. /// <summary>
  44. /// <param name="queryJson">查询参数</param>
  45. /// <returns></returns>
  46. public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListElective(Pagination pagination, string queryJson)
  47. {
  48. try
  49. {
  50. return openLessonPlanOfElectiveService.GetPageListElective(pagination, queryJson);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. /// <summary>
  65. /// 获取页面显示列表数据【学子在线-选课中心】
  66. /// <summary>
  67. /// <param name="queryJson">查询参数</param>
  68. /// <returns></returns>
  69. public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListOfStudent(Pagination pagination, string queryJson)
  70. {
  71. try
  72. {
  73. return openLessonPlanOfElectiveService.GetPageListOfStudent(pagination, queryJson);
  74. }
  75. catch (Exception ex)
  76. {
  77. if (ex is ExceptionEx)
  78. {
  79. throw;
  80. }
  81. else
  82. {
  83. throw ExceptionEx.ThrowBusinessException(ex);
  84. }
  85. }
  86. }
  87. /// <summary>
  88. /// 获取OpenLessonPlanOfElective表实体数据
  89. /// <param name="keyValue">主键</param>
  90. /// <summary>
  91. /// <returns></returns>
  92. public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanOfElectiveEntity(string keyValue)
  93. {
  94. try
  95. {
  96. return openLessonPlanOfElectiveService.GetOpenLessonPlanOfElectiveEntity(keyValue);
  97. }
  98. catch (Exception ex)
  99. {
  100. if (ex is ExceptionEx)
  101. {
  102. throw;
  103. }
  104. else
  105. {
  106. throw ExceptionEx.ThrowBusinessException(ex);
  107. }
  108. }
  109. }
  110. /// <summary>
  111. /// 获取OpenLessonPlan表实体数据
  112. /// <param name="keyValue">主键</param>
  113. /// <summary>
  114. /// <returns></returns>
  115. public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson)
  116. {
  117. try
  118. {
  119. return openLessonPlanOfElectiveService.GetOpenLessonPlanEntityByJson(queryJson);
  120. }
  121. catch (Exception ex)
  122. {
  123. if (ex is ExceptionEx)
  124. {
  125. throw;
  126. }
  127. else
  128. {
  129. throw ExceptionEx.ThrowBusinessException(ex);
  130. }
  131. }
  132. }
  133. /// <summary>
  134. /// 获取StuSelectLessonListEntity表实体数据
  135. /// <param name="keyValue">主键</param>
  136. /// <summary>
  137. /// <returns></returns>
  138. public StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson)
  139. {
  140. try
  141. {
  142. return openLessonPlanOfElectiveService.GetStuSelectLessonListEntityByJson(queryJson);
  143. }
  144. catch (Exception ex)
  145. {
  146. if (ex is ExceptionEx)
  147. {
  148. throw;
  149. }
  150. else
  151. {
  152. throw ExceptionEx.ThrowBusinessException(ex);
  153. }
  154. }
  155. }
  156. #endregion
  157. #region 提交数据
  158. /// <summary>
  159. /// 删除实体数据
  160. /// <param name="keyValue">主键</param>
  161. /// <summary>
  162. /// <returns></returns>
  163. public void DeleteEntity(string keyValue)
  164. {
  165. try
  166. {
  167. openLessonPlanOfElectiveService.DeleteEntity(keyValue);
  168. }
  169. catch (Exception ex)
  170. {
  171. if (ex is ExceptionEx)
  172. {
  173. throw;
  174. }
  175. else
  176. {
  177. throw ExceptionEx.ThrowBusinessException(ex);
  178. }
  179. }
  180. }
  181. public void SetUpIsAllowSelect(string keyValue, int IsAllowSelect)
  182. {
  183. try
  184. {
  185. openLessonPlanOfElectiveService.SetUpIsAllowSelect(keyValue, IsAllowSelect);
  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. public void DeleteElective(string keyValue)
  200. {
  201. try
  202. {
  203. openLessonPlanOfElectiveService.DeleteElective(keyValue);
  204. }
  205. catch (Exception ex)
  206. {
  207. if (ex is ExceptionEx)
  208. {
  209. throw;
  210. }
  211. else
  212. {
  213. throw ExceptionEx.ThrowBusinessException(ex);
  214. }
  215. }
  216. }
  217. /// <summary>
  218. /// 保存实体数据(新增、修改)
  219. /// <param name="keyValue">主键</param>
  220. /// <summary>
  221. /// <returns></returns>
  222. public void SaveEntity(string keyValue, OpenLessonPlanOfElectiveEntity entity)
  223. {
  224. try
  225. {
  226. openLessonPlanOfElectiveService.SaveEntity(keyValue, entity);
  227. }
  228. catch (Exception ex)
  229. {
  230. if (ex is ExceptionEx)
  231. {
  232. throw;
  233. }
  234. else
  235. {
  236. throw ExceptionEx.ThrowBusinessException(ex);
  237. }
  238. }
  239. }
  240. public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity)
  241. {
  242. try
  243. {
  244. openLessonPlanOfElectiveService.AddForm(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. /// <summary>
  259. /// 保存实体数据(新增、修改)
  260. /// <param name="keyValue">主键</param>
  261. /// <summary>
  262. /// <returns></returns>
  263. public void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity)
  264. {
  265. try
  266. {
  267. openLessonPlanOfElectiveService.SaveFormOfElective(keyValue, entity);
  268. }
  269. catch (Exception ex)
  270. {
  271. if (ex is ExceptionEx)
  272. {
  273. throw;
  274. }
  275. else
  276. {
  277. throw ExceptionEx.ThrowBusinessException(ex);
  278. }
  279. }
  280. }
  281. /// <summary>
  282. /// 批量设置人数
  283. /// </summary>
  284. /// <param name="keyValue"></param>
  285. /// <param name="StuNumMax"></param>
  286. public void SaveStuNumMax(string keyValue, int StuNumMax)
  287. {
  288. try
  289. {
  290. openLessonPlanOfElectiveService.SaveStuNumMax(keyValue, StuNumMax);
  291. }
  292. catch (Exception ex)
  293. {
  294. if (ex is ExceptionEx)
  295. {
  296. throw;
  297. }
  298. else
  299. {
  300. throw ExceptionEx.ThrowBusinessException(ex);
  301. }
  302. }
  303. }
  304. public (bool flag, string str) IsBatchEditMajor(List<OpenLessonPlanOfElectiveEntity> list)
  305. {
  306. try
  307. {
  308. return openLessonPlanOfElectiveService.IsBatchEditMajor(list);
  309. }
  310. catch (Exception ex)
  311. {
  312. if (ex is ExceptionEx)
  313. {
  314. throw;
  315. }
  316. else
  317. {
  318. throw ExceptionEx.ThrowBusinessException(ex);
  319. }
  320. }
  321. }
  322. #endregion
  323. #region 扩展数据
  324. /// <summary>
  325. /// 获取选课时间管理
  326. /// </summary>
  327. /// <returns></returns>
  328. public EADateArrangeEntity GetEADateArrangeEntityAboutElective()
  329. {
  330. try
  331. {
  332. return openLessonPlanOfElectiveService.GetEADateArrangeEntityAboutElective();
  333. }
  334. catch (Exception ex)
  335. {
  336. if (ex is ExceptionEx)
  337. {
  338. throw;
  339. }
  340. else
  341. {
  342. throw ExceptionEx.ThrowBusinessException(ex);
  343. }
  344. }
  345. }
  346. public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListOfMerge(Pagination pagination, string queryJson)
  347. {
  348. try
  349. {
  350. return openLessonPlanOfElectiveService.GetPageListOfMerge(pagination, queryJson);
  351. }
  352. catch (Exception ex)
  353. {
  354. if (ex is ExceptionEx)
  355. {
  356. throw;
  357. }
  358. else
  359. {
  360. throw ExceptionEx.ThrowBusinessException(ex);
  361. }
  362. }
  363. }
  364. /// <summary>
  365. /// 选修课课程异动
  366. /// <param name="keyValue">主键</param>
  367. /// <summary>
  368. /// <returns></returns>
  369. public void DoElectiveChange(OpenLessonPlanOfElectiveChangeEntity entity)
  370. {
  371. try
  372. {
  373. openLessonPlanOfElectiveService.DoElectiveChange(entity);
  374. }
  375. catch (Exception ex)
  376. {
  377. if (ex is ExceptionEx)
  378. {
  379. throw;
  380. }
  381. else
  382. {
  383. throw ExceptionEx.ThrowBusinessException(ex);
  384. }
  385. }
  386. }
  387. public void InitStuSelectLesson(string keyvalue)
  388. {
  389. try
  390. {
  391. openLessonPlanOfElectiveService.InitStuSelectLesson(keyvalue);
  392. }
  393. catch (Exception ex)
  394. {
  395. if (ex is ExceptionEx)
  396. {
  397. throw;
  398. }
  399. else
  400. {
  401. throw ExceptionEx.ThrowBusinessException(ex);
  402. }
  403. }
  404. }
  405. public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity)
  406. {
  407. try
  408. {
  409. openLessonPlanOfElectiveService.SaveStuSelectLessonListScaleByJson(queryJson, entity);
  410. }
  411. catch (Exception ex)
  412. {
  413. if (ex is ExceptionEx)
  414. {
  415. throw;
  416. }
  417. else
  418. {
  419. throw ExceptionEx.ThrowBusinessException(ex);
  420. }
  421. }
  422. }
  423. #endregion
  424. }
  425. }