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

【修改】异动提交增加去重验证;

新疆警官学校中职
dyy 1 рік тому
джерело
коміт
27287132a7
1 змінених файлів з 63 додано та 6 видалено
  1. +63
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs

+ 63
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs Переглянути файл

@@ -193,7 +193,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
//去重验证
if (entity.AnomalousType == "04")//转入
{
if (this.BaseRepository("CollegeMIS").FindEntity<StuTransferInfoEntity>(x =>
x.AnomalousType == entity.AnomalousType && x.StuName == entity.StuName &&
x.StuNo == entity.StuNo && x.IdentityCardNo == entity.IdentityCardNo) == null)
{
//添加数据
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
else
{
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
}
catch (Exception ex)
@@ -245,14 +259,46 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
InsertEntity.NewDeptNo = entity.NewDeptNo;
InsertEntity.NewGrade = entity.NewGrade;
InsertEntity.LeaveDate = entity.LeaveDate;
InsertEntity.StuStatus = entity.StuStatus;
InsertEntity.SuspensionBeginTime = entity.SuspensionBeginTime;
InsertEntity.SuspensionEndTime = entity.SuspensionEndTime;
InsertEntity.SuspensionPeriod = entity.SuspensionPeriod;
//
InsertEntity.StuStatus = entity.StuStatus;
InsertEntity.F_WriteMark = entity.F_WriteMark;

InsertEntity.Create();
//添加数据
entitylist.Add(InsertEntity);
//去重验证
if (InsertEntity.AnomalousType == "01" || InsertEntity.AnomalousType == "07" || InsertEntity.AnomalousType == "08")//转专业、转班、留级
{
if (this.BaseRepository("CollegeMIS").FindEntity<StuTransferInfoEntity>(x =>
x.AnomalousType == InsertEntity.AnomalousType && x.StuId == InsertEntity.StuId && x.DeptNo == InsertEntity.DeptNo && x.MajorNo == InsertEntity.MajorNo &&
x.ClassNo == InsertEntity.ClassNo && x.Grade == InsertEntity.Grade && x.NewDeptNo == InsertEntity.NewDeptNo && x.NewMajorNo == InsertEntity.NewMajorNo &&
x.NewClassNo == InsertEntity.NewClassNo && x.NewGrade == InsertEntity.NewGrade) == null)
{
//添加数据
entitylist.Add(InsertEntity);
}
}
else if (InsertEntity.AnomalousType == "06")//休学
{
if (this.BaseRepository("CollegeMIS").FindEntity<StuTransferInfoEntity>(x =>
x.AnomalousType == InsertEntity.AnomalousType && x.StuId == InsertEntity.StuId && x.EnteDate == InsertEntity.EnteDate && x.SuspensionPeriod == InsertEntity.SuspensionPeriod &&
x.SuspensionBeginTime == InsertEntity.SuspensionBeginTime && x.SuspensionEndTime == InsertEntity.SuspensionEndTime) == null)
{
//添加数据
entitylist.Add(InsertEntity);
}
}
else if (InsertEntity.AnomalousType == "02" || InsertEntity.AnomalousType == "05")//退学、转出
{
if (this.BaseRepository("CollegeMIS").FindEntity<StuTransferInfoEntity>(x =>
x.AnomalousType == InsertEntity.AnomalousType && x.StuId == InsertEntity.StuId && x.EnteDate == InsertEntity.EnteDate) == null)
{
//添加数据
entitylist.Add(InsertEntity);
}
}

}

db.Insert(entitylist); //创建学籍异动信息
@@ -312,8 +358,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
//恢复学籍,恢复账号
InsertEntity.RecoverStuStatus = entity.RecoverStuStatus;
InsertEntity.RecoverWriteMark = entity.RecoverWriteMark;
//添加数据
entitylist.Add(InsertEntity);

InsertEntity.Create();
//去重验证
if (InsertEntity.AnomalousType == "03")//复学
{
if (this.BaseRepository("CollegeMIS").FindEntity<StuTransferInfoEntity>(x =>
x.AnomalousType == InsertEntity.AnomalousType && x.StuId == InsertEntity.StuId && x.LeaveDate == InsertEntity.LeaveDate &&
x.NewDeptNo==InsertEntity.NewDeptNo && x.NewMajorNo == InsertEntity.NewMajorNo && x.NewClassNo==InsertEntity.NewClassNo && x.NewGrade==InsertEntity.NewGrade) == null)
{
//添加数据
entitylist.Add(InsertEntity);
}
}
}
db.Insert(entitylist); //创建学籍异动信息
db.Commit();


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