Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

638 lignes
16 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. public IEnumerable<StuInfoBasicEntity> GetList(string queryJson)
  42. {
  43. try
  44. {
  45. return stuInfoBasicService.GetList(queryJson);
  46. }
  47. catch (Exception ex)
  48. {
  49. if (ex is ExceptionEx)
  50. {
  51. throw;
  52. }
  53. else
  54. {
  55. throw ExceptionEx.ThrowBusinessException(ex);
  56. }
  57. }
  58. }
  59. /// <summary>
  60. /// 获取页面显示列表数据
  61. /// <summary>
  62. /// <param name="queryJson">查询参数</param>
  63. /// <returns></returns>
  64. public IEnumerable<StuInfoBasicEntity> GetPageListOfSoonGraduate(Pagination pagination, string queryJson)
  65. {
  66. try
  67. {
  68. return stuInfoBasicService.GetPageListOfSoonGraduate(pagination, queryJson);
  69. }
  70. catch (Exception ex)
  71. {
  72. if (ex is ExceptionEx)
  73. {
  74. throw;
  75. }
  76. else
  77. {
  78. throw ExceptionEx.ThrowBusinessException(ex);
  79. }
  80. }
  81. }
  82. /// <summary>
  83. /// 获取StuInfoBasic表实体数据
  84. /// <param name="keyValue">主键</param>
  85. /// <summary>
  86. /// <returns></returns>
  87. public StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue)
  88. {
  89. try
  90. {
  91. return stuInfoBasicService.GetStuInfoBasicEntity(keyValue);
  92. }
  93. catch (Exception ex)
  94. {
  95. if (ex is ExceptionEx)
  96. {
  97. throw;
  98. }
  99. else
  100. {
  101. throw ExceptionEx.ThrowBusinessException(ex);
  102. }
  103. }
  104. }
  105. /// <summary>
  106. /// 获取准许毕业学生的专业
  107. /// <summary>
  108. /// <returns></returns>
  109. public List<CdMajorEntity> GetMajorInfoWithGraduation()
  110. {
  111. try
  112. {
  113. return stuInfoBasicService.GetMajorInfoWithGraduation();
  114. }
  115. catch (Exception ex)
  116. {
  117. if (ex is ExceptionEx)
  118. {
  119. throw;
  120. }
  121. else
  122. {
  123. throw ExceptionEx.ThrowBusinessException(ex);
  124. }
  125. }
  126. }
  127. /// <summary>
  128. /// 根据专业顺序生成毕业证号
  129. /// <summary>
  130. /// <returns></returns>
  131. public void CreateGraduateNoByMajor(string CityCode, string SchoolCode, string MajorList)
  132. {
  133. try
  134. {
  135. stuInfoBasicService.CreateGraduateNoByMajor(CityCode, SchoolCode, MajorList);
  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. /// <summary>
  150. /// 获取StuInfoBasic表实体数据
  151. /// <param name="keyValue">主键</param>
  152. /// <summary>
  153. /// <returns></returns>
  154. public StuInfoBasicEntity GetStuNoByAccount(string keyValue)
  155. {
  156. try
  157. {
  158. return stuInfoBasicService.GetStuNoByAccount(keyValue);
  159. }
  160. catch (Exception ex)
  161. {
  162. if (ex is ExceptionEx)
  163. {
  164. throw;
  165. }
  166. else
  167. {
  168. throw ExceptionEx.ThrowBusinessException(ex);
  169. }
  170. }
  171. }
  172. public List<string> GetSaveClassStudents(string account)
  173. {
  174. try
  175. {
  176. return stuInfoBasicService.GetSaveClassStudents(account);
  177. }
  178. catch (Exception ex)
  179. {
  180. if (ex is ExceptionEx)
  181. {
  182. throw;
  183. }
  184. else
  185. {
  186. throw ExceptionEx.ThrowBusinessException(ex);
  187. }
  188. }
  189. }
  190. public StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode)
  191. {
  192. try
  193. {
  194. return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
  195. }
  196. catch (Exception ex)
  197. {
  198. if (ex is ExceptionEx)
  199. {
  200. throw;
  201. }
  202. else
  203. {
  204. throw ExceptionEx.ThrowBusinessException(ex);
  205. }
  206. }
  207. }
  208. public string GetPhotoByStuNo(string enCode)
  209. {
  210. try
  211. {
  212. return stuInfoBasicService.GetPhotoByStuNo(enCode);
  213. }
  214. catch (Exception ex)
  215. {
  216. if (ex is ExceptionEx)
  217. {
  218. throw;
  219. }
  220. else
  221. {
  222. throw ExceptionEx.ThrowBusinessException(ex);
  223. }
  224. }
  225. }
  226. public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
  227. {
  228. try
  229. {
  230. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  231. }
  232. catch (Exception ex)
  233. {
  234. if (ex is ExceptionEx)
  235. {
  236. throw;
  237. }
  238. else
  239. {
  240. throw ExceptionEx.ThrowBusinessException(ex);
  241. }
  242. }
  243. }
  244. /// <summary>
  245. /// 获取左侧树形数据
  246. /// <summary>
  247. /// <returns></returns>
  248. public List<TreeModel> GetTree()
  249. {
  250. try
  251. {
  252. DataTable list = stuInfoBasicService.GetSqlTree();
  253. List<TreeModel> treeList = new List<TreeModel>();
  254. foreach (DataRow item in list.Rows)
  255. {
  256. TreeModel node = new TreeModel
  257. {
  258. id = item["classno"].ToString(),
  259. text = item["classname"].ToString(),
  260. value = item["classno"].ToString(),
  261. showcheck = false,
  262. checkstate = 0,
  263. isexpand = true,
  264. parentId = ""
  265. };
  266. treeList.Add(node);
  267. }
  268. return treeList.ToTree();
  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 StuInfoBasicEntity GetStuInfoBasicEntityByIdCard(string idcard)
  283. {
  284. try
  285. {
  286. return stuInfoBasicService.GetStuInfoBasicEntityByIdCard(idcard);
  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. #endregion
  301. #region 提交数据
  302. /// <summary>
  303. /// 生成教师帐号
  304. /// </summary>
  305. public void GenerateAccout()
  306. {
  307. try
  308. {
  309. stuInfoBasicService.GenerateAccout();
  310. }
  311. catch (Exception ex)
  312. {
  313. if (ex is ExceptionEx)
  314. {
  315. throw;
  316. }
  317. else
  318. {
  319. throw ExceptionEx.ThrowBusinessException(ex);
  320. }
  321. }
  322. }
  323. public bool GetAny()
  324. {
  325. try
  326. {
  327. return stuInfoBasicService.GetAny();
  328. }
  329. catch (Exception ex)
  330. {
  331. if (ex is ExceptionEx)
  332. {
  333. throw;
  334. }
  335. else
  336. {
  337. throw ExceptionEx.ThrowBusinessException(ex);
  338. }
  339. }
  340. }
  341. public IEnumerable<StuInfoBasicEntity> GetAllList()
  342. {
  343. try
  344. {
  345. return stuInfoBasicService.GetAllList();
  346. }
  347. catch (Exception ex)
  348. {
  349. if (ex is ExceptionEx)
  350. {
  351. throw;
  352. }
  353. else
  354. {
  355. throw ExceptionEx.ThrowBusinessException(ex);
  356. }
  357. }
  358. }
  359. public IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo)
  360. {
  361. try
  362. {
  363. return stuInfoBasicService.GetStuInfoByClassNo(classNo);
  364. }
  365. catch (Exception ex)
  366. {
  367. if (ex is ExceptionEx)
  368. {
  369. throw;
  370. }
  371. else
  372. {
  373. throw ExceptionEx.ThrowBusinessException(ex);
  374. }
  375. }
  376. }
  377. public void SyncDept()
  378. {
  379. try
  380. {
  381. stuInfoBasicService.SyncDept();
  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. public void SyncMajor()
  396. {
  397. try
  398. {
  399. stuInfoBasicService.SyncMajor();
  400. }
  401. catch (Exception ex)
  402. {
  403. if (ex is ExceptionEx)
  404. {
  405. throw;
  406. }
  407. else
  408. {
  409. throw ExceptionEx.ThrowBusinessException(ex);
  410. }
  411. }
  412. }
  413. public void UpdateAccount()
  414. {
  415. try
  416. {
  417. stuInfoBasicService.UpdateAccount();
  418. }
  419. catch (Exception ex)
  420. {
  421. if (ex is ExceptionEx)
  422. {
  423. throw;
  424. }
  425. else
  426. {
  427. throw ExceptionEx.ThrowBusinessException(ex);
  428. }
  429. }
  430. }
  431. /// <summary>
  432. /// 删除实体数据
  433. /// <param name="keyValue">主键</param>
  434. /// <summary>
  435. /// <returns></returns>
  436. public void DeleteEntity(string keyValue)
  437. {
  438. try
  439. {
  440. stuInfoBasicService.DeleteEntity(keyValue);
  441. }
  442. catch (Exception ex)
  443. {
  444. if (ex is ExceptionEx)
  445. {
  446. throw;
  447. }
  448. else
  449. {
  450. throw ExceptionEx.ThrowBusinessException(ex);
  451. }
  452. }
  453. }
  454. /// <summary>
  455. /// 领取毕业证
  456. /// <param name="keyValue">主键</param>
  457. /// <summary>
  458. /// <returns></returns>
  459. public void GetCard(string keyValue)
  460. {
  461. try
  462. {
  463. stuInfoBasicService.GetCard(keyValue);
  464. }
  465. catch (Exception ex)
  466. {
  467. if (ex is ExceptionEx)
  468. {
  469. throw;
  470. }
  471. else
  472. {
  473. throw ExceptionEx.ThrowBusinessException(ex);
  474. }
  475. }
  476. }
  477. /// <summary>
  478. /// 毕业生归档
  479. /// <param name="keyValue">主键</param>
  480. /// <summary>
  481. /// <returns></returns>
  482. public void StuStore()
  483. {
  484. try
  485. {
  486. stuInfoBasicService.StuStore();
  487. }
  488. catch (Exception ex)
  489. {
  490. if (ex is ExceptionEx)
  491. {
  492. throw;
  493. }
  494. else
  495. {
  496. throw ExceptionEx.ThrowBusinessException(ex);
  497. }
  498. }
  499. }
  500. /// <summary>
  501. /// 审核全部
  502. /// </summary>
  503. public void CheckAll()
  504. {
  505. try
  506. {
  507. stuInfoBasicService.CheckAll();
  508. }
  509. catch (Exception ex)
  510. {
  511. if (ex is ExceptionEx)
  512. {
  513. throw;
  514. }
  515. else
  516. {
  517. throw ExceptionEx.ThrowBusinessException(ex);
  518. }
  519. }
  520. }
  521. /// <summary>
  522. /// 准许毕业
  523. /// </summary>
  524. public void AllowGraduate(string stuNo, string status)
  525. {
  526. try
  527. {
  528. stuInfoBasicService.AllowGraduate(stuNo, status);
  529. }
  530. catch (Exception ex)
  531. {
  532. if (ex is ExceptionEx)
  533. {
  534. throw;
  535. }
  536. else
  537. {
  538. throw ExceptionEx.ThrowBusinessException(ex);
  539. }
  540. }
  541. }
  542. public void SynPhoto()
  543. {
  544. try
  545. {
  546. stuInfoBasicService.SynPhoto();
  547. }
  548. catch (Exception ex)
  549. {
  550. if (ex is ExceptionEx)
  551. {
  552. throw;
  553. }
  554. else
  555. {
  556. throw ExceptionEx.ThrowBusinessException(ex);
  557. }
  558. }
  559. }
  560. /// <summary>
  561. /// 保存实体数据(新增、修改)
  562. /// <param name="keyValue">主键</param>
  563. /// <summary>
  564. /// <returns></returns>
  565. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  566. {
  567. try
  568. {
  569. stuInfoBasicService.SaveEntity(keyValue, entity);
  570. }
  571. catch (Exception ex)
  572. {
  573. if (ex is ExceptionEx)
  574. {
  575. throw;
  576. }
  577. else
  578. {
  579. throw ExceptionEx.ThrowBusinessException(ex);
  580. }
  581. }
  582. }
  583. /// <summary>
  584. /// 更新学生数据
  585. /// </summary>
  586. /// <param name="dt"></param>
  587. /// <param name="fileId"></param>
  588. /// <returns></returns>
  589. public (int snum, int fnum) StuInfoBasicUpdateImport(DataTable dt, string fileId, string classno)
  590. {
  591. try
  592. {
  593. return stuInfoBasicService.StuInfoBasicUpdateImport(dt, fileId, classno);
  594. }
  595. catch (Exception ex)
  596. {
  597. if (ex is ExceptionEx)
  598. {
  599. throw;
  600. }
  601. else
  602. {
  603. throw ExceptionEx.ThrowBusinessException(ex);
  604. }
  605. }
  606. }
  607. #endregion
  608. }
  609. }