培训发起人 培训记录人培训老师 如果是培训参训人 默认参加
This commit is contained in:
parent
bdd9eadeda
commit
eda8d6db8f
@ -234,6 +234,35 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 发起人 培训老师 记录人 默认参加
|
||||
|
||||
//LAUNCH_USER_ID
|
||||
List<Guid> listUserIDDo = new List<Guid>();
|
||||
if (entity.LAUNCH_USER_ID.HasValue)
|
||||
{
|
||||
listUserIDDo.Add(entity.LAUNCH_USER_ID.Value);
|
||||
}
|
||||
if (entity.USER_ID_TEACHER.HasValue && !listUserIDDo.Contains(entity.USER_ID_TEACHER.Value))
|
||||
{
|
||||
listUserIDDo.Add(entity.USER_ID_TEACHER.Value);
|
||||
}
|
||||
if (entity.RECORD_USER_ID.HasValue && !listUserIDDo.Contains(entity.RECORD_USER_ID.Value))
|
||||
{
|
||||
listUserIDDo.Add(entity.RECORD_USER_ID.Value);
|
||||
}
|
||||
if (listUserIDDo.Count>0)
|
||||
{
|
||||
foreach (var item in Nav_TrainUserList)
|
||||
{
|
||||
if (listUserIDDo.Contains(item.USER_ID))
|
||||
{
|
||||
item.IS_LEAVE = SETrainYesNoEnum.参加;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (entity.ISSENDNOTICE)
|
||||
{
|
||||
entity.STATUS = SETrainNotifyStatus.通知中;
|
||||
@ -301,26 +330,26 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
}
|
||||
|
||||
//2023/04/23当前人自动签到
|
||||
var currTrainUser = Nav_TrainUserList.FirstOrDefault(t => t.USER_ID == entity.LAUNCH_USER_ID);
|
||||
if (currTrainUser != null)
|
||||
{
|
||||
currTrainUser.IS_LEAVE = SETrainYesNoEnum.参加;
|
||||
}
|
||||
//var currTrainUser = Nav_TrainUserList.FirstOrDefault(t => t.USER_ID == entity.LAUNCH_USER_ID);
|
||||
//if (currTrainUser != null)
|
||||
//{
|
||||
// currTrainUser.IS_LEAVE = SETrainYesNoEnum.参加;
|
||||
//}
|
||||
|
||||
sendNoticeTask = NotificationTaskService.InsertUserNoticeTaskModels("培训通知-" + entity.NAME + "-确认", entity.ID, entity.ORG_ID, sendUsers, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(1), (int)FMNoticeTypeEnum.消息, "SE013_SHOWPRINT");
|
||||
|
||||
//if (listAuto != null && listAuto.Count > 0)
|
||||
//{
|
||||
// foreach (var item in sendNoticeTask)
|
||||
// {
|
||||
// if (listAuto.Contains(item.USER_ID))
|
||||
// {
|
||||
// item.NOTICE_STATUS = 1;
|
||||
// item.TASK_DT = DateTime.Now;
|
||||
// item.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if (listUserIDDo != null && listUserIDDo.Count > 0)
|
||||
{
|
||||
foreach (var item in sendNoticeTask)
|
||||
{
|
||||
if (listUserIDDo.Contains(item.USER_ID))
|
||||
{
|
||||
item.NOTICE_STATUS = 1;
|
||||
item.TASK_DT = DateTime.Now;
|
||||
item.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user