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 f74c83fa3..27ba326bc 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 @@ -1,5 +1,6 @@ using Dapper; using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.LogisticsManagement; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -535,18 +536,89 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 助学金奖学金(ScholarshipAudit,新-写入,旧-删除;) + var ScholarshipHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (ScholarshipHistory != null) + { + foreach (var items in ScholarshipHistory) + { + db.ExecuteBySql(" insert into ScholarshipTran select * from ScholarshipAudit where IsType = 1 and State =1 and id = '" + items.Id + "'"); + db.ExecuteBySql(" insert into ScholarshipTran select * from ScholarshipAudit where IsType = 0 and id = '" + items.Id + "'"); + // 删除旧数据 + db.Delete(x => x.Id == items.Id); + } + } #endregion #region 学生心理健康档案(APStuHealthRecords,新-写入,旧-删除;) + var AspHistory = db.FindList(x => x.Stuno == InsertStuTran.StuNo); + if (AspHistory != null) + { + foreach (var items in AspHistory) + { + db.ExecuteBySql(" insert into APStuHealthRecordsTran select * from APStuHealthRecords where ID = " + items.ID + "'"); + // 删除旧数据 + db.Delete(x => x.ID == items.ID); + } + } #endregion #region 兵役一(MSRIntentionManagement,新-写入,旧-删除;) + var MSRIntentionHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (MSRIntentionHistory != null) + { + foreach (var items in MSRIntentionHistory) + { + db.ExecuteBySql(" insert into MSRIntentionManagementTran select * from MSRIntentionManagement where ID = " + items.ID + "'"); + // 删除旧数据 + db.Delete(x => x.ID == items.ID); + } + } #endregion #region 兵役二(MSRMilitaryRecord,新-写入,旧-删除;) + var MSRMilitaryRecordHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (MSRMilitaryRecordHistory != null) + { + foreach (var items in MSRMilitaryRecordHistory) + { + db.ExecuteBySql(" insert into MSRMilitaryRecordTran select * from MSRMilitaryRecord where ID = " + items.ID + "'"); + // 删除旧数据 + db.Delete(x => x.ID == items.ID); + } + } #endregion #region 兵役三(MSRMilitaryServiceRegistration,新-写入,旧-删除;) + var MSRMilitaryServiceRegistrationHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (MSRMilitaryServiceRegistrationHistory != null) + { + foreach (var items in MSRMilitaryServiceRegistrationHistory) + { + db.ExecuteBySql(" insert into MSRMilitaryServiceRegistrationTran select * from MSRMilitaryServiceRegistration where ID = " + items.ID + "'"); + // 删除旧数据 + db.Delete(x => x.ID == items.ID); + } + } #endregion #region 奖励(StuEncourgement,新-写入,旧-删除;) + var StuEncourgementHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (StuEncourgementHistory != null) + { + foreach (var items in StuEncourgementHistory) + { + db.ExecuteBySql(" insert into StuEncourgementTran select * from StuEncourgement where ID = " + items.ID + "'"); + // 删除旧数据 + db.Delete(x => x.ID == items.ID); + } + } #endregion #region 处分(StuPunishment,新-写入,旧-删除;) + var StuPunishmentHistory = db.FindList(x => x.StuNo == InsertStuTran.StuNo); + if (StuPunishmentHistory != null) + { + foreach (var items in StuPunishmentHistory) + { + db.ExecuteBySql(" insert into StuPunishmentTran select * from StuPunishment where ID = " + items.Id + "'"); + // 删除旧数据 + db.Delete(x => x.Id == items.Id); + } + } #endregion if (upTrua.AnomalousType == "01" || upTrua.AnomalousType == "07" || upTrua.AnomalousType == "08")