From 27287132a776f7834011369c0424232019ed7901 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 31 Jan 2023 11:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=BC=82?= =?UTF-8?q?=E5=8A=A8=E6=8F=90=E4=BA=A4=E5=A2=9E=E5=8A=A0=E5=8E=BB=E9=87=8D?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuTransferInfo/StuTransferInfoService.cs | 69 +++++++++++++++++-- 1 file changed, 63 insertions(+), 6 deletions(-) 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 0cc74429f..2856f9c2f 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 @@ -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(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(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(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(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(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();