|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598 |
- using Learun.Util;
- using System;
- using System.Data;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using Learun.Application.Organization;
- using static Learun.Application.TwoDevelopment.EducationalAdministration.ArrangeExamTermService;
-
- namespace Learun.Application.TwoDevelopment.EducationalAdministration
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-02-27 11:05
- /// 描 述:排课
- /// </summary>
- public class ArrangeLessonTermBLL : ArrangeLessonTermIBLL
- {
- private ArrangeLessonTermService arrangeLessonTermService = new ArrangeLessonTermService();
-
- #region 获取数据
-
- /// <summary>
- /// 获取列表数据
- /// <summary>
- /// <returns></returns>
- public IEnumerable<ArrangeLessonTermEntity> GetList(string queryJson)
- {
- try
- {
- return arrangeLessonTermService.GetList(queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public IEnumerable<ArrangeLessonTermEntity> GetListForTimeTable(string queryJson)
- {
- try
- {
- return arrangeLessonTermService.GetListForTimeTable(queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 获取列表分页数据
- /// <param name="pagination">分页参数</param>
- /// <summary>
- /// <returns></returns>
- public IEnumerable<ArrangeLessonTermEntity> GetPageList(Pagination pagination, string queryJson)
- {
- try
- {
- return arrangeLessonTermService.GetPageList(pagination, queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 获取实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public ArrangeLessonTermEntity GetEntity(string keyValue)
- {
- try
- {
- return arrangeLessonTermService.GetEntity(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
-
- public IEnumerable<ArrangeLessonTermEntity> GetListByEmpNo(List<string> empNos)
- {
- try
- {
- return arrangeLessonTermService.GetListByEmpNo(empNos);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- public void DeleteEntity(string keyValue)
- {
- try
- {
- arrangeLessonTermService.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 SaveEntity(string keyValue, ArrangeLessonTermEntity entity)
- {
- try
- {
- arrangeLessonTermService.SaveEntity(keyValue, entity);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public IEnumerable<StuInfoBasicEntity> GetStudents()
- {
- try
- {
- return arrangeLessonTermService.GetStudents();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
-
-
-
- /// <summary>
- /// 获取相关课程考勤的学生信息
- /// </summary>
- /// <param name="year"></param>
- /// <param name="semester"></param>
- /// <param name="empno"></param>
- /// <param name="lessonNo"></param>
- /// <param name="teachClassNo"></param>
- /// <returns></returns>
- public IEnumerable<StuSelectLessonListEntity> AttendanceStudents(Pagination pagination, string queryJson)
- {
- var data = arrangeLessonTermService.AttendanceStudents(pagination, queryJson);
- return data;
- }
-
- public IEnumerable<CdMajorEntity> GetMajors(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetMajors(academicYearNo, semester);
- return data;
- }
- public IEnumerable<CdMajorEntity> GetMajorsNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetMajorsNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<ClassroomInfoEntity> GetClassrooms(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetClassrooms(academicYearNo, semester);
- return data;
- }
- public IEnumerable<ClassroomInfoEntity> GetClassroomsNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetClassroomsNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<CdClassTypeEntity> GetClassType()
- {
- var data = arrangeLessonTermService.GetClassType();
- return data;
- }
-
- public IEnumerable<LessonInfoEntity> GetLessons(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetLessons(academicYearNo, semester);
- return data;
- }
- public IEnumerable<LessonInfoEntity> GetLessonsNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetLessonsNotRecord(academicYearNo, semester);
- return data;
- }
- public IEnumerable<CdLessonSortDetailEntity> GetLessonSortDetails()
- {
- var data = arrangeLessonTermService.GetLessonSortDetails();
- return data;
- }
- public IEnumerable<CdLessonSortEntity> GetLessonSorts()
- {
- var data = arrangeLessonTermService.GetLessonSorts();
- return data;
- }
-
- public bool GetAny()
- {
- try
- {
- return arrangeLessonTermService.GetAny();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public IEnumerable<CdDeptEntity> GetDepts(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetDepts(academicYearNo, semester);
- return data;
- }
- public IEnumerable<CdDeptEntity> GetDeptsNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetDeptsNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<CompanyEntity> GetSchools(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetSchools(academicYearNo, semester);
- return data;
- }
- public IEnumerable<CompanyEntity> GetSchoolsNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetSchoolsNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<CdLessonTypeEntity> GetLessonTypes()
- {
- var data = arrangeLessonTermService.GetLessonTypes();
- return data;
- }
- public IEnumerable<ArrangeLessonTermEntity> GetPageListForTeacherWorkload(Pagination paginationobj, string queryJson)
- {
- try
- {
- return arrangeLessonTermService.GetPageListForTeacherWorkload(paginationobj, queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 教学工作量
- /// </summary>
- /// <param name="paginationobj"></param>
- /// <param name="queryJson"></param>
- /// <returns></returns>
- public IEnumerable<ArrangeLessonTermEntity> GetPageListForTeacherWorkloadByEmpNo(Pagination paginationobj, string queryJson, string empNo)
- {
- try
- {
- return arrangeLessonTermService.GetPageListForTeacherWorkloadByEmpNo(paginationobj, queryJson, empNo);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public IEnumerable<TeachClassEntity> GetClassLessons()
- {
- var data = arrangeLessonTermService.GetClassLessons();
- return data;
- }
-
- public IEnumerable<EmpInfoEntity> GetTeachers(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetTeachers(academicYearNo, semester);
- return data;
- }
- public IEnumerable<EmpInfoEntity> GetTeachersNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetTeachersNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<ClassInfoEntity> GetClasses(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetClasses(academicYearNo, semester);
- return data;
- }
- public IEnumerable<ClassInfoEntity> GetClassesNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetClassesNotRecord(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<StuInfoBasicEntity> GetStus(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetStus(academicYearNo, semester);
- return data;
- }
-
- public IEnumerable<StuInfoBasicEntity> GetStusNotRecord(string academicYearNo, string semester)
- {
- var data = arrangeLessonTermService.GetStusNotRecord(academicYearNo, semester);
- return data;
- }
-
- /// <summary>
- /// 课程表
- /// </summary>
- /// <param name="userAccount">账号</param>
- /// <param name="userType">用户类型 学生 教师</param>
- /// <param name="startDate">查询开始时间</param>
- /// <param name="endDate">查询截止时间</param>
- /// <returns></returns>
- public IEnumerable<TimeTable> GetTimeTable(string userAccount, string userType, string startDate, string endDate)
- {
- var data = arrangeLessonTermService.GetTimeTable(userAccount, userType, startDate, endDate);
- return data;
- }
-
- public async Task<bool> AsyncArrangeLessonData()
- {
- var data = await arrangeLessonTermService.AsyncArrangeLessonData();
- return data;
- }
- /// <summary>
- /// 清空当前学期排课数据
- /// </summary>
- /// <returns></returns>
- public async Task<bool> AsyncModifyArrangeLessonData()
- {
- var data = await arrangeLessonTermService.AsyncModifyArrangeLessonData();
- return data;
- }
-
-
- /// <summary>
- /// 按条件清空排课数据
- /// </summary>
- /// <returns></returns>
- public async Task<bool> AsyncModifyArrangeLessonDataByCondition(ArrangeLessonTermEntity entity)
- {
- var data = await arrangeLessonTermService.AsyncModifyArrangeLessonDataByCondition(entity);
- return data;
- }
- /// <summary>
- /// 按条件同步排课数据
- /// </summary>
- /// <returns></returns>
- public async Task<bool> AsyncArrangeLessonDataByCondition(ArrangeLessonTermEntity entity)
- {
- var data = await arrangeLessonTermService.AsyncArrangeLessonDataByCondition(entity);
- return data;
- }
-
-
- /// <summary>
- /// 课程表【教务】
- /// </summary>
- /// <param name="startDate">查询开始时间</param>
- /// <param name="endDate">查询截止时间</param>
- /// <param name="classNo">班级编号</param>
- /// <param name="empNo">教师编号</param>
- /// <param name="classroomNo">教室编号</param>
- /// <returns></returns>
- public IEnumerable<TimeTable> GetTimeTableInEducation(string startDate, string endDate, string classNo, string empNo, string schoolId, string classroomNo)
- {
- try
- {
- return arrangeLessonTermService.GetTimeTableInEducation(startDate, endDate, classNo, empNo, schoolId, classroomNo);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 课程表【教务】--班级下拉框信息
- /// </summary>
- /// <returns></returns>
- public IEnumerable<SelectModel> GetClassData(string schoolId)
- {
- try
- {
- return arrangeLessonTermService.GetClassData(schoolId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 课程表【教务】--教师下拉框信息
- /// </summary>
- /// <param name="startDate"></param>
- /// <returns></returns>
- public IEnumerable<SelectModel> GetTeacherData(string schoolId)
- {
- try
- {
- return arrangeLessonTermService.GetTeacherData(schoolId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 课程表【教务】--教室下拉框信息
- /// </summary>
- /// <returns></returns>
- public IEnumerable<SelectModel> GetClassroomData(string schoolId)
- {
- try
- {
- return arrangeLessonTermService.GetClassroomData(schoolId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 教学调度【教务】--课程下拉框信息
- /// </summary>
- /// <returns></returns>
- public IEnumerable<SelectModel> GetLessonDataInTerm(string queryJson)
- {
- try
- {
- return arrangeLessonTermService.GetLessonDataInTerm(queryJson);
-
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public IEnumerable<TimeTable> GetAllClassLesson(string academicYearNo, string semester)
- {
- try
- {
- return arrangeLessonTermService.GetAllClassLesson(academicYearNo, semester);
-
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public bool InitAsyncDataByCondition(ArrangeLessonTermEntity entity)
- {
- var data = arrangeLessonTermService.InitAsyncDataByCondition(entity);
- return data;
- }
- }
- }
|