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.
 
 
 
 
 
 

497 lines
13 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 StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
  168. {
  169. try
  170. {
  171. return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
  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. /// <summary>
  186. /// 获取左侧树形数据
  187. /// <summary>
  188. /// <returns></returns>
  189. public List<TreeModel> GetTree()
  190. {
  191. try
  192. {
  193. DataTable list = stuInfoBasicService.GetSqlTree();
  194. List<TreeModel> treeList = new List<TreeModel>();
  195. foreach (DataRow item in list.Rows)
  196. {
  197. TreeModel node = new TreeModel
  198. {
  199. id = item["classno"].ToString(),
  200. text = item["classname"].ToString(),
  201. value = item["classno"].ToString(),
  202. showcheck = false,
  203. checkstate = 0,
  204. isexpand = true,
  205. parentId = ""
  206. };
  207. treeList.Add(node);
  208. }
  209. return treeList.ToTree();
  210. }
  211. catch (Exception ex)
  212. {
  213. if (ex is ExceptionEx)
  214. {
  215. throw;
  216. }
  217. else
  218. {
  219. throw ExceptionEx.ThrowBusinessException(ex);
  220. }
  221. }
  222. }
  223. #endregion
  224. #region 提交数据
  225. /// <summary>
  226. /// 生成教师帐号
  227. /// </summary>
  228. public void GenerateAccout()
  229. {
  230. try
  231. {
  232. stuInfoBasicService.GenerateAccout();
  233. }
  234. catch (Exception ex)
  235. {
  236. if (ex is ExceptionEx)
  237. {
  238. throw;
  239. }
  240. else
  241. {
  242. throw ExceptionEx.ThrowBusinessException(ex);
  243. }
  244. }
  245. }
  246. public bool GetAny()
  247. {
  248. try
  249. {
  250. return stuInfoBasicService.GetAny();
  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 IEnumerable<StuInfoBasicEntity> GetAllList()
  265. {
  266. try
  267. {
  268. return stuInfoBasicService.GetAllList();
  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 IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo)
  283. {
  284. try
  285. {
  286. return stuInfoBasicService.GetStuInfoByClassNo(classNo);
  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 void UpdateAccount()
  301. {
  302. try
  303. {
  304. stuInfoBasicService.UpdateAccount();
  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. /// <summary>
  319. /// 删除实体数据
  320. /// <param name="keyValue">主键</param>
  321. /// <summary>
  322. /// <returns></returns>
  323. public void DeleteEntity(string keyValue)
  324. {
  325. try
  326. {
  327. stuInfoBasicService.DeleteEntity(keyValue);
  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. /// <summary>
  342. /// 领取毕业证
  343. /// <param name="keyValue">主键</param>
  344. /// <summary>
  345. /// <returns></returns>
  346. public void GetCard(string keyValue)
  347. {
  348. try
  349. {
  350. stuInfoBasicService.GetCard(keyValue);
  351. }
  352. catch (Exception ex)
  353. {
  354. if (ex is ExceptionEx)
  355. {
  356. throw;
  357. }
  358. else
  359. {
  360. throw ExceptionEx.ThrowBusinessException(ex);
  361. }
  362. }
  363. }
  364. /// <summary>
  365. /// 毕业生归档
  366. /// <param name="keyValue">主键</param>
  367. /// <summary>
  368. /// <returns></returns>
  369. public void StuStore()
  370. {
  371. try
  372. {
  373. stuInfoBasicService.StuStore();
  374. }
  375. catch (Exception ex)
  376. {
  377. if (ex is ExceptionEx)
  378. {
  379. throw;
  380. }
  381. else
  382. {
  383. throw ExceptionEx.ThrowBusinessException(ex);
  384. }
  385. }
  386. }
  387. /// <summary>
  388. /// 审核全部
  389. /// </summary>
  390. public void CheckAll()
  391. {
  392. try
  393. {
  394. stuInfoBasicService.CheckAll();
  395. }
  396. catch (Exception ex)
  397. {
  398. if (ex is ExceptionEx)
  399. {
  400. throw;
  401. }
  402. else
  403. {
  404. throw ExceptionEx.ThrowBusinessException(ex);
  405. }
  406. }
  407. }
  408. /// <summary>
  409. /// 准许毕业
  410. /// </summary>
  411. public void AllowGraduate(string stuNo,string status)
  412. {
  413. try
  414. {
  415. stuInfoBasicService.AllowGraduate(stuNo,status);
  416. }
  417. catch (Exception ex)
  418. {
  419. if (ex is ExceptionEx)
  420. {
  421. throw;
  422. }
  423. else
  424. {
  425. throw ExceptionEx.ThrowBusinessException(ex);
  426. }
  427. }
  428. }
  429. public void SynPhoto()
  430. {
  431. try
  432. {
  433. stuInfoBasicService.SynPhoto();
  434. }
  435. catch (Exception ex)
  436. {
  437. if (ex is ExceptionEx)
  438. {
  439. throw;
  440. }
  441. else
  442. {
  443. throw ExceptionEx.ThrowBusinessException(ex);
  444. }
  445. }
  446. }
  447. /// <summary>
  448. /// 保存实体数据(新增、修改)
  449. /// <param name="keyValue">主键</param>
  450. /// <summary>
  451. /// <returns></returns>
  452. public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
  453. {
  454. try
  455. {
  456. stuInfoBasicService.SaveEntity(keyValue, entity);
  457. }
  458. catch (Exception ex)
  459. {
  460. if (ex is ExceptionEx)
  461. {
  462. throw;
  463. }
  464. else
  465. {
  466. throw ExceptionEx.ThrowBusinessException(ex);
  467. }
  468. }
  469. }
  470. #endregion
  471. }
  472. }