using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;
namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-02-21 16:53
/// 描 述:学生学籍
///
public class StuInfoBasicBLL : StuInfoBasicIBLL
{
private StuInfoBasicService stuInfoBasicService = new StuInfoBasicService();
#region 获取数据
///
/// 获取页面显示列表数据
///
/// 查询参数
///
public IEnumerable GetPageList(Pagination pagination, string queryJson)
{
try
{
return stuInfoBasicService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取StuInfoBasic表实体数据
/// 主键
///
///
public StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取准许毕业学生的专业
///
///
public List GetMajorInfoWithGraduation()
{
try
{
return stuInfoBasicService.GetMajorInfoWithGraduation();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 根据专业顺序生成毕业证号
///
///
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);
}
}
}
///
/// 生成毕业证号
/// 主键
///
///
public void DoCreateGraduateNo()
{
try
{
stuInfoBasicService.DoCreateGraduateNo();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取StuInfoBasic表实体数据
/// 主键
///
///
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 GetSaveClassStudents(string account)
{
try
{
return stuInfoBasicService.GetSaveClassStudents(account);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public StuInfoBasicEntity GetIdCard(string Idcard)
{
try
{
return stuInfoBasicService.GetIdCard(Idcard);
}
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 StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public StuInfoBasicEntity GetStuInfoBasicEntityByStuNoOrStuName(string stuno, string stuname)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取左侧树形数据
///
///
public List GetTree()
{
try
{
DataTable list = stuInfoBasicService.GetSqlTree();
List treeList = new List();
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);
}
}
}
#endregion
#region 提交数据
///
/// 生成教师帐号
///
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 GetAllList()
{
try
{
return stuInfoBasicService.GetAllList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable GetAllList(string ChangeType)
{
try
{
return stuInfoBasicService.GetAllList(ChangeType);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable GetStuInfoByClassNo(string classNo)
{
try
{
return stuInfoBasicService.GetStuInfoByClassNo(classNo);
}
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);
}
}
}
public void UpdateState(string keyValue, string state)
{
try
{
stuInfoBasicService.UpdateState(keyValue, state);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 删除实体数据
/// 主键
///
///
public void DeleteEntity(string keyValue)
{
try
{
stuInfoBasicService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 领取毕业证
/// 主键
///
///
public void GetCard(string keyValue, string status, StuInfoBasicEntity entity)
{
try
{
stuInfoBasicService.GetCard(keyValue, status, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else if (ex is ArgumentException)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 图书资料归还
/// 主键
///
///
public void IsReturnBooks(string keyValue, string status)
{
try
{
stuInfoBasicService.IsReturnBooks(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 就业协议备案
/// 主键
///
///
public void IsEmployAgree(string keyValue, string status)
{
try
{
stuInfoBasicService.IsEmployAgree(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 学杂费结算
/// 主键
///
///
public void IsFeeSettle(string keyValue, string status)
{
try
{
stuInfoBasicService.IsFeeSettle(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 办理退住手续
/// 主键
///
///
public void IsCheckOut(string keyValue, string status)
{
try
{
stuInfoBasicService.IsCheckOut(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 校园卡注销
/// 主键
///
///
public void IsCardDeregistrate(string keyValue, string status)
{
try
{
stuInfoBasicService.IsCardDeregistrate(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 档案与组织关系转出
/// 主键
///
///
public void IsFileTransfer(string keyValue, string status, string fort)
{
try
{
stuInfoBasicService.IsFileTransfer(keyValue, status, fort);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 毕业生归档
/// 主键
///
///
public void StuStore(string keyValue)
{
try
{
stuInfoBasicService.StuStore(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 学生毕业归档-设置毕业时间
///
///
public void SaveFinishSchoolDate(DateTime finishDate)
{
try
{
stuInfoBasicService.SaveFinishSchoolDate(finishDate);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 学生毕业流程审核
/// 主键
///
///
public void StuGraduateCheck(string keyValue)
{
try
{
stuInfoBasicService.StuGraduateCheck(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 审核全部
///
public void CheckAll()
{
try
{
stuInfoBasicService.CheckAll();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 准许毕业
///
public void AllowGraduate(string stuNo, string status)
{
try
{
stuInfoBasicService.AllowGraduate(stuNo, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else if (ex is ArgumentException)
{
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);
}
}
}
///
/// 保存实体数据(新增、修改)
/// 主键
///
///
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);
}
}
}
public string StuInfoBasicImport(DataTable dt, string fileId)
{
try
{
return stuInfoBasicService.StuInfoBasicImport(dt, fileId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public int GetCount()
{
try
{
return stuInfoBasicService.GetCount();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public Dictionary GetGenderCount()
{
try
{
return stuInfoBasicService.GetDicCount(1);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public Dictionary GetDeptCount()
{
try
{
return stuInfoBasicService.GetDicCount(2);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}