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.
 
 
 
 
 
 

915 lines
25 KiB

  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-08-08 17:21
  13. /// 描 述:新生信息管理
  14. /// </summary>
  15. public class StuInfoFreshBLL : StuInfoFreshIBLL
  16. {
  17. private StuInfoFreshService stuInfoFreshService = new StuInfoFreshService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 获取列表数据
  21. /// <summary>
  22. /// <returns></returns>
  23. public IEnumerable<StuInfoFreshEntity> GetList(string queryJson)
  24. {
  25. try
  26. {
  27. return stuInfoFreshService.GetList(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. /// 获取列表数据
  43. /// <summary>
  44. /// <returns></returns>
  45. public IEnumerable<StuInfoFreshEntity> GetList2(string queryJson)
  46. {
  47. try
  48. {
  49. return stuInfoFreshService.GetList2(queryJson);
  50. }
  51. catch (Exception ex)
  52. {
  53. if (ex is ExceptionEx)
  54. {
  55. throw;
  56. }
  57. else
  58. {
  59. throw ExceptionEx.ThrowBusinessException(ex);
  60. }
  61. }
  62. }
  63. /// <summary>
  64. /// 获取列表分页数据
  65. /// <param name="pagination">分页参数</param>
  66. /// <summary>
  67. /// <returns></returns>
  68. public IEnumerable<StuInfoFreshEntity> GetPageList(Pagination pagination, string queryJson)
  69. {
  70. try
  71. {
  72. return stuInfoFreshService.GetPageList(pagination, queryJson);
  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. /// 获取StuInfoFreshFamily表数据
  88. /// <summary>
  89. /// <returns></returns>
  90. public IEnumerable<StuInfoFreshFamilyEntity> GetStuInfoFreshFamilyList(string keyValue)
  91. {
  92. try
  93. {
  94. return stuInfoFreshService.GetStuInfoFreshFamilyList(keyValue);
  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. /// 获取StuInfoFreshEmergePeople表数据
  110. /// <summary>
  111. /// <returns></returns>
  112. public IEnumerable<StuInfoFreshEmergePeopleEntity> GetStuInfoFreshEmergePeopleList(string keyValue)
  113. {
  114. try
  115. {
  116. return stuInfoFreshService.GetStuInfoFreshEmergePeopleList(keyValue);
  117. }
  118. catch (Exception ex)
  119. {
  120. if (ex is ExceptionEx)
  121. {
  122. throw;
  123. }
  124. else
  125. {
  126. throw ExceptionEx.ThrowBusinessException(ex);
  127. }
  128. }
  129. }
  130. /// <summary>
  131. /// 获取StuInfoFresh表实体数据
  132. /// <param name="keyValue">主键</param>
  133. /// <summary>
  134. /// <returns></returns>
  135. public StuInfoFreshEntity GetStuInfoFreshEntity(string keyValue)
  136. {
  137. try
  138. {
  139. return stuInfoFreshService.GetStuInfoFreshEntity(keyValue);
  140. }
  141. catch (Exception ex)
  142. {
  143. if (ex is ExceptionEx)
  144. {
  145. throw;
  146. }
  147. else
  148. {
  149. throw ExceptionEx.ThrowBusinessException(ex);
  150. }
  151. }
  152. }
  153. /// <summary>
  154. /// 获取StuInfoFresh表实体数据
  155. /// <param name="keyValue">主键</param>
  156. /// <summary>
  157. /// <returns></returns>
  158. public StuInfoFreshEntity GetStuInfoFreshEntityByStuNo(string stuNo)
  159. {
  160. try
  161. {
  162. return stuInfoFreshService.GetStuInfoFreshEntityByStuNo(stuNo);
  163. }
  164. catch (Exception ex)
  165. {
  166. if (ex is ExceptionEx)
  167. {
  168. throw;
  169. }
  170. else
  171. {
  172. throw ExceptionEx.ThrowBusinessException(ex);
  173. }
  174. }
  175. }
  176. /// <summary>
  177. /// 获取StuInfoFreshEmergePeople表实体数据
  178. /// <param name="keyValue">主键</param>
  179. /// <summary>
  180. /// <returns></returns>
  181. public StuInfoFreshEmergePeopleEntity GetStuInfoFreshEmergePeopleEntity(string keyValue)
  182. {
  183. try
  184. {
  185. return stuInfoFreshService.GetStuInfoFreshEmergePeopleEntity(keyValue);
  186. }
  187. catch (Exception ex)
  188. {
  189. if (ex is ExceptionEx)
  190. {
  191. throw;
  192. }
  193. else
  194. {
  195. throw ExceptionEx.ThrowBusinessException(ex);
  196. }
  197. }
  198. }
  199. /// <summary>
  200. /// 获取StuInfoFreshFamily表实体数据
  201. /// <param name="keyValue">主键</param>
  202. /// <summary>
  203. /// <returns></returns>
  204. public StuInfoFreshFamilyEntity GetStuInfoFreshFamilyEntity(string keyValue)
  205. {
  206. try
  207. {
  208. return stuInfoFreshService.GetStuInfoFreshFamilyEntity(keyValue);
  209. }
  210. catch (Exception ex)
  211. {
  212. if (ex is ExceptionEx)
  213. {
  214. throw;
  215. }
  216. else
  217. {
  218. throw ExceptionEx.ThrowBusinessException(ex);
  219. }
  220. }
  221. }
  222. /// <summary>
  223. /// 获取列表分页数据
  224. /// <param name="pagination">分页参数</param>
  225. /// <summary>
  226. /// <returns></returns>
  227. public IEnumerable<StuInfoFreshEntity> GetStuInfoFreshListByClassNo(string classNo)
  228. {
  229. try
  230. {
  231. return stuInfoFreshService.GetStuInfoFreshListByClassNo(classNo);
  232. }
  233. catch (Exception ex)
  234. {
  235. if (ex is ExceptionEx)
  236. {
  237. throw;
  238. }
  239. else
  240. {
  241. throw ExceptionEx.ThrowBusinessException(ex);
  242. }
  243. }
  244. }
  245. /// <summary>
  246. /// 获取分配宿舍列表
  247. /// </summary>
  248. /// <param name="pagination"></param>
  249. /// <param name="queryJson"></param>
  250. /// <returns></returns>
  251. public IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson)
  252. {
  253. try
  254. {
  255. return stuInfoFreshService.GetDormitorys(pagination, queryJson);
  256. }
  257. catch (Exception ex)
  258. {
  259. if (ex is ExceptionEx)
  260. {
  261. throw;
  262. }
  263. else
  264. {
  265. throw ExceptionEx.ThrowBusinessException(ex);
  266. }
  267. }
  268. }
  269. /// <summary>
  270. /// 获取分配宿舍列表
  271. /// </summary>
  272. /// <param name="pagination"></param>
  273. /// <param name="queryJson"></param>
  274. /// <returns></returns>
  275. public IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys2(Pagination pagination, string queryJson)
  276. {
  277. try
  278. {
  279. return stuInfoFreshService.GetDormitorys2(pagination, queryJson);
  280. }
  281. catch (Exception ex)
  282. {
  283. if (ex is ExceptionEx)
  284. {
  285. throw;
  286. }
  287. else
  288. {
  289. throw ExceptionEx.ThrowBusinessException(ex);
  290. }
  291. }
  292. }
  293. /// <summary>
  294. /// 获取分配宿舍树
  295. /// </summary>
  296. /// <returns></returns>
  297. public List<TreeModel> GetTree()
  298. {
  299. try
  300. {
  301. var data = stuInfoFreshService.GetTree();
  302. List<TreeModel> treeList = new List<TreeModel>();
  303. foreach (var item in data)
  304. {
  305. TreeModel node = new TreeModel
  306. {
  307. id = item.Item3,
  308. text = $"{item.Item4}(男{item.Item1},女{item.Item2})",
  309. value = item.Item3,
  310. showcheck = false,
  311. checkstate = 0,
  312. isexpand = false,
  313. parentId = ""
  314. };
  315. treeList.Add(node);
  316. }
  317. return treeList.ToTree();
  318. }
  319. catch (Exception ex)
  320. {
  321. if (ex is ExceptionEx)
  322. {
  323. throw;
  324. }
  325. else
  326. {
  327. throw ExceptionEx.ThrowBusinessException(ex);
  328. }
  329. }
  330. }
  331. //获取分配床位树
  332. public List<TreeModel> GetBedTree(string classNo, string gender)
  333. {
  334. try
  335. {
  336. var data = stuInfoFreshService.GetBedTree(classNo, gender);
  337. List<TreeModel> treeList = new List<TreeModel>();
  338. foreach (var item in data)
  339. {
  340. TreeModel node = new TreeModel
  341. {
  342. id = item.ID,
  343. text = item.Name,
  344. value = item.ID,
  345. showcheck = false,
  346. checkstate = 0,
  347. isexpand = false,
  348. parentId = item.ParentID == null ? "" : item.ParentID
  349. };
  350. treeList.Add(node);
  351. }
  352. return treeList.ToTree();
  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. #endregion
  367. #region 提交数据
  368. /// <summary>
  369. /// 删除实体数据
  370. /// <param name="keyValue">主键</param>
  371. /// <summary>
  372. /// <returns></returns>
  373. public void DeleteEntity(string keyValue)
  374. {
  375. try
  376. {
  377. stuInfoFreshService.DeleteEntity(keyValue);
  378. }
  379. catch (Exception ex)
  380. {
  381. if (ex is ExceptionEx)
  382. {
  383. throw;
  384. }
  385. else
  386. {
  387. throw ExceptionEx.ThrowBusinessException(ex);
  388. }
  389. }
  390. }
  391. /// <summary>
  392. /// 保存实体数据(新增、修改)
  393. /// <param name="keyValue">主键</param>
  394. /// <summary>
  395. /// <returns></returns>
  396. public void SaveEntity(string keyValue, StuInfoFreshEntity entity, List<StuInfoFreshEmergePeopleEntity> stuInfoFreshEmergePeopleList, List<StuInfoFreshFamilyEntity> stuInfoFreshFamilyList)
  397. {
  398. try
  399. {
  400. stuInfoFreshService.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList);
  401. }
  402. catch (Exception ex)
  403. {
  404. if (ex is ExceptionEx)
  405. {
  406. throw;
  407. }
  408. else
  409. {
  410. throw ExceptionEx.ThrowBusinessException(ex);
  411. }
  412. }
  413. }
  414. /// <summary>
  415. /// 保存实体数据(新增、修改)
  416. /// <param name="keyValue">主键</param>
  417. /// <summary>
  418. /// <returns></returns>
  419. public void SaveEntity(string keyValue, StuInfoFreshEntity entity)
  420. {
  421. try
  422. {
  423. stuInfoFreshService.SaveEntity(keyValue, entity);
  424. }
  425. catch (Exception ex)
  426. {
  427. if (ex is ExceptionEx)
  428. {
  429. throw;
  430. }
  431. else
  432. {
  433. throw ExceptionEx.ThrowBusinessException(ex);
  434. }
  435. }
  436. }
  437. #endregion
  438. #region 扩展数据
  439. /// <summary>
  440. /// 确认报到、取消报到
  441. /// <param name="keyValue">主键</param>
  442. /// <summary>
  443. /// <returns></returns>
  444. public void IsRegister(string keyValue, string status)
  445. {
  446. try
  447. {
  448. stuInfoFreshService.IsRegister(keyValue, status);
  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. /// <param name="keyValue">主键</param>
  465. /// <summary>
  466. /// <returns></returns>
  467. public void IsCollectFile(string keyValue, string status)
  468. {
  469. try
  470. {
  471. stuInfoFreshService.IsCollectFile(keyValue, status);
  472. }
  473. catch (Exception ex)
  474. {
  475. if (ex is ExceptionEx)
  476. {
  477. throw;
  478. }
  479. else
  480. {
  481. throw ExceptionEx.ThrowBusinessException(ex);
  482. }
  483. }
  484. }
  485. /// <summary>
  486. /// 领取钥匙
  487. /// <param name="keyValue">主键</param>
  488. /// <summary>
  489. /// <returns></returns>
  490. public void IsGetKey(string keyValue, string status)
  491. {
  492. try
  493. {
  494. stuInfoFreshService.IsGetKey(keyValue, status);
  495. }
  496. catch (Exception ex)
  497. {
  498. if (ex is ExceptionEx)
  499. {
  500. throw;
  501. }
  502. else
  503. {
  504. throw ExceptionEx.ThrowBusinessException(ex);
  505. }
  506. }
  507. }
  508. /// <summary>
  509. /// 领取校园卡
  510. /// <param name="keyValue">主键</param>
  511. /// <summary>
  512. /// <returns></returns>
  513. public void IsGetCard(string keyValue, string status)
  514. {
  515. try
  516. {
  517. stuInfoFreshService.IsGetCard(keyValue, status);
  518. }
  519. catch (Exception ex)
  520. {
  521. if (ex is ExceptionEx)
  522. {
  523. throw;
  524. }
  525. else
  526. {
  527. throw ExceptionEx.ThrowBusinessException(ex);
  528. }
  529. }
  530. }
  531. /// <summary>
  532. /// 缴费
  533. /// <param name="keyValue">主键</param>
  534. /// <summary>
  535. /// <returns></returns>
  536. public void IsPayFee(string keyValue, string status)
  537. {
  538. try
  539. {
  540. stuInfoFreshService.IsPayFee(keyValue, status);
  541. }
  542. catch (Exception ex)
  543. {
  544. if (ex is ExceptionEx)
  545. {
  546. throw;
  547. }
  548. else
  549. {
  550. throw ExceptionEx.ThrowBusinessException(ex);
  551. }
  552. }
  553. }
  554. /// <summary>
  555. /// 其他费用缴费
  556. /// <param name="keyValue">主键</param>
  557. /// <summary>
  558. /// <returns></returns>
  559. public void IsOtherPayFee(string keyValue, string status)
  560. {
  561. try
  562. {
  563. stuInfoFreshService.IsOtherPayFee(keyValue, status);
  564. }
  565. catch (Exception ex)
  566. {
  567. if (ex is ExceptionEx)
  568. {
  569. throw;
  570. }
  571. else
  572. {
  573. throw ExceptionEx.ThrowBusinessException(ex);
  574. }
  575. }
  576. }
  577. /// <summary>
  578. /// 审核助学贷款
  579. /// <param name="keyValue">主键</param>
  580. /// <summary>
  581. /// <returns></returns>
  582. public void DoCheckLoan(string keyValue, string status)
  583. {
  584. try
  585. {
  586. stuInfoFreshService.DoCheckLoan(keyValue, status);
  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. /// <summary>
  601. /// 分配班级
  602. /// <param name="keyValue">主键</param>
  603. /// <summary>
  604. /// <returns></returns>
  605. public void DoAllocationClass(List<StuInfoFreshEntity> stuInfoFreshEntities)
  606. {
  607. try
  608. {
  609. stuInfoFreshService.DoAllocationClass(stuInfoFreshEntities);
  610. }
  611. catch (Exception ex)
  612. {
  613. if (ex is ExceptionEx)
  614. {
  615. throw;
  616. }
  617. else
  618. {
  619. throw ExceptionEx.ThrowBusinessException(ex);
  620. }
  621. }
  622. }
  623. /// <summary>
  624. /// 分配宿舍
  625. /// <param name="keyValue">主键</param>
  626. /// <summary>
  627. /// <returns></returns>
  628. public void DoAllocationDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  629. {
  630. try
  631. {
  632. stuInfoFreshService.DoAllocationDormitory(acc_DormitoryBuildEntities);
  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 ImportDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  652. {
  653. try
  654. {
  655. stuInfoFreshService.ImportDormitory(acc_DormitoryBuildEntities);
  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. /// <param name="keyValue">主键</param>
  672. /// <summary>
  673. /// <returns></returns>
  674. public void CancelAllocationDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  675. {
  676. try
  677. {
  678. stuInfoFreshService.CancelAllocationDormitory(acc_DormitoryBuildEntities);
  679. }
  680. catch (Exception ex)
  681. {
  682. if (ex is ExceptionEx)
  683. {
  684. throw;
  685. }
  686. else
  687. {
  688. throw ExceptionEx.ThrowBusinessException(ex);
  689. }
  690. }
  691. }
  692. /// <summary>
  693. /// 分配床位
  694. /// </summary>
  695. /// <param name="dormitoryNo"></param>
  696. /// <param name="stuId"></param>
  697. /// <param name="dormitoryName"></param>
  698. public void DoAllocationBed(string dormitoryNo, string keyValue)
  699. {
  700. try
  701. {
  702. stuInfoFreshService.DoAllocationBed(dormitoryNo, keyValue);
  703. }
  704. catch (Exception ex)
  705. {
  706. if (ex is ExceptionEx)
  707. {
  708. throw;
  709. }
  710. else
  711. {
  712. throw ExceptionEx.ThrowBusinessException(ex);
  713. }
  714. }
  715. }
  716. /// <summary>
  717. /// 自动分配床位
  718. /// </summary>
  719. /// <param name="classNo">班级编号</param>
  720. /// <param name="stuId"></param>
  721. /// <param name="dormitoryName"></param>
  722. public void DoAllocationBedOfAuto(string classNo)
  723. {
  724. try
  725. {
  726. stuInfoFreshService.DoAllocationBedOfAuto(classNo);
  727. }
  728. catch (Exception ex)
  729. {
  730. if (ex is ExceptionEx)
  731. {
  732. throw;
  733. }
  734. else
  735. {
  736. throw ExceptionEx.ThrowBusinessException(ex);
  737. }
  738. }
  739. }
  740. public void ConfirmDormitory()
  741. {
  742. try
  743. {
  744. stuInfoFreshService.ConfirmDormitory();
  745. }
  746. catch (Exception ex)
  747. {
  748. if (ex is ExceptionEx)
  749. {
  750. throw;
  751. }
  752. else
  753. {
  754. throw ExceptionEx.ThrowBusinessException(ex);
  755. }
  756. }
  757. }
  758. public void ConfirmDormitoryTwo()
  759. {
  760. try
  761. {
  762. stuInfoFreshService.ConfirmDormitoryTwo();
  763. }
  764. catch (Exception ex)
  765. {
  766. if (ex is ExceptionEx)
  767. {
  768. throw;
  769. }
  770. else
  771. {
  772. throw ExceptionEx.ThrowBusinessException(ex);
  773. }
  774. }
  775. }
  776. public void GetUniform(string keyValue, bool Status)
  777. {
  778. try
  779. {
  780. stuInfoFreshService.GetUniform(keyValue, Status);
  781. }
  782. catch (Exception ex)
  783. {
  784. if (ex is ExceptionEx)
  785. {
  786. throw;
  787. }
  788. else
  789. {
  790. throw ExceptionEx.ThrowBusinessException(ex);
  791. }
  792. }
  793. }
  794. public void PayUniform(string keyValue, bool Status)
  795. {
  796. try
  797. {
  798. stuInfoFreshService.PayUniform(keyValue, Status);
  799. }
  800. catch (Exception ex)
  801. {
  802. if (ex is ExceptionEx)
  803. {
  804. throw;
  805. }
  806. else
  807. {
  808. throw ExceptionEx.ThrowBusinessException(ex);
  809. }
  810. }
  811. }
  812. /// <summary>
  813. /// 导入学籍信息
  814. /// </summary>
  815. public void ImportStuInfoBasic()
  816. {
  817. try
  818. {
  819. stuInfoFreshService.ImportStuInfoBasic();
  820. }
  821. catch (Exception ex)
  822. {
  823. if (ex is ExceptionEx)
  824. {
  825. throw;
  826. }
  827. else
  828. {
  829. throw ExceptionEx.ThrowBusinessException(ex);
  830. }
  831. }
  832. }
  833. /// <summary>
  834. /// 删除宿舍信息
  835. /// </summary>
  836. public void DeleteBed(string keyValue)
  837. {
  838. try
  839. {
  840. stuInfoFreshService.DeleteBed(keyValue);
  841. }
  842. catch (Exception ex)
  843. {
  844. if (ex is ExceptionEx)
  845. {
  846. throw;
  847. }
  848. else
  849. {
  850. throw ExceptionEx.ThrowBusinessException(ex);
  851. }
  852. }
  853. }
  854. #endregion
  855. #region 上传图片
  856. public (bool, string) IsPhoto(string stuId, bool status, string fileGuid)
  857. {
  858. try
  859. {
  860. return stuInfoFreshService.IsPhoto(stuId, status, fileGuid);
  861. }
  862. catch (Exception ex)
  863. {
  864. if (ex is ExceptionEx)
  865. {
  866. throw;
  867. }
  868. else
  869. {
  870. throw ExceptionEx.ThrowBusinessException(ex);
  871. }
  872. }
  873. }
  874. #endregion
  875. }
  876. }