Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

857 строки
22 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. /// 生成毕业证号
  110. /// <param name="keyValue">主键</param>
  111. /// <summary>
  112. /// <returns></returns>
  113. public void DoCreateGraduateNo()
  114. {
  115. try
  116. {
  117. stuInfoBasicService.DoCreateGraduateNo();
  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. /// <summary>
  132. /// 获取StuInfoBasic表实体数据
  133. /// <param name="keyValue">主键</param>
  134. /// <summary>
  135. /// <returns></returns>
  136. public StuInfoBasicEntity GetStuNoByAccount(string keyValue)
  137. {
  138. try
  139. {
  140. return stuInfoBasicService.GetStuNoByAccount(keyValue);
  141. }
  142. catch (Exception ex)
  143. {
  144. if (ex is ExceptionEx)
  145. {
  146. throw;
  147. }
  148. else
  149. {
  150. throw ExceptionEx.ThrowBusinessException(ex);
  151. }
  152. }
  153. }
  154. public List<string> GetSaveClassStudents(string account)
  155. {
  156. try
  157. {
  158. return stuInfoBasicService.GetSaveClassStudents(account);
  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 StuInfoBasicEntity GetIdCard(string Idcard)
  173. {
  174. try
  175. {
  176. return stuInfoBasicService.GetIdCard(Idcard);
  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 StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
  209. {
  210. try
  211. {
  212. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  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 GetStuInfoBasicEntityByStuNoOrStuName(string stuno, string stuname)
  227. {
  228. try
  229. {
  230. return stuInfoBasicService.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname);
  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. #endregion
  283. #region 提交数据
  284. /// <summary>
  285. /// 生成教师帐号
  286. /// </summary>
  287. public void GenerateAccout()
  288. {
  289. try
  290. {
  291. stuInfoBasicService.GenerateAccout();
  292. }
  293. catch (Exception ex)
  294. {
  295. if (ex is ExceptionEx)
  296. {
  297. throw;
  298. }
  299. else
  300. {
  301. throw ExceptionEx.ThrowBusinessException(ex);
  302. }
  303. }
  304. }
  305. public bool GetAny()
  306. {
  307. try
  308. {
  309. return stuInfoBasicService.GetAny();
  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 IEnumerable<StuInfoBasicEntity> GetAllList()
  324. {
  325. try
  326. {
  327. return stuInfoBasicService.GetAllList();
  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(string ChangeType)
  342. {
  343. try
  344. {
  345. return stuInfoBasicService.GetAllList(ChangeType);
  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 UpdateAccount()
  378. {
  379. try
  380. {
  381. stuInfoBasicService.UpdateAccount();
  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 UpdateState(string keyValue, string state)
  396. {
  397. try
  398. {
  399. stuInfoBasicService.UpdateState(keyValue, state);
  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. /// <summary>
  414. /// 删除实体数据
  415. /// <param name="keyValue">主键</param>
  416. /// <summary>
  417. /// <returns></returns>
  418. public void DeleteEntity(string keyValue)
  419. {
  420. try
  421. {
  422. stuInfoBasicService.DeleteEntity(keyValue);
  423. }
  424. catch (Exception ex)
  425. {
  426. if (ex is ExceptionEx)
  427. {
  428. throw;
  429. }
  430. else
  431. {
  432. throw ExceptionEx.ThrowBusinessException(ex);
  433. }
  434. }
  435. }
  436. /// <summary>
  437. /// 领取毕业证
  438. /// <param name="keyValue">主键</param>
  439. /// <summary>
  440. /// <returns></returns>
  441. public void GetCard(string keyValue, string status, StuInfoBasicEntity entity)
  442. {
  443. try
  444. {
  445. stuInfoBasicService.GetCard(keyValue, status, entity);
  446. }
  447. catch (Exception ex)
  448. {
  449. if (ex is ExceptionEx)
  450. {
  451. throw;
  452. }
  453. else if (ex is ArgumentException)
  454. {
  455. throw;
  456. }
  457. else
  458. {
  459. throw ExceptionEx.ThrowBusinessException(ex);
  460. }
  461. }
  462. }
  463. /// <summary>
  464. /// 图书资料归还
  465. /// <param name="keyValue">主键</param>
  466. /// <summary>
  467. /// <returns></returns>
  468. public void IsReturnBooks(string keyValue, string status)
  469. {
  470. try
  471. {
  472. stuInfoBasicService.IsReturnBooks(keyValue, status);
  473. }
  474. catch (Exception ex)
  475. {
  476. if (ex is ExceptionEx)
  477. {
  478. throw;
  479. }
  480. else
  481. {
  482. throw ExceptionEx.ThrowBusinessException(ex);
  483. }
  484. }
  485. }
  486. /// <summary>
  487. /// 就业协议备案
  488. /// <param name="keyValue">主键</param>
  489. /// <summary>
  490. /// <returns></returns>
  491. public void IsEmployAgree(string keyValue, string status)
  492. {
  493. try
  494. {
  495. stuInfoBasicService.IsEmployAgree(keyValue, status);
  496. }
  497. catch (Exception ex)
  498. {
  499. if (ex is ExceptionEx)
  500. {
  501. throw;
  502. }
  503. else
  504. {
  505. throw ExceptionEx.ThrowBusinessException(ex);
  506. }
  507. }
  508. }
  509. /// <summary>
  510. /// 学杂费结算
  511. /// <param name="keyValue">主键</param>
  512. /// <summary>
  513. /// <returns></returns>
  514. public void IsFeeSettle(string keyValue, string status)
  515. {
  516. try
  517. {
  518. stuInfoBasicService.IsFeeSettle(keyValue, status);
  519. }
  520. catch (Exception ex)
  521. {
  522. if (ex is ExceptionEx)
  523. {
  524. throw;
  525. }
  526. else
  527. {
  528. throw ExceptionEx.ThrowBusinessException(ex);
  529. }
  530. }
  531. }
  532. /// <summary>
  533. /// 办理退住手续
  534. /// <param name="keyValue">主键</param>
  535. /// <summary>
  536. /// <returns></returns>
  537. public void IsCheckOut(string keyValue, string status)
  538. {
  539. try
  540. {
  541. stuInfoBasicService.IsCheckOut(keyValue, status);
  542. }
  543. catch (Exception ex)
  544. {
  545. if (ex is ExceptionEx)
  546. {
  547. throw;
  548. }
  549. else
  550. {
  551. throw ExceptionEx.ThrowBusinessException(ex);
  552. }
  553. }
  554. }
  555. /// <summary>
  556. /// 校园卡注销
  557. /// <param name="keyValue">主键</param>
  558. /// <summary>
  559. /// <returns></returns>
  560. public void IsCardDeregistrate(string keyValue, string status)
  561. {
  562. try
  563. {
  564. stuInfoBasicService.IsCardDeregistrate(keyValue, status);
  565. }
  566. catch (Exception ex)
  567. {
  568. if (ex is ExceptionEx)
  569. {
  570. throw;
  571. }
  572. else
  573. {
  574. throw ExceptionEx.ThrowBusinessException(ex);
  575. }
  576. }
  577. }
  578. /// <summary>
  579. /// 档案与组织关系转出
  580. /// <param name="keyValue">主键</param>
  581. /// <summary>
  582. /// <returns></returns>
  583. public void IsFileTransfer(string keyValue, string status, string fort)
  584. {
  585. try
  586. {
  587. stuInfoBasicService.IsFileTransfer(keyValue, status, fort);
  588. }
  589. catch (Exception ex)
  590. {
  591. if (ex is ExceptionEx)
  592. {
  593. throw;
  594. }
  595. else
  596. {
  597. throw ExceptionEx.ThrowBusinessException(ex);
  598. }
  599. }
  600. }
  601. /// <summary>
  602. /// 毕业生归档
  603. /// <param name="keyValue">主键</param>
  604. /// <summary>
  605. /// <returns></returns>
  606. public void StuStore(string keyValue)
  607. {
  608. try
  609. {
  610. stuInfoBasicService.StuStore(keyValue);
  611. }
  612. catch (Exception ex)
  613. {
  614. if (ex is ExceptionEx)
  615. {
  616. throw;
  617. }
  618. else
  619. {
  620. throw ExceptionEx.ThrowBusinessException(ex);
  621. }
  622. }
  623. }
  624. /// <summary>
  625. /// 学生毕业归档-设置毕业时间
  626. /// </summary>
  627. /// <param name="finishDate"></param>
  628. public void SaveFinishSchoolDate(DateTime finishDate)
  629. {
  630. try
  631. {
  632. stuInfoBasicService.SaveFinishSchoolDate(finishDate);
  633. }
  634. catch (Exception ex)
  635. {
  636. if (ex is ExceptionEx)
  637. {
  638. throw;
  639. }
  640. else
  641. {
  642. throw ExceptionEx.ThrowBusinessException(ex);
  643. }
  644. }
  645. }
  646. /// <summary>
  647. /// 学生毕业流程审核
  648. /// <param name="keyValue">主键</param>
  649. /// <summary>
  650. /// <returns></returns>
  651. public void StuGraduateCheck(string keyValue)
  652. {
  653. try
  654. {
  655. stuInfoBasicService.StuGraduateCheck(keyValue);
  656. }
  657. catch (Exception ex)
  658. {
  659. if (ex is ExceptionEx)
  660. {
  661. throw;
  662. }
  663. else
  664. {
  665. throw ExceptionEx.ThrowBusinessException(ex);
  666. }
  667. }
  668. }
  669. /// <summary>
  670. /// 审核全部
  671. /// </summary>
  672. public void CheckAll()
  673. {
  674. try
  675. {
  676. stuInfoBasicService.CheckAll();
  677. }
  678. catch (Exception ex)
  679. {
  680. if (ex is ExceptionEx)
  681. {
  682. throw;
  683. }
  684. else
  685. {
  686. throw ExceptionEx.ThrowBusinessException(ex);
  687. }
  688. }
  689. }
  690. /// <summary>
  691. /// 准许毕业
  692. /// </summary>
  693. public void AllowGraduate(string stuNo, string status)
  694. {
  695. try
  696. {
  697. stuInfoBasicService.AllowGraduate(stuNo, status);
  698. }
  699. catch (Exception ex)
  700. {
  701. if (ex is ExceptionEx)
  702. {
  703. throw;
  704. }
  705. else if (ex is ArgumentException)
  706. {
  707. throw;
  708. }
  709. else
  710. {
  711. throw ExceptionEx.ThrowBusinessException(ex);
  712. }
  713. }
  714. }
  715. public void SynPhoto()
  716. {
  717. try
  718. {
  719. stuInfoBasicService.SynPhoto();
  720. }
  721. catch (Exception ex)
  722. {
  723. if (ex is ExceptionEx)
  724. {
  725. throw;
  726. }
  727. else
  728. {
  729. throw ExceptionEx.ThrowBusinessException(ex);
  730. }
  731. }
  732. }
  733. /// <summary>
  734. /// 保存实体数据(新增、修改)
  735. /// <param name="keyValue">主键</param>
  736. /// <summary>
  737. /// <returns></returns>
  738. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  739. {
  740. try
  741. {
  742. stuInfoBasicService.SaveEntity(keyValue, entity);
  743. }
  744. catch (Exception ex)
  745. {
  746. if (ex is ExceptionEx)
  747. {
  748. throw;
  749. }
  750. else
  751. {
  752. throw ExceptionEx.ThrowBusinessException(ex);
  753. }
  754. }
  755. }
  756. public string StuInfoBasicImport(DataTable dt, string fileId)
  757. {
  758. try
  759. {
  760. return stuInfoBasicService.StuInfoBasicImport(dt, fileId);
  761. }
  762. catch (Exception ex)
  763. {
  764. if (ex is ExceptionEx)
  765. {
  766. throw;
  767. }
  768. else
  769. {
  770. throw ExceptionEx.ThrowBusinessException(ex);
  771. }
  772. }
  773. }
  774. public int GetCount()
  775. {
  776. try
  777. {
  778. return stuInfoBasicService.GetCount();
  779. }
  780. catch (Exception ex)
  781. {
  782. if (ex is ExceptionEx)
  783. {
  784. throw;
  785. }
  786. else
  787. {
  788. throw ExceptionEx.ThrowBusinessException(ex);
  789. }
  790. }
  791. }
  792. public Dictionary<string, int> GetGenderCount()
  793. {
  794. try
  795. {
  796. return stuInfoBasicService.GetDicCount(1);
  797. }
  798. catch (Exception ex)
  799. {
  800. if (ex is ExceptionEx)
  801. {
  802. throw;
  803. }
  804. else
  805. {
  806. throw ExceptionEx.ThrowBusinessException(ex);
  807. }
  808. }
  809. }
  810. public Dictionary<string, int> GetDeptCount()
  811. {
  812. try
  813. {
  814. return stuInfoBasicService.GetDicCount(2);
  815. }
  816. catch (Exception ex)
  817. {
  818. if (ex is ExceptionEx)
  819. {
  820. throw;
  821. }
  822. else
  823. {
  824. throw ExceptionEx.ThrowBusinessException(ex);
  825. }
  826. }
  827. }
  828. #endregion
  829. }
  830. }