123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Web;
- using System.Linq.Expressions;
- using System.Transactions;
- using Bowin.Common.Linq;
- using Bowin.Common.Linq.Entity;
- using EMIS.Entities;
- using EMIS.ViewModel;
- using EMIS.ViewModel.StudentManage.InfoCenter;
- using EMIS.DataLogic.StudentManage.StudentProfile;
- using EMIS.DataLogic.StudentManage.OnlineChecking;
- using EMIS.CommonLogic.SystemServices;
- using EMIS.CommonLogic.StudentManage.StudentStatistics;
- namespace EMIS.CommonLogic.StudentWeb.InfoCenter
- {
- public class PersonalInfoServices : BaseWorkflowServices<CF_StudentContrast>, IPersonalInfoServices
- {
- public StudentDAL StudentDAL { get; set; }
- public OpenObjectDAL OpenObjectDAL { get; set; }
- public CheckingControlDAL CheckingControlDAL { get; set; }
- public CheckingApproveDAL CheckingApproveDAL { get; set; }
- public Lazy<IInSchoolSettingServices> InSchoolSettingServices { get; set; }
- /// <summary>
- /// 根据学生信息ID查询对应的网上校对开放对象信息
- /// 可校对条件:在校状态为在校且在开放对象范围内
- /// </summary>
- /// <param name="userID"></param>
- public void StudentOpenObject(Guid? userID)
- {
- try
- {
- var studentBaseView = StudentDAL.GetStudentBaseViewQueryable(x => x.UserID == userID).SingleOrDefault();
- if (studentBaseView != null)
- {
- if (!InSchoolSettingServices.Value.GetInschoolStatusList(true).Contains(studentBaseView.InSchoolStatusID))
- {
- throw new Exception("只允许在校生对个人信息进行网上校对。");
- }
- var currentSchoolYear = StudentDAL.SchoolyearRepository.GetList(x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE && x.IsCurrent == true).SingleOrDefault();
- if (currentSchoolYear == null)
- {
- throw new Exception("未设置启用的学年学期,请设置。");
- }
- var nowSchoolyearNumID = (currentSchoolYear.Value - (currentSchoolYear.SchoolcodeID == studentBaseView.SemesterID ? 0 : 1) - studentBaseView.StartSchoolyearValue.Value) / 2 + 1;
- var studentOpenObject = OpenObjectDAL.StudentEditObjectsRepository.GetList(x => x.SchoolyearNumID == nowSchoolyearNumID && x.EducationID == studentBaseView.EducationID).SingleOrDefault();
- if (studentOpenObject == null)
- {
- throw new Exception("未设置对应的网上校对开放对象信息,请设置(入学学年学期:" + studentBaseView.StartSchoolyearCode + ")。");
- }
- else
- {
- if (System.DateTime.Now < studentOpenObject.Starttime || System.DateTime.Now > studentOpenObject.Endtime)
- {
- throw new Exception("对应的网上校对时间不在开放范围内(" + "开放时间:"
- + studentOpenObject.Starttime.Value.ToString("yyyy-MM-dd HH:mm") + "--"
- + studentOpenObject.Endtime.Value.ToString("yyyy-MM-dd HH:mm") + ")。");
- }
- }
- }
- else
- {
- throw new Exception("数据有误,请重新刷新加载。");
- }
- }
- catch (Exception ex)
- {
- throw new Exception(ex.Message);
- }
- }
- /// <summary>
- /// 查询对应的校对控制信息List
- /// </summary>
- /// <returns></returns>
- public List<EditFeildView> GetStudentEditFeildList()
- {
- Expression<Func<CF_StudentEditControl, bool>> exp = (x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE);
- var editFeildViewList = CheckingControlDAL.GetStudentEditFeildQueryable(exp).OrderBy(x => x.OrderNo).ToList();
- return editFeildViewList;
- }
- /// <summary>
- /// 学生个人信息校对
- /// </summary>
- /// <param name="studentViewDataList"></param>
- /// <param name="userID"></param>
- public void StudentCheckEdit(Dictionary<string, object> studentViewDataList, Guid? userID)
- {
- try
- {
- this.StudentOpenObject(userID);
- var workflowStatusViewList = this.GetStatusViewList();
- if (workflowStatusViewList == null || workflowStatusViewList.Count() <= 0)
- {
- throw new Exception("工作流平台中,网上校对流程未配置,请核查。");
- }
- var startStatusID = this.GetStartStatus();
- if (startStatusID == null)
- {
- throw new Exception("工作流平台中,网上校对流程开始环节未配置,请核查。");
- }
- var startActionViewList = this.GetStartActionView().ToList();
- var endStatusID = this.GetCorrectEndStatus();
- if (endStatusID == null)
- {
- throw new Exception("工作流平台中,网上校对流程结束环节未配置,请核查。");
- }
- var approveStatusIDList = this.GetApproveStatusViewList().Select(x => x.ID).ToList();
- Expression<Func<CF_StudentContrast, bool>> expStudentContrast = (x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE);
- expStudentContrast = expStudentContrast.And(x => approveStatusIDList.Contains(x.ApprovalStatus));
- expStudentContrast = expStudentContrast.And(x => x.UserID == userID);
- var approveColumnNameList = CheckingApproveDAL.GetCheckingHistoryViewQueryable(expStudentContrast).ToDictionary(x => x.ColumnName, x => x.Description);
- var checkingControlEditList = CheckingControlDAL.StudentEditControlRepository.GetList(x => x.CheckingTypeID != (int)CF_CheckingType.Close).ToList();
- if (checkingControlEditList != null && checkingControlEditList.Count() > 0)
- {
- var checkingColumnDescriptionList = CheckingControlDAL.StudentEditColumnDescriptionRepository.GetList(x => true).ToList();
- if (checkingColumnDescriptionList != null && checkingColumnDescriptionList.Count() > 0)
- {
- List<CF_StudentContrast> studentContrastInList = new List<CF_StudentContrast>();
- List<CF_StudentSource> studentSourceInList = new List<CF_StudentSource>();
- List<Sys_UserContrast> userContrastInList = new List<Sys_UserContrast>();
- List<Sys_UserSource> userSourceInList = new List<Sys_UserSource>();
- List<CF_StudentProfileContrast> studentProfileContrastInList = new List<CF_StudentProfileContrast>();
- List<CF_StudentProfileSource> studentProfileSourceInList = new List<CF_StudentProfileSource>();
- List<CF_StudentContactContrast> studentContactContrastInList = new List<CF_StudentContactContrast>();
- List<CF_StudentContactSource> studentContactSourceInList = new List<CF_StudentContactSource>();
- List<CF_StudentAccountContrast> studentAccountContrastInList = new List<CF_StudentAccountContrast>();
- List<CF_StudentAccountSource> studentAccountSourceInList = new List<CF_StudentAccountSource>();
- List<CF_RecruitstudentsContrast> recruitstudentsContrastInList = new List<CF_RecruitstudentsContrast>();
- List<CF_RecruitstudentsSource> recruitstudentsSourceInList = new List<CF_RecruitstudentsSource>();
- List<Guid> needEditIDList = new List<Guid>();
- List<Guid> needSubmitIDList = new List<Guid>();
- List<Sys_User> userUpList = new List<Sys_User>();
- List<CF_Student> studentUpList = new List<CF_Student>();
- List<CF_StudentProfile> studentProfileUpList = new List<CF_StudentProfile>();
- List<CF_StudentContact> studentContactUpList = new List<CF_StudentContact>();
- List<CF_StudentAccount> studentAccountUpList = new List<CF_StudentAccount>();
- List<CF_Recruitstudents> recruitstudentsUpList = new List<CF_Recruitstudents>();
- List<CF_StudentRecordChangeHistory> studentRecordChangeHistoryInList = new List<CF_StudentRecordChangeHistory>();
- bool isUserCheck = false;
- bool isStudentCheck = false;
- bool isStuProfileCheck = false;
- bool isStuContactCheck = false;
- bool isStuAccountCheck = false;
- bool isStuRecruitCheck = false;
- var student = StudentDAL.StudentRepository.GetList(x => x.UserID == userID, (x => x.CF_StudentProfile), (x => x.CF_StudentContact), (x => x.CF_StudentAccount), (x => x.CF_Recruitstudents), (x => x.Sys_User)).SingleOrDefault();
- var checkingControlGroupByDictionary = checkingControlEditList.GroupBy(x => x.CheckingTypeID).ToDictionary(x => x.Key, x => x.DefaultIfEmpty());
- foreach (var checkingControlGroupBy in checkingControlGroupByDictionary)
- {
- #region
- isUserCheck = false;
- isStudentCheck = false;
- isStuProfileCheck = false;
- isStuContactCheck = false;
- isStuAccountCheck = false;
- isStuRecruitCheck = false;
- var studentContrast = new CF_StudentContrast();
- studentContrast.StudentContrastID = Guid.NewGuid();
- studentContrast.UserID = student.UserID;
- studentContrast.ClassmajorID = student.ClassmajorID;
- studentContrast.SexID = student.SexID;
- studentContrast.BirthDate = student.BirthDate;
- studentContrast.NationID = student.NationID;
- studentContrast.PoliticsID = student.PoliticsID;
- studentContrast.CertificatesType = student.CertificatesType;
- studentContrast.IDNumber = student.IDNumber;
- studentContrast.StudentType = student.StudentType;
- studentContrast.InSchoolStatusID = student.InSchoolStatusID;
- studentContrast.StudentStatus = student.StudentStatus;
- studentContrast.StudentCardNo = student.StudentCardNo;
- studentContrast.PhotoUrl = student.PhotoUrl;
- studentContrast.PlanningGraduateDate = student.PlanningGraduateDate;
- studentContrast.GraduateDate = student.GraduateDate;
- studentContrast.GraduateCardNo = student.GraduateCardNo;
- studentContrast.ReplaceGraduateNo = student.ReplaceGraduateNo;
- studentContrast.DegreeStatus = student.DegreeStatus;
- studentContrast.GraduationPictureUrl = student.GraduationPictureUrl;
- studentContrast.Career = student.Career;
- studentContrast.IsPhotoComparison = student.IsPhotoComparison;
- studentContrast.IsProofread = student.IsProofread;
- studentContrast.Remark = student.Remark;
- studentContrast.IP = HttpContext.Current.Request.UserHostAddress;
- studentContrast.ApprovalStatus = startStatusID;
- studentContrast.Comment = null;
- studentContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- studentContrast.CreateUserID = userID;
- studentContrast.CreateTime = DateTime.Now;
- studentContrast.ModifyUserID = userID;
- studentContrast.ModifyTime = DateTime.Now;
- var studentSource = new CF_StudentSource();
- studentSource.StudentContrastID = studentContrast.StudentContrastID;
- studentSource.ClassmajorID = student.ClassmajorID;
- studentSource.SexID = student.SexID;
- studentSource.BirthDate = student.BirthDate;
- studentSource.NationID = student.NationID;
- studentSource.PoliticsID = student.PoliticsID;
- studentSource.CertificatesType = student.CertificatesType;
- studentSource.IDNumber = student.IDNumber;
- studentSource.StudentType = student.StudentType;
- studentSource.InSchoolStatusID = student.InSchoolStatusID;
- studentSource.StudentStatus = student.StudentStatus;
- studentSource.StudentCardNo = student.StudentCardNo;
- studentSource.PhotoUrl = student.PhotoUrl;
- studentSource.PlanningGraduateDate = student.PlanningGraduateDate;
- studentSource.GraduateDate = student.GraduateDate;
- studentSource.GraduateCardNo = student.GraduateCardNo;
- studentSource.ReplaceGraduateNo = student.ReplaceGraduateNo;
- studentSource.DegreeStatus = student.DegreeStatus;
- studentSource.GraduationPictureUrl = student.GraduationPictureUrl;
- studentSource.Career = student.Career;
- studentSource.IsPhotoComparison = student.IsPhotoComparison;
- studentSource.IsProofread = student.IsProofread;
- studentSource.Remark = student.Remark;
- var userContrast = new Sys_UserContrast();
- userContrast.StudentContrastID = studentContrast.StudentContrastID;
- userContrast.LoginID = student.Sys_User.LoginID;
- userContrast.Name = student.Sys_User.Name;
- userContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- userContrast.CreateUserID = userID;
- userContrast.CreateTime = DateTime.Now;
- userContrast.ModifyUserID = userID;
- userContrast.ModifyTime = DateTime.Now;
- var userSource = new Sys_UserSource();
- userSource.StudentContrastID = studentContrast.StudentContrastID;
- userSource.LoginID = student.Sys_User.LoginID;
- userSource.Name = student.Sys_User.Name;
- var studentProfileContrast = new CF_StudentProfileContrast();
- studentProfileContrast.StudentContrastID = studentContrast.StudentContrastID;
- studentProfileContrast.UsedName = student.CF_StudentProfile.UsedName;
- studentProfileContrast.LiteracyLevelID = student.CF_StudentProfile.LiteracyLevelID;
- studentProfileContrast.CultureModelID = student.CF_StudentProfile.CultureModelID;
- studentProfileContrast.IsDreamProject = student.CF_StudentProfile.IsDreamProject;
- studentProfileContrast.Country = student.CF_StudentProfile.Country;
- studentProfileContrast.Place = student.CF_StudentProfile.Place;
- studentProfileContrast.BornPlace = student.CF_StudentProfile.BornPlace;
- studentProfileContrast.HealthStateID = student.CF_StudentProfile.HealthStateID;
- studentProfileContrast.BloodGroup = student.CF_StudentProfile.BloodGroup;
- studentProfileContrast.Specialty = student.CF_StudentProfile.Specialty;
- studentProfileContrast.Height = student.CF_StudentProfile.Height;
- studentProfileContrast.Weight = student.CF_StudentProfile.Weight;
- studentProfileContrast.DirectorName = student.CF_StudentProfile.DirectorName;
- studentProfileContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- studentProfileContrast.CreateUserID = userID;
- studentProfileContrast.CreateTime = DateTime.Now;
- studentProfileContrast.ModifyUserID = userID;
- studentProfileContrast.ModifyTime = DateTime.Now;
- var studentProfileSource = new CF_StudentProfileSource();
- studentProfileSource.StudentContrastID = studentContrast.StudentContrastID;
- studentProfileSource.UsedName = student.CF_StudentProfile.UsedName;
- studentProfileSource.LiteracyLevelID = student.CF_StudentProfile.LiteracyLevelID;
- studentProfileSource.CultureModelID = student.CF_StudentProfile.CultureModelID;
- studentProfileSource.IsDreamProject = student.CF_StudentProfile.IsDreamProject;
- studentProfileSource.Country = student.CF_StudentProfile.Country;
- studentProfileSource.Place = student.CF_StudentProfile.Place;
- studentProfileSource.BornPlace = student.CF_StudentProfile.BornPlace;
- studentProfileSource.HealthStateID = student.CF_StudentProfile.HealthStateID;
- studentProfileSource.BloodGroup = student.CF_StudentProfile.BloodGroup;
- studentProfileSource.Specialty = student.CF_StudentProfile.Specialty;
- studentProfileSource.Height = student.CF_StudentProfile.Height;
- studentProfileSource.Weight = student.CF_StudentProfile.Weight;
- studentProfileSource.DirectorName = student.CF_StudentProfile.DirectorName;
- var studentContactContrast = new CF_StudentContactContrast();
- studentContactContrast.StudentContrastID = studentContrast.StudentContrastID;
- studentContactContrast.Email = student.CF_StudentContact.Email;
- studentContactContrast.Telephone = student.CF_StudentContact.Telephone;
- studentContactContrast.Mobile = student.CF_StudentContact.Mobile;
- studentContactContrast.ZIPCode = student.CF_StudentContact.ZIPCode;
- studentContactContrast.WeChatNum = student.CF_StudentContact.WeChatNum;
- studentContactContrast.QQ = student.CF_StudentContact.QQ;
- studentContactContrast.HomeAddress = student.CF_StudentContact.HomeAddress;
- studentContactContrast.WorkUnit = student.CF_StudentContact.WorkUnit;
- studentContactContrast.Address = student.CF_StudentContact.Address;
- studentContactContrast.Recipient = student.CF_StudentContact.Recipient;
- studentContactContrast.Dormitory = student.CF_StudentContact.Dormitory;
- studentContactContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- studentContactContrast.CreateUserID = userID;
- studentContactContrast.CreateTime = DateTime.Now;
- studentContactContrast.ModifyUserID = userID;
- studentContactContrast.ModifyTime = DateTime.Now;
- var studentContactSource = new CF_StudentContactSource();
- studentContactSource.StudentContrastID = studentContrast.StudentContrastID;
- studentContactSource.Email = student.CF_StudentContact.Email;
- studentContactSource.Telephone = student.CF_StudentContact.Telephone;
- studentContactSource.Mobile = student.CF_StudentContact.Mobile;
- studentContactSource.ZIPCode = student.CF_StudentContact.ZIPCode;
- studentContactSource.WeChatNum = student.CF_StudentContact.WeChatNum;
- studentContactSource.QQ = student.CF_StudentContact.QQ;
- studentContactSource.HomeAddress = student.CF_StudentContact.HomeAddress;
- studentContactSource.WorkUnit = student.CF_StudentContact.WorkUnit;
- studentContactSource.Address = student.CF_StudentContact.Address;
- studentContactSource.Recipient = student.CF_StudentContact.Recipient;
- studentContactSource.Dormitory = student.CF_StudentContact.Dormitory;
- var studentAccountContrast = new CF_StudentAccountContrast();
- studentAccountContrast.StudentContrastID = studentContrast.StudentContrastID;
- studentAccountContrast.CardNo = student.CF_StudentAccount.CardNo;
- studentAccountContrast.BankName = student.CF_StudentAccount.BankName;
- studentAccountContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- studentAccountContrast.CreateUserID = userID;
- studentAccountContrast.CreateTime = DateTime.Now;
- studentAccountContrast.ModifyUserID = userID;
- studentAccountContrast.ModifyTime = DateTime.Now;
- var studentAccountSource = new CF_StudentAccountSource();
- studentAccountSource.StudentContrastID = studentContrast.StudentContrastID;
- studentAccountSource.CardNo = student.CF_StudentAccount.CardNo;
- studentAccountSource.BankName = student.CF_StudentAccount.BankName;
- var recruitstudentsContrast = new CF_RecruitstudentsContrast();
- recruitstudentsContrast.StudentContrastID = studentContrast.StudentContrastID;
- recruitstudentsContrast.ExamineeNum = student.CF_Recruitstudents.ExamineeNum;
- recruitstudentsContrast.AdmissionTicketNo = student.CF_Recruitstudents.AdmissionTicketNo;
- recruitstudentsContrast.ExamineeType = student.CF_Recruitstudents.ExamineeType;
- recruitstudentsContrast.EnteringSchoolYearID = student.CF_Recruitstudents.EnteringSchoolYearID;
- recruitstudentsContrast.EntranceDate = student.CF_Recruitstudents.EntranceDate;
- recruitstudentsContrast.Score = student.CF_Recruitstudents.Score;
- recruitstudentsContrast.EntranceWayID = student.CF_Recruitstudents.EntranceWayID;
- recruitstudentsContrast.FeaturesID = student.CF_Recruitstudents.FeaturesID;
- recruitstudentsContrast.TerritorialID = student.CF_Recruitstudents.TerritorialID;
- recruitstudentsContrast.Area = student.CF_Recruitstudents.Area;
- recruitstudentsContrast.RecruitPictureUrl = student.CF_Recruitstudents.RecruitPictureUrl;
- recruitstudentsContrast.RecordStatus = (int)SYS_STATUS.USABLE;
- recruitstudentsContrast.CreateUserID = userID;
- recruitstudentsContrast.CreateTime = DateTime.Now;
- recruitstudentsContrast.ModifyUserID = userID;
- recruitstudentsContrast.ModifyTime = DateTime.Now;
- var recruitstudentsSource = new CF_RecruitstudentsSource();
- recruitstudentsSource.StudentContrastID = studentContrast.StudentContrastID;
- recruitstudentsSource.ExamineeNum = student.CF_Recruitstudents.ExamineeNum;
- recruitstudentsSource.AdmissionTicketNo = student.CF_Recruitstudents.AdmissionTicketNo;
- recruitstudentsSource.ExamineeType = student.CF_Recruitstudents.ExamineeType;
- recruitstudentsSource.EnteringSchoolYearID = student.CF_Recruitstudents.EnteringSchoolYearID;
- recruitstudentsSource.EntranceDate = student.CF_Recruitstudents.EntranceDate;
- recruitstudentsSource.Score = student.CF_Recruitstudents.Score;
- recruitstudentsSource.EntranceWayID = student.CF_Recruitstudents.EntranceWayID;
- recruitstudentsSource.FeaturesID = student.CF_Recruitstudents.FeaturesID;
- recruitstudentsSource.TerritorialID = student.CF_Recruitstudents.TerritorialID;
- recruitstudentsSource.Area = student.CF_Recruitstudents.Area;
- recruitstudentsSource.RecruitPictureUrl = student.CF_Recruitstudents.RecruitPictureUrl;
- #endregion
- if (checkingControlGroupBy.Key == (int)CF_CheckingType.AllOpen)
- {
- foreach (var checkingControl in checkingControlGroupBy.Value)
- {
- #region
- var keyValuePair = studentViewDataList.Where(x => x.Key == checkingControl.ColumnName).SingleOrDefault();
- var approveColumnName = approveColumnNameList.Where(x => x.Key.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- var userProperty = typeof(Sys_User).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userProperty != null)
- {
- if (!(userProperty.GetValue(student.Sys_User, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var userContrastProperty = typeof(Sys_UserContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userContrastProperty != null)
- {
- userContrastProperty.SetValue(userContrast, studentViewDataList[keyValuePair.Key], null);
- userContrast.ModifyUserID = userID;
- userContrast.ModifyTime = DateTime.Now;
- userProperty.SetValue(student.Sys_User, studentViewDataList[keyValuePair.Key], null);
- isUserCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProperty = typeof(CF_Student).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProperty != null)
- {
- if (!(studentProperty.GetValue(student, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContrastProperty = typeof(CF_StudentContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContrastProperty != null)
- {
- studentContrastProperty.SetValue(studentContrast, studentViewDataList[keyValuePair.Key], null);
- studentContrast.ModifyUserID = userID;
- studentContrast.ModifyTime = DateTime.Now;
- studentProperty.SetValue(student, studentViewDataList[keyValuePair.Key], null);
- isStudentCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProfileProperty = typeof(CF_StudentProfile).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileProperty != null)
- {
- if (!(studentProfileProperty.GetValue(student.CF_StudentProfile, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentProfileContrastProperty = typeof(CF_StudentProfileContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileContrastProperty != null)
- {
- studentProfileContrastProperty.SetValue(studentProfileContrast, studentViewDataList[keyValuePair.Key], null);
- studentProfileContrast.ModifyUserID = userID;
- studentProfileContrast.ModifyTime = DateTime.Now;
- studentProfileProperty.SetValue(student.CF_StudentProfile, studentViewDataList[keyValuePair.Key], null);
- isStuProfileCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentContactProperty = typeof(CF_StudentContact).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactProperty != null)
- {
- if (!(studentContactProperty.GetValue(student.CF_StudentContact, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContactContrastProperty = typeof(CF_StudentContactContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactContrastProperty != null)
- {
- studentContactContrastProperty.SetValue(studentContactContrast, studentViewDataList[keyValuePair.Key], null);
- studentContactContrast.ModifyUserID = userID;
- studentContactContrast.ModifyTime = DateTime.Now;
- studentContactProperty.SetValue(student.CF_StudentContact, studentViewDataList[keyValuePair.Key], null);
- isStuContactCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentAccountProperty = typeof(CF_StudentAccount).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountProperty != null)
- {
- if (!(studentAccountProperty.GetValue(student.CF_StudentAccount, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentAccountContrastProperty = typeof(CF_StudentAccountContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountContrastProperty != null)
- {
- studentAccountContrastProperty.SetValue(studentAccountContrast, studentViewDataList[keyValuePair.Key], null);
- studentAccountContrast.ModifyUserID = userID;
- studentAccountContrast.ModifyTime = DateTime.Now;
- studentAccountProperty.SetValue(student.CF_StudentAccount, studentViewDataList[keyValuePair.Key], null);
- isStuAccountCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var recruitstudentsProperty = typeof(CF_Recruitstudents).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsProperty != null)
- {
- if (!(recruitstudentsProperty.GetValue(student.CF_Recruitstudents, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var recruitstudentsContrastProperty = typeof(CF_RecruitstudentsContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsContrastProperty != null)
- {
- recruitstudentsContrastProperty.SetValue(recruitstudentsContrast, studentViewDataList[keyValuePair.Key], null);
- recruitstudentsContrast.ModifyUserID = userID;
- recruitstudentsContrast.ModifyTime = DateTime.Now;
- recruitstudentsProperty.SetValue(student.CF_Recruitstudents, studentViewDataList[keyValuePair.Key], null);
- isStuRecruitCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.UNUSABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- #endregion
- }
- if (isUserCheck || isStudentCheck || isStuProfileCheck || isStuContactCheck || isStuAccountCheck || isStuRecruitCheck)
- {
- #region
- studentContrastInList.Add(studentContrast);
- studentSourceInList.Add(studentSource);
- userContrastInList.Add(userContrast);
- userSourceInList.Add(userSource);
- studentProfileContrastInList.Add(studentProfileContrast);
- studentProfileSourceInList.Add(studentProfileSource);
- studentContactContrastInList.Add(studentContactContrast);
- studentContactSourceInList.Add(studentContactSource);
- studentAccountContrastInList.Add(studentAccountContrast);
- studentAccountSourceInList.Add(studentAccountSource);
- recruitstudentsContrastInList.Add(recruitstudentsContrast);
- recruitstudentsSourceInList.Add(recruitstudentsSource);
- needEditIDList.Add(studentContrast.StudentContrastID);
- if (isUserCheck)
- {
- student.Sys_User.ModifyUserID = userID;
- student.Sys_User.ModifyTime = DateTime.Now;
- userUpList.Add(student.Sys_User);
- }
- if (isStudentCheck)
- {
- student.ModifyUserID = userID;
- student.ModifyTime = DateTime.Now;
- studentUpList.Add(student);
- }
- if (isStuProfileCheck)
- {
- student.CF_StudentProfile.ModifyUserID = userID;
- student.CF_StudentProfile.ModifyTime = DateTime.Now;
- studentProfileUpList.Add(student.CF_StudentProfile);
- }
- if (isStuContactCheck)
- {
- student.CF_StudentContact.ModifyUserID = userID;
- student.CF_StudentContact.ModifyTime = DateTime.Now;
- studentContactUpList.Add(student.CF_StudentContact);
- }
- if (isStuAccountCheck)
- {
- student.CF_StudentAccount.ModifyUserID = userID;
- student.CF_StudentAccount.ModifyTime = DateTime.Now;
- studentAccountUpList.Add(student.CF_StudentAccount);
- }
- if (isStuRecruitCheck)
- {
- student.CF_Recruitstudents.ModifyUserID = userID;
- student.CF_Recruitstudents.ModifyTime = DateTime.Now;
- recruitstudentsUpList.Add(student.CF_Recruitstudents);
- }
- #endregion
- }
- }
- else if (checkingControlGroupBy.Key == (int)CF_CheckingType.OpenRecord)
- {
- foreach (var checkingControl in checkingControlGroupBy.Value)
- {
- #region
- var keyValuePair = studentViewDataList.Where(x => x.Key == checkingControl.ColumnName).SingleOrDefault();
- var approveColumnName = approveColumnNameList.Where(x => x.Key.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- var userProperty = typeof(Sys_User).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userProperty != null)
- {
- if (!(userProperty.GetValue(student.Sys_User, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var userContrastProperty = typeof(Sys_UserContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userContrastProperty != null)
- {
- userContrastProperty.SetValue(userContrast, studentViewDataList[keyValuePair.Key], null);
- userContrast.ModifyUserID = userID;
- userContrast.ModifyTime = DateTime.Now;
- userProperty.SetValue(student.Sys_User, studentViewDataList[keyValuePair.Key], null);
- isUserCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProperty = typeof(CF_Student).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProperty != null)
- {
- if (!(studentProperty.GetValue(student, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContrastProperty = typeof(CF_StudentContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContrastProperty != null)
- {
- studentContrastProperty.SetValue(studentContrast, studentViewDataList[keyValuePair.Key], null);
- studentContrast.ModifyUserID = userID;
- studentContrast.ModifyTime = DateTime.Now;
- studentProperty.SetValue(student, studentViewDataList[keyValuePair.Key], null);
- isStudentCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProfileProperty = typeof(CF_StudentProfile).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileProperty != null)
- {
- if (!(studentProfileProperty.GetValue(student.CF_StudentProfile, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentProfileContrastProperty = typeof(CF_StudentProfileContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileContrastProperty != null)
- {
- studentProfileContrastProperty.SetValue(studentProfileContrast, studentViewDataList[keyValuePair.Key], null);
- studentProfileContrast.ModifyUserID = userID;
- studentProfileContrast.ModifyTime = DateTime.Now;
- studentProfileProperty.SetValue(student.CF_StudentProfile, studentViewDataList[keyValuePair.Key], null);
- isStuProfileCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentContactProperty = typeof(CF_StudentContact).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactProperty != null)
- {
- if (!(studentContactProperty.GetValue(student.CF_StudentContact, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContactContrastProperty = typeof(CF_StudentContactContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactContrastProperty != null)
- {
- studentContactContrastProperty.SetValue(studentContactContrast, studentViewDataList[keyValuePair.Key], null);
- studentContactContrast.ModifyUserID = userID;
- studentContactContrast.ModifyTime = DateTime.Now;
- studentContactProperty.SetValue(student.CF_StudentContact, studentViewDataList[keyValuePair.Key], null);
- isStuContactCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentAccountProperty = typeof(CF_StudentAccount).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountProperty != null)
- {
- if (!(studentAccountProperty.GetValue(student.CF_StudentAccount, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentAccountContrastProperty = typeof(CF_StudentAccountContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountContrastProperty != null)
- {
- studentAccountContrastProperty.SetValue(studentAccountContrast, studentViewDataList[keyValuePair.Key], null);
- studentAccountContrast.ModifyUserID = userID;
- studentAccountContrast.ModifyTime = DateTime.Now;
- studentAccountProperty.SetValue(student.CF_StudentAccount, studentViewDataList[keyValuePair.Key], null);
- isStuAccountCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var recruitstudentsProperty = typeof(CF_Recruitstudents).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsProperty != null)
- {
- if (!(recruitstudentsProperty.GetValue(student.CF_Recruitstudents, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var recruitstudentsContrastProperty = typeof(CF_RecruitstudentsContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsContrastProperty != null)
- {
- recruitstudentsContrastProperty.SetValue(recruitstudentsContrast, studentViewDataList[keyValuePair.Key], null);
- recruitstudentsContrast.ModifyUserID = userID;
- recruitstudentsContrast.ModifyTime = DateTime.Now;
- recruitstudentsProperty.SetValue(student.CF_Recruitstudents, studentViewDataList[keyValuePair.Key], null);
- isStuRecruitCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- #endregion
- }
- if (isUserCheck || isStudentCheck || isStuProfileCheck || isStuContactCheck || isStuAccountCheck || isStuRecruitCheck)
- {
- #region
- studentContrastInList.Add(studentContrast);
- studentSourceInList.Add(studentSource);
- userContrastInList.Add(userContrast);
- userSourceInList.Add(userSource);
- studentProfileContrastInList.Add(studentProfileContrast);
- studentProfileSourceInList.Add(studentProfileSource);
- studentContactContrastInList.Add(studentContactContrast);
- studentContactSourceInList.Add(studentContactSource);
- studentAccountContrastInList.Add(studentAccountContrast);
- studentAccountSourceInList.Add(studentAccountSource);
- recruitstudentsContrastInList.Add(recruitstudentsContrast);
- recruitstudentsSourceInList.Add(recruitstudentsSource);
- needEditIDList.Add(studentContrast.StudentContrastID);
- if (isUserCheck)
- {
- student.Sys_User.ModifyUserID = userID;
- student.Sys_User.ModifyTime = DateTime.Now;
- userUpList.Add(student.Sys_User);
- }
- if (isStudentCheck)
- {
- student.ModifyUserID = userID;
- student.ModifyTime = DateTime.Now;
- studentUpList.Add(student);
- }
- if (isStuProfileCheck)
- {
- student.CF_StudentProfile.ModifyUserID = userID;
- student.CF_StudentProfile.ModifyTime = DateTime.Now;
- studentProfileUpList.Add(student.CF_StudentProfile);
- }
- if (isStuContactCheck)
- {
- student.CF_StudentContact.ModifyUserID = userID;
- student.CF_StudentContact.ModifyTime = DateTime.Now;
- studentContactUpList.Add(student.CF_StudentContact);
- }
- if (isStuAccountCheck)
- {
- student.CF_StudentAccount.ModifyUserID = userID;
- student.CF_StudentAccount.ModifyTime = DateTime.Now;
- studentAccountUpList.Add(student.CF_StudentAccount);
- }
- if (isStuRecruitCheck)
- {
- student.CF_Recruitstudents.ModifyUserID = userID;
- student.CF_Recruitstudents.ModifyTime = DateTime.Now;
- recruitstudentsUpList.Add(student.CF_Recruitstudents);
- }
- #endregion
- }
- }
- else
- {
- foreach (var checkingControl in checkingControlGroupBy.Value)
- {
- #region
- var keyValuePair = studentViewDataList.Where(x => x.Key == checkingControl.ColumnName).SingleOrDefault();
- var approveColumnName = approveColumnNameList.Where(x => x.Key.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- var userProperty = typeof(Sys_User).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userProperty != null)
- {
- if (!(userProperty.GetValue(student.Sys_User, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var userContrastProperty = typeof(Sys_UserContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (userContrastProperty != null)
- {
- userContrastProperty.SetValue(userContrast, studentViewDataList[keyValuePair.Key], null);
- userContrast.ModifyUserID = userID;
- userContrast.ModifyTime = DateTime.Now;
- isUserCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProperty = typeof(CF_Student).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProperty != null)
- {
- if (!(studentProperty.GetValue(student, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContrastProperty = typeof(CF_StudentContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContrastProperty != null)
- {
- studentContrastProperty.SetValue(studentContrast, studentViewDataList[keyValuePair.Key], null);
- studentContrast.ModifyUserID = userID;
- studentContrast.ModifyTime = DateTime.Now;
- isStudentCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentProfileProperty = typeof(CF_StudentProfile).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileProperty != null)
- {
- if (!(studentProfileProperty.GetValue(student.CF_StudentProfile, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentProfileContrastProperty = typeof(CF_StudentProfileContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentProfileContrastProperty != null)
- {
- studentProfileContrastProperty.SetValue(studentProfileContrast, studentViewDataList[keyValuePair.Key], null);
- studentProfileContrast.ModifyUserID = userID;
- studentProfileContrast.ModifyTime = DateTime.Now;
- isStuProfileCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentContactProperty = typeof(CF_StudentContact).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactProperty != null)
- {
- if (!(studentContactProperty.GetValue(student.CF_StudentContact, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentContactContrastProperty = typeof(CF_StudentContactContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentContactContrastProperty != null)
- {
- studentContactContrastProperty.SetValue(studentContactContrast, studentViewDataList[keyValuePair.Key], null);
- studentContactContrast.ModifyUserID = userID;
- studentContactContrast.ModifyTime = DateTime.Now;
- isStuContactCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var studentAccountProperty = typeof(CF_StudentAccount).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountProperty != null)
- {
- if (!(studentAccountProperty.GetValue(student.CF_StudentAccount, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var studentAccountContrastProperty = typeof(CF_StudentAccountContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (studentAccountContrastProperty != null)
- {
- studentAccountContrastProperty.SetValue(studentAccountContrast, studentViewDataList[keyValuePair.Key], null);
- studentAccountContrast.ModifyUserID = userID;
- studentAccountContrast.ModifyTime = DateTime.Now;
- isStuAccountCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- var recruitstudentsProperty = typeof(CF_Recruitstudents).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsProperty != null)
- {
- if (!(recruitstudentsProperty.GetValue(student.CF_Recruitstudents, null) ?? "").Equals((studentViewDataList[keyValuePair.Key] ?? "")))
- {
- if (approveColumnName.Key == null)
- {
- var recruitstudentsContrastProperty = typeof(CF_RecruitstudentsContrast).GetProperties().Where(x => x.Name.ToLower() == keyValuePair.Key.ToLower()).SingleOrDefault();
- if (recruitstudentsContrastProperty != null)
- {
- recruitstudentsContrastProperty.SetValue(recruitstudentsContrast, studentViewDataList[keyValuePair.Key], null);
- recruitstudentsContrast.ModifyUserID = userID;
- recruitstudentsContrast.ModifyTime = DateTime.Now;
- isStuRecruitCheck = true;
- var checkingColumnDescription = checkingColumnDescriptionList.Where(x => x.ColumnName == keyValuePair.Key).SingleOrDefault();
- if (checkingColumnDescription != null)
- {
- var studentRecordChangeHistory = new CF_StudentRecordChangeHistory();
- studentRecordChangeHistory.StudentRecordChangeHistoryID = Guid.NewGuid();
- studentRecordChangeHistory.StudentContrastID = studentContrast.StudentContrastID;
- studentRecordChangeHistory.TableName = checkingColumnDescription.TableName;
- studentRecordChangeHistory.ColumnName = keyValuePair.Key;
- studentRecordChangeHistory.CheckingTypeID = checkingControlGroupBy.Key;
- studentRecordChangeHistory.RecordStatus = (int)SYS_STATUS.USABLE;
- studentRecordChangeHistory.CreateUserID = userID;
- studentRecordChangeHistory.CreateTime = DateTime.Now;
- studentRecordChangeHistory.ModifyUserID = userID;
- studentRecordChangeHistory.ModifyTime = DateTime.Now;
- studentRecordChangeHistoryInList.Add(studentRecordChangeHistory);
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("对应的比对信息表属性不存在(字段:" + keyValuePair.Key + ")。");
- }
- }
- else
- {
- throw new Exception("存在待审核的请求信息,如需继续请前往校对结果页面选择撤消对应的信息(校对名称:" + approveColumnName.Value + ")。");
- }
- }
- }
- #endregion
- }
- if (isUserCheck || isStudentCheck || isStuProfileCheck || isStuContactCheck || isStuAccountCheck || isStuRecruitCheck)
- {
- #region
- studentContrastInList.Add(studentContrast);
- studentSourceInList.Add(studentSource);
- userContrastInList.Add(userContrast);
- userSourceInList.Add(userSource);
- studentProfileContrastInList.Add(studentProfileContrast);
- studentProfileSourceInList.Add(studentProfileSource);
- studentContactContrastInList.Add(studentContactContrast);
- studentContactSourceInList.Add(studentContactSource);
- studentAccountContrastInList.Add(studentAccountContrast);
- studentAccountSourceInList.Add(studentAccountSource);
- recruitstudentsContrastInList.Add(recruitstudentsContrast);
- recruitstudentsSourceInList.Add(recruitstudentsSource);
- needSubmitIDList.Add(studentContrast.StudentContrastID);
- #endregion
- }
- }
- }
- if (studentContrastInList != null && studentContrastInList.Count() > 0)
- {
- TransactionOptions transactionOption = new TransactionOptions();
- transactionOption.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
- transactionOption.Timeout = new TimeSpan(0, 3, 0);
- using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, transactionOption))
- {
- UnitOfWork.BulkInsert<CF_StudentContrast>(studentContrastInList);
- UnitOfWork.BulkInsert<CF_StudentSource>(studentSourceInList);
- UnitOfWork.BulkInsert<Sys_UserContrast>(userContrastInList);
- UnitOfWork.BulkInsert<Sys_UserSource>(userSourceInList);
- UnitOfWork.BulkInsert<CF_StudentProfileContrast>(studentProfileContrastInList);
- UnitOfWork.BulkInsert<CF_StudentProfileSource>(studentProfileSourceInList);
- UnitOfWork.BulkInsert<CF_StudentContactContrast>(studentContactContrastInList);
- UnitOfWork.BulkInsert<CF_StudentContactSource>(studentContactSourceInList);
- UnitOfWork.BulkInsert<CF_StudentAccountContrast>(studentAccountContrastInList);
- UnitOfWork.BulkInsert<CF_StudentAccountSource>(studentAccountSourceInList);
- UnitOfWork.BulkInsert<CF_RecruitstudentsContrast>(recruitstudentsContrastInList);
- UnitOfWork.BulkInsert<CF_RecruitstudentsSource>(recruitstudentsSourceInList);
- UnitOfWork.BulkInsert<CF_StudentRecordChangeHistory>(studentRecordChangeHistoryInList);
- if (needEditIDList.Count > 0)
- {
- var startActionEditID = startActionViewList.Where(x => (x.Description ?? "").Contains("[ET]")).Select(x => x.ActionID).SingleOrDefault();
- if (startActionEditID == null)
- {
- throw new Exception("对应的流程动作未配置(修改)。");
- }
- else
- {
- foreach (var needEditID in needEditIDList)
- {
- this.StartUp(needEditID, userID.Value, startActionEditID, null);
- }
- }
- }
- if (needSubmitIDList.Count > 0)
- {
- var startActionSubmitID = startActionViewList.Where(x => (x.Description ?? "").Contains("[ST]")).Select(x => x.ActionID).SingleOrDefault();
- if (startActionSubmitID == null)
- {
- throw new Exception("对应的流程动作未配置(提交)。");
- }
- else
- {
- foreach (var needSubmitID in needSubmitIDList)
- {
- this.StartUp(needSubmitID, userID.Value, startActionSubmitID, null);
- }
- }
- }
- if (userUpList != null && userUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(userUpList);
- }
- if (studentUpList != null && studentUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(studentUpList);
- }
- if (studentProfileUpList != null && studentProfileUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(studentProfileUpList);
- }
- if (studentContactUpList != null && studentContactUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(studentContactUpList);
- }
- if (studentAccountUpList != null && studentAccountUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(studentAccountUpList);
- }
- if (recruitstudentsUpList != null && recruitstudentsUpList.Count() > 0)
- {
- UnitOfWork.BatchUpdate(recruitstudentsUpList);
- }
- ts.Complete();
- }
- }
- else
- {
- throw new Exception("未对任何信息进行校对。");
- }
- }
- else
- {
- throw new Exception("对应的校对字段说明未配置(为空)。");
- }
- }
- else
- {
- throw new Exception("对应的可校对控制信息为空(不可修改)。");
- }
- }
- catch (Exception ex)
- {
- throw new Exception(ex.Message);
- }
- }
- /// <summary>
- /// 学生个人信息核对
- /// </summary>
- /// <param name="userID"></param>
- public void StudentProofread(Guid? userID)
- {
- try
- {
- var student = StudentDAL.StudentRepository.GetList(x => x.UserID == userID).SingleOrDefault();
- if (student != null)
- {
- student.IsProofread = true;
- student.ModifyUserID = userID;
- student.ModifyTime = DateTime.Now;
- UnitOfWork.Commit();
- }
- else
- {
- throw new Exception("数据有误,请重新刷新加载。");
- }
- }
- catch (Exception ex)
- {
- throw new Exception(ex.Message);
- }
- }
- }
- }
|