排序开始时间等于 签到开始时间 不限制
不触发培训反馈 人员所在岗位、组织 缓存数据处理
This commit is contained in:
parent
129d5455bd
commit
59f9cf439c
@ -70,7 +70,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
//{
|
//{
|
||||||
// throw new Exception("签到开始时间不能大于培训结束时间!");
|
// throw new Exception("签到开始时间不能大于培训结束时间!");
|
||||||
//}
|
//}
|
||||||
if (entity.DT_START_SIGN.HasValue && entity.TRAIN_START_TIME.HasValue && entity.DT_START_SIGN.Value >= entity.TRAIN_START_TIME.Value)
|
if (entity.DT_START_SIGN.HasValue && entity.TRAIN_START_TIME.HasValue && entity.DT_START_SIGN.Value > entity.TRAIN_START_TIME.Value)
|
||||||
{
|
{
|
||||||
throw new Exception("签到开始时间不能大于培训开始时间!");
|
throw new Exception("签到开始时间不能大于培训开始时间!");
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
listUserIDDo.Add(entity.RECORD_USER_ID.Value);
|
listUserIDDo.Add(entity.RECORD_USER_ID.Value);
|
||||||
}
|
}
|
||||||
if (listUserIDDo.Count>0)
|
if (listUserIDDo.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in Nav_TrainUserList)
|
foreach (var item in Nav_TrainUserList)
|
||||||
{
|
{
|
||||||
@ -263,17 +263,17 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
var sendUserAll = Nav_TrainUserList.Where(t => t.IS_DELETED == false).Select(t => t.USER_ID).ToList();
|
||||||
|
BaseFilter userFilter = new BaseFilter(entity.ORG_ID);
|
||||||
|
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);
|
||||||
|
T_FM_USER userCheck = null;
|
||||||
if (entity.ISSENDNOTICE)
|
if (entity.ISSENDNOTICE)
|
||||||
{
|
{
|
||||||
entity.STATUS = SETrainNotifyStatus.通知中;
|
entity.STATUS = SETrainNotifyStatus.通知中;
|
||||||
//触发培训通知给所有培训人员
|
//触发培训通知给所有培训人员
|
||||||
var allSendUserNames = new List<string>();
|
var allSendUserNames = new List<string>();
|
||||||
var sendUsers = Nav_TrainUserList.Where(t => t.IS_DELETED == false && t.USER_ID != entity.LAUNCH_USER_ID).Select(t => t.USER_ID).ToList();
|
var sendUsers = Nav_TrainUserList.Where(t => t.IS_DELETED == false && t.USER_ID != entity.LAUNCH_USER_ID).Select(t => t.USER_ID).ToList();
|
||||||
var sendUserAll = Nav_TrainUserList.Where(t => t.IS_DELETED == false).Select(t => t.USER_ID).ToList();
|
|
||||||
|
|
||||||
BaseFilter userFilter = new BaseFilter(entity.ORG_ID);
|
|
||||||
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>();
|
//List<Guid> listAuto = new List<Guid>();
|
||||||
//if (entity.RECORD_USER_ID.HasValue && sendUsers.Contains(entity.RECORD_USER_ID.Value))
|
//if (entity.RECORD_USER_ID.HasValue && sendUsers.Contains(entity.RECORD_USER_ID.Value))
|
||||||
@ -285,7 +285,6 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
// listAuto.Add(entity.USER_ID_TEACHER.Value);
|
// listAuto.Add(entity.USER_ID_TEACHER.Value);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
T_FM_USER userCheck = null;
|
|
||||||
foreach (var user in Nav_TrainUserList)
|
foreach (var user in Nav_TrainUserList)
|
||||||
{
|
{
|
||||||
if (user.IS_DELETED)
|
if (user.IS_DELETED)
|
||||||
@ -353,6 +352,20 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
foreach (var item in Nav_TrainUserList)
|
||||||
|
{
|
||||||
|
if (item.IS_DELETED)
|
||||||
|
continue;
|
||||||
|
userCheck = userNames.FirstOrDefault(t => t.ID == item.USER_ID);
|
||||||
|
|
||||||
|
item.IS_LEAVE = SETrainYesNoEnum.参加;
|
||||||
|
if (userCheck != null)
|
||||||
|
{
|
||||||
|
item.DEPARTMENT_NAME = userCheck?.Nav_Department?.NAME;
|
||||||
|
item.POST_NAME = userCheck.Nav_Person?.Nav_Post?.NAME;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//没有触发培训通知
|
//没有触发培训通知
|
||||||
if (entity.CREATE_NOTIFY_RECORD)
|
if (entity.CREATE_NOTIFY_RECORD)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user