diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs index 27ba326bc..95140b893 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs @@ -429,23 +429,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration switch (upTrua.AnomalousType) { - //case "01": //留级 - //case "07": //转班 - //case "08": //转专业 - - // break; - - //case "02": //转校 - //case "05": //退学 - //case "06": //休学 - - // #region 复制一份学生学籍表 - // copyStuInfoBasic(upTrua, stulist, InsertStuTran); - // InStuinTran.Add(InsertStuTran); - // #endregion - - // break; - case "01": //留级 case "07": //转班 case "08": //转专业 @@ -643,8 +626,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 课表(StuSelectLessonList,旧-写入新班级课表数据;) - //todo: - + db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist)); + #endregion } else if (upTrua.AnomalousType == "02" || upTrua.AnomalousType == "05" || upTrua.AnomalousType == "06") @@ -882,6 +865,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #region 课表(StuSelectLessonList,旧-写入新班级课表数据;) + + db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist)); + #endregion break; case "04": //转入 @@ -909,6 +895,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion #region 课表(StuSelectLessonList,旧-写入新班级课表数据;) + + db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist)); + #endregion break; default: @@ -1125,6 +1114,68 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration InsertStuTran.TranDateTime = DateTime.Now; InsertStuTran.Create(); } + + /// + /// 课表(StuSelectLessonList,旧-写入新班级课表数据;) + /// + /// + /// + /// + public List CreateInsertStuSelectLessonList(StuTransferInfoEntity upTrua, StuInfoBasicEntity stulist) + { + var nowYearSemester = Common.GetSemesterAndYear(DateTime.Now.ToString()); + //查找一个同班同学作为参考 + var referenceStuInfoBasic = this.BaseRepository("CollegeMIS").FindEntity(x => x.CheckMark == "1" && x.DeptNo == upTrua.NewDeptNo && x.MajorNo == upTrua.NewMajorNo && x.ClassNo == upTrua.NewClassNo && x.Grade == upTrua.NewGrade); + //参考同学的课表:学年大;学年同且学期大于等于;。 + var referenceStuSelectLessonList = this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == referenceStuInfoBasic.StuNo && x.StuName == referenceStuInfoBasic.StuName); + referenceStuSelectLessonList = referenceStuSelectLessonList.Where(x => x.AcademicYearNo.ToDecimal() > nowYearSemester.AcademicYearShort.ToDecimal() || (x.AcademicYearNo == nowYearSemester.AcademicYearShort && x.Semester.ToDecimal() >= nowYearSemester.Semester.ToDecimal())); + var insertStuSelectLessonList = new List(); + foreach (var referenceEntity in referenceStuSelectLessonList) + { + var entity = new StuSelectLessonListEntity(); + entity.NoticeBookNo = stulist.NoticeNo; + entity.StuNo = stulist.StuNo; + entity.DeptNo = referenceEntity.DeptNo; + entity.MajorNo = referenceEntity.MajorNo; + entity.ClassNo = referenceEntity.ClassNo; + entity.MajorDetailNo = referenceEntity.MajorDetailNo; + entity.MajorDetailName = referenceEntity.MajorDetailName; + entity.StuName = stulist.StuName; + entity.GenderNo = stulist.GenderNo == true ? "1" : "0"; + entity.AcademicYearNo = referenceEntity.AcademicYearNo; + entity.Semester = referenceEntity.Semester; + entity.OpenLessonDeptNo = referenceEntity.OpenLessonDeptNo; + entity.OpenLessonMajorNo = referenceEntity.OpenLessonMajorNo; + entity.LessonNo = referenceEntity.LessonNo; + entity.LessonName = referenceEntity.LessonName; + entity.PartCode = referenceEntity.PartCode; + entity.LessonNameEng = referenceEntity.LessonNameEng; + entity.OrdinaryScoreScale = referenceEntity.OrdinaryScoreScale; + entity.TermInScoreScale = referenceEntity.TermInScoreScale; + entity.TermEndScoreScale = referenceEntity.TermEndScoreScale; + entity.OtherScoreScale = referenceEntity.OtherScoreScale; + entity.TeachClassNo = referenceEntity.TeachClassNo; + entity.LessonSortNo = referenceEntity.LessonSortNo; + entity.StuSortNo = referenceEntity.StuSortNo; + entity.Grade = referenceEntity.Grade; + entity.StudyScore = referenceEntity.StudyScore; + entity.TotalStudyHour = referenceEntity.TotalStudyHour; + entity.IsInEffect = referenceEntity.IsInEffect; + entity.Remark = referenceEntity.Remark; + entity.ConflictLessonNo = referenceEntity.ConflictLessonNo; + entity.EmpNo = referenceEntity.EmpNo; + entity.TeachPlanNo = referenceEntity.TeachPlanNo; + entity.IsPitchOn = referenceEntity.IsPitchOn; + entity.CheckMark = referenceEntity.CheckMark; + entity.InsertTime = DateTime.Now; + entity.F_SchoolId = referenceEntity.F_SchoolId; + insertStuSelectLessonList.Add(entity); + } + + return insertStuSelectLessonList; + } + + #endregion }