diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs new file mode 100644 index 000000000..655e67029 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-12 15:47 + /// 描 述:考试课程表 + /// + public class Exam_ExamPlanRoomDetailMap : EntityTypeConfiguration + { + public Exam_ExamPlanRoomDetailMap() + { + #region 表、主键 + //表 + this.ToTable("Exam_ExamPlanRoomDetail"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 87f819316..2711f50ec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -85,6 +85,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailBLL.cs new file mode 100644 index 000000000..c4c6c2432 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailBLL.cs @@ -0,0 +1,145 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public class Exam_ExamPlanRoomDetaiBLL : Exam_ExamPlanRoomDetailIBLL + { + private Exam_ExamPlanRoomDetailService exam_ExamPlanRoomService = new Exam_ExamPlanRoomDetailService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return exam_ExamPlanRoomService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetList(string queryJson) + { + try + { + return exam_ExamPlanRoomService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public Exam_ExamPlanRoomDetailEntity GetEntity(string keyValue) + { + try + { + return exam_ExamPlanRoomService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + exam_ExamPlanRoomService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Exam_ExamPlanRoomDetailEntity entity) + { + try + { + exam_ExamPlanRoomService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailEntity.cs new file mode 100644 index 000000000..2891d183e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailEntity.cs @@ -0,0 +1,132 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 18:12 + /// 描 述:排考安排考场表 + /// + public class Exam_ExamPlanRoomDetailEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("ID")] + public string ID { get; set; } + /// + /// ClassRoomNo + /// + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// ECEmpNo + /// + /// + [Column("ECEMPNO")] + public string ECEmpNo { get; set; } + /// + /// ECEmpName + /// + /// + [Column("ECEMPNAME")] + public string ECEmpName { get; set; } + /// + /// AcademicYearNo + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// EPRId + /// + /// + [Column("Semester")] + public string Semester { get; set; } + /// + /// StuNo + /// + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// Grade + /// + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// DeptNo + /// + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// ECOrder + /// + /// + [Column("ECORDER")] + public int? ECOrder { get; set; } + /// + /// ECEnabled + /// + /// + [Column("ECENABLED")] + public string ECEnabled { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + /// + /// 考试日期 + /// + [NotMapped] + public DateTime? ExamDate { get; set; } + /// + /// 考试时间 + /// + [NotMapped] + public string ExamTime { get; set; } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailIBLL.cs new file mode 100644 index 000000000..2530861be --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailIBLL.cs @@ -0,0 +1,52 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public interface Exam_ExamPlanRoomDetailIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + IEnumerable GetList(string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + Exam_ExamPlanRoomDetailEntity GetEntity(string keyValue); + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Exam_ExamPlanRoomDetailEntity entity); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailService.cs new file mode 100644 index 000000000..1f6443949 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoomDetail/Exam_ExamPlanRoomDetailService.cs @@ -0,0 +1,207 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public class Exam_ExamPlanRoomDetailService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Exam_ExamPlanRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EPLId"].IsEmpty()) + { + dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); + strSql.Append(" AND t.EPLId = @EPLId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Exam_ExamPlanRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EPLId"].IsEmpty()) + { + dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); + strSql.Append(" AND t.EPLId = @EPLId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Exam_ExamPlanLesson表实体数据 + /// + /// 主键 + /// + public Exam_ExamPlanRoomDetailEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + var entity = new Exam_ExamPlanRoomEntity(); + if (keyValue.Contains(",")) + { + entity = this.BaseRepository("CollegeMIS").FindEntity((keyValue.Split(','))[0]); + + keyValue = string.Join("','", keyValue.Split(',')); + } + else + { + entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + + string sql = $"delete from Exam_ExamPlanRoom where EPRId in ('{keyValue}')"; + + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Exam_ExamPlanRoomDetailEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// 自动生成班级有多少个座位 + /// 开始考试后/考试安排以后不可编辑班级座位 + /// + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 8ed737ba9..5af051acf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -183,6 +183,10 @@ + + + +