会议 获取参会人员 改进
This commit is contained in:
parent
c26f4d9da0
commit
66e081bdc4
@ -144,6 +144,25 @@ namespace APT.SC.WebApi.Controllers.Api.SC
|
||||
}
|
||||
}
|
||||
|
||||
if (listUsers != null && listUsers.Any() && (listUsers[0].Nav_Department == null || listUsers[0].Nav_Person == null))
|
||||
{
|
||||
var listDepID = listUsers.Where(e => e.DEPARTMENT_ID.HasValue).Select(e => e.DEPARTMENT_ID.Value).Distinct();
|
||||
var listPersonID = listUsers.Where(e => e.PERSON_ID.HasValue).Select(e => e.PERSON_ID.Value).Distinct();
|
||||
|
||||
if (listDepID.Any() && listPersonID.Any())
|
||||
{
|
||||
var listDep = GetEntities<T_FM_DEPARTMENT>(e => listDepID.Contains(e.ID), null);
|
||||
var listPer = GetEntities<T_FM_PERSON>(e => listPersonID.Contains(e.ID), null, "Nav_Post");
|
||||
foreach (var item in listUsers)
|
||||
{
|
||||
if (item.DEPARTMENT_ID.HasValue)
|
||||
item.Nav_Department = listDep.FirstOrDefault(e => e.ID == item.DEPARTMENT_ID);
|
||||
if (item.PERSON_ID.HasValue)
|
||||
item.Nav_Person = listPer.FirstOrDefault(e => e.ID == item.PERSON_ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var MEETING_ID = new Guid(filter.Keyword);
|
||||
for (int i = 0; i < listUsers.Count; i++)
|
||||
{
|
||||
@ -210,6 +229,10 @@ namespace APT.SC.WebApi.Controllers.Api.SC
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (entity.DEPARTMENT_ID == Guid.Empty)
|
||||
{
|
||||
throw new Exception("会议部门不能为空或者超级管理员不能发布会议!");
|
||||
}
|
||||
Guid LoginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value;
|
||||
if (entity.USER_ID_ORIGINATOR != Guid.Empty && entity.USER_ID_ORIGINATOR != LoginID)
|
||||
{
|
||||
@ -224,7 +247,6 @@ namespace APT.SC.WebApi.Controllers.Api.SC
|
||||
{
|
||||
throw new Exception("请选择会议类型!");
|
||||
}
|
||||
|
||||
if (entity.Nav_Department == null)
|
||||
{
|
||||
entity.Nav_Department = GetEntity<T_FM_DEPARTMENT>(entity.DEPARTMENT_ID);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user