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
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-02-27 11:05
/// 描 述:排课
///
public class ArrangeLessonTermBLL : ArrangeLessonTermIBLL
{
private ArrangeLessonTermService arrangeLessonTermService = new ArrangeLessonTermService();
#region 获取数据
///
/// 获取列表数据
///
///
public IEnumerable GetList(string queryJson)
{
try
{
return arrangeLessonTermService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取列表分页数据
/// 分页参数
///
///
public IEnumerable GetPageList(Pagination pagination, string queryJson)
{
try
{
return arrangeLessonTermService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取实体数据
/// 主键
///
///
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 GetListByEmpNo(List empNos)
{
try
{
return arrangeLessonTermService.GetListByEmpNo(empNos);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
///
/// 删除实体数据
/// 主键
///
///
public void DeleteEntity(string keyValue)
{
try
{
arrangeLessonTermService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 保存实体数据(新增、修改)
/// 主键
///
///
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 GetStudents()
{
try
{
return arrangeLessonTermService.GetStudents();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
///
/// 获取相关课程考勤的学生信息
///
///
///
///
///
///
///
public IEnumerable AttendanceStudents(Pagination pagination, string queryJson)
{
var data = arrangeLessonTermService.AttendanceStudents(pagination, queryJson);
return data;
}
public IEnumerable GetMajors(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetMajors(academicYearNo, semester);
return data;
}
public IEnumerable GetMajorsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetMajorsNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetClassrooms(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetClassrooms(academicYearNo, semester);
return data;
}
public IEnumerable GetClassroomsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetClassroomsNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetClassType()
{
var data = arrangeLessonTermService.GetClassType();
return data;
}
public IEnumerable GetLessons(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetLessons(academicYearNo, semester);
return data;
}
public IEnumerable GetLessonsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetLessonsNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetLessonSortDetails()
{
var data = arrangeLessonTermService.GetLessonSortDetails();
return data;
}
public IEnumerable 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 GetDepts(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetDepts(academicYearNo, semester);
return data;
}
public IEnumerable GetDeptsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetDeptsNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetSchools(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetSchools(academicYearNo, semester);
return data;
}
public IEnumerable GetSchoolsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetSchoolsNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetLessonTypes()
{
var data = arrangeLessonTermService.GetLessonTypes();
return data;
}
public IEnumerable GetPageListForTeacherWorkload(Pagination paginationobj, string queryJson)
{
try
{
return arrangeLessonTermService.GetPageListForTeacherWorkload(paginationobj, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 教学工作量
///
///
///
///
public IEnumerable 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 GetClassLessons()
{
var data = arrangeLessonTermService.GetClassLessons();
return data;
}
public IEnumerable GetTeachers(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetTeachers(academicYearNo, semester);
return data;
}
public IEnumerable GetTeachersNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetTeachersNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetClasses(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetClasses(academicYearNo, semester);
return data;
}
public IEnumerable GetClassesNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetClassesNotRecord(academicYearNo, semester);
return data;
}
public IEnumerable GetStus(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetStus(academicYearNo, semester);
return data;
}
public IEnumerable GetStusNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetStusNotRecord(academicYearNo, semester);
return data;
}
///
/// 课程表
///
/// 账号
/// 用户类型 学生 教师
/// 查询开始时间
/// 查询截止时间
///
public IEnumerable GetTimeTable(string userAccount, string userType, string startDate, string endDate)
{
var data = arrangeLessonTermService.GetTimeTable(userAccount, userType, startDate, endDate);
return data;
}
public async Task AsyncArrangeLessonData()
{
var data = await arrangeLessonTermService.AsyncArrangeLessonData();
return data;
}
///
/// 清空当前学期排课数据
///
///
public async Task AsyncModifyArrangeLessonData()
{
var data = await arrangeLessonTermService.AsyncModifyArrangeLessonData();
return data;
}
///
/// 按条件清空排课数据
///
///
public async Task AsyncModifyArrangeLessonDataByCondition(ArrangeLessonTermEntity entity)
{
var data = await arrangeLessonTermService.AsyncModifyArrangeLessonDataByCondition(entity);
return data;
}
///
/// 按条件同步排课数据
///
///
public async Task AsyncArrangeLessonDataByCondition(ArrangeLessonTermEntity entity)
{
var data = await arrangeLessonTermService.AsyncArrangeLessonDataByCondition(entity);
return data;
}
///
/// 课程表【教务】
///
/// 查询开始时间
/// 查询截止时间
/// 班级编号
/// 教师编号
///
public IEnumerable GetTimeTableInEducation(string startDate, string endDate, string classNo, string empNo, string schoolId)
{
try
{
return arrangeLessonTermService.GetTimeTableInEducation(startDate, endDate, classNo, empNo, schoolId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 课程表【教务】--班级下拉框信息
///
///
public IEnumerable GetClassData(string schoolId)
{
try
{
return arrangeLessonTermService.GetClassData(schoolId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 课程表【教务】--教师下拉框信息
///
///
///
public IEnumerable GetTeacherData(string schoolId)
{
try
{
return arrangeLessonTermService.GetTeacherData(schoolId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 教学调度【教务】--课程下拉框信息
///
///
public IEnumerable GetLessonDataInTerm(string queryJson)
{
try
{
return arrangeLessonTermService.GetLessonDataInTerm(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable 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;
}
}
}