diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js index 7519ff62e..d1cff2e41 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js @@ -178,12 +178,17 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('user', { key: value, callback: function (_data) { - callback(_data.name); + //callback(_data.name); + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : callback(_data.name); } }); } }, - { label: "审核时间", name: "CheckTime", width: 120, align: "left" }, + { + label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value,row) { + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : value; + } + }, ], mainId: 'Id', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs index a6778004e..321a46ae5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs @@ -186,74 +186,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { entity.Modify(keyValue, userInfo); db.Update(entity); - //会议签到记录表中先删除参会人员记录,再增加参会人员; - db.Delete(x => x.MeetID == entity.Id); } else { entity.Create(userInfo); db.Insert(entity); - //会议签到记录表中增加参会人员; - } - //增加校内参入人员: - if (!string.IsNullOrEmpty(entity.InternalParticipants)) - { - if (entity.InternalParticipants.IndexOf(',') == -1) - { - var model = new MeetingSignInRecordEntity() - { - MeetID = entity.Id, - ParticipantID = entity.InternalParticipants, - ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == entity.InternalParticipants)?.F_RealName, - IsSignIn = false - }; - model.Create(userInfo); - db.Insert(model); - } - else - { - foreach (var item in entity.InternalParticipants.Split(',')) - { - var model = new MeetingSignInRecordEntity() - { - MeetID = entity.Id, - ParticipantID = item, - ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == item)?.F_RealName, - IsSignIn = false - }; - model.Create(userInfo); - db.Insert(model); - } - } - } - //增加校外参入人员: - if (!string.IsNullOrEmpty(entity.ExternalParticipants)) - { - if (entity.ExternalParticipants.IndexOf(',') == -1) - { - var model = new MeetingSignInRecordEntity() - { - MeetID = entity.Id, - ParticipantName = entity.ExternalParticipants, - IsSignIn = false - }; - model.Create(userInfo); - db.Insert(model); - } - else - { - foreach (var item in entity.ExternalParticipants.Split(',')) - { - var model = new MeetingSignInRecordEntity() - { - MeetID = entity.Id, - ParticipantName = item, - IsSignIn = false - }; - model.Create(userInfo); - db.Insert(model); - } - } } db.Commit(); @@ -279,12 +216,90 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// public void DoCheck(UserInfo userInfo, string keyValue, string status) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - this.BaseRepository("CollegeMIS").ExecuteBySql("update MeetingManagement set CheckStatus='" + status + "',CheckUser='" + userInfo.userId + "',CheckTime='" + DateTime.Now + "' where Id='" + keyValue + "' "); + //修改会议工作管理表的审核字段; + db.ExecuteBySql("update MeetingManagement set CheckStatus='" + status + "',CheckUser='" + userInfo.userId + "',CheckTime='" + DateTime.Now + "' where Id='" + keyValue + "' "); + if (status == "1")//审核通过:会议签到记录表中增加参会人员; + { + var entity = db.FindEntity(x => x.Id == keyValue); + if (entity != null) + { + //增加校内参入人员: + if (!string.IsNullOrEmpty(entity.InternalParticipants)) + { + if (entity.InternalParticipants.IndexOf(',') == -1) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantID = entity.InternalParticipants, + ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == entity.InternalParticipants)?.F_RealName, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + else + { + foreach (var item in entity.InternalParticipants.Split(',')) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantID = item, + ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == item)?.F_RealName, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + } + } + //增加校外参入人员: + if (!string.IsNullOrEmpty(entity.ExternalParticipants)) + { + if (entity.ExternalParticipants.IndexOf(',') == -1) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantName = entity.ExternalParticipants, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + else + { + foreach (var item in entity.ExternalParticipants.Split(',')) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantName = item, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + } + } + + } + } + else if (status == "2") //审核不通过:会议签到记录表中删除参会人员记录; + { + db.Delete(x => x.MeetID == keyValue); + } + + db.Commit(); + } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw;