213
This commit is contained in:
parent
a6ff507885
commit
1fc1ff717e
@ -187,13 +187,13 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
if (orgId.ToString() == "8B3C41AA-51B1-7CE9-1879-248A038C1B5C".ToLower())
|
||||
{
|
||||
pageFilter.FilterGroup.Rules.Clear();
|
||||
var departs = this.GetEntities<T_FM_DEPARTMENT>(t=>t.ENABLE_STATUS == 0,new BaseFilter(orgId));
|
||||
var depart = departs.FirstOrDefault(t=>t.ID == loginDepartmentId);
|
||||
var departs = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(orgId));
|
||||
var depart = departs.FirstOrDefault(t => t.ID == loginDepartmentId);
|
||||
if (depart != null && depart.DEPARTMENT_TYPE == 2)
|
||||
{
|
||||
selectDepatmentIds = departs.Where(t => t.PARENT_ID == depart.PARENT_ID).Select(m => m.ID).ToList();
|
||||
}
|
||||
else
|
||||
else
|
||||
{ selectDepatmentIds.Add(loginDepartmentId); }
|
||||
result = WitOrderPaged(t => !t.NAME.Contains("管理员") && t.ENABLE_STATUS == 0 && !t.PROJECT_ID.HasValue && selectDepatmentIds.Contains(t.DEPARTMENT_ID.Value), pageFilter);
|
||||
}
|
||||
@ -322,7 +322,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
var result = new PagedActionResult<T_FM_USER>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var admiId = this.GetEntity<T_FM_USER>(t => t.CODE == "admin")?.ID;
|
||||
var AH = GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.Nav_Department!=null && (t.Nav_Department.DEPARTMENT_TYPE == 0 || t.Nav_Department.DEPARTMENT_TYPE == 3) && (t.Nav_Department.NAME.Contains("安全环保") || t.Nav_Department.NAME.Contains("安环")));
|
||||
var AH = GetEntity<T_FM_USER>(t => t.NAME != null && t.ID == loginUserId && t.Nav_Department != null && (t.Nav_Department.DEPARTMENT_TYPE == 0 || t.Nav_Department.DEPARTMENT_TYPE == 3) && (t.Nav_Department.NAME.Contains("安全环保") || t.Nav_Department.NAME.Contains("安环")));
|
||||
if (loginUserId == null || loginUserId == admiId || AH != null)
|
||||
{
|
||||
result = WitOrderPaged(null, pageFilter); ;
|
||||
@ -853,7 +853,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
if (userPhoto != null && userPhoto.Any())
|
||||
userPhoto.ForEach(t => t.USER_ID = entity.ID);
|
||||
if (userSign != null && userSign.Any())
|
||||
userSign.ForEach(t => { t.USER_ID = entity.ID;t.Nav_ImgFile = null; });
|
||||
userSign.ForEach(t => { t.USER_ID = entity.ID; t.Nav_ImgFile = null; });
|
||||
if (personTeam != null && personTeam.Count > 0)
|
||||
personTeam.ForEach(i => i.PERSON_ID = person.ID);
|
||||
if (productionUnit != null && productionUnit.Any())
|
||||
@ -938,10 +938,10 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
this.UpdateEntityNoCommit(teamInfo);
|
||||
if (departmentInfo != null)
|
||||
this.UpdateEntityNoCommit(departmentInfo);
|
||||
|
||||
|
||||
if (personTeam != null && personTeam.Any())
|
||||
this.BantchSaveEntityNoCommit(personTeam);
|
||||
|
||||
|
||||
if (deleteBelongRoleIds.Any())
|
||||
this.DeleteEntityNoCommit<T_FM_USER_BELONG_ROLE>(t => deleteBelongRoleIds.Contains(t.ID));
|
||||
if (deleteBelongRoleGroupIds.Any())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user