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.
 
 
 
 
 
 

750 lines
20 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 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 GetStuInfoBasicEntityByStuNo(string enCode)
  173. {
  174. try
  175. {
  176. return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
  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 GetStuInfoBasicEntityByStuName(string name)
  191. {
  192. try
  193. {
  194. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  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 GetStuInfoBasicEntityByStuNoOrStuName(string stuno, string stuname)
  209. {
  210. try
  211. {
  212. return stuInfoBasicService.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname);
  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. /// <summary>
  227. /// 获取左侧树形数据
  228. /// <summary>
  229. /// <returns></returns>
  230. public List<TreeModel> GetTree()
  231. {
  232. try
  233. {
  234. DataTable list = stuInfoBasicService.GetSqlTree();
  235. List<TreeModel> treeList = new List<TreeModel>();
  236. foreach (DataRow item in list.Rows)
  237. {
  238. TreeModel node = new TreeModel
  239. {
  240. id = item["classno"].ToString(),
  241. text = item["classname"].ToString(),
  242. value = item["classno"].ToString(),
  243. showcheck = false,
  244. checkstate = 0,
  245. isexpand = true,
  246. parentId = ""
  247. };
  248. treeList.Add(node);
  249. }
  250. return treeList.ToTree();
  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. #endregion
  265. #region 提交数据
  266. /// <summary>
  267. /// 生成教师帐号
  268. /// </summary>
  269. public void GenerateAccout()
  270. {
  271. try
  272. {
  273. stuInfoBasicService.GenerateAccout();
  274. }
  275. catch (Exception ex)
  276. {
  277. if (ex is ExceptionEx)
  278. {
  279. throw;
  280. }
  281. else
  282. {
  283. throw ExceptionEx.ThrowBusinessException(ex);
  284. }
  285. }
  286. }
  287. public bool GetAny()
  288. {
  289. try
  290. {
  291. return stuInfoBasicService.GetAny();
  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 IEnumerable<StuInfoBasicEntity> GetAllList()
  306. {
  307. try
  308. {
  309. return stuInfoBasicService.GetAllList();
  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<StuInfoBasicService.StuInfoStatisticsModel> GetAllStatistics()
  324. {
  325. try
  326. {
  327. return stuInfoBasicService.GetAllStatistics();
  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
  454. {
  455. throw ExceptionEx.ThrowBusinessException(ex);
  456. }
  457. }
  458. }
  459. /// <summary>
  460. /// 图书资料归还
  461. /// <param name="keyValue">主键</param>
  462. /// <summary>
  463. /// <returns></returns>
  464. public void IsReturnBooks(string keyValue, string status)
  465. {
  466. try
  467. {
  468. stuInfoBasicService.IsReturnBooks(keyValue, status);
  469. }
  470. catch (Exception ex)
  471. {
  472. if (ex is ExceptionEx)
  473. {
  474. throw;
  475. }
  476. else
  477. {
  478. throw ExceptionEx.ThrowBusinessException(ex);
  479. }
  480. }
  481. }
  482. /// <summary>
  483. /// 就业协议备案
  484. /// <param name="keyValue">主键</param>
  485. /// <summary>
  486. /// <returns></returns>
  487. public void IsEmployAgree(string keyValue, string status)
  488. {
  489. try
  490. {
  491. stuInfoBasicService.IsEmployAgree(keyValue, status);
  492. }
  493. catch (Exception ex)
  494. {
  495. if (ex is ExceptionEx)
  496. {
  497. throw;
  498. }
  499. else
  500. {
  501. throw ExceptionEx.ThrowBusinessException(ex);
  502. }
  503. }
  504. }
  505. /// <summary>
  506. /// 学杂费结算
  507. /// <param name="keyValue">主键</param>
  508. /// <summary>
  509. /// <returns></returns>
  510. public void IsFeeSettle(string keyValue, string status)
  511. {
  512. try
  513. {
  514. stuInfoBasicService.IsFeeSettle(keyValue, status);
  515. }
  516. catch (Exception ex)
  517. {
  518. if (ex is ExceptionEx)
  519. {
  520. throw;
  521. }
  522. else
  523. {
  524. throw ExceptionEx.ThrowBusinessException(ex);
  525. }
  526. }
  527. }
  528. /// <summary>
  529. /// 办理退住手续
  530. /// <param name="keyValue">主键</param>
  531. /// <summary>
  532. /// <returns></returns>
  533. public void IsCheckOut(string keyValue, string status)
  534. {
  535. try
  536. {
  537. stuInfoBasicService.IsCheckOut(keyValue, status);
  538. }
  539. catch (Exception ex)
  540. {
  541. if (ex is ExceptionEx)
  542. {
  543. throw;
  544. }
  545. else
  546. {
  547. throw ExceptionEx.ThrowBusinessException(ex);
  548. }
  549. }
  550. }
  551. /// <summary>
  552. /// 校园卡注销
  553. /// <param name="keyValue">主键</param>
  554. /// <summary>
  555. /// <returns></returns>
  556. public void IsCardDeregistrate(string keyValue, string status)
  557. {
  558. try
  559. {
  560. stuInfoBasicService.IsCardDeregistrate(keyValue, status);
  561. }
  562. catch (Exception ex)
  563. {
  564. if (ex is ExceptionEx)
  565. {
  566. throw;
  567. }
  568. else
  569. {
  570. throw ExceptionEx.ThrowBusinessException(ex);
  571. }
  572. }
  573. }
  574. /// <summary>
  575. /// 档案与组织关系转出
  576. /// <param name="keyValue">主键</param>
  577. /// <summary>
  578. /// <returns></returns>
  579. public void IsFileTransfer(string keyValue, string status, string fort)
  580. {
  581. try
  582. {
  583. stuInfoBasicService.IsFileTransfer(keyValue, status, fort);
  584. }
  585. catch (Exception ex)
  586. {
  587. if (ex is ExceptionEx)
  588. {
  589. throw;
  590. }
  591. else
  592. {
  593. throw ExceptionEx.ThrowBusinessException(ex);
  594. }
  595. }
  596. }
  597. /// <summary>
  598. /// 毕业生归档
  599. /// <param name="keyValue">主键</param>
  600. /// <summary>
  601. /// <returns></returns>
  602. public void StuStore()
  603. {
  604. try
  605. {
  606. stuInfoBasicService.StuStore();
  607. }
  608. catch (Exception ex)
  609. {
  610. if (ex is ExceptionEx)
  611. {
  612. throw;
  613. }
  614. else
  615. {
  616. throw ExceptionEx.ThrowBusinessException(ex);
  617. }
  618. }
  619. }
  620. /// <summary>
  621. /// 审核全部
  622. /// </summary>
  623. public void CheckAll()
  624. {
  625. try
  626. {
  627. stuInfoBasicService.CheckAll();
  628. }
  629. catch (Exception ex)
  630. {
  631. if (ex is ExceptionEx)
  632. {
  633. throw;
  634. }
  635. else
  636. {
  637. throw ExceptionEx.ThrowBusinessException(ex);
  638. }
  639. }
  640. }
  641. /// <summary>
  642. /// 准许毕业
  643. /// </summary>
  644. public void AllowGraduate(string stuNo, string status)
  645. {
  646. try
  647. {
  648. stuInfoBasicService.AllowGraduate(stuNo, status);
  649. }
  650. catch (Exception ex)
  651. {
  652. if (ex is ExceptionEx)
  653. {
  654. throw;
  655. }
  656. else
  657. {
  658. throw ExceptionEx.ThrowBusinessException(ex);
  659. }
  660. }
  661. }
  662. public void SynPhoto()
  663. {
  664. try
  665. {
  666. stuInfoBasicService.SynPhoto();
  667. }
  668. catch (Exception ex)
  669. {
  670. if (ex is ExceptionEx)
  671. {
  672. throw;
  673. }
  674. else
  675. {
  676. throw ExceptionEx.ThrowBusinessException(ex);
  677. }
  678. }
  679. }
  680. /// <summary>
  681. /// 保存实体数据(新增、修改)
  682. /// <param name="keyValue">主键</param>
  683. /// <summary>
  684. /// <returns></returns>
  685. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  686. {
  687. try
  688. {
  689. stuInfoBasicService.SaveEntity(keyValue, entity);
  690. }
  691. catch (Exception ex)
  692. {
  693. if (ex is ExceptionEx)
  694. {
  695. throw;
  696. }
  697. else
  698. {
  699. throw ExceptionEx.ThrowBusinessException(ex);
  700. }
  701. }
  702. }
  703. public string StuInfoBasicImport(DataTable dt, string fileId)
  704. {
  705. try
  706. {
  707. return stuInfoBasicService.StuInfoBasicImport(dt, fileId);
  708. }
  709. catch (Exception ex)
  710. {
  711. if (ex is ExceptionEx)
  712. {
  713. throw;
  714. }
  715. else
  716. {
  717. throw ExceptionEx.ThrowBusinessException(ex);
  718. }
  719. }
  720. }
  721. #endregion
  722. }
  723. }