diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs index 86d114c44..c5415f322 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs @@ -165,25 +165,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("F_ENABLEDMARK")] public int? F_EnabledMark { get; set; } /// - /// 是否保留学籍 0是 1否 + /// 是否保留学籍 1是 0否 /// /// [Column("STUSTATUS")] public int? StuStatus { get; set; } /// - /// 是否注销账号 0是 1否 + /// 是否注销账号 1是 0否 /// /// [Column("F_WRITEMARK")] public int? F_WriteMark { get; set; } /// - /// 是否恢复学籍 0是 1否 + /// 是否恢复学籍 1是 0否 /// /// [Column("RECOVERSTUSTATUS")] public string RecoverStuStatus { get; set; } /// - /// 是否恢复账号 0是 1否 + /// 是否恢复账号 1是 0否 /// /// [Column("RECOVERWRITEMARK")] @@ -207,7 +207,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("SUSPENSIONENDTIME")] public DateTime? SuspensionEndTime { get; set; } /// - /// 是否已复学 0是 1否【休学】 + /// 是否已复学 1是 0否【休学】 /// /// [Column("ISRETURNSCHOOL")] 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 0122ad011..d1df79818 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 @@ -422,7 +422,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration upTrua.CheckUserId = userInfo.userId; upTrua.CheckTime = DateTime.Now; upTrua.F_EnabledMark = 1; - UpStuTran.Add(upTrua); var stulist = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuId == upTrua.StuId); var InsertStuTran = new StuInfoBasicTranEntity(); @@ -614,7 +613,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration StuId = upTrua.StuId, StuNo = upTrua.StuNo, StuName = upTrua.StuName, - ClassNo = upTrua.ClassNo, + ClassNo = upTrua.NewClassNo, MajorNo = upTrua.NewMajorNo, DeptNo = upTrua.NewDeptNo, Grade = upTrua.NewGrade, @@ -633,23 +632,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration else if (upTrua.AnomalousType == "02" || upTrua.AnomalousType == "05" || upTrua.AnomalousType == "06") { #region 学籍操作 - if (upTrua.StuStatus == 1) //如果是保留学籍 修改学籍 否则删除学籍 - { - StuEntity = new StuInfoBasicEntity - { - //修改学籍表信息 - StuId = upTrua.StuId, - StuNo = upTrua.StuNo, - StuName = upTrua.StuName, - ClassNo = upTrua.ClassNo, - MajorNo = upTrua.NewMajorNo, - DeptNo = upTrua.NewDeptNo, - Grade = upTrua.NewGrade, - EduSystem = upTrua.EduSystem - }; - upStulist.Add(StuEntity); - } - else + if (upTrua.StuStatus == 0) //如果保留学籍,basic不动;否则删除学籍basic,备份到basictran; { //删除学籍 db.Delete(x => x.StuId == upTrua.StuId); @@ -668,15 +651,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration break; case "03": //复学 //学籍异动列表 - if (upTrua.IsReturnSchool == "1") + if (upTrua.IsReturnSchool == "0") { - upTrua.IsReturnSchool = "0"; - if (upTrua.RecoverStuStatus == "0") //恢复学籍 + upTrua.IsReturnSchool = "1"; + //1.basic找,有就改;2.basictran复制并改; + if (stulist == null) { + #region 重新生成学籍 //复学的学籍 var ReturnStu = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuId == upTrua.StuId); - //todo:根据页面更新系专业班级年级数据; - #region 重新生成学籍 + addTruan.StuId = ReturnStu.StuId; addTruan.StuNo = ReturnStu.StuNo; addTruan.StuCode = ReturnStu.StuCode; @@ -852,13 +836,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration addTruan.CheckMark = "0"; Stulist.Add(addTruan); #endregion + } - if (upTrua.RecoverWriteMark == "0") //恢复账号 + else + { + stulist.DeptNo = upTrua.NewDeptNo; + stulist.MajorNo = upTrua.NewMajorNo; + stulist.ClassNo = upTrua.NewClassNo; + stulist.Grade = upTrua.NewGrade; + db.Update(stulist); + } + + if (upTrua.RecoverWriteMark == "1") //恢复账号 { #region 用户表 db1.ExecuteBySql(" update LR_Base_User set F_EnabledMark= 1 where F_EnCode='" + upTrua.StuNo + "' and F_Account ='" + upTrua.StuNo + "'and F_RealName='" + upTrua.StuName + "' and F_IdentityCardNo ='" + upTrua.IdentityCardNo + "' "); - UpStuTran.Add(upTrua); //修改学籍异动表 为复学 #endregion } @@ -903,6 +896,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration default: break; } + + UpStuTran.Add(upTrua); } db.Insert(InStuinTran); //学籍异动记录 db.Update(UpStuTran); //修改学籍异动信息