|
- using Learun.Util;
- using System;
- using System.Data;
- using System.Collections.Generic;
-
- namespace Learun.Application.TwoDevelopment.EducationalAdministration
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-02-21 16:53
- /// 描 述:学生学籍
- /// </summary>
- public class StuInfoBasicBLL : StuInfoBasicIBLL
- {
- private StuInfoBasicService stuInfoBasicService = new StuInfoBasicService();
-
- #region 获取数据
-
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- public IEnumerable<StuInfoBasicEntity> GetPageList(Pagination pagination, string queryJson)
- {
- try
- {
- return stuInfoBasicService.GetPageList(pagination, queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 获取StuInfoBasic表实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue)
- {
- try
- {
- return stuInfoBasicService.GetStuInfoBasicEntity(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 获取准许毕业学生的专业
- /// <summary>
- /// <returns></returns>
- public List<CdMajorEntity> GetMajorInfoWithGraduation()
- {
- try
- {
- return stuInfoBasicService.GetMajorInfoWithGraduation();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 根据专业顺序生成毕业证号
- /// <summary>
- /// <returns></returns>
- public void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList)
- {
- try
- {
- stuInfoBasicService.CreateGraduateNoByMajor(CityCode,SchoolCode,MajorList);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 获取StuInfoBasic表实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public StuInfoBasicEntity GetStuNoByAccount(string keyValue)
- {
- try
- {
- return stuInfoBasicService.GetStuNoByAccount(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public List<string> GetSaveClassStudents(string account)
- {
- try
- {
- return stuInfoBasicService.GetSaveClassStudents(account);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
-
- public StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode)
- {
- try
- {
- return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public string GetPhotoByStuNo(string enCode)
- {
- try
- {
- return stuInfoBasicService.GetPhotoByStuNo(enCode);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
- {
- try
- {
- return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
-
- /// <summary>
- /// 获取左侧树形数据
- /// <summary>
- /// <returns></returns>
- public List<TreeModel> GetTree()
- {
- try
- {
- DataTable list = stuInfoBasicService.GetSqlTree();
- List<TreeModel> treeList = new List<TreeModel>();
- foreach (DataRow item in list.Rows)
- {
- TreeModel node = new TreeModel
- {
- id = item["classno"].ToString(),
- text = item["classname"].ToString(),
- value = item["classno"].ToString(),
- showcheck = false,
- checkstate = 0,
- isexpand = true,
- parentId = ""
- };
- treeList.Add(node);
- }
- return treeList.ToTree();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public StuInfoBasicEntity GetStuInfoBasicEntityByIdCard(string idcard)
- {
- try
- {
- return stuInfoBasicService.GetStuInfoBasicEntityByIdCard(idcard);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
-
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 生成教师帐号
- /// </summary>
- public void GenerateAccout()
- {
- try
- {
- stuInfoBasicService.GenerateAccout();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public bool GetAny()
- {
- try
- {
- return stuInfoBasicService.GetAny();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public IEnumerable<StuInfoBasicEntity> GetAllList()
- {
- try
- {
- return stuInfoBasicService.GetAllList();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo)
- {
- try
- {
- return stuInfoBasicService.GetStuInfoByClassNo(classNo);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public void SyncDept()
- {
- try
- {
- stuInfoBasicService.SyncDept();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public void SyncMajor()
- {
- try
- {
- stuInfoBasicService.SyncMajor();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public void UpdateAccount()
- {
- try
- {
- stuInfoBasicService.UpdateAccount();
-
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public void DeleteEntity(string keyValue)
- {
- try
- {
- stuInfoBasicService.DeleteEntity(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 领取毕业证
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public void GetCard(string keyValue)
- {
- try
- {
- stuInfoBasicService.GetCard(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 毕业生归档
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public void StuStore()
- {
- try
- {
- stuInfoBasicService.StuStore();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 审核全部
- /// </summary>
- public void CheckAll()
- {
- try
- {
- stuInfoBasicService.CheckAll();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 准许毕业
- /// </summary>
- public void AllowGraduate(string stuNo,string status)
- {
- try
- {
- stuInfoBasicService.AllowGraduate(stuNo,status);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public void SynPhoto()
- {
- try
- {
- stuInfoBasicService.SynPhoto();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
- {
- try
- {
- stuInfoBasicService.SaveEntity(keyValue, entity);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
-
- }
- }
|