Browse Source

【增加】课表导入:班级开课计划开发;

黑艺新账号
dyy 11 months ago
parent
commit
42e0d8619b
1 changed files with 45 additions and 4 deletions
  1. +45
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 45
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs View File

@@ -2538,12 +2538,13 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
var stuSelectLessonListEntityData = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>();
//待插入数据
var insertStuSelectLessonListDataList = new List<StuSelectLessonListEntity>();
var now = DateTime.Now;
foreach (var itemteachclass in teachclasslist)
{
var classstulist = stuinfobasicData.Where(m => m.ClassNo == itemteachclass.TeachClassNo).ToList();
foreach (var stu in classstulist)
{
var insertDataStuSelect = new StuSelectLessonListEntity()
var insertDatastuselect = new StuSelectLessonListEntity()
{
NoticeBookNo = stu.NoticeNo,
StuNo = stu.StuNo,
@@ -2558,12 +2559,52 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
OpenLessonMajorNo = itemteachclass.MajorNo,
LessonNo = itemteachclass.LessonNo,
LessonName = this.BaseRepository("CollegeMIS").FindEntity<LessonInfoEntity>(x => x.LessonNo == itemteachclass.LessonNo)?.LessonName,

PartCode = "",
OrdinaryScoreScale = 1,
TermInScoreScale = 1,
TermEndScoreScale = 1,
OtherScoreScale = 1,
TeachClassNo = stu.ClassNo,
LessonSortNo = itemteachclass.LessonSortNo,
StuSortNo = "02",
Grade = stu.Grade,
StudyScore = 0,
TotalStudyHour = 0,
IsInEffect = "1",
EmpNo = itemteachclass.EmpNo,
IsPitchOn = "1",
CheckMark = "1",
InsertTime = now,
F_SchoolId = itemteachclass.F_SchoolId
};

if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 &&
insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
{
insertStuSelectLessonListDataList.Add(insertDatastuselect);
}
}
}

this.BaseRepository("CollegeMIS").Insert(insertStuSelectLessonListDataList);
#endregion

}


Loading…
Cancel
Save