|
|
@@ -186,74 +186,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement |
|
|
|
{ |
|
|
|
entity.Modify(keyValue, userInfo); |
|
|
|
db.Update(entity); |
|
|
|
//会议签到记录表中先删除参会人员记录,再增加参会人员; |
|
|
|
db.Delete<MeetingSignInRecordEntity>(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<UserEntity>(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<UserEntity>(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 |
|
|
|
/// <returns></returns> |
|
|
|
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<MeetingManagementEntity>(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<UserEntity>(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<UserEntity>(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<MeetingSignInRecordEntity>(x => x.MeetID == keyValue); |
|
|
|
} |
|
|
|
|
|
|
|
db.Commit(); |
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
db.Rollback(); |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|