Переглянути джерело

同步排课数据取消专业开课计划的教师

长阳分支中职
ndbs 1 тиждень тому
джерело
коміт
aa34bf4226
2 змінених файлів з 51 додано та 49 видалено
  1. +50
    -48
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs

+ 50
- 48
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<CdMajorEntity>()).ToList();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).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);
}


+ 1
- 1
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



Завантаження…
Відмінити
Зберегти