手动 触发签到 待办人姓名 处理
This commit is contained in:
parent
1ed769e4d6
commit
27f2968dc5
@ -60,7 +60,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
throw new Exception("获取传参失败!");
|
throw new Exception("获取传参失败!");
|
||||||
}
|
}
|
||||||
var ru = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.ID == Record_USER_ID, "Nav_Record.Nav_Notify");
|
var ru = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.ID == Record_USER_ID, "Nav_Record.Nav_Notify", "Nav_User");
|
||||||
if (ru == null || ru.Nav_Record == null || ru.Nav_Record.Nav_Notify == null)
|
if (ru == null || ru.Nav_Record == null || ru.Nav_Record.Nav_Notify == null)
|
||||||
{
|
{
|
||||||
throw new Exception("获取信息失败,请重试或检查表单是否存在!");
|
throw new Exception("获取信息失败,请重试或检查表单是否存在!");
|
||||||
@ -75,14 +75,13 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
throw new Exception("该用户已有此签到单,请勿重复触发签到通知!");
|
throw new Exception("该用户已有此签到单,请勿重复触发签到通知!");
|
||||||
}
|
}
|
||||||
DateTime dtEnd = ru.Nav_Record.Nav_Notify.TRAIN_END_TIME.HasValue ? ru.Nav_Record.Nav_Notify.TRAIN_END_TIME.Value : DateTime.Now.AddHours(12);
|
DateTime dtEnd = ru.Nav_Record.Nav_Notify.TRAIN_END_TIME.HasValue ? ru.Nav_Record.Nav_Notify.TRAIN_END_TIME.Value : DateTime.Now.AddHours(12);
|
||||||
T_FM_NOTIFICATION_TASK notice = NotificationTaskService.InsertUserNoticeTaskModel("培训记录签到-" + ru.Nav_Record.Nav_Notify.NAME, ru.RECORD_ID, ru.ORG_ID, ru.USER_ID, "", DateTime.Now, dtEnd, 1, "SE017_SHOWPRINT");
|
T_FM_NOTIFICATION_TASK notice = NotificationTaskService.InsertUserNoticeTaskModel("培训记录签到-" + ru.Nav_Record.Nav_Notify.NAME, ru.RECORD_ID, ru.ORG_ID, ru.USER_ID, ru.Nav_User.NAME, DateTime.Now, dtEnd, 1, "SE017_SHOWPRINT");
|
||||||
|
|
||||||
ru.IS_RESEND = true;
|
ru.IS_RESEND = true;
|
||||||
ru.Nav_Record = null;
|
//ru.Nav_Record = null;//有这句会报错
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
AddEntityNoCommit(notice);
|
AddEntityNoCommit(notice);
|
||||||
UpdateEntity(ru);
|
UpdateEntityNoCommit(ru);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user