Преглед изворни кода

【修改】异动审核:课表表增加新课程数据;

新疆警官学校中职
dyy пре 1 година
родитељ
комит
0c63fd5c5f
1 измењених фајлова са 70 додато и 19 уклоњено
  1. +70
    -19
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs

+ 70
- 19
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();
}

/// <summary>
/// 课表(StuSelectLessonList,旧-写入新班级课表数据;)
/// </summary>
/// <param name="upTrua"></param>
/// <param name="stulist"></param>
/// <returns></returns>
public List<StuSelectLessonListEntity> CreateInsertStuSelectLessonList(StuTransferInfoEntity upTrua, StuInfoBasicEntity stulist)
{
var nowYearSemester = Common.GetSemesterAndYear(DateTime.Now.ToString());
//查找一个同班同学作为参考
var referenceStuInfoBasic = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(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<StuSelectLessonListEntity>(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<StuSelectLessonListEntity>();
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

}


Loading…
Откажи
Сачувај