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.
 
 
 
 
 
 

572 lines
15 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 StuInfoBasicEntity GetStuNoByAccount(string keyValue)
  114. {
  115. try
  116. {
  117. return stuInfoBasicService.GetStuNoByAccount(keyValue);
  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. public List<string> GetSaveClassStudents(string account)
  132. {
  133. try
  134. {
  135. return stuInfoBasicService.GetSaveClassStudents(account);
  136. }
  137. catch (Exception ex)
  138. {
  139. if (ex is ExceptionEx)
  140. {
  141. throw;
  142. }
  143. else
  144. {
  145. throw ExceptionEx.ThrowBusinessException(ex);
  146. }
  147. }
  148. }
  149. public StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode)
  150. {
  151. try
  152. {
  153. return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
  154. }
  155. catch (Exception ex)
  156. {
  157. if (ex is ExceptionEx)
  158. {
  159. throw;
  160. }
  161. else
  162. {
  163. throw ExceptionEx.ThrowBusinessException(ex);
  164. }
  165. }
  166. }
  167. public string GetPhotoByStuNo(string enCode)
  168. {
  169. try
  170. {
  171. return stuInfoBasicService.GetPhotoByStuNo(enCode);
  172. }
  173. catch (Exception ex)
  174. {
  175. if (ex is ExceptionEx)
  176. {
  177. throw;
  178. }
  179. else
  180. {
  181. throw ExceptionEx.ThrowBusinessException(ex);
  182. }
  183. }
  184. }
  185. public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
  186. {
  187. try
  188. {
  189. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  190. }
  191. catch (Exception ex)
  192. {
  193. if (ex is ExceptionEx)
  194. {
  195. throw;
  196. }
  197. else
  198. {
  199. throw ExceptionEx.ThrowBusinessException(ex);
  200. }
  201. }
  202. }
  203. /// <summary>
  204. /// 获取左侧树形数据
  205. /// <summary>
  206. /// <returns></returns>
  207. public List<TreeModel> GetTree()
  208. {
  209. try
  210. {
  211. DataTable list = stuInfoBasicService.GetSqlTree();
  212. List<TreeModel> treeList = new List<TreeModel>();
  213. foreach (DataRow item in list.Rows)
  214. {
  215. TreeModel node = new TreeModel
  216. {
  217. id = item["classno"].ToString(),
  218. text = item["classname"].ToString(),
  219. value = item["classno"].ToString(),
  220. showcheck = false,
  221. checkstate = 0,
  222. isexpand = true,
  223. parentId = ""
  224. };
  225. treeList.Add(node);
  226. }
  227. return treeList.ToTree();
  228. }
  229. catch (Exception ex)
  230. {
  231. if (ex is ExceptionEx)
  232. {
  233. throw;
  234. }
  235. else
  236. {
  237. throw ExceptionEx.ThrowBusinessException(ex);
  238. }
  239. }
  240. }
  241. public StuInfoBasicEntity GetStuInfoBasicEntityByIdCard(string idcard)
  242. {
  243. try
  244. {
  245. return stuInfoBasicService.GetStuInfoBasicEntityByIdCard(idcard);
  246. }
  247. catch (Exception ex)
  248. {
  249. if (ex is ExceptionEx)
  250. {
  251. throw;
  252. }
  253. else
  254. {
  255. throw ExceptionEx.ThrowBusinessException(ex);
  256. }
  257. }
  258. }
  259. #endregion
  260. #region 提交数据
  261. /// <summary>
  262. /// 生成教师帐号
  263. /// </summary>
  264. public void GenerateAccout()
  265. {
  266. try
  267. {
  268. stuInfoBasicService.GenerateAccout();
  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. public bool GetAny()
  283. {
  284. try
  285. {
  286. return stuInfoBasicService.GetAny();
  287. }
  288. catch (Exception ex)
  289. {
  290. if (ex is ExceptionEx)
  291. {
  292. throw;
  293. }
  294. else
  295. {
  296. throw ExceptionEx.ThrowBusinessException(ex);
  297. }
  298. }
  299. }
  300. public IEnumerable<StuInfoBasicEntity> GetAllList()
  301. {
  302. try
  303. {
  304. return stuInfoBasicService.GetAllList();
  305. }
  306. catch (Exception ex)
  307. {
  308. if (ex is ExceptionEx)
  309. {
  310. throw;
  311. }
  312. else
  313. {
  314. throw ExceptionEx.ThrowBusinessException(ex);
  315. }
  316. }
  317. }
  318. public IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo)
  319. {
  320. try
  321. {
  322. return stuInfoBasicService.GetStuInfoByClassNo(classNo);
  323. }
  324. catch (Exception ex)
  325. {
  326. if (ex is ExceptionEx)
  327. {
  328. throw;
  329. }
  330. else
  331. {
  332. throw ExceptionEx.ThrowBusinessException(ex);
  333. }
  334. }
  335. }
  336. public void SyncDept()
  337. {
  338. try
  339. {
  340. stuInfoBasicService.SyncDept();
  341. }
  342. catch (Exception ex)
  343. {
  344. if (ex is ExceptionEx)
  345. {
  346. throw;
  347. }
  348. else
  349. {
  350. throw ExceptionEx.ThrowBusinessException(ex);
  351. }
  352. }
  353. }
  354. public void SyncMajor()
  355. {
  356. try
  357. {
  358. stuInfoBasicService.SyncMajor();
  359. }
  360. catch (Exception ex)
  361. {
  362. if (ex is ExceptionEx)
  363. {
  364. throw;
  365. }
  366. else
  367. {
  368. throw ExceptionEx.ThrowBusinessException(ex);
  369. }
  370. }
  371. }
  372. public void UpdateAccount()
  373. {
  374. try
  375. {
  376. stuInfoBasicService.UpdateAccount();
  377. }
  378. catch (Exception ex)
  379. {
  380. if (ex is ExceptionEx)
  381. {
  382. throw;
  383. }
  384. else
  385. {
  386. throw ExceptionEx.ThrowBusinessException(ex);
  387. }
  388. }
  389. }
  390. /// <summary>
  391. /// 删除实体数据
  392. /// <param name="keyValue">主键</param>
  393. /// <summary>
  394. /// <returns></returns>
  395. public void DeleteEntity(string keyValue)
  396. {
  397. try
  398. {
  399. stuInfoBasicService.DeleteEntity(keyValue);
  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 GetCard(string keyValue)
  419. {
  420. try
  421. {
  422. stuInfoBasicService.GetCard(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 StuStore()
  442. {
  443. try
  444. {
  445. stuInfoBasicService.StuStore();
  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. /// </summary>
  462. public void CheckAll()
  463. {
  464. try
  465. {
  466. stuInfoBasicService.CheckAll();
  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. /// </summary>
  483. public void AllowGraduate(string stuNo,string status)
  484. {
  485. try
  486. {
  487. stuInfoBasicService.AllowGraduate(stuNo,status);
  488. }
  489. catch (Exception ex)
  490. {
  491. if (ex is ExceptionEx)
  492. {
  493. throw;
  494. }
  495. else
  496. {
  497. throw ExceptionEx.ThrowBusinessException(ex);
  498. }
  499. }
  500. }
  501. public void SynPhoto()
  502. {
  503. try
  504. {
  505. stuInfoBasicService.SynPhoto();
  506. }
  507. catch (Exception ex)
  508. {
  509. if (ex is ExceptionEx)
  510. {
  511. throw;
  512. }
  513. else
  514. {
  515. throw ExceptionEx.ThrowBusinessException(ex);
  516. }
  517. }
  518. }
  519. /// <summary>
  520. /// 保存实体数据(新增、修改)
  521. /// <param name="keyValue">主键</param>
  522. /// <summary>
  523. /// <returns></returns>
  524. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  525. {
  526. try
  527. {
  528. stuInfoBasicService.SaveEntity(keyValue, entity);
  529. }
  530. catch (Exception ex)
  531. {
  532. if (ex is ExceptionEx)
  533. {
  534. throw;
  535. }
  536. else
  537. {
  538. throw ExceptionEx.ThrowBusinessException(ex);
  539. }
  540. }
  541. }
  542. #endregion
  543. }
  544. }