发现BUG
This commit is contained in:
parent
1bc2b649b3
commit
59d564d6d1
@ -227,7 +227,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var result = new PagedActionResult<T_FO_CHANGE_SHIFT_RECORD>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_PreUsers");
|
||||
pageFilter.Include.Add("Nav_AfterUsers");
|
||||
@ -237,7 +237,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var tempDeps = GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId));
|
||||
var departStatus = tempDeps.FirstOrDefault(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CHANGE_SHIFT_RECORD>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -1757,11 +1757,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -1062,11 +1062,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -620,11 +620,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var result = new PagedActionResult<T_FO_CURRENT_CLASS_RECORD>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -791,11 +791,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_ACTIVITY_RECORD>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -752,11 +752,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(null, pageFilter, "Nav_CreateUser", "Nav_JobEventPerson.Nav_User");
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -280,10 +281,11 @@ namespace APT.FM.WebApi.Controllers.Api.FO
|
||||
var result = new PagedActionResult<T_FO_PRE_OPER_SCH>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
|
||||
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_OPER_SCH>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -793,11 +793,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
}
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(express, pageFilter);
|
||||
}
|
||||
|
||||
@ -259,11 +259,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var result = new PagedActionResult<T_FO_TEAM_ACTIVITY>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TEAM_ACTIVITY>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -786,11 +786,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
var result = new PagedActionResult<T_FO_TECH_DISCLOSURE_FROM>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if (loginUserCode.Contains("admin") || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TECH_DISCLOSURE_FROM>(null, pageFilter);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user