@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomDetailMap : EntityTypeConfiguration<Exam_ExamPlanRoomDetailEntity> | |||
{ | |||
public Exam_ExamPlanRoomDetailMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("Exam_ExamPlanRoomDetail"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -85,6 +85,7 @@ | |||
<Compile Include="EducationalAdministration\ExamSubjectMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomDetailMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClassMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLessonMap.cs" /> | |||
@@ -0,0 +1,145 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomDetaiBLL : Exam_ExamPlanRoomDetailIBLL | |||
{ | |||
private Exam_ExamPlanRoomDetailService exam_ExamPlanRoomService = new Exam_ExamPlanRoomDetailService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomDetailEntity> 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<Exam_ExamPlanRoomDetailEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanRoomService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
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 | |||
} | |||
} |
@@ -0,0 +1,132 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 18:12 | |||
/// 描 述:排考安排考场表 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomDetailEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// ID | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// ClassRoomNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSROOMNO")] | |||
public string ClassRoomNo { get; set; } | |||
/// <summary> | |||
/// ClassRoomName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassRoomName { get; set; } | |||
/// <summary> | |||
/// ECEmpNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ECEMPNO")] | |||
public string ECEmpNo { get; set; } | |||
/// <summary> | |||
/// ECEmpName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ECEMPNAME")] | |||
public string ECEmpName { get; set; } | |||
/// <summary> | |||
/// AcademicYearNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// EPRId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("Semester")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// StuNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// Grade | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// MajorNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// ClassNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// ECOrder | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ECORDER")] | |||
public int? ECOrder { get; set; } | |||
/// <summary> | |||
/// ECEnabled | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ECENABLED")] | |||
public string ECEnabled { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.ID = keyValue; | |||
} | |||
#endregion | |||
/// <summary> | |||
/// 考试日期 | |||
/// </summary> | |||
[NotMapped] | |||
public DateTime? ExamDate { get; set; } | |||
/// <summary> | |||
/// 考试时间 | |||
/// </summary> | |||
[NotMapped] | |||
public string ExamTime { get; set; } | |||
} | |||
} | |||
@@ -0,0 +1,52 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public interface Exam_ExamPlanRoomDetailIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ExamPlanRoomDetailEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ExamPlanRoomDetailEntity> GetList(string queryJson); | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ExamPlanRoomDetailEntity GetEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamPlanRoomDetailEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomDetailService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomDetailEntity> 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<Exam_ExamPlanRoomDetailEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomDetailEntity> 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<Exam_ExamPlanRoomDetailEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ExamPlanLesson表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamPlanRoomDetailEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomDetailEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = new Exam_ExamPlanRoomEntity(); | |||
if (keyValue.Contains(",")) | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>((keyValue.Split(','))[0]); | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
else | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>(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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
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 | |||
} | |||
} |
@@ -183,6 +183,10 @@ | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomDetail\Exam_ExamPlanRoomDetailBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomDetail\Exam_ExamPlanRoomDetailEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomDetail\Exam_ExamPlanRoomDetailIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomDetail\Exam_ExamPlanRoomDetailService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomIBLL.cs" /> | |||