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.
 
 
 
 
 
 

554 lines
14 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-02-21 16:53
  12. /// 描 述:学生学籍
  13. /// </summary>
  14. public class StuInfoBasicBLL : StuInfoBasicIBLL
  15. {
  16. private StuInfoBasicService stuInfoBasicService = new StuInfoBasicService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<StuInfoBasicEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return stuInfoBasicService.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. /// 获取StuInfoBasic表实体数据
  43. /// <param name="keyValue">主键</param>
  44. /// <summary>
  45. /// <returns></returns>
  46. public StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue)
  47. {
  48. try
  49. {
  50. return stuInfoBasicService.GetStuInfoBasicEntity(keyValue);
  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. /// <returns></returns>
  68. public List<CdMajorEntity> GetMajorInfoWithGraduation()
  69. {
  70. try
  71. {
  72. return stuInfoBasicService.GetMajorInfoWithGraduation();
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowBusinessException(ex);
  83. }
  84. }
  85. }
  86. /// <summary>
  87. /// 根据专业顺序生成毕业证号
  88. /// <summary>
  89. /// <returns></returns>
  90. public void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList)
  91. {
  92. try
  93. {
  94. stuInfoBasicService.CreateGraduateNoByMajor(CityCode,SchoolCode,MajorList);
  95. }
  96. catch (Exception ex)
  97. {
  98. if (ex is ExceptionEx)
  99. {
  100. throw;
  101. }
  102. else
  103. {
  104. throw ExceptionEx.ThrowBusinessException(ex);
  105. }
  106. }
  107. }
  108. /// <summary>
  109. /// 获取StuInfoBasic表实体数据
  110. /// <param name="keyValue">主键</param>
  111. /// <summary>
  112. /// <returns></returns>
  113. public StuInfoBasicEntity GetStuNoByAccount(string keyValue)
  114. {
  115. try
  116. {
  117. return stuInfoBasicService.GetStuNoByAccount(keyValue);
  118. }
  119. catch (Exception ex)
  120. {
  121. if (ex is ExceptionEx)
  122. {
  123. throw;
  124. }
  125. else
  126. {
  127. throw ExceptionEx.ThrowBusinessException(ex);
  128. }
  129. }
  130. }
  131. public List<string> GetSaveClassStudents(string account)
  132. {
  133. try
  134. {
  135. return stuInfoBasicService.GetSaveClassStudents(account);
  136. }
  137. catch (Exception ex)
  138. {
  139. if (ex is ExceptionEx)
  140. {
  141. throw;
  142. }
  143. else
  144. {
  145. throw ExceptionEx.ThrowBusinessException(ex);
  146. }
  147. }
  148. }
  149. public StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode)
  150. {
  151. try
  152. {
  153. return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
  154. }
  155. catch (Exception ex)
  156. {
  157. if (ex is ExceptionEx)
  158. {
  159. throw;
  160. }
  161. else
  162. {
  163. throw ExceptionEx.ThrowBusinessException(ex);
  164. }
  165. }
  166. }
  167. public string GetPhotoByStuNo(string enCode)
  168. {
  169. try
  170. {
  171. return stuInfoBasicService.GetPhotoByStuNo(enCode);
  172. }
  173. catch (Exception ex)
  174. {
  175. if (ex is ExceptionEx)
  176. {
  177. throw;
  178. }
  179. else
  180. {
  181. throw ExceptionEx.ThrowBusinessException(ex);
  182. }
  183. }
  184. }
  185. public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
  186. {
  187. try
  188. {
  189. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  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. /// <returns></returns>
  207. public List<TreeModel> GetTree()
  208. {
  209. try
  210. {
  211. DataTable list = stuInfoBasicService.GetSqlTree();
  212. List<TreeModel> treeList = new List<TreeModel>();
  213. foreach (DataRow item in list.Rows)
  214. {
  215. TreeModel node = new TreeModel
  216. {
  217. id = item["classno"].ToString(),
  218. text = item["classname"].ToString(),
  219. value = item["classno"].ToString(),
  220. showcheck = false,
  221. checkstate = 0,
  222. isexpand = true,
  223. parentId = ""
  224. };
  225. treeList.Add(node);
  226. }
  227. return treeList.ToTree();
  228. }
  229. catch (Exception ex)
  230. {
  231. if (ex is ExceptionEx)
  232. {
  233. throw;
  234. }
  235. else
  236. {
  237. throw ExceptionEx.ThrowBusinessException(ex);
  238. }
  239. }
  240. }
  241. #endregion
  242. #region 提交数据
  243. /// <summary>
  244. /// 生成教师帐号
  245. /// </summary>
  246. public void GenerateAccout()
  247. {
  248. try
  249. {
  250. stuInfoBasicService.GenerateAccout();
  251. }
  252. catch (Exception ex)
  253. {
  254. if (ex is ExceptionEx)
  255. {
  256. throw;
  257. }
  258. else
  259. {
  260. throw ExceptionEx.ThrowBusinessException(ex);
  261. }
  262. }
  263. }
  264. public bool GetAny()
  265. {
  266. try
  267. {
  268. return stuInfoBasicService.GetAny();
  269. }
  270. catch (Exception ex)
  271. {
  272. if (ex is ExceptionEx)
  273. {
  274. throw;
  275. }
  276. else
  277. {
  278. throw ExceptionEx.ThrowBusinessException(ex);
  279. }
  280. }
  281. }
  282. public IEnumerable<StuInfoBasicEntity> GetAllList()
  283. {
  284. try
  285. {
  286. return stuInfoBasicService.GetAllList();
  287. }
  288. catch (Exception ex)
  289. {
  290. if (ex is ExceptionEx)
  291. {
  292. throw;
  293. }
  294. else
  295. {
  296. throw ExceptionEx.ThrowBusinessException(ex);
  297. }
  298. }
  299. }
  300. public IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo)
  301. {
  302. try
  303. {
  304. return stuInfoBasicService.GetStuInfoByClassNo(classNo);
  305. }
  306. catch (Exception ex)
  307. {
  308. if (ex is ExceptionEx)
  309. {
  310. throw;
  311. }
  312. else
  313. {
  314. throw ExceptionEx.ThrowBusinessException(ex);
  315. }
  316. }
  317. }
  318. public void SyncDept()
  319. {
  320. try
  321. {
  322. stuInfoBasicService.SyncDept();
  323. }
  324. catch (Exception ex)
  325. {
  326. if (ex is ExceptionEx)
  327. {
  328. throw;
  329. }
  330. else
  331. {
  332. throw ExceptionEx.ThrowBusinessException(ex);
  333. }
  334. }
  335. }
  336. public void SyncMajor()
  337. {
  338. try
  339. {
  340. stuInfoBasicService.SyncMajor();
  341. }
  342. catch (Exception ex)
  343. {
  344. if (ex is ExceptionEx)
  345. {
  346. throw;
  347. }
  348. else
  349. {
  350. throw ExceptionEx.ThrowBusinessException(ex);
  351. }
  352. }
  353. }
  354. public void UpdateAccount()
  355. {
  356. try
  357. {
  358. stuInfoBasicService.UpdateAccount();
  359. }
  360. catch (Exception ex)
  361. {
  362. if (ex is ExceptionEx)
  363. {
  364. throw;
  365. }
  366. else
  367. {
  368. throw ExceptionEx.ThrowBusinessException(ex);
  369. }
  370. }
  371. }
  372. /// <summary>
  373. /// 删除实体数据
  374. /// <param name="keyValue">主键</param>
  375. /// <summary>
  376. /// <returns></returns>
  377. public void DeleteEntity(string keyValue)
  378. {
  379. try
  380. {
  381. stuInfoBasicService.DeleteEntity(keyValue);
  382. }
  383. catch (Exception ex)
  384. {
  385. if (ex is ExceptionEx)
  386. {
  387. throw;
  388. }
  389. else
  390. {
  391. throw ExceptionEx.ThrowBusinessException(ex);
  392. }
  393. }
  394. }
  395. /// <summary>
  396. /// 领取毕业证
  397. /// <param name="keyValue">主键</param>
  398. /// <summary>
  399. /// <returns></returns>
  400. public void GetCard(string keyValue)
  401. {
  402. try
  403. {
  404. stuInfoBasicService.GetCard(keyValue);
  405. }
  406. catch (Exception ex)
  407. {
  408. if (ex is ExceptionEx)
  409. {
  410. throw;
  411. }
  412. else
  413. {
  414. throw ExceptionEx.ThrowBusinessException(ex);
  415. }
  416. }
  417. }
  418. /// <summary>
  419. /// 毕业生归档
  420. /// <param name="keyValue">主键</param>
  421. /// <summary>
  422. /// <returns></returns>
  423. public void StuStore()
  424. {
  425. try
  426. {
  427. stuInfoBasicService.StuStore();
  428. }
  429. catch (Exception ex)
  430. {
  431. if (ex is ExceptionEx)
  432. {
  433. throw;
  434. }
  435. else
  436. {
  437. throw ExceptionEx.ThrowBusinessException(ex);
  438. }
  439. }
  440. }
  441. /// <summary>
  442. /// 审核全部
  443. /// </summary>
  444. public void CheckAll()
  445. {
  446. try
  447. {
  448. stuInfoBasicService.CheckAll();
  449. }
  450. catch (Exception ex)
  451. {
  452. if (ex is ExceptionEx)
  453. {
  454. throw;
  455. }
  456. else
  457. {
  458. throw ExceptionEx.ThrowBusinessException(ex);
  459. }
  460. }
  461. }
  462. /// <summary>
  463. /// 准许毕业
  464. /// </summary>
  465. public void AllowGraduate(string stuNo,string status)
  466. {
  467. try
  468. {
  469. stuInfoBasicService.AllowGraduate(stuNo,status);
  470. }
  471. catch (Exception ex)
  472. {
  473. if (ex is ExceptionEx)
  474. {
  475. throw;
  476. }
  477. else
  478. {
  479. throw ExceptionEx.ThrowBusinessException(ex);
  480. }
  481. }
  482. }
  483. public void SynPhoto()
  484. {
  485. try
  486. {
  487. stuInfoBasicService.SynPhoto();
  488. }
  489. catch (Exception ex)
  490. {
  491. if (ex is ExceptionEx)
  492. {
  493. throw;
  494. }
  495. else
  496. {
  497. throw ExceptionEx.ThrowBusinessException(ex);
  498. }
  499. }
  500. }
  501. /// <summary>
  502. /// 保存实体数据(新增、修改)
  503. /// <param name="keyValue">主键</param>
  504. /// <summary>
  505. /// <returns></returns>
  506. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  507. {
  508. try
  509. {
  510. stuInfoBasicService.SaveEntity(keyValue, entity);
  511. }
  512. catch (Exception ex)
  513. {
  514. if (ex is ExceptionEx)
  515. {
  516. throw;
  517. }
  518. else
  519. {
  520. throw ExceptionEx.ThrowBusinessException(ex);
  521. }
  522. }
  523. }
  524. #endregion
  525. }
  526. }