Compare commits

...

2 Commits

2 changed files with 30 additions and 2 deletions

View File

@ -58,9 +58,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{
throw new Exception("截止时间至少比发起时间要大于一天");
}
if (Demands == null || !Demands.Any() || Demands.Count() < 1)
if (Demands == null || !Demands.Any() || Demands.Count() < 1 || Demands.Where(e => !e.IS_DELETED).Count() < 1)
{
throw new Exception("请添加培训人员信息!");
throw new Exception("请添加调查人员信息!");
}
if (entity.LAUNCH_USER_ID == Guid.Empty)
{

View File

@ -242,6 +242,16 @@ namespace APT.SC.WebApi.Controllers.Api.SE
userFilter.Include = new string[] { "Nav_Person.Nav_Post", "Nav_Department" };
IEnumerable<T_FM_USER> userNames = GetEntities<T_FM_USER>(t => sendUserAll.Contains(t.ID), userFilter);
//List<Guid> listAuto = new List<Guid>();
//if (entity.RECORD_USER_ID.HasValue && sendUsers.Contains(entity.RECORD_USER_ID.Value))
//{
// listAuto.Add(entity.RECORD_USER_ID.Value);
//}
//if (entity.USER_ID_TEACHER.HasValue && !listAuto.Contains(entity.USER_ID_TEACHER.Value))
//{
// listAuto.Add(entity.USER_ID_TEACHER.Value);
//}
T_FM_USER userCheck = null;
foreach (var user in Nav_TrainUserList)
{
@ -275,6 +285,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
user.DEPARTMENT_NAME = userCheck.Nav_Department?.NAME;
user.POST_NAME = userCheck.Nav_Person?.Nav_Post?.NAME;
//if (listAuto != null && listAuto.Count > 0 && listAuto.Contains(user.USER_ID))
//{
// user.IS_LEAVE = SETrainYesNoEnum.参加;
//}
}
foreach (var user in sendUsers)
{
@ -289,6 +304,19 @@ namespace APT.SC.WebApi.Controllers.Api.SE
}
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;
// }
// }
//}
}
else
{