diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index 1a48b61e9..0562ca20d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -1179,7 +1179,9 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_course cour ON cour.id= p.`course` LEFT JOIN tb_curriculum curr ON curr.id=cour.`course` WHERE s.year = '" + entity.AcademicYearNo + "' AND s.number = '" + entity.Semester - + "' AND curr.`ification` ='1' and tt.EmpNo is not null ORDER BY p.`major` "); + //+ "' AND curr.`ification` ='1' and tt.EmpNo is not null ORDER BY p.`major` "); + //2024年11月11日16:44:14 wx修改 校方去掉专业开课计划的教师 + + "' AND curr.`ification` ='1' ORDER BY p.`major` "); var majorData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); var lessonData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); if (TeachList.Count() > 0) @@ -1190,61 +1192,61 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest foreach (var item in TeachList) { - var TeachClass = item.EmpNo.Split(','); - foreach (var itemTeach in TeachClass) + //var TeachClass = item.EmpNo.Split(','); + //foreach (var itemTeach in TeachClass) + //{ + var insertData = new OpenLessonPlanEntity() { - var insertData = new OpenLessonPlanEntity() - { - TeachNo = itemTeach, - MakeDate = now, - AcademicYearNo = item.AcademicYearNo, - Semester = item.Semester, - DeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo, - MajorNo = item.MajorNo, - LessonNo = item.LessonNo, - LessonName = item.LessonName, - PartCode = "", - Grade = item.Grade, - LessonSortNo = "1", - LessonSortDetailNo = lessonData - .FirstOrDefault(m => m.LessonNo == item.LessonSortDetailNo)?.LessonSortDetailNo, - StartWeek = item.StartWeek, - EndWeek = item.EndWeek, - WeekLessonHour = item.ClassHour, - CheckStyleNo = "1", - ScoreRecordStyleNo = "1", - TeachDeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo, - StudyScore = 0, - AmendDate = now, - ClassroomType = 1, - ClassroomPracticeType = 99, - CheckMarkDept = "1", - CheckMark = "1", - TestMark = 0, - F_SchoolId = item.F_SchoolId, - State = 1, - ExamType = item.ExamType - }; - if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && - m.Semester == insertData.Semester && - m.MajorNo == insertData.MajorNo && - m.LessonNo == insertData.LessonNo && - m.Grade == insertData.Grade && - m.LessonSortNo == insertData.LessonSortNo && - m.LessonName == insertData.LessonName && - m.F_SchoolId == insertData.F_SchoolId) == 0 && - insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && + TeachNo = item.EmpNo, + MakeDate = now, + AcademicYearNo = item.AcademicYearNo, + Semester = item.Semester, + DeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo, + MajorNo = item.MajorNo, + LessonNo = item.LessonNo, + LessonName = item.LessonName, + PartCode = "", + Grade = item.Grade, + LessonSortNo = "1", + LessonSortDetailNo = lessonData + .FirstOrDefault(m => m.LessonNo == item.LessonSortDetailNo)?.LessonSortDetailNo, + StartWeek = item.StartWeek, + EndWeek = item.EndWeek, + WeekLessonHour = item.ClassHour.IsEmpty() ? 0 : Convert.ToInt32(item.ClassHour), + CheckStyleNo = "1", + ScoreRecordStyleNo = "1", + TeachDeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo, + StudyScore = 0, + AmendDate = now, + ClassroomType = 1, + ClassroomPracticeType = 99, + CheckMarkDept = "1", + CheckMark = "1", + TestMark = 0, + F_SchoolId = item.F_SchoolId, + State = 1, + ExamType = item.ExamType + }; + if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester && m.MajorNo == insertData.MajorNo && m.LessonNo == insertData.LessonNo && m.Grade == insertData.Grade && m.LessonSortNo == insertData.LessonSortNo && m.LessonName == insertData.LessonName && - m.F_SchoolId == insertData.F_SchoolId) == 0) - { - insertDataList.Add(insertData); - } + m.F_SchoolId == insertData.F_SchoolId) == 0 && + insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && + m.Semester == insertData.Semester && + m.MajorNo == insertData.MajorNo && + m.LessonNo == insertData.LessonNo && + m.Grade == insertData.Grade && + m.LessonSortNo == insertData.LessonSortNo && + m.LessonName == insertData.LessonName && + m.F_SchoolId == insertData.F_SchoolId) == 0) + { + insertDataList.Add(insertData); } + //} } await BaseRepository("CollegeMIS").InsertAsync(insertDataList); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs index f560bca12..47dc8f528 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs @@ -123,7 +123,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public string LessonSortDetailNo { get; set; } [NotMapped] - public int? ClassHour { get; set; } + public string ClassHour { get; set; } #endregion