From 0dbbfe3f1c1b499cfbbb5e86ebc481d61f006a08 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 14 Feb 2023 16:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=AD=A6?= =?UTF-8?q?=E7=B1=8D=E5=BC=82=E5=8A=A8=E5=AE=A1=E6=A0=B8=EF=BC=9A=E8=AF=BE?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E9=80=89=E4=BF=AE=E8=AF=BE=E8=A1=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuTransferInfo/StuTransferInfoService.cs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) 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 a27b7efa5..f74c83fa3 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 @@ -5,6 +5,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -472,8 +473,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 课表(StuSelectLessonList,新-写入,旧-删除;) + var StuSelectLessonListHistory = db.FindList(x => x.StuNo == upTrua.StuNo && x.StuName == upTrua.StuName + && x.DeptNo == upTrua.DeptNo && x.MajorNo == upTrua.MajorNo && x.ClassNo == upTrua.ClassNo && x.Grade == upTrua.Grade); + if (StuSelectLessonListHistory.Any()) + { + foreach (var entity in StuSelectLessonListHistory) + { + //插入新数据 + db.ExecuteBySql("insert into StuSelectLessonListTran select * from StuSelectLessonList where SelectId='" + entity.SelectId + "'"); + //删除旧数据 + db.Delete(x => x.SelectId == entity.SelectId); + } + } #endregion #region 选修课表(StuSelectLessonListOfElective,新-写入,旧-删除;OpenLessonPlanOfElective,旧-修改已报名的学生数量字段;) + var StuSelectLessonListOfElectiveHistory = db.FindList(x => x.StuNo == upTrua.StuNo && x.StuName == upTrua.StuName + && x.DeptNo == upTrua.DeptNo && x.MajorNo == upTrua.MajorNo && x.ClassNo == upTrua.ClassNo && x.Grade == upTrua.Grade); + if (StuSelectLessonListOfElectiveHistory.Any()) + { + foreach (var entity in StuSelectLessonListOfElectiveHistory) + { + //插入新数据 + db.ExecuteBySql("insert into StuSelectLessonListOfElectiveTran select * from StuSelectLessonListOfElective where Id='" + entity.Id + "'"); + //修改旧数据:报名成功时,选课表中报名成功人数字段减一; + if (entity.Status == 2) + { + db.ExecuteBySql("update OpenLessonPlanOfElective set StuNum=StuNum-1 where Id='" + entity.OLPEId + "'"); + } + //删除旧数据 + db.Delete(x => x.Id == entity.Id); + } + } #endregion #region 补考成绩(StuScoreNotPass,新-写入,旧-删除;) var StuScoreNotPassHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo @@ -540,6 +570,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion #region 课表(StuSelectLessonList,旧-写入新班级课表数据;) + + //todo: + #endregion } else if (upTrua.AnomalousType == "02" || upTrua.AnomalousType == "05" || upTrua.AnomalousType == "06")