From b2f37958c445aba69c948e56f5b93630443eca79 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Tue, 23 Feb 2021 18:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E5=B7=A5=E4=BD=9C=E7=AE=A1=E7=90=86-=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E5=AE=A1=E6=A0=B8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/MeetingManagement/Index.js | 9 +- .../MeetingManagementService.cs | 143 ++++++++++-------- 2 files changed, 86 insertions(+), 66 deletions(-) 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;