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.
 
 
 
 
 
 

933 lines
26 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. public StuInfoFreshEntity Getksh(string ksh)
  246. {
  247. try
  248. {
  249. return stuInfoFreshService.Getksh(ksh);
  250. }
  251. catch (Exception ex)
  252. {
  253. if (ex is ExceptionEx)
  254. {
  255. throw;
  256. }
  257. else
  258. {
  259. throw ExceptionEx.ThrowBusinessException(ex);
  260. }
  261. }
  262. }
  263. /// <summary>
  264. /// 获取分配宿舍列表
  265. /// </summary>
  266. /// <param name="pagination"></param>
  267. /// <param name="queryJson"></param>
  268. /// <returns></returns>
  269. public IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson)
  270. {
  271. try
  272. {
  273. return stuInfoFreshService.GetDormitorys(pagination, queryJson);
  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. /// <summary>
  288. /// 获取分配宿舍列表
  289. /// </summary>
  290. /// <param name="pagination"></param>
  291. /// <param name="queryJson"></param>
  292. /// <returns></returns>
  293. public IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys2(Pagination pagination, string queryJson)
  294. {
  295. try
  296. {
  297. return stuInfoFreshService.GetDormitorys2(pagination, queryJson);
  298. }
  299. catch (Exception ex)
  300. {
  301. if (ex is ExceptionEx)
  302. {
  303. throw;
  304. }
  305. else
  306. {
  307. throw ExceptionEx.ThrowBusinessException(ex);
  308. }
  309. }
  310. }
  311. /// <summary>
  312. /// 获取分配宿舍树
  313. /// </summary>
  314. /// <returns></returns>
  315. public List<TreeModel> GetTree()
  316. {
  317. try
  318. {
  319. var data = stuInfoFreshService.GetTree();
  320. List<TreeModel> treeList = new List<TreeModel>();
  321. foreach (var item in data)
  322. {
  323. TreeModel node = new TreeModel
  324. {
  325. id = item.Item3,
  326. text = $"{item.Item4}(男{item.Item1},女{item.Item2})",
  327. value = item.Item3,
  328. showcheck = false,
  329. checkstate = 0,
  330. isexpand = false,
  331. parentId = ""
  332. };
  333. treeList.Add(node);
  334. }
  335. return treeList.ToTree();
  336. }
  337. catch (Exception ex)
  338. {
  339. if (ex is ExceptionEx)
  340. {
  341. throw;
  342. }
  343. else
  344. {
  345. throw ExceptionEx.ThrowBusinessException(ex);
  346. }
  347. }
  348. }
  349. //获取分配床位树
  350. public List<TreeModel> GetBedTree(string classNo, string gender)
  351. {
  352. try
  353. {
  354. var data = stuInfoFreshService.GetBedTree(classNo, gender);
  355. List<TreeModel> treeList = new List<TreeModel>();
  356. foreach (var item in data)
  357. {
  358. TreeModel node = new TreeModel
  359. {
  360. id = item.ID,
  361. text = item.Name,
  362. value = item.ID,
  363. showcheck = false,
  364. checkstate = 0,
  365. isexpand = false,
  366. parentId = item.ParentID == null ? "" : item.ParentID
  367. };
  368. treeList.Add(node);
  369. }
  370. return treeList.ToTree();
  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. #endregion
  385. #region 提交数据
  386. /// <summary>
  387. /// 删除实体数据
  388. /// <param name="keyValue">主键</param>
  389. /// <summary>
  390. /// <returns></returns>
  391. public void DeleteEntity(string keyValue)
  392. {
  393. try
  394. {
  395. stuInfoFreshService.DeleteEntity(keyValue);
  396. }
  397. catch (Exception ex)
  398. {
  399. if (ex is ExceptionEx)
  400. {
  401. throw;
  402. }
  403. else
  404. {
  405. throw ExceptionEx.ThrowBusinessException(ex);
  406. }
  407. }
  408. }
  409. /// <summary>
  410. /// 保存实体数据(新增、修改)
  411. /// <param name="keyValue">主键</param>
  412. /// <summary>
  413. /// <returns></returns>
  414. public void SaveEntity(string keyValue, StuInfoFreshEntity entity, List<StuInfoFreshEmergePeopleEntity> stuInfoFreshEmergePeopleList, List<StuInfoFreshFamilyEntity> stuInfoFreshFamilyList)
  415. {
  416. try
  417. {
  418. stuInfoFreshService.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList);
  419. }
  420. catch (Exception ex)
  421. {
  422. if (ex is ExceptionEx)
  423. {
  424. throw;
  425. }
  426. else
  427. {
  428. throw ExceptionEx.ThrowBusinessException(ex);
  429. }
  430. }
  431. }
  432. /// <summary>
  433. /// 保存实体数据(新增、修改)
  434. /// <param name="keyValue">主键</param>
  435. /// <summary>
  436. /// <returns></returns>
  437. public void SaveEntity(string keyValue, StuInfoFreshEntity entity)
  438. {
  439. try
  440. {
  441. stuInfoFreshService.SaveEntity(keyValue, entity);
  442. }
  443. catch (Exception ex)
  444. {
  445. if (ex is ExceptionEx)
  446. {
  447. throw;
  448. }
  449. else
  450. {
  451. throw ExceptionEx.ThrowBusinessException(ex);
  452. }
  453. }
  454. }
  455. #endregion
  456. #region 扩展数据
  457. /// <summary>
  458. /// 确认报到、取消报到
  459. /// <param name="keyValue">主键</param>
  460. /// <summary>
  461. /// <returns></returns>
  462. public void IsRegister(string keyValue, string status)
  463. {
  464. try
  465. {
  466. stuInfoFreshService.IsRegister(keyValue, status);
  467. }
  468. catch (Exception ex)
  469. {
  470. if (ex is ExceptionEx)
  471. {
  472. throw;
  473. }
  474. else
  475. {
  476. throw ExceptionEx.ThrowBusinessException(ex);
  477. }
  478. }
  479. }
  480. /// <summary>
  481. /// 收取学生档案
  482. /// <param name="keyValue">主键</param>
  483. /// <summary>
  484. /// <returns></returns>
  485. public void IsCollectFile(string keyValue, string status)
  486. {
  487. try
  488. {
  489. stuInfoFreshService.IsCollectFile(keyValue, status);
  490. }
  491. catch (Exception ex)
  492. {
  493. if (ex is ExceptionEx)
  494. {
  495. throw;
  496. }
  497. else
  498. {
  499. throw ExceptionEx.ThrowBusinessException(ex);
  500. }
  501. }
  502. }
  503. /// <summary>
  504. /// 领取钥匙
  505. /// <param name="keyValue">主键</param>
  506. /// <summary>
  507. /// <returns></returns>
  508. public void IsGetKey(string keyValue, string status)
  509. {
  510. try
  511. {
  512. stuInfoFreshService.IsGetKey(keyValue, status);
  513. }
  514. catch (Exception ex)
  515. {
  516. if (ex is ExceptionEx)
  517. {
  518. throw;
  519. }
  520. else
  521. {
  522. throw ExceptionEx.ThrowBusinessException(ex);
  523. }
  524. }
  525. }
  526. /// <summary>
  527. /// 领取校园卡
  528. /// <param name="keyValue">主键</param>
  529. /// <summary>
  530. /// <returns></returns>
  531. public void IsGetCard(string keyValue, string status)
  532. {
  533. try
  534. {
  535. stuInfoFreshService.IsGetCard(keyValue, status);
  536. }
  537. catch (Exception ex)
  538. {
  539. if (ex is ExceptionEx)
  540. {
  541. throw;
  542. }
  543. else
  544. {
  545. throw ExceptionEx.ThrowBusinessException(ex);
  546. }
  547. }
  548. }
  549. /// <summary>
  550. /// 缴费
  551. /// <param name="keyValue">主键</param>
  552. /// <summary>
  553. /// <returns></returns>
  554. public void IsPayFee(string keyValue, string status)
  555. {
  556. try
  557. {
  558. stuInfoFreshService.IsPayFee(keyValue, status);
  559. }
  560. catch (Exception ex)
  561. {
  562. if (ex is ExceptionEx)
  563. {
  564. throw;
  565. }
  566. else
  567. {
  568. throw ExceptionEx.ThrowBusinessException(ex);
  569. }
  570. }
  571. }
  572. /// <summary>
  573. /// 其他费用缴费
  574. /// <param name="keyValue">主键</param>
  575. /// <summary>
  576. /// <returns></returns>
  577. public void IsOtherPayFee(string keyValue, string status)
  578. {
  579. try
  580. {
  581. stuInfoFreshService.IsOtherPayFee(keyValue, status);
  582. }
  583. catch (Exception ex)
  584. {
  585. if (ex is ExceptionEx)
  586. {
  587. throw;
  588. }
  589. else
  590. {
  591. throw ExceptionEx.ThrowBusinessException(ex);
  592. }
  593. }
  594. }
  595. /// <summary>
  596. /// 审核助学贷款
  597. /// <param name="keyValue">主键</param>
  598. /// <summary>
  599. /// <returns></returns>
  600. public void DoCheckLoan(string keyValue, string status)
  601. {
  602. try
  603. {
  604. stuInfoFreshService.DoCheckLoan(keyValue, status);
  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. /// <summary>
  619. /// 分配班级
  620. /// <param name="keyValue">主键</param>
  621. /// <summary>
  622. /// <returns></returns>
  623. public void DoAllocationClass(List<StuInfoFreshEntity> stuInfoFreshEntities)
  624. {
  625. try
  626. {
  627. stuInfoFreshService.DoAllocationClass(stuInfoFreshEntities);
  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. /// <param name="keyValue">主键</param>
  644. /// <summary>
  645. /// <returns></returns>
  646. public void DoAllocationDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  647. {
  648. try
  649. {
  650. stuInfoFreshService.DoAllocationDormitory(acc_DormitoryBuildEntities);
  651. }
  652. catch (Exception ex)
  653. {
  654. if (ex is ExceptionEx)
  655. {
  656. throw;
  657. }
  658. else
  659. {
  660. throw ExceptionEx.ThrowBusinessException(ex);
  661. }
  662. }
  663. }
  664. /// <summary>
  665. /// 导入宿舍
  666. /// <param name="keyValue">主键</param>
  667. /// <summary>
  668. /// <returns></returns>
  669. public void ImportDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  670. {
  671. try
  672. {
  673. stuInfoFreshService.ImportDormitory(acc_DormitoryBuildEntities);
  674. }
  675. catch (Exception ex)
  676. {
  677. if (ex is ExceptionEx)
  678. {
  679. throw;
  680. }
  681. else
  682. {
  683. throw ExceptionEx.ThrowBusinessException(ex);
  684. }
  685. }
  686. }
  687. /// <summary>
  688. /// 取消分配宿舍
  689. /// <param name="keyValue">主键</param>
  690. /// <summary>
  691. /// <returns></returns>
  692. public void CancelAllocationDormitory(List<Acc_DormitoryBuildEntity> acc_DormitoryBuildEntities)
  693. {
  694. try
  695. {
  696. stuInfoFreshService.CancelAllocationDormitory(acc_DormitoryBuildEntities);
  697. }
  698. catch (Exception ex)
  699. {
  700. if (ex is ExceptionEx)
  701. {
  702. throw;
  703. }
  704. else
  705. {
  706. throw ExceptionEx.ThrowBusinessException(ex);
  707. }
  708. }
  709. }
  710. /// <summary>
  711. /// 分配床位
  712. /// </summary>
  713. /// <param name="dormitoryNo"></param>
  714. /// <param name="stuId"></param>
  715. /// <param name="dormitoryName"></param>
  716. public void DoAllocationBed(string dormitoryNo, string keyValue)
  717. {
  718. try
  719. {
  720. stuInfoFreshService.DoAllocationBed(dormitoryNo, keyValue);
  721. }
  722. catch (Exception ex)
  723. {
  724. if (ex is ExceptionEx)
  725. {
  726. throw;
  727. }
  728. else
  729. {
  730. throw ExceptionEx.ThrowBusinessException(ex);
  731. }
  732. }
  733. }
  734. /// <summary>
  735. /// 自动分配床位
  736. /// </summary>
  737. /// <param name="classNo">班级编号</param>
  738. /// <param name="stuId"></param>
  739. /// <param name="dormitoryName"></param>
  740. public void DoAllocationBedOfAuto(string classNo)
  741. {
  742. try
  743. {
  744. stuInfoFreshService.DoAllocationBedOfAuto(classNo);
  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 ConfirmDormitory()
  759. {
  760. try
  761. {
  762. stuInfoFreshService.ConfirmDormitory();
  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 ConfirmDormitoryTwo()
  777. {
  778. try
  779. {
  780. stuInfoFreshService.ConfirmDormitoryTwo();
  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 GetUniform(string keyValue, bool Status)
  795. {
  796. try
  797. {
  798. stuInfoFreshService.GetUniform(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. public void PayUniform(string keyValue, bool Status)
  813. {
  814. try
  815. {
  816. stuInfoFreshService.PayUniform(keyValue, Status);
  817. }
  818. catch (Exception ex)
  819. {
  820. if (ex is ExceptionEx)
  821. {
  822. throw;
  823. }
  824. else
  825. {
  826. throw ExceptionEx.ThrowBusinessException(ex);
  827. }
  828. }
  829. }
  830. /// <summary>
  831. /// 导入学籍信息
  832. /// </summary>
  833. public void ImportStuInfoBasic()
  834. {
  835. try
  836. {
  837. stuInfoFreshService.ImportStuInfoBasic();
  838. }
  839. catch (Exception ex)
  840. {
  841. if (ex is ExceptionEx)
  842. {
  843. throw;
  844. }
  845. else
  846. {
  847. throw ExceptionEx.ThrowBusinessException(ex);
  848. }
  849. }
  850. }
  851. /// <summary>
  852. /// 删除宿舍信息
  853. /// </summary>
  854. public void DeleteBed(string keyValue)
  855. {
  856. try
  857. {
  858. stuInfoFreshService.DeleteBed(keyValue);
  859. }
  860. catch (Exception ex)
  861. {
  862. if (ex is ExceptionEx)
  863. {
  864. throw;
  865. }
  866. else
  867. {
  868. throw ExceptionEx.ThrowBusinessException(ex);
  869. }
  870. }
  871. }
  872. #endregion
  873. #region 上传图片
  874. public (bool, string) IsPhoto(string stuId, bool status, string fileGuid)
  875. {
  876. try
  877. {
  878. return stuInfoFreshService.IsPhoto(stuId, status, fileGuid);
  879. }
  880. catch (Exception ex)
  881. {
  882. if (ex is ExceptionEx)
  883. {
  884. throw;
  885. }
  886. else
  887. {
  888. throw ExceptionEx.ThrowBusinessException(ex);
  889. }
  890. }
  891. }
  892. #endregion
  893. }
  894. }