From 9b607b60a19afb7f91d5a4999d20f313973d75ff Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 26 Aug 2020 15:16:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=BF=AE=E6=8E=92=E8=AF=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8E=BB=E9=87=8D=E8=AF=AD=E5=8F=A5=E5=A2=9E=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); + } } }