@@ -269,7 +269,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
InsertEntity.SuspensionBeginTime = entity.SuspensionBeginTime;
InsertEntity.SuspensionEndTime = entity.SuspensionEndTime;
InsertEntity.SuspensionPeriod = entity.SuspensionPeriod;
InsertEntity.ChangeReason = entity.Remark;
InsertEntity.Remark = entity.Remark;
//
InsertEntity.StuStatus = entity.StuStatus;
InsertEntity.F_WriteMark = entity.F_WriteMark;
@@ -345,6 +345,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var InsertEntity = new StuTransferInfoEntity();
//历史数据
InsertEntity.StuId = item.StuId;
InsertEntity.ReturnSchoolId = item.ID;
InsertEntity.StuNo = item.StuNo;
InsertEntity.StuName = item.StuName;
InsertEntity.Gender = item.Gender;
@@ -358,7 +359,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
InsertEntity.AnomalousType = entity.AnomalousType;
InsertEntity.ChangeReason = entity.ChangeReason;
InsertEntity.NewClassNo = entity.NewClassNo;
InsertEntity.MajorNo = entity.MajorNo;
InsertEntity.New MajorNo = entity.New MajorNo;
InsertEntity.NewDeptNo = entity.NewDeptNo;
InsertEntity.NewGrade = entity.NewGrade;
InsertEntity.LeaveDate = entity.LeaveDate;
@@ -409,21 +410,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var db1 = this.BaseRepository().BeginTrans();
try
{
List<StuTransferInfoEntity> UpStuTran = new List<StuTransferInfoEntity>();
List<StuInfoBasicTranEntity> InStuinTran = new List<StuInfoBasicTranEntity>();
List<StuInfoBasicEntity> Stulist = new List<StuInfoBasicEntity>();
List<StuInfoBasicEntity> upStulist = new List<StuInfoBasicEntity>();
// List<StuInfoBasicEntity> Stulist = new List<StuInfoBasicEntity>();
var StuEntity = new StuInfoBasicEntity();
var Id = keyValue.Split(',');
foreach (var item in Id)
{
var addTruan = new StuInfoBasicEntity();
var upTrua = this.BaseRepository("CollegeMIS") .FindEntity<StuTransferInfoEntity>(x => x.ID == item);
var upTrua = db .FindEntity<StuTransferInfoEntity>(x => x.ID == item);
upTrua.CheckUserId = userInfo.userId;
upTrua.CheckTime = DateTime.Now;
upTrua.F_EnabledMark = 1;
var stulist = this.BaseRepository("CollegeMIS") .FindEntity<StuInfoBasicEntity>(x => x.StuId == upTrua.StuId);
var stulist = db .FindEntity<StuInfoBasicEntity>(x => x.StuId == upTrua.StuId);
var InsertStuTran = new StuInfoBasicTranEntity();
switch (upTrua.AnomalousType)
{
@@ -606,20 +606,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
#region 学籍操作
StuEntity = new StuInfoBasicEntity
{
//修改学籍表信息
StuId = upTrua.StuId,
StuNo = upTrua.StuNo,
StuName = upTrua.StuName,
ClassNo = upTrua.NewClassNo,
MajorNo = upTrua.NewMajorNo,
DeptNo = upTrua.NewDeptNo,
Grade = upTrua.NewGrade,
EduSystem = upTrua.EduSystem
};
//StuEntity = new StuInfoBasicEntity
//{
//修改学籍表信息
stulist.ClassNo = upTrua.NewClassNo;
stulist.MajorNo = upTrua.NewMajorNo;
stulist.DeptNo = upTrua.NewDeptNo;
stulist.Grade = upTrua.NewGrade;
stulist.EduSystem = upTrua.EduSystem;
upStulist.Add(StuEntity);
//};
db.Update(stulist);
#endregion
#region 课表(StuSelectLessonList,旧-写入新班级课表数据;)
@@ -633,6 +632,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
else if (upTrua.AnomalousType == "02" || upTrua.AnomalousType == "05" || upTrua.AnomalousType == "06")
{
if (upTrua.AnomalousType == "06") //休学保存部分基础数据 StuTransferInfo数据?
{
upTrua.NationalityNo = stulist.NationalityNo;
upTrua.Province = stulist.F_ProvinceId;
upTrua.City = stulist.F_CityId;
upTrua.County = stulist.F_CountyId;
upTrua.Mobile = stulist.mobile;
upTrua.Remark = stulist.Remark;
upTrua.ResidencePlace = stulist.FatherUnit;
upTrua.LocationFile = stulist.MatherUnit;
}
#region 学籍操作
if (upTrua.StuStatus == 0) //如果保留学籍,basic不动;否则删除学籍basic,备份到basictran;
{
@@ -656,12 +666,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (upTrua.IsReturnSchool == "0")
{
upTrua.IsReturnSchool = "1";
//修改记录为已审核
upTrua.F_EnabledMark = 1;
upTrua.CheckTime = DateTime.Now;
upTrua.CheckUserId = userInfo.userId;
//修改关联休学记录的 IsReturnSchool = 1
db.ExecuteBySql(" update StuTransferInfo set IsReturnSchool = 1 where ID = '" + upTrua.ReturnSchoolId + "'");
//1.basic找,有就改;2.basictran复制并改;
if (stulist == null)
{
#region 重新生成学籍
//复学的学籍
var ReturnStu = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicTranEntity>(x => x.StuId == upTrua.StuId);
var ReturnStu = db .FindEntity<StuInfoBasicTranEntity>(x => x.StuId == upTrua.StuId);
addTruan.StuId = ReturnStu.StuId;
addTruan.StuNo = ReturnStu.StuNo;
@@ -836,7 +854,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
addTruan.DiplomaReceiveIdcard = ReturnStu.DiplomaReceiveIdcard;
addTruan.DiplomaReceiveRemark = ReturnStu.DiplomaReceiveRemark;
addTruan.CheckMark = "0";
Stulist.Add (addTruan);
db.Insert (addTruan);
#endregion
}
@@ -875,11 +893,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var stuInfoBasicEntity = new StuInfoBasicEntity();
stuInfoBasicEntity.StuId = upTrua.StuId;
stuInfoBasicEntity.StuNo = upTrua.StuNo;
stuInfoBasicEntity.ProvinceCode = upTrua.StuNo;
stuInfoBasicEntity.StuName = upTrua.StuName;
stuInfoBasicEntity.DeptNo = upTrua.DeptNo;
stuInfoBasicEntity.MajorNo = upTrua.MajorNo;
stuInfoBasicEntity.Grade = upTrua.Grade;
stuInfoBasicEntity.ClassNo = upTrua.ClassNo;
stuInfoBasicEntity.DeptNo = upTrua.NewDeptNo;
stuInfoBasicEntity.MajorNo = upTrua.NewMajorNo;
stuInfoBasicEntity.Grade = upTrua.NewGrade;
stuInfoBasicEntity.ClassNo = upTrua.NewClassNo;
stuInfoBasicEntity.EduSystem = upTrua.NewEduSystem;
stuInfoBasicEntity.GenderNo = upTrua.Gender;
stuInfoBasicEntity.Birthday = upTrua.Birthday;
stuInfoBasicEntity.NationalityNo = upTrua.NationalityNo;
@@ -907,13 +927,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
default:
break;
}
UpStuTran.Add(upTrua);
db.Update(upTrua); //休学学籍异动信息
}
db.Insert(InStuinTran); //学籍异动记录
db.Update(UpStuTran); //修改学籍异动信息
db.Insert(Stulist); //学籍
db.Update(upStulist); //修改学籍
//db.Insert(Stulist); //学籍
db.Commit();
db1.Commit();