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.

StuEnrollBLL.cs 23 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907
  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. using Learun.Application.TwoDevelopment.LogisticsManagement;
  6. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-07-17 11:20
  13. /// 描 述:新生录取管理
  14. /// </summary>
  15. public class StuEnrollBLL : StuEnrollIBLL
  16. {
  17. private StuEnrollService stuEnrollService = new StuEnrollService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 获取页面显示列表数据
  21. /// <summary>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<StuEnrollEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return stuEnrollService.GetPageList(pagination, queryJson);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. public IEnumerable<StuEnrollEntity> AllStudent()
  43. {
  44. try
  45. {
  46. return stuEnrollService.AllStudent();
  47. }
  48. catch (Exception ex)
  49. {
  50. if (ex is ExceptionEx)
  51. {
  52. throw;
  53. }
  54. else
  55. {
  56. throw ExceptionEx.ThrowBusinessException(ex);
  57. }
  58. }
  59. }
  60. public IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson)
  61. {
  62. try
  63. {
  64. return stuEnrollService.GetDormitorys(pagination, queryJson);
  65. }
  66. catch (Exception ex)
  67. {
  68. if (ex is ExceptionEx)
  69. {
  70. throw;
  71. }
  72. else
  73. {
  74. throw ExceptionEx.ThrowBusinessException(ex);
  75. }
  76. }
  77. }
  78. /// <summary>
  79. /// 获取页面显示列表数据
  80. /// <summary>
  81. /// <param name="queryJson">查询参数</param>
  82. /// <returns></returns>
  83. public IEnumerable<StuEnrollEntity> GetReportPageList(Pagination pagination, string queryJson)
  84. {
  85. try
  86. {
  87. return stuEnrollService.GetReportPageList(pagination, queryJson);
  88. }
  89. catch (Exception ex)
  90. {
  91. if (ex is ExceptionEx)
  92. {
  93. throw;
  94. }
  95. else
  96. {
  97. throw ExceptionEx.ThrowBusinessException(ex);
  98. }
  99. }
  100. }
  101. /// <summary>
  102. /// 获取StuEnroll表实体数据
  103. /// <param name="keyValue">主键</param>
  104. /// <summary>
  105. /// <returns></returns>
  106. public StuEnrollEntity GetStuEnrollEntity(string keyValue)
  107. {
  108. try
  109. {
  110. return stuEnrollService.GetStuEnrollEntity(keyValue);
  111. }
  112. catch (Exception ex)
  113. {
  114. if (ex is ExceptionEx)
  115. {
  116. throw;
  117. }
  118. else
  119. {
  120. throw ExceptionEx.ThrowBusinessException(ex);
  121. }
  122. }
  123. }
  124. public object GetStuInfo(string stuId)
  125. {
  126. try
  127. {
  128. return stuEnrollService.GetStuInfo(stuId);
  129. }
  130. catch (Exception ex)
  131. {
  132. if (ex is ExceptionEx)
  133. {
  134. throw;
  135. }
  136. else
  137. {
  138. throw ExceptionEx.ThrowBusinessException(ex);
  139. }
  140. }
  141. }
  142. public object GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo)
  143. {
  144. try
  145. {
  146. return stuEnrollService.GetCheckInStatistics(DeptNo, MajorNo, ClassNo);
  147. }
  148. catch (Exception ex)
  149. {
  150. if (ex is ExceptionEx)
  151. {
  152. throw;
  153. }
  154. else
  155. {
  156. throw ExceptionEx.ThrowBusinessException(ex);
  157. }
  158. }
  159. }
  160. public object GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo)
  161. {
  162. try
  163. {
  164. return stuEnrollService.GetHelpStatistics(DeptNo, MajorNo, ClassNo);
  165. }
  166. catch (Exception ex)
  167. {
  168. if (ex is ExceptionEx)
  169. {
  170. throw;
  171. }
  172. else
  173. {
  174. throw ExceptionEx.ThrowBusinessException(ex);
  175. }
  176. }
  177. }
  178. public object GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo)
  179. {
  180. try
  181. {
  182. return stuEnrollService.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo);
  183. }
  184. catch (Exception ex)
  185. {
  186. if (ex is ExceptionEx)
  187. {
  188. throw;
  189. }
  190. else
  191. {
  192. throw ExceptionEx.ThrowBusinessException(ex);
  193. }
  194. }
  195. }
  196. public List<TreeModel> GetTree()
  197. {
  198. try
  199. {
  200. var data = stuEnrollService.GetTree();
  201. List<TreeModel> treeList = new List<TreeModel>();
  202. foreach (var item in data)
  203. {
  204. TreeModel node = new TreeModel
  205. {
  206. id = item.Item3,
  207. text = $"{item.Item4}(男{item.Item1},女{item.Item2})",
  208. value = item.Item3,
  209. showcheck = false,
  210. checkstate = 0,
  211. isexpand = false,
  212. parentId = ""
  213. };
  214. treeList.Add(node);
  215. }
  216. return treeList.ToTree();
  217. }
  218. catch (Exception ex)
  219. {
  220. if (ex is ExceptionEx)
  221. {
  222. throw;
  223. }
  224. else
  225. {
  226. throw ExceptionEx.ThrowBusinessException(ex);
  227. }
  228. }
  229. }
  230. public List<TreeModel> GetBedTree(string classNo, string gender)
  231. {
  232. try
  233. {
  234. var data = stuEnrollService.GetBedTree(classNo, gender);
  235. List<TreeModel> treeList = new List<TreeModel>();
  236. foreach (var item in data)
  237. {
  238. TreeModel node = new TreeModel
  239. {
  240. id = item.ID,
  241. text = item.Name,
  242. value = item.ID,
  243. showcheck = false,
  244. checkstate = 0,
  245. isexpand = false,
  246. parentId = item.ParentID == null ? "" : item.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. public List<string> GetStuIdCards()
  265. {
  266. try
  267. {
  268. return stuEnrollService.GetStuIdCards();
  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. /// <param name="keyValue">主键</param>
  287. /// <summary>
  288. /// <returns></returns>
  289. public void DeleteEntity(string keyValue)
  290. {
  291. try
  292. {
  293. stuEnrollService.DeleteEntity(keyValue);
  294. }
  295. catch (Exception ex)
  296. {
  297. if (ex is ExceptionEx)
  298. {
  299. throw;
  300. }
  301. else
  302. {
  303. throw ExceptionEx.ThrowBusinessException(ex);
  304. }
  305. }
  306. }
  307. public void EditEnrollType(string stuIds, string enrollType)
  308. {
  309. try
  310. {
  311. stuEnrollService.EditEnrollType(stuIds, enrollType);
  312. }
  313. catch (Exception ex)
  314. {
  315. if (ex is ExceptionEx)
  316. {
  317. throw;
  318. }
  319. else
  320. {
  321. throw ExceptionEx.ThrowBusinessException(ex);
  322. }
  323. }
  324. }
  325. /// <summary>
  326. /// 保存实体数据(新增、修改)
  327. /// <param name="keyValue">主键</param>
  328. /// <summary>
  329. /// <returns></returns>
  330. public void SaveEntity(string keyValue, StuEnrollEntity entity)
  331. {
  332. try
  333. {
  334. stuEnrollService.SaveEntity(keyValue, entity);
  335. }
  336. catch (Exception ex)
  337. {
  338. if (ex is ExceptionEx)
  339. {
  340. throw;
  341. }
  342. else
  343. {
  344. throw ExceptionEx.ThrowBusinessException(ex);
  345. }
  346. }
  347. }
  348. public void AllocationClass(string classNo, string dataJson)
  349. {
  350. try
  351. {
  352. stuEnrollService.AllocationClass(classNo, dataJson);
  353. }
  354. catch (Exception ex)
  355. {
  356. if (ex is ExceptionEx)
  357. {
  358. throw;
  359. }
  360. else
  361. {
  362. throw ExceptionEx.ThrowBusinessException(ex);
  363. }
  364. }
  365. }
  366. public void NewAllocationDormitory(string classNo, string dataJson)
  367. {
  368. try
  369. {
  370. stuEnrollService.NewAllocationDormitory(classNo, dataJson);
  371. }
  372. catch (Exception ex)
  373. {
  374. if (ex is ExceptionEx)
  375. {
  376. throw;
  377. }
  378. else
  379. {
  380. throw ExceptionEx.ThrowBusinessException(ex);
  381. }
  382. }
  383. }
  384. public void AllocationDormiotry(string dormitoryNo, string stuId, string dormitoryName)
  385. {
  386. try
  387. {
  388. stuEnrollService.AllocationDormitory(dormitoryNo, stuId, dormitoryName);
  389. }
  390. catch (Exception ex)
  391. {
  392. if (ex is ExceptionEx)
  393. {
  394. throw;
  395. }
  396. else
  397. {
  398. throw ExceptionEx.ThrowBusinessException(ex);
  399. }
  400. }
  401. }
  402. public void SyncDept()
  403. {
  404. try
  405. {
  406. stuEnrollService.SyncDept();
  407. }
  408. catch (Exception ex)
  409. {
  410. if (ex is ExceptionEx)
  411. {
  412. throw;
  413. }
  414. else
  415. {
  416. throw ExceptionEx.ThrowBusinessException(ex);
  417. }
  418. }
  419. }
  420. public void SyncMajor()
  421. {
  422. try
  423. {
  424. stuEnrollService.SyncMajor();
  425. }
  426. catch (Exception ex)
  427. {
  428. if (ex is ExceptionEx)
  429. {
  430. throw;
  431. }
  432. else
  433. {
  434. throw ExceptionEx.ThrowBusinessException(ex);
  435. }
  436. }
  437. }
  438. public (bool, string) Sign(string stuId, bool status)
  439. {
  440. try
  441. {
  442. return stuEnrollService.Sign(stuId, status);
  443. }
  444. catch (Exception ex)
  445. {
  446. if (ex is ExceptionEx)
  447. {
  448. throw;
  449. }
  450. else
  451. {
  452. throw ExceptionEx.ThrowBusinessException(ex);
  453. }
  454. }
  455. }
  456. public (bool, string) Report(string stuId, bool status)
  457. {
  458. try
  459. {
  460. return stuEnrollService.Report(stuId, status);
  461. }
  462. catch (Exception ex)
  463. {
  464. if (ex is ExceptionEx)
  465. {
  466. throw;
  467. }
  468. else
  469. {
  470. throw ExceptionEx.ThrowBusinessException(ex);
  471. }
  472. }
  473. }
  474. public (bool, string) Stay(string stuId, bool status, bool After)
  475. {
  476. try
  477. {
  478. return stuEnrollService.Stay(stuId, status, After);
  479. }
  480. catch (Exception ex)
  481. {
  482. if (ex is ExceptionEx)
  483. {
  484. throw;
  485. }
  486. else
  487. {
  488. throw ExceptionEx.ThrowBusinessException(ex);
  489. }
  490. }
  491. }
  492. public void AllStay()
  493. {
  494. try
  495. {
  496. stuEnrollService.AllStay();
  497. }
  498. catch (Exception ex)
  499. {
  500. if (ex is ExceptionEx)
  501. {
  502. throw;
  503. }
  504. else
  505. {
  506. throw ExceptionEx.ThrowBusinessException(ex);
  507. }
  508. }
  509. }
  510. public (bool, string) Help(string stuId, bool status, bool payAfter)
  511. {
  512. try
  513. {
  514. return stuEnrollService.Help(stuId, status, payAfter);
  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. public void AllHelp()
  529. {
  530. try
  531. {
  532. stuEnrollService.AllHelp();
  533. }
  534. catch (Exception ex)
  535. {
  536. if (ex is ExceptionEx)
  537. {
  538. throw;
  539. }
  540. else
  541. {
  542. throw ExceptionEx.ThrowBusinessException(ex);
  543. }
  544. }
  545. }
  546. public (bool, string) Military(string stuId, bool status, bool payAfter)
  547. {
  548. try
  549. {
  550. return stuEnrollService.Military(stuId, status, payAfter);
  551. }
  552. catch (Exception ex)
  553. {
  554. if (ex is ExceptionEx)
  555. {
  556. throw;
  557. }
  558. else
  559. {
  560. throw ExceptionEx.ThrowBusinessException(ex);
  561. }
  562. }
  563. }
  564. public void AllMilitary()
  565. {
  566. try
  567. {
  568. stuEnrollService.AllMilitary();
  569. }
  570. catch (Exception ex)
  571. {
  572. if (ex is ExceptionEx)
  573. {
  574. throw;
  575. }
  576. else
  577. {
  578. throw ExceptionEx.ThrowBusinessException(ex);
  579. }
  580. }
  581. }
  582. public void AllReport()
  583. {
  584. try
  585. {
  586. stuEnrollService.AllReport();
  587. }
  588. catch (Exception ex)
  589. {
  590. if (ex is ExceptionEx)
  591. {
  592. throw;
  593. }
  594. else
  595. {
  596. throw ExceptionEx.ThrowBusinessException(ex);
  597. }
  598. }
  599. }
  600. public void AllPhoto()
  601. {
  602. try
  603. {
  604. stuEnrollService.AllPhoto();
  605. }
  606. catch (Exception ex)
  607. {
  608. if (ex is ExceptionEx)
  609. {
  610. throw;
  611. }
  612. else
  613. {
  614. throw ExceptionEx.ThrowBusinessException(ex);
  615. }
  616. }
  617. }
  618. public void AllGetCloth()
  619. {
  620. try
  621. {
  622. stuEnrollService.AllGetCloth();
  623. }
  624. catch (Exception ex)
  625. {
  626. if (ex is ExceptionEx)
  627. {
  628. throw;
  629. }
  630. else
  631. {
  632. throw ExceptionEx.ThrowBusinessException(ex);
  633. }
  634. }
  635. }
  636. public void AllGetSize()
  637. {
  638. try
  639. {
  640. stuEnrollService.AllGetSize();
  641. }
  642. catch (Exception ex)
  643. {
  644. if (ex is ExceptionEx)
  645. {
  646. throw;
  647. }
  648. else
  649. {
  650. throw ExceptionEx.ThrowBusinessException(ex);
  651. }
  652. }
  653. }
  654. public void AllGetArticle()
  655. {
  656. try
  657. {
  658. stuEnrollService.AllGetArticle();
  659. }
  660. catch (Exception ex)
  661. {
  662. if (ex is ExceptionEx)
  663. {
  664. throw;
  665. }
  666. else
  667. {
  668. throw ExceptionEx.ThrowBusinessException(ex);
  669. }
  670. }
  671. }
  672. public (bool, string) IsPay(string stuId, bool status)
  673. {
  674. try
  675. {
  676. return stuEnrollService.IsPay(stuId, status);
  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. public object GetPaymentInfo()
  691. {
  692. try
  693. {
  694. return stuEnrollService.GetPaymentInfo();
  695. }
  696. catch (Exception ex)
  697. {
  698. if (ex is ExceptionEx)
  699. {
  700. throw;
  701. }
  702. else
  703. {
  704. throw ExceptionEx.ThrowBusinessException(ex);
  705. }
  706. }
  707. }
  708. public object GetStuDefaultInfo(string StuId)
  709. {
  710. try
  711. {
  712. return stuEnrollService.GetStuDefaultInfo(StuId);
  713. }
  714. catch (Exception ex)
  715. {
  716. if (ex is ExceptionEx)
  717. {
  718. throw;
  719. }
  720. else
  721. {
  722. throw ExceptionEx.ThrowBusinessException(ex);
  723. }
  724. }
  725. }
  726. public (bool, string) IsPhoto(string stuId, bool status, string fileGuid)
  727. {
  728. try
  729. {
  730. return stuEnrollService.IsPhoto(stuId, status, fileGuid);
  731. }
  732. catch (Exception ex)
  733. {
  734. if (ex is ExceptionEx)
  735. {
  736. throw;
  737. }
  738. else
  739. {
  740. throw ExceptionEx.ThrowBusinessException(ex);
  741. }
  742. }
  743. }
  744. public (bool, string) GetCloth(string stuId, bool status)
  745. {
  746. try
  747. {
  748. return stuEnrollService.GetCloth(stuId, status);
  749. }
  750. catch (Exception ex)
  751. {
  752. if (ex is ExceptionEx)
  753. {
  754. throw;
  755. }
  756. else
  757. {
  758. throw ExceptionEx.ThrowBusinessException(ex);
  759. }
  760. }
  761. }
  762. public (bool, string) GetClothSize(string stuId, bool status)
  763. {
  764. try
  765. {
  766. return stuEnrollService.GetClothSize(stuId, status);
  767. }
  768. catch (Exception ex)
  769. {
  770. if (ex is ExceptionEx)
  771. {
  772. throw;
  773. }
  774. else
  775. {
  776. throw ExceptionEx.ThrowBusinessException(ex);
  777. }
  778. }
  779. }
  780. public (bool, string) GetArticles(string stuId, bool status)
  781. {
  782. try
  783. {
  784. return stuEnrollService.GetArticles(stuId, status);
  785. }
  786. catch (Exception ex)
  787. {
  788. if (ex is ExceptionEx)
  789. {
  790. throw;
  791. }
  792. else
  793. {
  794. throw ExceptionEx.ThrowBusinessException(ex);
  795. }
  796. }
  797. }
  798. public void GetMoney()
  799. {
  800. try
  801. {
  802. stuEnrollService.GetMoney();
  803. }
  804. catch (Exception ex)
  805. {
  806. if (ex is ExceptionEx)
  807. {
  808. throw;
  809. }
  810. else
  811. {
  812. throw ExceptionEx.ThrowBusinessException(ex);
  813. }
  814. }
  815. }
  816. public void RelationPhoto()
  817. {
  818. try
  819. {
  820. stuEnrollService.RelationPhoto();
  821. }
  822. catch (Exception ex)
  823. {
  824. if (ex is ExceptionEx)
  825. {
  826. throw;
  827. }
  828. else
  829. {
  830. throw ExceptionEx.ThrowBusinessException(ex);
  831. }
  832. }
  833. }
  834. public void Synchronization()
  835. {
  836. try
  837. {
  838. stuEnrollService.Synchronization();
  839. }
  840. catch (Exception ex)
  841. {
  842. if (ex is ExceptionEx)
  843. {
  844. throw;
  845. }
  846. else
  847. {
  848. throw ExceptionEx.ThrowBusinessException(ex);
  849. }
  850. }
  851. }
  852. #endregion
  853. }
  854. }