From 9e879759cf6ea908e2099364a01afdc532d077e7 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Wed, 26 Aug 2020 10:40:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E9=80=89?= =?UTF-8?q?=E8=AF=BE=EF=BC=9A=E4=B8=93=E4=B8=9A=E3=80=81=E5=B9=B4=E7=BA=A7?= =?UTF-8?q?=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenLessonPlanOfElectiveService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index 9f68fac2f..4b2ba21b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status,cp.Status as StatusPre from ElectiveMajor a left join OpenLessonPlanOfElective b on a.OLPOEId=b.Id left join StuSelectLessonListOfElective c on b.Id=c.OLPEId and c.StuNo=@StuNo left join StuSelectLessonListOfElectivePre cp on b.Id=cp.OLPEId and cp.StuNo=@StuNo - where 1=1 "); + where 1=1 and a.MajorId is not null and a.Grade is not null "); //学号 if (!queryParam["StuNo"].IsEmpty()) { @@ -106,18 +106,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("StuMajorNo", queryParam["StuMajorNo"].ToString(), DbType.String); strSql.Append(" and a.MajorId=@StuMajorNo "); } + else + { + strSql.Append(" and a.MajorId='' "); + } if (!queryParam["StuGrade"].IsEmpty()) { dp.Add("StuGrade", queryParam["StuGrade"].ToString(), DbType.String); strSql.Append(" and a.Grade=@StuGrade "); } + else + { + strSql.Append(" and a.Grade='' "); + } //教学工作安排中“选课”工作设置的学年学期 var now = DateTime.Now; var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity(x => x.WorkName == "选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); if (EADateArrangeEntityAboutElective != null) { strSql.Append(" AND b.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and b.Semester='" + EADateArrangeEntityAboutElective?.Semester + "'"); - strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='"+ queryParam["StuNo"].ToString() + "' and Status<>3)"); + strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='" + queryParam["StuNo"].ToString() + "' and Status<>3)"); } else { From 9b607b60a19afb7f91d5a4999d20f313973d75ff Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 26 Aug 2020 15:16:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=80=89=E4=BF=AE=E6=8E=92=E8=AF=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8E=BB=E9=87=8D=E8=AF=AD=E5=8F=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermOfElectiveService.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs index cf01e049b..5ffeabf2c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs @@ -191,6 +191,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //ArrangeLessonTermOfElective数据处理 var insertDataList = new List(); var lessonData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); + var oldArrangeLessonTermOfElectiveDataList = BaseRepository("CollegeMIS") + .FindList(m => m.F_SchoolId == entity.F_SchoolId + && m.AcademicYearNo == entity.AcademicYearNo && m.Semester == entity.Semester).ToList(); foreach (var item in dataList) { if (!string.IsNullOrEmpty(item.paike.timeText)) @@ -217,7 +220,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration F_SchoolId = entity.F_SchoolId, CheckMark = "1" }; - insertDataList.Add(insertData); + if (oldArrangeLessonTermOfElectiveDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo + && m.Semester == insertData.Semester && m.LessonNo == insertData.LessonNo + && m.LessonSection == insertData.LessonSection && m.EmpNo == insertData.EmpNo + && m.ClassRoomNo == insertData.ClassRoomNo) == 0) + { + insertDataList.Add(insertData); + } } } From 96710676d51bbbff75c1e87beefabcc338fa0c14 Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 26 Aug 2020 17:55:27 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=80=89=E4=BF=AE=E6=8E=92=E8=AF=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AEid=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermOfElectiveService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs index 5ffeabf2c..b57de4c9d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs @@ -293,7 +293,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration x.ClassRoomNo == insertOpenLessonPlanOfElectiveData.ClassRoomNo && x.F_SchoolId == insertOpenLessonPlanOfElectiveData.F_SchoolId) == 0) { - insertOpenLessonPlanOfElectiveDataList.Add(insertOpenLessonPlanOfElectiveData); + if (BaseRepository("CollegeMIS").FindEntity(m => m.Id == insertOpenLessonPlanOfElectiveData.Id) == null + && BaseRepository("CollegeMIS").FindEntity(m => m.Id == insertOpenLessonPlanOfElectiveData.Id) == null) + { + insertOpenLessonPlanOfElectiveDataList.Add(insertOpenLessonPlanOfElectiveData); + } } } From df72e78f61a7c59a716b1cd8455ebd7372784a17 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Thu, 27 Aug 2020 17:32:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=EF=BC=9A=E5=A2=9E=E5=8A=A0=E9=80=89=E8=AF=BE=E4=B8=93?= =?UTF-8?q?=E4=B8=9A=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/OpenLessonPlanOfElective/MergeIndex.js | 14 +++++++++++++- .../ElectiveMajor/ElectiveMajorEntity.cs | 5 +++++ .../OpenLessonPlanOfElectiveEntity.cs | 6 ++++++ .../OpenLessonPlanOfElectiveService.cs | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index 93e7635e7..055f0fb1b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -217,7 +217,19 @@ var bootstrap = function ($, learun) { { label: "已报人数", name: "StuNumOfApply", width: 60, align: "left" }, { label: "通过人数", name: "StuNum", width: 60, align: "left" }, { label: "已报人数(预)", name: "StuNumOfApplyPre", width: 80, align: "left" }, - { label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" } + { label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" }, + { + label: "选课专业", name: "ElectiveMajorList", width: 150, align: "left",formatter: function (cellvalue,row) { + var str = ""; + for (var i = 0; i < row.ElectiveMajorList.length; i++) { + str += row.ElectiveMajorList[i].Grade + "级" + row.ElectiveMajorList[i].MajorName; + if (i != row.ElectiveMajorList.length - 1) { + str += ","; + } + } + return str; + } + } ], mainId: 'Id', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorEntity.cs index 07051fc5d..aa1b3ddbc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorEntity.cs @@ -69,6 +69,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + [NotMapped] + public string MajorNo { get; set; } + [NotMapped] + public string MajorName { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs index 378ba783c..3f3730287 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs @@ -1,5 +1,6 @@ using Learun.Util; using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -221,6 +222,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public string LessonNo2 { get; set; } [NotMapped] public string EmpNo2 { get; set; } + /// + /// 选课专业列表 + /// + [NotMapped] + public List ElectiveMajorList { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index 4b2ba21b6..a4b0ca115 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -362,6 +362,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); //审核通过人数 item.StuNum = aa.Where(x => x.Status == 2).Count(); + //选课专业 + var strSql2 = new StringBuilder(); + strSql2.Append("select e.Id,e.OLPOEId,e.MajorId,e.Grade,m.MajorNo,m.MajorName from ElectiveMajor e left join CdMajor m on e.MajorId=m.ID where e.OLPOEId='" + item.Id + "' and e.MajorId is not null and e.Grade is not null "); + item.ElectiveMajorList = this.BaseRepository("CollegeMIS").FindList(strSql2.ToString()).OrderBy(x => x.MajorNo).ThenBy(x => x.Grade).ToList(); //模式一:预选课 var aaa = this.BaseRepository("CollegeMIS").FindList(x => x.OLPEId == item.Id); @@ -370,6 +374,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //审核通过人数 item.StuNumPre = aaa.Where(x => x.Status == 2).Count(); + } return list;