Просмотр исходного кода

学籍异动审核功能 课表为空报错处理

怀来职教中心中职
ndbs 1 год назад
Родитель
Сommit
550ececac5
1 измененных файлов: 71 добавлений и 53 удалений
  1. +71
    -53
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs

+ 71
- 53
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs Просмотреть файл

@@ -425,7 +425,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

var stulist = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(x => x.StuId == upTrua.StuId);
var InsertStuTran = new StuInfoBasicTranEntity();
var CreateList = new StuSelectLessonListEntity();
switch (upTrua.AnomalousType)
{
case "01": //留级
@@ -624,9 +624,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#endregion

#region 课表(StuSelectLessonList,旧-写入新班级课表数据;)

db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));
//db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));
// wx修改 2023-3-21 课表空数据报错 ,查找同班同学 如果不为空继续执行
if (CreateInsertStuSelectLessonList(upTrua, stulist) != null)
{
db.Insert(CreateList);
}
#endregion
}
else if (upTrua.AnomalousType == "02" || upTrua.AnomalousType == "05" || upTrua.AnomalousType == "06")
@@ -846,7 +849,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
stulist.Grade = upTrua.NewGrade;
db.Update(stulist);
}
if (upTrua.RecoverWriteMark == "1") //恢复账号
{
#region 用户表
@@ -859,7 +862,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#region 课表(StuSelectLessonList,旧-写入新班级课表数据;)

db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));
//db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));
// wx修改 2023-3-21 课表空数据报错 ,查找同班同学 如果不为空继续执行
if (CreateInsertStuSelectLessonList(upTrua, stulist) != null)
{
db.Insert(CreateList);
}

#endregion
break;
@@ -889,8 +897,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#region 课表(StuSelectLessonList,旧-写入新班级课表数据;)

db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));

//db.Insert(CreateInsertStuSelectLessonList(upTrua, stulist));
// wx修改 2023-3-21 课表空数据报错 ,查找同班同学 如果不为空继续执行
if (CreateInsertStuSelectLessonList(upTrua, stulist) != null)
{
db.Insert(CreateList);
}
#endregion
break;
default:
@@ -1122,54 +1134,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
//查找一个同班同学作为参考
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)
if (referenceStuInfoBasic != null)
{
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;
}
else
{
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 null;
}

return insertStuSelectLessonList;
}


#endregion



Загрузка…
Отмена
Сохранить