From 0c63fd5c5f9109d416b66905f6bb8a6d62ae60f6 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Sat, 18 Feb 2023 14:44:34 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=BC=82?=
=?UTF-8?q?=E5=8A=A8=E5=AE=A1=E6=A0=B8=EF=BC=9A=E8=AF=BE=E8=A1=A8=E8=A1=A8?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E8=AF=BE=E7=A8=8B=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../StuTransferInfo/StuTransferInfoService.cs | 89 +++++++++++++++----
1 file changed, 70 insertions(+), 19 deletions(-)
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
}