培训发起人 培训记录人培训老师 如果是培训参训人 默认参加

This commit is contained in:
wyw 2026-07-23 16:11:11 +08:00
parent bdd9eadeda
commit eda8d6db8f

View File

@ -234,6 +234,35 @@ namespace APT.SC.WebApi.Controllers.Api.SE
#endregion #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) if (entity.ISSENDNOTICE)
{ {
entity.STATUS = SETrainNotifyStatus.; entity.STATUS = SETrainNotifyStatus.;
@ -301,26 +330,26 @@ namespace APT.SC.WebApi.Controllers.Api.SE
} }
//2023/04/23当前人自动签到 //2023/04/23当前人自动签到
var currTrainUser = Nav_TrainUserList.FirstOrDefault(t => t.USER_ID == entity.LAUNCH_USER_ID); //var currTrainUser = Nav_TrainUserList.FirstOrDefault(t => t.USER_ID == entity.LAUNCH_USER_ID);
if (currTrainUser != null) //if (currTrainUser != null)
{ //{
currTrainUser.IS_LEAVE = SETrainYesNoEnum.; // 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"); 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) if (listUserIDDo != null && listUserIDDo.Count > 0)
//{ {
// foreach (var item in sendNoticeTask) foreach (var item in sendNoticeTask)
// { {
// if (listAuto.Contains(item.USER_ID)) if (listUserIDDo.Contains(item.USER_ID))
// { {
// item.NOTICE_STATUS = 1; item.NOTICE_STATUS = 1;
// item.TASK_DT = DateTime.Now; item.TASK_DT = DateTime.Now;
// item.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; item.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
// } }
// } }
//} }
} }
else else
{ {