From 4818ee0ba1a1d12a3bb5bc9730cc5372d608059f Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 10 Dec 2021 09:25:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=80=83=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Department/DepartmentBLL.cs | 1 - .../Views/ArrangeExamTermNew/Index.js | 2 +- .../Views/ArrangeExamTermNew/IndexItem.js | 4 +- .../XmlConfig/system.config | 2 + .../ArrangeExamTermItemNewMap.cs | 28 +++ .../Learun.Application.Mapping.csproj | 1 + .../ArrangeExamTerm/ArrangeExamTermService.cs | 9 +- .../ArrangeExamTermItemNewBLL.cs | 148 +++++++++++ .../ArrangeExamTermItemNewEntity.cs | 139 +++++++++++ .../ArrangeExamTermItemNewIBLL.cs | 55 ++++ .../ArrangeExamTermItemNewService.cs | 235 ++++++++++++++++++ .../ArrangeExamTermNewBLL.cs | 2 +- .../ArrangeExamTermNewEntity.cs | 6 + .../ArrangeExamTermNewIBLL.cs | 2 +- .../ArrangeExamTermNewService.cs | 21 +- .../Learun.Application.TwoDevelopment.csproj | 4 + 16 files changed, 635 insertions(+), 24 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs index 10b20d45f..9f2fffe98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs @@ -39,7 +39,6 @@ namespace Learun.Application.Organization if (list == null) { list = (List)departmentService.GetList(companyId); - cache.Write>(cacheKey + companyId, list, CacheId.department); } return list; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js index 77b1e2e27..351bbb26f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js @@ -82,7 +82,7 @@ var bootstrap = function ($, learun) { text: 'text' }); //课程 - $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonid', text: 'lessonname' }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js index 8c0494fc1..7ddfc218e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js @@ -78,8 +78,8 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, { label: '学期', name: 'Semester', width: 80, align: "left" }, - { label: '考试开始时间', name: 'StartDate', width: 100, align: "left" }, - { label: '考试结束时间', name: 'EndDate', width: 100, align: "left" }, + { label: '考试日期', name: 'ExamDate', width: 100, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 100, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '监考教师编号', name: 'EmpNo', width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 7da28dc63..799393964 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -130,6 +130,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs new file mode 100644 index 000000000..d5bc86e8d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs @@ -0,0 +1,28 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 14:27 + /// 描 述:排考明细 + /// + public class ArrangeExamTermItemNewMap : EntityTypeConfiguration + { + public ArrangeExamTermItemNewMap() + { + #region 表、主键 + //表 + this.ToTable("ARRANGEEXAMTERMITEMNEW"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} \ No newline at end of file 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 7832cd268..e366181a5 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 @@ -67,6 +67,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs index fb70f684b..55a82339a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs @@ -190,6 +190,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 + /// + /// 2021新排考接口 + /// + /// + /// public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) { bool result = false; @@ -207,7 +212,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var lessonData = this.BaseRepository("CollegeMIS").FindList().ToList(); HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}"); httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); - var apiData = await Client.PostAsync(Config.GetValue("ArrangeExamAPINew"), httpContent).Result.Content.ReadAsStringAsync(); + var apiData = await Client.PostAsync(Config.GetValue("ArrangeExamAPINew"), httpContent).Result.Content.ReadAsStringAsync(); + //明细接口 + Client.PostAsync(Config.GetValue("ArrangeExamItemAPINew"), httpContent); if (!string.IsNullOrEmpty(apiData)) { var data = JsonConvert.DeserializeObject(apiData); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs new file mode 100644 index 000000000..798b43b91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs @@ -0,0 +1,148 @@ +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 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewBLL : ArrangeExamTermItemNewIBLL + { + private ArrangeExamTermItemNewService arrangeExamTermItemNewService = new ArrangeExamTermItemNewService(); + + #region 获取数据 + + /// +         /// 获取列表数据 +         /// +         /// 查询参数 +         /// + public IEnumerable GetList(string queryJson) + { + try + { + return arrangeExamTermItemNewService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 获取列表分页数据 +         /// +         /// 分页参数 +         /// 查询参数 +         /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermItemNewService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 获取实体数据 +         /// +         /// 主键 +         /// + public ArrangeExamTermItemNewEntity GetEntity(string keyValue) + { + try + { + return arrangeExamTermItemNewService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// +         /// 删除实体数据 +         /// +         /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + arrangeExamTermItemNewService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 保存实体数据(新增、修改) +         /// +         /// 主键 +         /// 实体 + public void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity) + { + try + { + arrangeExamTermItemNewService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs new file mode 100644 index 000000000..fcae8ff0b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs @@ -0,0 +1,139 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// +     /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 +     /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewEntity + { + #region 实体成员 + /// +         /// Id +         /// +         /// + [Column("ID")] + public string Id { get; set; } + /// +         /// AcademicYearNo +         /// +         /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// +         /// Semester +         /// +         /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// +         /// ExamDate +         /// +         /// + [Column("EXAMDATE")] + public DateTime? ExamDate { get; set; } + /// +         /// ExamTime +         /// +         /// + [Column("EXAMTIME")] + public string ExamTime { get; set; } + /// +         /// ClassNo +         /// +         /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// +         /// ClassName +         /// +         /// + [Column("CLASSNAME")] + public string ClassName { get; set; } + /// +         /// LessonNo +         /// +         /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// +         /// LessonName +         /// +         /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// +         /// EmpNo +         /// +         /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// +         /// EmpName +         /// +         /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// +         /// ClassRoomNo +         /// +         /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// +         /// ClassRoomName +         /// +         /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// +         /// F_SchoolId +         /// +         /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + /// +         /// SitNumber +         /// +         /// + [Column("SITNUMBER")] + public string SitNumber { get; set; } + /// +         /// StuNo +         /// +         /// + [Column("STUNO")] + public string StuNo { get; set; } + /// +         /// StuName +         /// +         /// + [Column("STUNAME")] + public string StuName { get; set; } + #endregion + + #region 扩展操作 + /// +         /// 新增调用 +         /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// +         /// 编辑调用 +         /// +         /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs new file mode 100644 index 000000000..bd8f19f4e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 14:27 + /// 描 述:排考明细 + /// + public interface ArrangeExamTermItemNewIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + ArrangeExamTermItemNewEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity); + #endregion + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs new file mode 100644 index 000000000..8462c44c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs @@ -0,0 +1,235 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// +     /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 +     /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// +         /// 构造方法 +         /// + public ArrangeExamTermItemNewService() + { + fieldSql = @" +                t.Id, +                t.AcademicYearNo, +                t.Semester, +                t.ExamDate, +                t.ExamTime, +                t.ClassNo, +                t.ClassName, +                t.LessonNo, +                t.LessonName, +                t.EmpNo, +                t.EmpName, +                t.ClassRoomNo, +                t.ClassRoomName, +                t.F_SchoolId, +                t.SitNumber, +                t.StuNo, +                t.StuName +            "; + } + #endregion + + #region 获取数据 + + /// +         /// 获取列表数据 +         /// +         /// 条件参数 +         /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermItemNew t "); + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 获取列表分页数据 +         /// +         /// 分页参数 +         /// 条件参数 +         /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermItemNew t where 1=1 "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo='" + queryParam["EmpNo"].ToString() + "' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["StartTime"].ToString() + "' ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),null,pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 获取实体数据 +         /// +         /// 主键 +         /// + public ArrangeExamTermItemNewEntity 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 + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 保存实体数据(新增、修改) +         /// 主键 +         /// 实体 +         /// + public void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity 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 + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs index d355186c1..d49c077fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs @@ -67,7 +67,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) { try { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs index f8dc0b35c..9601c6899 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs @@ -102,11 +102,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 座位编号 /// + [NotMapped] public string SitNumber { get; set; } + [NotMapped] public string StuNo { get; set; } + [NotMapped] public string StuName { get; set; } + [NotMapped] public string StartDate { get; set; } + [NotMapped] public string EndDate { get; set; } + [NotMapped] public string Teacher { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs index 03d5d3c69..1c9e13cb4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs @@ -28,7 +28,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); - IEnumerable GetItemPageList(Pagination pagination, string queryJson); + IEnumerable GetItemPageList(Pagination pagination, string queryJson); /// /// 获取实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs index a98c3c567..25b2afeab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs @@ -78,7 +78,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(fieldSql); - strSql.Append(" FROM ArrangeExamTermNew t "); + strSql.Append(" FROM ArrangeExamTermNew t where 1=1 "); var queryParam = queryJson.ToJObject(); var dp = new DynamicParameters(new { }); if (!queryParam["AcademicYearNo"].IsEmpty()) @@ -137,7 +137,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// /// - public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) { try { @@ -180,21 +180,8 @@ where a.student is not null and a.currid is not null) t where 1=1 "); { strSql.Append(" AND ( StartDate >= '" + queryParam["StartTime"].ToString() + "' AND StartDate <= '" + queryParam["StartTime"].ToString() + "' ) "); } - - var teacherlist = BaseRepository("paikeDbString").FindList("select name,id,number from tb_teacher"); - var list= this.BaseRepository("paikeDbString").FindList(strSql.ToString(), null, pagination); - foreach (var item in list) - { - if (!string.IsNullOrEmpty(item.Teacher)) - { - foreach (var teacheritem in item.Teacher.Split(',')) - { - item.EmpNo +=teacherlist.FirstOrDefault(m=>m.id==teacheritem)?.number +","; - item.EmpName += teacherlist.FirstOrDefault(m => m.id == teacheritem)?.name + ","; - } - } - } - return list; + + return this.BaseRepository("paikeDbString").FindList(strSql.ToString(), null, pagination); } catch (Exception ex) { 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 e63556a18..18945acac 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 @@ -91,6 +91,10 @@ + + + +