签到完成 给安环人员返送信息 修改
找安环人员 service方法 修改
This commit is contained in:
parent
211114b332
commit
98bac0bc6e
@ -105,9 +105,9 @@ namespace APT.BaseData.Domain.IServices.FM
|
|||||||
List<T_FM_USER> GetDepPostUser(ref string Msg, Guid DEPARTMENT_ID, Guid POST_ID, bool IsOnly);
|
List<T_FM_USER> GetDepPostUser(ref string Msg, Guid DEPARTMENT_ID, Guid POST_ID, bool IsOnly);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 找安环部人员
|
/// 找安环部人员 默认 安环安全员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="UserType">1 NUM 从小到大 找第一个 2 NUM 找老大</param>
|
/// <param name="UserType">1 NUM 从小到大 找第一个 10 NUM 找老大</param>
|
||||||
/// <param name="ORG_ID">1</param>
|
/// <param name="ORG_ID">1</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
T_FM_USER GetSafeApproveUser(Guid ORG_ID, int UserType = 1);
|
T_FM_USER GetSafeApproveUser(Guid ORG_ID, int UserType = 1);
|
||||||
|
|||||||
@ -997,7 +997,7 @@ namespace APT.BaseData.Services.Services.FM
|
|||||||
#region 找安环部人员
|
#region 找安环部人员
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 找安环部人员
|
/// 找安环部人员 默认 安环安全员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="UserType">1 NUM 从小到大 找第一个 10 NUM 找老大</param>
|
/// <param name="UserType">1 NUM 从小到大 找第一个 10 NUM 找老大</param>
|
||||||
/// <param name="ORG_ID">1</param>
|
/// <param name="ORG_ID">1</param>
|
||||||
|
|||||||
@ -25,9 +25,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
public class SETrainRecordController : AuthorizeApiController<T_SE_TRAIN_RECORD>
|
public class SETrainRecordController : AuthorizeApiController<T_SE_TRAIN_RECORD>
|
||||||
{
|
{
|
||||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||||
public SETrainRecordController(IFMNotificationTaskService notificationTaskService)
|
IFMUserService UserService { get; set; }
|
||||||
|
public SETrainRecordController(IFMNotificationTaskService notificationTaskService, IFMUserService userService)
|
||||||
{
|
{
|
||||||
NotificationTaskService = notificationTaskService;
|
NotificationTaskService = notificationTaskService;
|
||||||
|
UserService = userService;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存
|
/// 保存
|
||||||
@ -517,13 +519,18 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
if (userCount == 0 && !isReSend)
|
if (userCount == 0 && !isReSend)
|
||||||
{
|
{
|
||||||
record.STATUS = SETrainRecordStatus.审阅中;
|
record.STATUS = SETrainRecordStatus.审阅中;
|
||||||
var chargeUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole.NAME == "安环部负责人");
|
T_FM_USER chargeUser = UserService.GetSafeApproveUser(record.ORG_ID.Value, 10);
|
||||||
if (chargeUser == null)
|
|
||||||
|
//var chargeUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole.NAME == "安环部负责人");
|
||||||
|
//if (chargeUser == null)
|
||||||
|
//{
|
||||||
|
// chargeUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole.NAME == "安环部安全员");
|
||||||
|
//}
|
||||||
|
if (chargeUser != null)
|
||||||
{
|
{
|
||||||
chargeUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole.NAME == "安环部安全员");
|
|
||||||
}
|
|
||||||
sendNotices.Add(NotificationTaskService.InsertUserNoticeTaskModel("培训记录完成待审阅-" + record.Nav_Notify.NAME, Guid.Parse(filter.Keyword), filter.GetOrgId(), chargeUser.ID, chargeUser.NAME, DateTime.Now, DateTime.Now.AddDays(2), 1, "SE017_SHOWPRINT"));
|
sendNotices.Add(NotificationTaskService.InsertUserNoticeTaskModel("培训记录完成待审阅-" + record.Nav_Notify.NAME, Guid.Parse(filter.Keyword), filter.GetOrgId(), chargeUser.ID, chargeUser.NAME, DateTime.Now, DateTime.Now.AddDays(2), 1, "SE017_SHOWPRINT"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
UpdateEntityNoCommit(record, "STATUS");
|
UpdateEntityNoCommit(record, "STATUS");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user