|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571 |
- 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
-
- }
- }
|